改好了:
DATAS SEGMENT
A DB 9 ;10
DB ?,10 DUP("$")
H DB 10,13,"$"
MSG DB "INPUT: $"
MSG1 DB "NO!$";此處輸入資料段程式碼
DATAS ENDS
STACKS SEGMENT
;此處輸入堆疊段程式碼
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
LEA DX,H
MOV AH,9
INT 21H ;輸出回車鍵
LEA DX,A
MOV AH,10
INT 21H;鍵盤輸入
LEA dx,A ;AX,A
add dx,2
INT 21H ;輸出A值
mov ah,7
int 21h
MOV AH,4CH
INT 21H
CODES ENDS
END START
改好了:
DATAS SEGMENT
A DB 9 ;10
DB ?,10 DUP("$")
H DB 10,13,"$"
MSG DB "INPUT: $"
MSG1 DB "NO!$";此處輸入資料段程式碼
DATAS ENDS
STACKS SEGMENT
;此處輸入堆疊段程式碼
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
LEA DX,H
MOV AH,9
INT 21H ;輸出回車鍵
LEA DX,A
MOV AH,10
INT 21H;鍵盤輸入
LEA DX,H
MOV AH,9
INT 21H ;輸出回車鍵
LEA dx,A ;AX,A
add dx,2
MOV AH,9
INT 21H ;輸出A值
LEA DX,H
MOV AH,9
INT 21H ;輸出回車鍵
mov ah,7
int 21h
MOV AH,4CH
INT 21H
CODES ENDS
END START