nkeck720 / nos

A command-line based OS written in FASM syntax for i386 and above.
GNU General Public License v2.0
9 stars 5 forks source link

FASM board issue 8 #9

Closed nkeck720 closed 8 years ago

nkeck720 commented 8 years ago

The instruction "mov [boot_drv], dl" will fail because at this point the DS register holds the value 07C0h! The file "KERNEL.ASM" is compiled by FASM using an implicit "ORG 0". This is fine, but since the loader has put this program at the segmented address 1000h:0000h you still have to initialize the DS segment register to 1000h. Alternatively write the following:

Code:

push cs 
push cs 
pop  ds               ;Here DS becomes 1000h 
pop  es 
mov  [boot_drv], dl