assume cs:code,ds:data,ss:stack stack segment dw 0,0,0,0,0,0,0,0 stack ends data segment db '1. display ' db '2. brows ' db '3. replace ' db '4. modify ' data ends code segment start: mov ax,data mov ds,ax mov ax,stack mov ss,ax mov sp,10h mov bx,0 mov cx,4 s:push cx mov si,0 mov cx,4 s0:mov al,3[bx+si] and al,11011111b mov 3[bx+si],al inc si loop s0 add bx,16 pop cx loop s mov ax,4c00h int 21h code ends end start
编程:将data段中每个单词的前四个字母改为大写字母(汇编语言(王爽))
最开始跟踪时data段的数据如下:
程序运行完毕后,data段的数据如下: