Page 1 of 1

How can i debug my bootimage?

Posted: Wed May 07, 2003 6:04 am
by Wacky
Hello,
i've a problem with my bootimage. Now i want to debug it. What is the best programm for this and how to use it?? ???

thx for helping.. WaCkY

Re:How can i debug my bootimage?

Posted: Wed May 07, 2003 6:16 am
by Tim
You can't debug a boot sector/boot loader using a debugger, because no OS is present at that time. You must do it by adding print statements to your code. A good way is to write directly to video memory so you can see where the code is, e.g.:

Code: Select all

mov ax, 0B800h
mov es, ax
mov es:[0], 02000h | 'A'
puts an 'A' in the top-left corner of the screen.