registers in bootloader

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
nitroglycerin

registers in bootloader

Post by nitroglycerin »

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
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:registers in bootloader

Post by distantvoices »

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
Ozguxxx

Re:registers in bootloader

Post by Ozguxxx »

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

Post by nitroglycerin »

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
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:registers in bootloader

Post by distantvoices »

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
Post Reply