You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
mov ss, 1
|
|
mov sp, 0x10 ; 从 0x00 ~ 0xf 是栈的空间 0x10 - 1 = 0xf
|
|
jmp start
|
|
|
|
init_d:
|
|
mov d, 0x10
|
|
ret
|
|
|
|
increase_d:
|
|
inc d
|
|
cmp d, 0x15
|
|
jz increase_d_end
|
|
|
|
jmp increase_d
|
|
|
|
increase_d_end:
|
|
ret
|
|
|
|
start:
|
|
call init_d
|
|
call increase_d
|
|
|
|
; 下面是查看栈是否回归正常
|
|
push 0xf0
|
|
push 0xf1
|
|
push 0xf2
|
|
push 0xf3
|
|
hlt
|
|
|