The DEBUG Version of MS-DOS 6.2 always prints a newline, before printing the registers. That way, normal program output can be easier recognized and register output isn't messed up.
The disadvantage is, that for every "t" trace/step command one additional line is printed.
The DEBUG version v1.28 of FreeDOS behaves differently. It doesn't print a new line. If the normal program prints an output, then the register output is appended on the same line, resulting in a messed up register output.
The benefit of this behavior is that when the normal program doesn't output anything, there are more space/lines available for the debug stepping history.
Question, is that behavior by intention or is that a bug?
See the screenshots for comparison.
https://github.com/Baron-von-Riedesel/DOS-debug
there is a new version 2.0 out, also delivered with freedos 2304.
just for info.
If you want to get your problem fixed, please report it directly there. Most FD programmers do not watch this site.
I added a runtime option to my forked debugger project. (It is based on FreeDOS Debug/X.) You can enable the option using a command like
r dco6 or= 8000_0000and then the R command as well as run commands (T, TP, P, G) will display the additional linebreak. If you don't want to build the latest sources yourself, you can download the "current release" archive from https://pushbx.org/ecm/download/ldebug.zip (it will be updated with this change within the next 5 hours as of now, so don't try it before then).Last edit: E. C. Masloch 2023-07-02
Would be possible to add, if you use
install BIOSOUTPUT. The DOS I/O interface does not provide a way to query the current cursor position.If you install
BIOSOUTPUTthen the getinput function is used, even if youuninstall GETINPUTas the latter only affects things if DOS input and output is used.Yes. I did not implement anything like this yet, just speaking hypothetically.
I changed DCO6 8000_0000h to a conditional linebreak. It only works if the output is to int 10h, that is
install BIOSOUTPUTwas used (orinstall INDOS), and I/O is not across a serial port.DCO2 40_0000h now is used to unconditionally display a linebreak.
You should use
r dco6 or= 8000_0000to avoid resetting all other DCO6 flags. And yes, you need both that flag as well as a setup that usesint 10hto write the output. This can be done usinginstall BIOSOUTPUTor its aliasinstall INT10OUTPUT(no side effects), orinstall INDOS(side effect that DOS is no longer called, including that Script for lDebug files cannot be read), orr dco6 or= 100_0000(both input and output done using the ROM-BIOS, side effect that Script for lDebug files cannot be read any longer).There is no reason to put this line before the label. And in both of these lines you misspelled
.SLDas.SID.Missing
or=.Superfluous
Rat the end. And you don't have to put that into the file if A. you never use lDebug as a device driver and B. the section is empty anyway so it will never have any effect.Yes, this is possible with lDebug as a bootloaded debugger. Here are some pointers for that:
https://pushbx.org/ecm/dokuwiki/doku.php?id=blog:pushbx:2022:1107_bootable_ldebug_vs_freedos_debugb
https://pushbx.org/ecm/doc/ldebug.htm#invoking-boot
https://pushbx.org/ecm/doc/ldebug.htm#cmdhelp-instsect
Note that a bootloaded kernel or application may re-initialise interrupt vectors intercepted by lDebug, particularly the interrupt 1 (trace) and interrupt 3 (breakpoint) vectors. If this happens then in the best case the debugger will lose control of the machine, in a worse case the machine may crash. You can use something like
tp f_ffff while ! value from linear 0:1 * 4 length 3 dwords in writing silent 4to try to step the debuggee until it tries to modify either of these two vectors. However, conditional tracing is much slower than running like with G.If you do trace (using a scriptlet like the above, or manually) and you come across instructions that would modify the vectors, then you have to skip past these instructions, modifying
ipand possibly other registers to match the expected operation of the kernel.Basically you run a DOS and use
instsect A:(program included inldebug.zip) or for whatever drive you want to make bootable. You copyldebug.comto the root directory of the same drive. You can include anldebug.sldwith the:bootstartupsection if you want to include debugger settings. (install getinputandinstall biosoutputare both useless but don't do any harm in bootloaded mode.) Now you need to arrange it so the drive you set up is booted, this depends on the machine you're using and may involve an MBR loader if the drive is a partition on a partitioned disk.Here's a recent post of mine with an example to create a bootable diskette image with ldosboot, bootimg, and lDebug: https://retrocomputing.stackexchange.com/questions/27275/creating-8086-binary-larger-than-64-kib-using-nasm-or-any-other-assembler/27279#27279 The advantage over using instsect is that you can create the entire image from a host system like Linux, instead of needing a DOS step.
Once you're in the booted lDebug you can use commands like
boot fdaorboot fdborboot protocol MSDOS6 hda1(There are many predefined protocols as well as settings for modifying them.)boot quitwill try to shut down the machine.qwill uninstall the debugger and continue at the current debuggee client cs:ip.Yes. This is why I created this mode, in part.
No, the only networking that lDebug can do is to connect to a serial terminal for the debugger interface. The settings default to the COM2 port at 9600 baud, but can be changed before you connect. See https://pushbx.org/ecm/doc/ldebug.htm#interface-serial
You can capture the output of lDebug on the remote machine and eg reconstruct data from dumps, or feed data with lDebug enter commands to the terminal. However, there is no support for any specific protocols for file transfer.
Also no. The only disk accesses that bootable lDebug supports are:
It should work to write lDebug to a diskette for that drive. Once lDebug has loaded and is done executing the ldebug.sld file, swap the diskette for the one with your booter. Now enter a
boot fdacommand to lDebug and it should "just work".Note that for FAT12 file system access (including to boot itself), lDebug needs the ROM-BIOS to report the correct geometry that matches the file system. If this is not the case, it is possible to patch lDebug and the ldosboot boot sector loader.
There are three parts to patch:
/q nonein particular.ldebug /f ldebug.comorldebug /f+ /e+ ldebug.comthen load the patch script usingy patch.sld.)ldpyou need to set theBOOTUNITFL00(or whatever drive you booted) to reflect the proper patch. This can be carried over from the iniload query patch using its flag 80h. These variables aren't documented well yet, pointers are https://hg.pushbx.org/ecm/ldebug/file/27bafee89139/source/expr.asm#l2523 and https://hg.pushbx.org/ecm/ldebug/file/27bafee89139/source/debug.mac#l724 and https://hg.pushbx.org/ecm/ldebug/file/27bafee89139/source/boot.asm#l20If your ROM-BIOS loader has the option, you can boot lDebug from drive B:. If not then swapping the diskettes as I described is your best bet.
It probably doesn't use the unit number passed to it from the prior loader. A lot of kernels assume that they run off unit 00h or 80h.
You're free to add features like this. I'd rather work on sending data across the serial terminal link though, that is rather more within my abilities.