Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

EDR-DOS development (Announce)

posted by bretjohn Homepage E-mail, Rio Rancho, NM, 14.08.2023, 21:12

> What do you think about adding to EDR-DOS and maybe to FreeDOS an extended
> Exec() function with variants with for example bit 6 of the AL register set
> (Int21.AX=4B40, Int21.AX=4B41 etc.) to run the program with the line
> command longer than 127 bytes? The long command line would be copied into
> the program environment and would be available under the name CMDLINE as
> the 4DOS interpreter does. It annoys me that it's so short.

It's unnecessary to add new DOS function(s) for this -- there's already a "standard" way to do it. Check the byte value at PSP:80h (the number of characters in the command-line string) and if it's at least 7Eh then look for a CMDLINE environment variable. If the CMDLINE variable doesn't exist then 7Eh is the actual size of the command-line string.

Just as a cautionary note, you shouldn't just automatically look for a CMDLINE environment variable since the user can set that environment variable called CMDLINE to anything they want that has nothing to do with the command-line. You should only use it if the value at PSP:80h is >= 7Eh.

BTW this also works in at least some versions of the Windows command-line shell.

 

Complete thread:

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