NAME TURN
DSEG SEGMENT
A DB 'PLEASE INPUT (a~z):'搏春燃,'$'
B DB 0AH,0DH,'$'
DSEG ENDS
SSEG SEGMENT STACK
DB 90H DUP(?)
SSEG ENDS
CSEG SEGMENT
ASSUME CS:CSEG,DS:DSEG,SS:SSEG
START:
MOV AX,DSEG
MOV DS,AX
MOV DX,OFFSET A///提基虚示输入
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
MOV BL,AL
SUB BL,20H/森做//转换
MOV DX,OFFSET B
MOV AH,09H
INT 21H
MOV DL,BL
MOV AH,02
INT 21H//输出
MOV AH,4CH
INT 21H/////结束
CSEG ENDS
END START
;/////////////////////////////档丛者///////////////////////////////////////
;// 字 符 矩 阵 //
;// CopyRight CCSoft 2002.11.5 //
;///////////////////////stack segment//////////////行薯//////////////////
STACKS SEGMENT STACK
DB 128 DUP(?)
STACKS ENDS
;///////////////////////data segment///////////////郑瞎//////////////////
DATAS SEGMENT
N DB 0
DATAS ENDS
;///////////////////////code segment/////////////////////////////////
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
;///////////////////////////////////
START PROC FAR
MOV AX,DATAS
MOV DS,AX
MOV AH,01H ;get a character
INT 021H
SBB AL,20H ;get the number of the character
MOV DL,AL
MOV AH, 02H
INT 21H
MOV AX,4C00H ;return to dos
INT 21H
START ENDP
CODES ENDS
END START
;按回车念蔽腔结束程并敬序仔衫
CODES SEGMENT
ASSUME CS:CODES
START:
a: mov ah,01h
int 21h
cmp al,0dh
jz exit
sub al,32
mov dl,al
mov ah,02
int 21h
jmp a
exit: MOV AH,4CH
INT 21H
CODES ENDS
END START