显示是这样的错误:
Rebuild target 'Target 1'
assembling 123.asm...
123.asm(5): error A40: INVALID REGISTER
123.asm(5): error A9: SYNTAX ERROR
Target not created
程序:ORG 0000H
AJMP MAIN
ORG 0100H
MAIN:
MOV R1,#DPTR
MOV DPTR,#7FF8H
MOV R7,#08H
LOOP:MOVX @DPTR,A
HER: JNB P3.0,HER
MOVX A,@DPTR
MOV @R1,A
INC DPTR
INC R1
DJNZ R7,LOOP
k1: LCALL DISP
JB P3.2,K2
INC @R1
LCALL DISP
k2: JB P3.3,K1
DEC @R1
LCALL DISP
DISP: MOV A,@R1
MOV B,#10
DIV AB
MOV 20H,A
MOV 21H,B
CLR P2.4
SETB P2.5
MOV A,20H
MOVC A,@A+DPTR
MOV P1,A
LCALL DELAY
CLR P2.5
SETB P2.4
MOV A,21H
MOVC A,@A+DPTR
MOV P1,A
RET
DELAY: MOV R6,#01H
DL0: MOV R5,#61H
DJNZ R5,$
DJNZ R6,DL0
RET
TABLE: DB 0C0H,0F9H,0A4H,0B0H,99H ;
DB 92H,82H,0F8H,80H,90H
END
|