关于汇编语言的dw
这个是将每个单词前四个字母转大写的代码,我想请问,建立了栈段后,既然dw了8个0,那初始时内存中这块空间中不应该是8个字的0吗,可为什么debug时0b47:0 f,这16个字节不全为零啊?谢谢程序代码:
assume ds:datasg,cs:codesg,ss:stacksg stacksg segment dw 0,0,0,0,0,0,0,0 stacksg ends datasg segment db '1.display ' db '2.brows ' db '3.replace ' db '4.modify ' db '5.arrange ' datasg ends codesg segment start:mov ax,datasg mov ds,ax mov ax,stacksg mov ss,ax mov sp,10h mov bx,0 mov cx,5 s:push cx mov cx,4 mov si,0 y:mov al,[si+bx+2] and al,0dfh mov [si+bx+2],al inc si loop y pop cx add bx,10h loop s mov ax,4c00h int 21h codesg ends end start end