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
registers in bootloader
-
distantvoices
- Member

- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:registers in bootloader
for 0xb8000 - this is the start of the text video memory, where you can put ascii codes to have them output on the screen. unless you don#t have a valid gs prepared for this, you should leave this value in gs untouched even in protected mode.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
-
Ozguxxx
Re:registers in bootloader
Hey, Im just curious, where did you find this code? I was planning to use "xos", ill be happy if you can give link... Thanx...
-
nitroglycerin
Re:registers in bootloader
Shoot me if I'm wrong
but I think that it was on osdev.neopages.net - look under "docs" and "tutorials"
may I say that this site is great for os dev? I downloaded 99% of material available there
may I say that this site is great for os dev? I downloaded 99% of material available there
-
distantvoices
- Member

- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:registers in bootloader
on that page there are many nifty things to find, i admit
) 've found myself a load of good stuff there.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image