Guest User

Untitled

a guest
Sep 14th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. How to set the Stack segment
  2. bootloader_start:
  3.  
  4. mov ax, 07C0h ; Set up 4K of stack space above buffer
  5.  
  6. add ax, 544 ; 8k buffer = 512 paragraphs + 32 paragraphs
  7.  
  8. ; NASM syntax
  9. xor ax, ax ; or set ax to whatever segment you wish
  10. mov ss, ax ; IIRC, you can't just go mov ss, 0
  11. mov sp, 0xF000 ; or set sp to whatever you wish
Add Comment
Please, Sign In to add comment