8088汇编出错
我在编译SCB-1单板计算机与PC机通讯的程序时出现问题(见程序)程序来源于SCB-1说明书的附录。使用masm for windows 2009.7集成实验共享版。烦请各位老师给予指正。问题出在哪。谢谢;TRANSLATE FLLES
STACK SEGMENT PARA STACK 'STACK'
DB 256 DUP (0)
STACK ENDS
DATA SEGMENT PARA PUBLIC 'DATA'
PCB DB 37 DUP (0)
DTA DB 256 DUP (0)
COUNT DB 0
INMSG DB 'INPUT FILENAME;',10,13,'$'
ERRMSG DB 'PILE ACESS ERROR !',10,13,'$'
ERR DB 'INPUT ERROR ! $'
COMERR DB 'TRANSMITTING ERROR!',10,13,'$'
DATA ENDS
CODE SEGMENT PARA PUBLIC 'CODE'
START PROC FAR
ASSUME CS: CODE, DS: DATA
ASSUME ES: DATA, SS: STACK
PUSH DS
MOV AX, 0
PUSH AX
MOV AX,DATA
MOV ES,AX
MOV DS,AX
MOV DX,3FBH
MOV AL,80H
OUT DX,AL
MOV DX,3F8H
MOV AL,0CH
OUT DX,AL
MOV DX,3F9H
MOV AL,0
OUT DX,AL
MOV DX,3FBH
MOV AL,1BH
OUT DX,AL
MOV DX,3F9H
MOV AL,0
OUT DX,AL
MOV DX,OFFSET DTA
MOV AH,1AH
INT 21H
;RECEIVER FILENAME PUT IT IN FCB
PLE: CALL SETFCB
MOV DX,OFFSET FCB 编译OBJ文件时提示FCB:符号没有定义
MOV AH,0FH
INT 21H
CMP AL,0
JNZ PLE
MOV WORd PTr FCB+OCH,0; 编译OBJ文件时提示FCB:符号没有定义
MOV WORd PTr FCB+OCH,1 ;编译OBJ文件时提示FCB:符号没有定义
MOV FCB+20H,0
AGAIN2: MOV CH,2
MOV BH,0
AGAIN: MOV DX,OFFSET FCB 编译OBJ文件时提示FCB:符号没有定义
MOV AH,14H
INT 21H
CMP AL,0
JNZ ERROR
MOV AL,DTA
CMP AL,1AH
JZ EOF
CALL DISPCHAR
CMP AL,40H
JC SMALL
SUB AL,55
JMP ROT
SMALL: SUB AL,48
ROT: DEC CH
JZ ATOB
MOV BH,AL
JMP AGAIN
ATOB: CALL BCD
; CALL DISPCHAR
SEND: MOV DX,3FDH
IN AL,DX
TEST AL,20H
JZ SEND
MOV DX,3F8H
MOV AL,BH
OUT DX,AL
;CALL DISPCHAR
JMP AGAIN2
CERR: MOV DX,OFFSET COMERR
MOV AH,10H
INT 21H
RET
ERROR: MOV DX,OFFSET ERRMSG
MOV AH,9
INT 21H
RET
EOF: MOV DX,OFFSET FCB ;编译OBJ文件时提示FCB:符号没有定义
MOV AH,10H
INT 21H
GOBACK: RET
START ENDP
SETFCB PROC NEAR
STA: MOV DX,OFFSET INMSG
MOV AH,9
INT 21H
MOV AH,1
INT 21H
CMP AL,'A'
JZ X1
CMP AL,'B'
JZ X1
CMP AL,'C'
JZ X1
CMP AL,'D'
JZ X1
JMP TEST1
X1: SUB AL,40H
MOV FCB+00H,AL ;编译OBJ文件时提示FCB:符号没有定义
JMP IN ;编译OBJ文件时提示 IN:语法错误
TEST1: CMP AL,'a'
JZ X2
CMP AL,'b'
JZ X2
CMP AL,'c'
JZ X2
CMP AL,'d'
JZ X2
JMP USED
ERROR1: MOV DX,OFFSET ERR
MOV AH,9
INT 21H
JMP STA
X2: SUB AL,60H
MOV FCB+00H,AL ;编译OBJ文件时提示FCB:符号没有定义
IN: MOV AH,1 ;编译OBJ文件时提示MOV: 语法错误
INT 21H
CMP AL,':'
JZ NAME ;编译OBJ文件时提示NAME: 语法错误
USED: MOV FCB+00H,00H ;编译OBJ文件时提示FCB:符号没有定义
JMP FIRST
NAME: MOV COUNT,1
MOV DI,OFFSET FCB+1 ;编译OBJ文件时提示FCB:符号没有定义
LOP: MOV AH,1
INT 21H
FIRST: CMP AL, ','
JNZ GOON
FC9: CMP COUNT,9
JNZ BLANK
JMP SET1
BLANK: MOV AL,' '
STOSB
INC COUNT
JMP FC9
GOON: CMP COUNT,9
JZ ERROR1
STOSB
INC COUNT
JMP LOP
SET1: MOV AH,1
INT 21H
MOV FCB+9,AL ;编译OBJ文件时提示FCB:符号没有定义
MOV AH,1
INT 21H
MOV FCB+10,AL ;编译OBJ文件时提示FCB:符号没有定义
MOV AH,1
INT 21H
MOV FCB+11,AL ;编译OBJ文件时提示FCB:符号没有定义
MOV AL,0DH
CALL DISPCHAR
MOV AL,0AH
CALL DISPCHAR
RET
SETFCB ENDP
;DISPLAY A WORD
DISPCHAR PROC NEAR
PUSH BX
MOV BX,0
MOV AH,14
INT 10H
POP BX
RET
DISPCHAR ENDP
;CHANG ASCII TO BCD
BCD PROC NEAR
PUSH CX
MOV CL,4
XCHG AL,BH
SAL AL,CL
OR AL,BH
MOV BH,AL
POP CX
RET
BCD ENDP
CODE ENDS
END START