汇编语言
dxgxx macro buf;宏定义,将大写字母换成小写
local again,next1,next2
mov bx,offset buf
again: mov al,[bx]
.while al!=0
.if al>='A' && al<='Z'
add al,20h
mov [bx],al
inc bx
.else
inc bx
.endif
.endw
endm
.model small
.stack
.data
string db 'HeLLO,eveRyboDy !',0
.code
.startup
dxgxx string
mov bx,offset string
.while [bx]!=0
mov dl,[bx]
mov ah,2
int 21h
.endw
done: .exit 0
end
帮我看看哪里有错,
dxgxx macro buf
local again,next1,next2
mov bx,offset buf
again: mov al,[bx]
or al,al;cmp al,0
jz next2
cmp al,'A'
jb next1
cmp al,'Z'
ja next1
or al,20h
mov [bx],al
next1: inc bx
jmp again
next2: endm
.model small
.stack
.data
string db 'HeLLO,eveRyboDy !',0
.code
.startup
dxgxx string
mov bx,offset string
w1: mov dl,[bx]
or dl,dl;cmp dl,0
jz done
mov ah,2
int 21h
inc bx
jmp w1
done: .exit 0
end
这个说什么宏嵌套有问题啥的,看看啥问题