- 分享
- 0
- 人气
- 0
- 主题
- 16
- 帖子
- 195
- UID
- 182764
- 积分
- 152
- 阅读权限
- 13
- 注册时间
- 2008-11-29
- 最后登录
- 2015-5-11
- 在线时间
- 615 小时
|
还是找不到适合的,和老师教有点差别。
.MODEL SMALL
.STACK 100H
.DATA
msg1 DB "PLS ENTER A CHARACTER: $"
msg2 DB 0DH,0AH,"THIS IS UR INPUT: $"
arraylist LABEL BYTE
MAX DB 10
ACT DB ?
arraydata DB 10 DUP (?)
;------------------------------------------
.CODE
MAIN PROC FAR
MOV AX, @DATA ;initiate date segment
MOV DS,AX
MOV AH,0AH
LEA DX, arraylist
INT 21H
MOV AH,09H ; display 1st msg
LEA DX,msg1
INT 21H
MOV AH, 01H ;01 = input 1 character
INT 21H
MOV BL,AL
MOV AH, 02H ;02 = OUTPUT A CHAR
MOV DL, 0DH
INT 21H
MOV DL, 0AH ;0A = input a string
INT 21H
MOV AH,09H ;09 = output a string
LEA DX,msg2
INT 21H
MOV AH,02H ;output 1 character
MOV DL,BL
INT 21H
MOV AH,07H ;07 = input 1 char with no echo
INT 21H
MOV AX, 4C00H ;4CH = terminate program
INT 21H
MAIN ENDP
END MAIN
红字是我不懂的,可以帮我吗,谢谢!! |
|