;分析一个奇怪的程序
assume cs:codesg
codesg segment
mov ax,4c00h
int 21h
start:
mov ax,0
s: nop
nop
mov di,offset s
mov si,offset s2
mov ax,cs:[si]
mov cs:[di],ax
s0: jmp short s
s1: mov ax,0
int 21h
mov ax,0
s2: jmp short s1
nop
codesg ends
end start
;这个程序 首先把s2处的指令复制到s处,然后通过跳转
;到s处,此时执行原s2处的jmp short s1,但这里有一个
;要注意的是,jmp short是短转移,存储的是位移,所以
;实际是向上跳转到mov ax,4c00h处,然后程序结束,s1处
;的代码不曾执行过
;分析一个奇怪的程序 jmp short s
最新推荐文章于 2022-08-28 22:14:37 发布