This shows you the differences between two versions of the page.
— |
blog:pushbx:2024:0214_remote_debugging_of_svarcom_and_dos_navigator_incompatibility [2024-02-14 17:47:26 +0100 Feb Wed] (current) ecm created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Remote debugging of SvarCOM and Dos Navigator incompatibility ====== | ||
+ | |||
+ | Robert recently asked me to help figure out an incompatibility where Dos Navigator | ||
+ | would be unable to execute programs when run on SvarCOM as the shell. | ||
+ | Some details are provided [[https:// | ||
+ | Read on for an overview of how we debugged this. | ||
+ | |||
+ | ===== ===== | ||
+ | |||
+ | My first suggestion upon reading the initial problem description: | ||
+ | |||
+ | < | ||
+ | |||
+ | you can also check with '' | ||
+ | |||
+ | hmm possibly DN sends a " | ||
+ | |||
+ | < | ||
+ | |||
+ | that would explain how svarcom is involved</ | ||
+ | |||
+ | Next, rr shared a patch that would replace Carriage Returns by NUL bytes in the " | ||
+ | |||
+ | < | ||
+ | for that you need to hook 21.4B00 and when the call is coming from there check the parameter block | ||
+ | |||
+ | the command line in the parameter block is copied 1:1 by dos to psp:80h | ||
+ | |||
+ | so svarcom should know how long the command is and at the right spot there should be a CR | ||
+ | |||
+ | 00h 0Dh is an empty line | ||
+ | |||
+ | so the counter at address byte [psp:80h] should not include the CR | ||
+ | |||
+ | if the CR is included by it then it's an error in dn. albeit svarcom of course could fix / work around that | ||
+ | |||
+ | that's just the first idea that I have. if it fits, hurray. if not we are smarter as well</ | ||
+ | |||
+ | To inspect the command line, I suggested a string of lDebug commands: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | tsr | ||
+ | install indos | ||
+ | bp new ptr ri21p when ax == 4B00 | ||
+ | g</ | ||
+ | |||
+ | then with '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | skips the prompt for a new value</ | ||
+ | |||
+ | A few minutes later I provided a more involved lDebug scriptlet: | ||
+ | |||
+ | < | ||
+ | should show you the command line. last dumped byte should be a CR, before that no CRs | ||
+ | |||
+ | just tried it and it also works</ | ||
+ | |||
+ | Next rr noticed he had to skip one call to service 4B00h that presumably originated in SvarCOM loading its transient portion. | ||
+ | Continuing with a '' | ||
+ | My long command proved most useful: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | I concluded this part of the debugging with a statement regarding this result: | ||
+ | |||
+ | < | ||
+ | |||
+ | freecom and ms-dos presumably use only the CR as a terminator | ||
+ | |||
+ | svarcom I assume uses the length byte to find and overwrite the expected (first) CR with a NUL</ | ||
+ | |||
+ | The remainder is just inspection of how Dos Navigator builds its incorrect command line, and various attempts at fixing it. Three workarounds are depicted in the bug report linked above. | ||
+ | |||
+ | {{tag> | ||
+ | |||
+ | |||
+ | ~~DISCUSSION~~ | ||