實驗十一
編寫一個程序,將包含任意字符,以0結尾的字符串中的小寫字母轉變成大寫字母
assume cs:codesg
datasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
begin: mov ax,datasg
mov ds,ax
mov si,0
call letterc
mov ax,4c00h
int 21h
letterc: push cx
mov ch,0
s: mov cl,[si]
jcxz endl
cmp cl,97
jb next
cmp cl,122
ja next
and cl,11011111b
mov [si],cl
next: inc si
jmp short s
endl: pop cx
ret
codesg ends
end begin