registers in bootloader
Posted: Sat Apr 19, 2003 7:47 am
hey!
I've found this XOS and it starts by doing this:
mov ax,cs
mov ds,ax
mov es,ax
mov fs,ax
mov ax,0x1D0
mov ss,ax
mov sp,0x200
mov ax,0xb800
mov gs,ax
now, few questions: CS is CodeSegment, right? so why is DataSegment put on the same place? and what are ES & FS?
also, why is stack put on 0x1D0 with 512 bytes- is there a rule about this memory layouts or what?
the same with GraphicSegment: is 0xB800 obligated or just free will?
thanks
I've found this XOS and it starts by doing this:
mov ax,cs
mov ds,ax
mov es,ax
mov fs,ax
mov ax,0x1D0
mov ss,ax
mov sp,0x200
mov ax,0xb800
mov gs,ax
now, few questions: CS is CodeSegment, right? so why is DataSegment put on the same place? and what are ES & FS?
also, why is stack put on 0x1D0 with 512 bytes- is there a rule about this memory layouts or what?
the same with GraphicSegment: is 0xB800 obligated or just free will?
thanks