代码改变世界

王爽实验8 分析一个奇怪的程序

2012-07-05 17:15  youxin  阅读(530)  评论(0)    收藏  举报

题目:分析下面的程序,在运行前思考:这个程序可以正确返回吗?运行后再思考:为什么是这种结果?通过这个程序加深对相关内容的理解。

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

http://www.asmedu.net/blog/user/postcontent.jsp?neighborId=7740&kindId=8867&postId=10867&readSg=1&vs=1

http://www.cnblogs.com/VincentHome/archive/2012/06/19/2555395.html