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) ?
; removedall comments (because size over 7000cars)
what Mickey-Mouse stuff are you using giving you that limit?
IS that actually the Keil assembler?
"size over 7000cars"
Is that a limit of this forum, or of the assembler?
yes, it is a forum limitation, for max number of char inside the message
my *.lst file is over 12K (with adresses and comments) is it possible to join a *.txt file or *.zip file ? i did not see about this possibility as on other forum.
is it possible to join a *.txt file or *.zip file ?
I suspect you mean 'attach'.
Not on this forum. But anyway, I don;t think there are many professionals here who would give the time to just freely look at a 12K+ list file. Better to just give the relevant portion.
I certainly wouldn't bother to open up a file of that size without being paid.
asm portion
**************************** ; ; ; ORG 0000H JMP START ORG 0003H RETI ORG 000BH LJMP INTT0 ORG 0013H RETI ORG 001BH LJMP INTT1 ORG 0023H RETI ; Main procedure .. etc ....
and after compile ..
A51 MACRO ASSEMBLER CLOCK DATE 30/01/18 PAGE 1 MS-DOS MACRO ASSEMBLER A51 V4.4 OBJECT MODULE PLACED IN CLOCK.OBJ ASSEMBLER INVOKED BY: A51 CLOCK.ASM LOC OBJ LINE SOURCE 1 ; *** _________________________^ *** __________________________^ *** ___________________________^ *** ERROR #4, LINE #1, BAD (OR MISUSED SPECIAL) CHARACTER *** ERROR #4, LINE #1, BAD (OR MISUSED SPECIAL) CHARACTER *** ERROR #4, LINE #1, BAD (OR MISUSED SPECIAL) CHARACTER 2 ; 3 ; 0000 4 ORG 0000H 0000 020024 5 JMP START 6 0003 7 ORG 0003H 0003 32 8 RETI 000B 9 ORG 000BH 000B 020055 10 LJMP INTT0 0013 11 ORG 0013H 0013 32 12 RETI 001B 13 ORG 001BH 001B 0200A9 14 LJMP INTT1 0023 15 ORG 0023H 0023 32 16 RETI 17 18 ; Main procedure
i can't see what is the error in the line #1 ?
Your first line is:
****************************
did you copy/paste it here correctly?
If you did, then you need to realise that the assembler will try to interpret that line. For it to be a comment it must start with a semi colon.
If in doubt, just delete the whole of line 1. It's only there to make the code look pretty, and it fails badly with that task anyway!
Again, is this actually the Keil assembler?
Here is an example of Keil's A51 listing: http://www.keil.com/support/man/docs/a51/a51_xc.htm
Note that it does not say anything about MS-DOS ...
"i can't see what is the error in the line #1 ?"
Look again:
What needs to be the first character on a comment line ... ?
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.
Seriously? I mean come on man, how much more brutally can the tool point you at exactly the things it objects to, short of sending an actual person who beats you over the head with them?
1 ; *** _________________________^ *** __________________________^ *** ___________________________^ *** ERROR #4, LINE #1, BAD (OR MISUSED SPECIAL) CHARACTER *** ERROR #4, LINE #1, BAD (OR MISUSED SPECIAL) CHARACTER *** ERROR #4, LINE #1, BAD (OR MISUSED SPECIAL) CHARACTER
What you're looking at there is one of those supposedly clever ideas that are actually completely bone-headed: a byte order mark in an UTF-8 encoded text file, where it's not needed at all. Turn that off in your text editor, and never think of this nonsense again.
And for Pete's sake, consider using a version of the tools that isn't older than yourself!
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.