Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

FreeDOS on SBC188 (Announce)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 13.09.2020, 21:39

> 4. If you want, I can give you further instructions on how to debug the
> failing loader. The files i12debug.com (run with "A:") and ldebug.com (copy
> to the diskette) in this archive can be used to set up my bootable
> debugger. Then "ifd12org.com A: /F1=TESTPL.COM
> /B=A:\b12test.bin" can be used to generate a chainloadable boot
> sector dump with the failing loader. Next, boot the debugger, and try
> running the BOOT
> command "boot protocol chain b12test.bin" then
> "q". If this displays the test payload status dump something
> strange is going on. If it hangs the same way as that loader otherwise
> does, we can actually debug it. (If you want to do this, tell me and I'll
> get around to it within the week.)

I got around to a very simple test right away. Here's what I did (using dosemu2):

$ dd if=/dev/zero of=../diskette.img bs=1 count=$((1440 * 1024))
$ touch autoexec.bat
$ dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "format A:"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "ifd12quc.com A: /F1=TESTPL.COM"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "copy testpl.com A:"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "copy C:kernel.sys A:"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "copy D:\\dosemu\\exitemu.com A:"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "copy C:command.com A:"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "copy autoexec.bat A:"

{press Enter each time for the format application's prompts}

$ dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "ifd12org.com A: /F1=TESTPL.COM /B=A:\b12test.bin"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "i12debug.com A:"; dosemu -dumb -quiet -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -E "copy ldebug.com A:"; dosemu -dumb -K "$PWD" -I "floppy { threeinch device ../diskette.img }" -A


How to set up the diskette:

1. Format it, leave the volume label empty.

2. Copy testpl.com to the file system. Important: This should be the very first file to copy onto it. (Not needed to boot it generally, but important to make the cluster numbers the same as those I got.)

3. Copy other files, such as the debugger, the FreeDOS kernel, FreeCOM (FreeDOS command.com), etc.

4. Create empty autoexec.bat for FreeCOM. (Otherwise it will prompt for date and time during startup.)

5. ifd12org.com A: /F1=TESTPL.COM /B=A:\b12test.bin

6. i12debug.com A:

7. Boot it.

Next, to debug the loader in a very basic way, we can tell the debugger to step through it until execution leaves the boot loader. I uploaded a recording of the debugger I/O for this in https://ulukai.org/ecm/test/20200913.txt

First you need to enter boot protocol chain b12test.bin and then the following: tp fffff while !( cs != 7C0 && cs != 0 && cs != 1FE0 || ip < 7C00 || ip > 7C00+#512 ) silent

This may not be sufficient to debug the loader but it will probably tell us something about how it fails.

---
l

 

Complete thread:

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