;input a capital letter change it opposite one
data segment
mess db ' please input: ','$'
data ends
;-----------------------------
code segment
assume cs:code,ds:data
;----------------------
start:
push cs
sub ax, ax
push ax
;---------------------------
mov ax, data
mov ds, ax
;---------------------------
again:
lea dx, mess ;ouput message
mov ah, 09
int 21h
mov ah, 01 ;input
int 21h
cmp al, 30h ;if input 0 exit
je exit
cmp al, 61h ;judge the letter
jb next ;the input is't a capital
sub al, 20h
next:
mov dl, al
mov ah, 2
int 21h
jmp again ;move in circles
exit:
ret
code ends
end start
经过修改已经可以了!