||6 months ago|
|Makefile||6 months ago|
|README.md||6 months ago|
|mon8086.asm||6 months ago|
A control monitor program for the Intel 8086 in a single sector (512 bytes)
Its main use it to help me debugging disk i/o and boot issues on IBM PC compatibles.
make. Requires the NASM assembler.
How to get it running
You can run
make qemu to make it run in qemu.
If you want to run it on a real machine, you need to write it to the boot sector first:
dd if=mon8086.bs of=/dev/sdb1.
There is no real line editing - key presses have instant effect.
- D: Dump the memory at the memory pointer. The pointer is advanced by the dumped bytes.
- E: Edit bytes at the memory pointer. You can cancel the editing by pressing space.
- S: Edit the segment of the memory pointer.
- O: Edit the offset of the memory pointer.
- R: Show the register set and next instruction bytes.
- V: This command expects a two-character argument naming the register to be changed. It allows then to edit the register value.
- G: Start execution at CS:IP address
- T: Single-step a single instruction at CS-IP
Several commands allow the user to edit a value. While editing, pressing space results in the value being discarded. The monitor will then return to the prompt. This is useful for the inspection of values.
Hexdump the bios data area
S 0040 O 0000 D
Query drive parameters
E B4 08 B2 80 CD 13 CC G
Replace the 80 with the bios drive number (00, 01 and 80 are common values). The results are spread over the CX and DX registers, check Ralf Browns Interrupt List or your BIOS documentation for INT 13h/AH=8 on how to interpret the results.
Boot arbitrary drive
O 7BF2 E B8 01 02 B9 01 00 BA 80 00 BB 00 7C CD 13 V IP 7BF2 G
Replace the 80 with the bios drive number (00, 01 and 80 are common values).
Reboot the machine
V CS FFFF V IP 0000 G