汇编程序28:检测点10.2

 1 assume cs:code
 2 //判断程序结束后ax的值,使用call 标号指令
 3 code segment
 4     start:
 5           mov ax,0
 6           call s //将IP,6压栈,随后跳到标号处
 7           inc ax
 8         s:
 9           pop ax //将栈顶数据取出(此处为之前压栈的IP,6),随后赋给ax,所以ax=6
10     mov ax,4c00h
11     int 21h
12 code ends
13 
14 end start

 

posted on 2018-01-29 23:23  叶倾仙  阅读(279)  评论(0编辑  收藏  举报

导航