FDOS / freecom

FreeDOS Command Shell (command.com)
http://www.freedos.org/
GNU General Public License v2.0
154 stars 39 forks source link

FreeCOM fails to match any commands in RxDOS 7.24 due to unsupported Int21.6505 #20

Open ecm-pushbx opened 4 years ago

ecm-pushbx commented 4 years ago

Tested with "FreeCom version 0.84-pre2 XMS_Swap [Aug 28 2006 00:29:00]" running on "RxDOS version 7.25 [hg e59148587a27] [2020-01-31]". However, it appears that the current branch head of FreeCOM will be affected too.

(The FreeCOM 0.84-pre7 release's COMMANDG.COM on the same RxDOS kernel version leads to RxDOSINI's message "Halted. Press Ctrl+Alt+Del to reboot." which is a separate problem I will explore at another time.)

Interrupt 21h function 6505h (see RBIL entry and its referenced lists in Format of country information and Format of filename terminator table) is not supported in my RxDOS releases yet, and returns CY set, error 0001h (Invalid function).

This appears to lead to is_fnchar using an uninitialised nlsBuf-derefenced buffer with all zeros. This seems to make docommand detect an empty command line. The response "Bad command or filename - "dir"." is given by FreeCOM then.

I will eventually add support for, at least, a default table for function 6505h to RxDOS 7.25, but arguably FreeCOM should default to initialise the buffer itself if the function is not supported.

ecm-pushbx commented 4 years ago

For the record, I fixed the other problem with a kernel bugfix. Now, the new version seems to run into the same issue as the older one.

PerditionC commented 3 years ago

I believe this should be resolved with cherry picked support for fallback nls values if 650x is unsupported, see commit eb7de78d9764bb5d8abfab1c7414f5e806058502, but I still have to verify.