STACK1 SEGMENT STACK
DW 64 DUP(?)
STACK1 ENDS
DATA SEGMENT
input db 0ah,0dh,'change the packed BCD code to the decimal
numbers',0ah,0dh
db 'if you want to quit please press Q or q ......'
db 'press other key to input numbers$'
input1 db 0AH,0DH,'input a BCD code like "10010111b":',0ah,0dh,'$'
BUF1 DB 10 DUP(0)
BUF DB ? ;存放输入的数据
buf2 db 20 ;字符缓冲区
db ?
db 20 dup(0)
buf0 db 10 dup(0) ;存放输入的有效字符串
dat db 2
output db 0AH,0DH,'the number changed into is :',0AH,0DH,'$'
ERROR_MESS DB 'INPUT ERROR!',0AH,0DH,'$'
评论10