masm汇编debug调试字符串大小写转换演示
把“Hello World”这行字符串全部转换为大写
assume cs:codesg,ds:datasg
datasg segment
db 'Hello World$'
datasg ends
codesg segment
start:
mov ax, datasg
mov ds, ax
mov bx, 0
mov cx, 12
s:
mov al, [bx]
and al, 11011111b
mov [bx], al
inc bx
loop s
mov ax, 4c00h
int 21h
codesg ends
end start
演示效果: