汇编程序27:检测点10.1

 1 assume cs:code,ss:stack
 2 //实现retf指令,转移到1000:0处指令
 3 stack segment
 4     dw 8 dup(0)
 5 stack ends
 6 
 7 code segment
 8     start:
 9           mov ax,stack //自定义栈区,共16字节
10           mov ss,ax
11           mov sp,16
12           mov ax,1000h //传入起始段地址CS,1000h
13           push ax //压栈
14           mov ax,0 //传入偏移地址IP,0h
15           push ax //压栈
16           retf //依次取出2个字数据,作为新CS:IP
17     mov ax,4c00h
18     int 21h
19 code ends
20 
21 end start

 

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

导航