Unknown bug in boot sector ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Unknown bug in boot sector ?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:21 pm, edited 1 time in total.
gedeon

Re:Unknown bug in boot sector ?

Post by gedeon »

May be this can help you

; code located at 0000:7C00, adjust segment registers
cli
mov ax, 0x07C0
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
sti
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Unknown bug in boot sector ?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:22 pm, edited 1 time in total.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Unknown bug in boot sector ?

Post by Pype.Clicker »

one thing that could help you is adding a checksum at the end of your kernel: edit the last 2 bytes so that the sum of your kernel words is 0. When loading the kernel (or your 2nd stage. that's roughly the same ;) ), check this sum is still 0 before jumping: it should help you telling whether you loaded the whole file correctly or not.
Post Reply