You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
563 B

*Concepts you may want to Google beforehand: stack*
10 years ago
**Goal: Learn how to use the stack**
The usage of the stack is important, so we'll write yet another boot sector
with an example.
Remember that the `bp` register stores the base address (i.e. bottom) of the stack,
and `sp` stores the top, and that the stack grows downwards from `bp` (i.e. `sp` gets
decremented)
This lesson is quite straightforward, so jump ahead to the code.
I suggest that you try accessing in-stack memory addresses by yourself,
at different points in the code, and see what happens.