BIOS interrupt initalization

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
eliscool

BIOS interrupt initalization

Post by eliscool »

Could someone please tell me what all the registers are initailized to but the BIOS (for your bootsector)? like DX is highbyte = ??h, lowbyte = drive num we booted from right? im pretty sure CS, DS and SS are set to 00h, but what is SP set to? is it 'valid' memory?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BIOS interrupt initalization

Post by Pype.Clicker »

don't be sure of CS and DS : they could be 0x7C0 on some BIOSes.
SS:SP is "guaranteed to be some valid stack " (big enough to handle BIOS interrupts, imho) but you have no guarantee of how big it is, thus if you have function calls, you should better set up a new stack.
eliscool

Re:BIOS interrupt initalization

Post by eliscool »

any of the other registers have useful stuff in them? (eg. like dl has the drive num)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BIOS interrupt initalization

Post by Pype.Clicker »

not to my knowledge
Post Reply