Why is my boot loader's stack segment at 0x3FF (end of Real Mode IVT)?

Posted by Laurimann on Stack Overflow See other posts from Stack Overflow or by Laurimann
Published on 2010-04-29T14:15:53Z Indexed on 2010/04/29 15:07 UTC
Read the original article Hit count: 390

Filed under:
|
|
|
|

Title says it all.

"address 0x500 is the last one used by the BIOS" - en.wikipedia.org/wiki/Master_boot_record

"00000000-000003FF Real Mode IVT (Interrupt Vector Table)" - wiki.osdev.org/Memory_Map_%28x86%29

So can you tell me why NASM places my .com file's stack pointer to 0x3FF while my instruction pointer starts at 0x7c00? To me the most intuitive place for SP would be right below 0x7c00.

Thanks.

© Stack Overflow or respective owner

Related posts about bootloader

Related posts about assembly