王爽《汇编语言》问题7.9 将datasg段中每个单词的前4个字母改为大写字母

assume cs:codesg,ds:datasg

datasg segment
        db '1. display      '
        db '2. brows        '
        db '3. replace      '
        db '4. modify       '
datasg ends

stack segment
        dw 0,0,0,0, 0,0,0,0
stack ends

codesg segment
start:
        mov ax,datasg
        mov ds,ax
        mov di,0
        mov cx,4
        mov ax,stack
        mov ss,ax
        mov sp,10H

      s:
        push cx
        mov cx,4

      k:
        mov bl,[di+03]
        and bl,11011111B
        mov [di+03],bl
        inc di
        loop k
        pop cx

        add di,0cH
        loop s

              mov ax,4c00H
        int 21H

codesg ends

end start

你可能感兴趣的:(ASM)