First post, by james.harper
I am trying to get an ancient DOS program working on newer hardware and under Windows XP. It's an upload/download app that talks to a cutting machine, sending and receiving program instructions which are just text files. I fixed one problem in DosBox where it called INT21h function 0x33/0x0b (don't know what that is but I just ignored it instead of crashing DosEmu), and have one final issue to resolve.
Everything works except for sending files. Basically the application doesn't ever see the end of file unless it has an actual EOF (^Z) character in it. It works fine on the original laptop running Win95 DOS with any file though.
I added some debug statements to INT21h 0x3F (read) and found for the working file (with the ^Z at the end) (each read is for one byte):
Read 1 byte
...
Read 1 byte (EOF char)
Read 0 bytes (eg no more data)
success!
and for the not working file (no ^Z)
Read 1 byte
...
Read 1 byte
Read 0 bytes
Read 0 bytes
...
Read 0 bytes forever
So i'm thinking that maybe DOS puts an EOF character in there automatically for the application or something when the file is a text file? I can't see anything to that effect in any of the various documentation for INT21h found via google though.
Can anyone make any suggestions? I'm running DOSBox under Windows, I can't easily bring a Linux machine on site to test if that makes any difference. DOSBox is 0.74 that I have compiled myself. I can't test the distributed binary of 0.74 as my application crashes out immediately when it tries to call INT21h 0x33/0x0b so I need to patch DOSBox to get my application to load at all.
Thanks!
James