课件制作 发表于 2011-7-31 14:32:39

Program terminated normally

下面一段代码编译成exe后,用debug运行到第二个Loop循环上面的add bx,2时用t命令单步调试时总会出Program terminated normally要不然会跳出关闭对话框,如何解决这个问题,怎样改变cs/ip的值,如何能看到最终的结果(用g 也可以看到结果),add bx,2时用t命令单步调试时为什么会出Program terminated normally,程序已经真的结束了吗?为什么?

assume cs:code ,ds:date ,ss:stack
date segment
dw 0101h,0202h,0303h,0404h,0505h,0606h,0707h,0808h
date ends
stack segment
dw 0,0,0,0,0,0,0,0
stack ends
code segment
start:   mov ax,date
   mov ds,ax
   mov ax,stack
   mov ss,ax
   mov sp,16
   mov bx,0
   mov cx,8
s:   push
      add bx,2
   loop s
   
   mov bx,0
   mov cx,8
sss: pop
      add bx,2
   loop sss
      mov ax,4c00h
      int 21h
code ends
end start
页: [1]
查看完整版本: Program terminated normally