hello,
it is my first step with AT89C2051 try to assemble this program with A51 assemble .. and at 1srt comile i get 5 erros, i corrected one, wich what clearly indicated in the *.lst result. But they are 3 remainings errors Error 4 Line 1 Nothing suspect (by me !) inside the *.lst result . So , i request an advice from specialist .. what could be thoses errors ?
; date 30.01.2018 ; correction error ligne 233 ; removedall comments (because size over 7000cars) ORG 0000H JMP START ORG 0003H RETI ORG 000BH LJMP INTT0 ORG 0013H RETI ORG 001BH LJMP INTT1 ORG 0023H RETI ; Main procedure START: MOV R0,#70H ; MOV R7,#0BH ; CLEARDISP: MOV @R0,#00H ; INC R0 ; DJNZ R7,CLEARDISP ; MOV 20H,#00H MOV 7AH,#0AH MOV TMOD,#11H MOV TL0,#0B0H MOV TH0,#3CH MOV TL1,#0B0H MOV TH1,#3CH SETB EA SETB ET0 SETB TR0 MOV R4,#14H ; START1: LCALL DISPLAY ; JNB P3.7,SETMM1 ; SJMP START1 ; SETMM1: LJMP SETMM ; ; Timing procedure of one second INTT0: PUSH ACC PUSH PSW CLR ET0 CLR TR0 MOV A,#0B7H ADD A,TL0 MOV TL0,A MOV A,#3CH ADDC A,TH0 ; MOV TH0,A SETB TR0 DJNZ R4, OUTT0 ADDSS: MOV R4,#14H MOV R0,#71H ACALL ADD1 ; MOV A,R3 CLR C CJNE A,#60H,ADDMM ; ADDMM: JC OUTT0 ACALL CLR0 MOV R0,#77H ACALL ADD1 MOV A,R3 CLR C CJNE A,#60H,ADDHH ; ADDHH: JC OUTT0 ACALL CLR0 MOV R0,#79H ACALL ADD1 MOV A,R3 CLR C ; CJNE A,#24H,HOUR ; HOUR: JC OUTT0 ACALL CLR0 OUTT0: MOV 72H,76H MOV 73H,77H MOV 74H,78H MOV 75H,79H POP PSW POP ACC SETB ET0 RETI ; Flicker the procedure while adjusting- INTT1: PUSH ACC PUSH PSW ; MOV TL1, #0B0H MOV TH1, #3CH ; DJNZ R2,INTT1OUT MOV R2,#06H CPL 02H JB 02H,FLASH1 MOV 72H,76H MOV 73H,77H MOV 74H,78H MOV 75H,79H INTT1OUT: POP PSW POP ACC ; RETI ; FLASH1: JB 01H,FLASH2 MOV 72H,7AH MOV 73H,7AH MOV 74H,78H MOV 75H,79H AJMP INTT1OUT FLASH2: MOV 72H,76H MOV 73H,77H MOV 74H,7AH MOV 75H,7AH ; AJMP INTT1OUT ; Add a sub procedure ADD1: MOV A,@R0 DEC R0 SWAP A ORL A,@R0 ADD A,#01H DA A ; MOV R3,A ANL A,#0FH MOV @R0,A MOV A,R3 INC R0 SWAP A ANL A,#0FH MOV @R0,A RET ; Zero clearing procedure CLR0: CLR A ; MOV @R0,A DEC R0 MOV @R0,A RET ; The clock adjusts the procedure SETMM: cLR ET0 CLR TR0 LCALL DL1S JB P3.7,CLOSEDIS MOV R2,#06H SETB ET1 SETB TR1 SET2: JNB P3.7,SET1 SETB 00H SET4: JB P3.7,SET3 LCALL DL05S JNB P3.7,SETHH MOV R0,#77H LCALL ADD1 MOV A,R3 CLR C CJNE A,#60H,HHH HHH: JC SET4 LCALL CLR0 CLR C AJMP SET4 CLOSEDIS: SETB ET0 SETB TR0 CLOSE: JB P3.7,CLOSE LCALL DISPLAY JB P3.7,CLOSE WAITH: JNB P3.7,WAITH LJMP START1 SETHH: CLR 00H SETHH1: JNB P3.7,SET5 SETB 01H SET6: JB P3.7,SET7 LCALL DL05S JNB P3.7,SETOUT MOV R0,#79H LCALL ADD1 ; MOV A,R3 ; CLR C ; CJNE A,#24H,HOUU HOUU: JC SET6 LCALL CLR0 AJMP SET6 SETOUT: JNB P3.7,SETOUT1 LCALL DISPLAY JNB P3.7,SETOUT CLR 01H CLR 00H CLR 02H CLR TR1 ; CLR ET1 SETB TR0 SETB ET0 LJMP START1 SET1: LCALL DISPLAY AJMP SET2 SET3: LCALL DISPLAY AJMP SET4 SET5: LCALL DISPLAY AJMP SETHH1 SET7: LCALL DISPLAY AJMP SET6 SETOUT1: LCALL DISPLAY AJMP SETOUT ; Reveal the procedure DISPLAY: MOV R1,#70H ; MOV R5,#0FEH PLAY: MOV A,R5 MOV P3,A MOV A,@R1 MOV DPTR,#TAB ; ; MOVC A,@ADPTR ; Check that reveals the data correspond to one section of codes <-- 5 ERRORs ; ERROR A4 ; A51: ERROR 4 (BAD INDIRECT REGISTER IDENTIFIER) ;This indicates that the register or register combination is not valid for indirect access. ; For example, @R7, @R3, @PC+A, @DPTR+A. <- ???? MOVC A,@A+DPTR ; Check that reveals the data correspond to one section of codes <--- 3 errors ; ; MOV P1,A ; LCALL DL1MS INC R1 ; MOV A,R5 JNB ACC.5,ENDOUT RL A ; MOV R5,A AJMP PLAY ; ENDOUT: SETB P3.5 MOV P1,#0FFH RET TAB: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,0FFH ; One section of code tables of male genital altogether ; †0″ †1″ †2″ †3″ †4″ †5″ †6″ †7″ †8″ †9″ †Non- bright †; Time delay procedure DL1MS: MOV R6,#14H DL1: MOV R7,#19H DL2: DJNZ R7,DL2 DJNZ R6,DL1 RET DS20MS: ACALL DISPLAY ACALL DISPLAY ACALL DISPLAY RET ; DL1S: LCALL DL05S LCALL DL05S RET DL05S: MOV R3,#20H DL05S1: LCALL DISPLAY DJNZ R3,DL05S1 RET ; ----------------------------- END
message on MDOS windows ( i used DOSBOX 0.74 to use AR1.EXE) inside WIN10
MS-DOS Macro assembler A51 V4.4 Object module palced in clock.obj Assembler invoked by : A51 clock.asm ASSEMBLER COMPLETE 3 ERRORS Found
nota: i can't join the *.lst , because more > 7000 cars
is it possible to joint a file (clock.lst) ?
Tanhk's for answer
but i add manual this ************ to separate the texte, before using the specific tag
in reality this line doesn't existe in my asm file else i know, it needs to add ";" for comment
; ****************
Then the question is what have you actually got as the first line of your file?
Has it an unusual file encoding? Can you open the file with a hex editor and view the hex value of each character in the file?
Some encoding schemes (such as unicode) prefix a file with the encoding details that might be interpreted by an editor or viewer but confuse the hell out of an assembler.
Thank's P.Summer for your valuable answer .
I changed the encoding to Ansi instead of UTF8 .. and compile is now OK , without errors.
Some Geeks on this forum could better think twice before to speak and respect the Old person.