首页 > 代码库 > 汇编实验十:编写子程序

汇编实验十:编写子程序

预备知识:

(1)

ret  :修改IP  IP = SS*16 + SP   SP+=2

retf :修改CS,IP  IP = SS*16 + SP ,SP+=2 , CS = SS*16 + SP , SP+=2

Source Code:

技术分享
assume cs:codestack segment    db 16 dup (0)stack endscode segment    mov ax,4c00H    int 21H    start:        mov ax,stack        mov ss,ax        mov sp,16        push ax        mov bx,0        retcode endsend start
View Code

 

汇编实验十:编写子程序