mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
Merge 910ada89f0
into ce8e050d24
This commit is contained in:
commit
87f57bd17c
@ -3,12 +3,12 @@ mov ah, 0x0e ; tty mode
|
|||||||
mov bp, 0x8000 ; this is an address far away from 0x7c00 so that we don't get overwritten
|
mov bp, 0x8000 ; this is an address far away from 0x7c00 so that we don't get overwritten
|
||||||
mov sp, bp ; if the stack is empty then sp points to bp
|
mov sp, bp ; if the stack is empty then sp points to bp
|
||||||
|
|
||||||
push 'A'
|
push 'A' ; pushes 2 bytes onto the top of the stack since the CPU is in 16bit mode
|
||||||
push 'B'
|
push 'B'
|
||||||
push 'C'
|
push 'C'
|
||||||
|
|
||||||
; to show how the stack grows downwards
|
; to show how the stack grows downwards
|
||||||
mov al, [0x7ffe] ; 0x8000 - 2
|
mov al, [0x7ffe] ; 0x8000 - 2 (each character takes 2 bytes due to 16bit boundaries)
|
||||||
int 0x10
|
int 0x10
|
||||||
|
|
||||||
; however, don't try to access [0x8000] now, because it won't work
|
; however, don't try to access [0x8000] now, because it won't work
|
||||||
|
Loading…
Reference in New Issue
Block a user