DOS v. Unix/Linux
Posted on 2003-12-04
Ok, so I've been programming C in Unix/Linux for awhile, on and off. My main interest is file I/O, parsing, scanning, etc. However, I now have an assignment (not school related, so don't worry) to write a DOS-based parser in C (for a predefined file schema). However, since I've not written any DOS programs before (other than batch file or QBasic programs), I'm not exactly sure where to start...
I've always used "gcc -ansi -pedantic -Wall -O2" for my Unix work (along with splint/lint), so I don't think non-standard grammar or syntax would be an issue. However, I make a lot of I/O calls that would seem rather specific to Unix. My main question is what do I need to know that is different from Unix to DOS? Is I/O relatively the same (other than file system structure)? Does anyone have good links to DOS C tutorials, particularly with I/O? Is this a question better meant for the C++ section (please don't make me write C++!)? Am I being weird and not realizing that all I/O calls are the same?
I'm reading/writing regular text files, and binary files, so I need to know about both of them. If you could offer any assitance before I just start coding away without direction, I'd much appreciate it!