RE:Oops:7C00=07C0
Posted: Thu Apr 08, 2004 11:00 pm
Because SI is not calculated right. This is right (I believe, never wrote a bootloader):
[ORG 0x7C00]
start:
JMP 0x0000:setCS ; CS is now 0
setCS:
XOR AX, AX
MOV DS, AX
MOV ES, AX
Better not set FS and GS at this time because your code might be running on a 286 or 8086, without any FS or GS at all.
[ORG 0x7C00]
start:
JMP 0x0000:setCS ; CS is now 0
setCS:
XOR AX, AX
MOV DS, AX
MOV ES, AX
Better not set FS and GS at this time because your code might be running on a 286 or 8086, without any FS or GS at all.