Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

C's system() & COMMAND.COM (Developers)

posted by bretjohn(R) Homepage E-mail, Rio Rancho, NM, 15.09.2014, 19:24

> DJGPP looks at the extension and executes .COM/.EXE directly if the
> extension is present.
>
> OW seems to do that and also consult a list of what it thinks are
> COMMAND.COM's commands.
>
> For me checking the extension and possibly traversing PATH is good enough.

All very dangerous roads to go down, especially with things like 4DOS around (aliases, BTM files, etc.). Even MS-DOS has an extensibility function (INT 2F.AE00/AE01) that allows you to effectively add your own "internal" commands (via TSR's) to the ones built into the shell. Basically, you can never be certain what all of the "internal" commands (which get processed before any executable file even if they have the same name) really are.

Internal commands are ALWAYS processed first, so even if you find a valid COM/EXE/BAT/BTM with the appropriate name, it may not be what actually gets processed.

 

Complete thread:

Back to the forum
Board view  Mix view
15192 Postings in 1365 Threads, 250 registered users, 17 users online (0 registered, 17 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum