Re: command_line() bug in ex.exe 2.4
- Posted by Robert Craig <rds at RapidEuphoria.com> Nov 05, 2004
- 439 views
Juergen Luethje wrote: > }}} <eucode> > -- program cmd_line.ex > include machine.e > constant DOS32 = 1 > > function cmd_line() > sequence registers > integer PSPaddr > > if platform() != DOS32 then return -1 end if > > registers = repeat(0, 10) > registers[REG_AX] = #6200 > registers = dos_interrupt(#21, registers) > PSPaddr = registers[REG_BX]*#10 > return peek({PSPaddr+#81, peek(PSPaddr+#80)}) > end function > > puts(1, "-" & cmd_line() & "-\n") > </eucode> {{{ > > This works fine for me in a DOS box on Win 98 (using Eu 2.4). > Calling on the command line > ex.exe cmd_line.ex "c:\long dirname\" "d:\long dirname\" 123 > displays > - cmd_line.ex "c:\long dirname\" "d:\long dirname\" 123- > > Rob, I can (try to) gather more comprehensive information about this > point, if you want me to do so. It's interesting that you got the DOS interrupt to work. I'll make a note of this and look at it maybe for 2.6. In general I'm a bit leary of coding DOS interrupts. I'd rather call a C routine. I know that some interrupts don't work the same (or at all) on all versions of DOS. Maybe you can put this change into the new Public Domain source for 2.5 and people can test it better on more platforms. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com