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

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 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.

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