assume cs:code,ds:data
data segment
db "Beginner's All-purpose Symbolic Intruction Code.",0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0
call letterc
mov ax,4c00h
int 21h
letterc:
mov al,[si]
;小写字母的ascii范围[97,122]
cmp al,97 ;小于97 循环到下一次
jb s
cmp al,122 ;大于122,循环到下一次
ja s
and al,11011111b
mov [si],al
s: inc si
cmp al,0
jne letterc
ret
code ends
end start