本文为《汇编语言程序设计》1001小节例程。点击链接…进课程主页。
用ret返回
assume cs:codesg, ss:stack
stack segment
db 16 dup (0)
stack ends
codesg segment
mov ax,4c00h
int 21h
start: mov ax,stack
mov ss,ax
mov sp,16
mov ax,0
push ax
mov bx,0
ret
codesg ends
end start
用retf返回
assume cs:codesg, ss:stack
stack segment
db 16 dup (0)
stack ends
codesg segment
mov ax,4c00h
int 21h
start: mov ax,stack
mov ss,ax
mov sp,16
mov ax,0
push cs
push ax
mov bx,0
retf
codesg ends
end start
时间: 2024-09-22 20:18:41