王爽<汇编语言> 第十一章 实验十一
assume cs:codesg,ds:datasg
datasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
letterc:push bp
mov bp,sp
push bx
push ax
mov bx,ss:4h[bp]
lt_find:mov al,ds:[bx]
cmp al,0h
je lt_end
cmp al,61h
jb lt_next
cmp al,7ah
ja lt_next
sub al,20h
mov ds:[bx],al
lt_next:inc bx
jmp lt_find
lt_end:pop ax
pop bx
pop bp
ret 2h
start:mov ax,datasg
mov ds,ax
mov ax,0h
push ax
call letterc
mov ax,4c00h
int 21h
codesg ends
end start