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
push si
xunhuan:
mov cl , [si]
mov ch , 0
jcxz over
cmp cl , 97
jb again
cmp cl , 122
ja again
and cl , 11011111B
mov [si] , cl
again:
inc si
jmp short xunhuan
over:
pop si
pop cx
ret
codesg ends
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
push si
xunhuan:
mov cl , [si]
mov ch , 0
jcxz over
cmp cl , 97
jb again
cmp cl , 122
ja again
and cl , 11011111B
mov [si] , cl
again:
inc si
jmp short xunhuan
over:
pop si
pop cx
ret
codesg ends
end begin