分析:
利用 and 11011111b 将小写改为大写
子程序代码:
letterc:
push ax
push si
s0:mov al,[si] # 将ds:[si]处的字节传入al
cmp al,0 # 判断是否已经到了字符串尾部
je s2 # 到尾部了跳转到退出
mov ah,'a'
cmp al,ah
jb s1 # al中的值小于'a'对应的值则跳转s1
mov ah,'z'
cmp al,ah
ja s1 # al中的值大于'z'对应的值则跳转s1
and al,11011111b # 小写转大写
mov [si],al # 转换完成的值传回
s1:inc si
jmp short s0 # 跳转至s0
s2:pop si
pop ax
ret