Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

DOS programming

Name: Anonymous 2006-09-22 10:53

Hi guys,

I'm writing a DOS program, and I need to know the largest file number that can be returned. i.e. the value of FILES= in config.sys. Without reading the CONFIG.SYS file or calling INT 21 OPEN until I get error 4, how can I determine what that value is?

Btw Google fails me, I've already tried that

Name: Anonymous 2006-09-22 11:12

Do it the traditional way: decide on your own limit and tell your users to make sure FILES is larger than that.

Hah.

Name: Anonymous 2006-09-22 13:48

>>1
A... DOS program? Anonymous is hardcore. Anyways, do as >>2, nobody ever cared and everybody assumed you'd have enough open files.

Seriously, OSes with open files limit lower than 2^32 are obnoxious and disgusting.

Name: Anonymous 2006-09-22 15:27

Thanks, I just picked 0x13 as the highest as I found that DOS programs only have 20 file handles in the table by default, unless they make a call to expand it (up to the value in FILES=).

It's a DOS TSR linked to a Windows VDD, the purpose of which is to take a printout intended for a dot matrix printer and print it using the windows API to the default laser printer, while also adding in an equivalent of the pre-printed stationary they use on the old printers. To do this I trap the open, write and close int21 calls to certain special filename patterns. The handle I use needs not to clash with the ones that DOS may return, which is why I was looking for a way to determine the highest valid one.

I haven't programmed DOS assembler for years (and never before for money!) so this is a quite a strange nostalgic experience.

Name: Anonymous 2006-09-23 1:31

Do a barrel.rol

Name: Anonymous 2006-09-23 3:59

tap z or r twice

Name: Anonymous 2006-09-23 4:30

>>4
Nice. Good job on doing something both interesting and oldskool!

Name: Anonymous 2006-09-23 12:13

>>7

Name: Anonymous 2009-01-14 14:14

What happened to /prog/?

Name: Anonymous 2009-03-06 11:44


What do you mean The REPL Anyways   debuggers are awesome   I have to   answer correctly to   the txt file   say every hour   or so I   thought that Emacs   is being rewritten   in PERL 1.

Name: Anonymous 2009-08-16 23:23

Lain.

Name: Anonymous 2010-12-06 10:00

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-04 15:40

Name: Sgt.Kabu舻汁kiman쭼뺏 2012-05-28 20:08

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List