assume cs:code,ds:data
data segment
db 'Beginners All-purpose Symbolic Instruction Code.',0
data ends
code segment
begin:mov ax,data
mov ds,ax
mov si,0
call letterc
mov ah,4ch
int 21h
;名称:letterc
;功能:将以0结尾的字符串中的小写字母转变成大写字母
;参数:ds:[si]指向字符串首地址
letterc:push ax
s:mov al,[si]
mov ah,0
mov cx,ax
jcxz return
cmp al,61h
jb next
cmp al,91h
ja next
and al,11011111b
mov [si],al
next:inc si
jmp short s
return:pop ax
ret
code ends
end begin