- Assembly code
assume cs:codesg,ds:datasg,ss:stackdatasg segment db 'ibm ' db 'dec ' db 'dos ' db 'vax 'datasg endsstack segment dw 0,0,0,0,0,0,0,0stack endscodesg segmentstart: mov ax,stack mov ss,ax ;这步执行完栈段就不为0了 mov sp,10h mov ax,datasg mov ds,ax mov bx,0 mov cx,4 s: push cx mov si,0 mov cx,3 s0: mov al,[bx+si] add al,11011111b mov [bx+si],al inc si add bx,16 loop s0 pop cx loop s mov ax,4c00h int 21hcodesg endsend start
为什么我开始debug到第2步栈段的内容就不为0了,之前还为0着,求解怎么变的?
------解决方案--------------------------------------------------------
DEBUG也是使用栈保存信息