i use the keil uvision3 which can be use for c source code and assembler.each time i write a code in A51 i keep getting error in trying to build it(target not created i.e the error message)whic i thought the error is that i dont know the type of header to use in a51 just like we use #include <> in c51.pls try to give me solution to this.
FROM THE TEMPLATE FILE IN KEIL A51.I USED: $NOMOD51 #include <reg52.h> ;THE ERROR MESSAGE WAS:
Build target 'Target 1' assembling TEST2.A51... TEST2.A51(7): error A45: UNDEFINED SYMBOL (PASS-2) Target not created.
PLS HELP ME SOLVE THIS PROBLEM!
You are forward referencing the DELAY routine. Is that the problem (I don't want to test it myself now):
(or you might need to use the $INCLUDE method--depending upon the revision of KEIL I guess)...
#INCLUDE <REG52.h> DELAY: mov R0,#(11) H1: mov R1,#(248) H2: mov R3,#(255) H3: DJNZ R3,H3 DJNZ R1,H2 DJNZ R0,H1 RET BACK: mov A,#(55h) mov P1,A ACALL DELAY mov A,#(AAh) mov P1,A ACALL DELAY SJMP BACK END
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
i try the correction u made above and this was the error message: Build target 'Target 1' assembling TEST2.A51... TEST2.A51(1): error A315: unknown #directive 'INCLUDE' TEST2.A51(23): error A45: UNDEFINED SYMBOL (PASS-2) Target not created
Try the leading zero in the mov A,#(AAh) to mov A,#(0AAh)
#INCLUDE <REG52.h> DELAY: mov R0,#(11) H1: mov R1,#(248) H2: mov R3,#(255) H3: DJNZ R3,H3 DJNZ R1,H2 DJNZ R0,H1 RET BACK: mov A,#(55h) mov P1,A ACALL DELAY mov A,#(0AAh) mov P1,A ACALL DELAY SJMP BACK END
Captain, if you continue posting source code at this rate, Jack Sprat is likely to start complaining about your "cowboy" debugging technics...
the error is now : Build target 'Target 1' assembling TEST2.A51... TEST2.A51(1): error A315: unknown #directive 'INCLUDE' Target not created
No kidding.
i was just trying to see how i can correct this problem.so donot be angry.
Don't make me come down there and fix it! (At this point, you may need a sardine's take on it)
Are you sure about the #include <REG52.H> ? Try localizing it (move REG52.H to the source file directory) and do the #include "REG52.H" thing.
(I really don't want to create a project just do debug this stupid, err, sample code).
I be thinking I ansewrd it in the thread:
http://www.keil.com/forum/docs/thread15468.asp
You be looking at page:
http://www.keil.com/support/man/docs/a51/a51_include.htm
$include NOT #include
ANSI Assembly ?
(knowing too many assemblers can get in the way... not to mention that I've been up since 3:30AM too)
Come on, guys, you both need to look carefully at the error message to see exactly what it is telling you!
Read it literally: "unknown #directive 'INCLUDE'"
It is teling you that 'INCLUDE' is not recognised as a #directive; ie, #INCLUDE is not valid A51 syntax.
The valid syntax for $INCLUDE is shown here: http://www.keil.com/support/man/docs/a51/a51_include.htm
An example using #include is shown here: http://www.keil.com/support/man/docs/a51/a51_in_templatefile.htm
Spot the difference...
thanks guy u are cool.
thanks!the code is now error free. one cup of tea for u.
Read it literally: "unknown #directive 'INCLUDE'" It is teling you that 'INCLUDE' is not recognised as a #directive; ie, #INCLUDE is not valid A51 syntax.
An example using #include is shown here:
finally SHOUTING bites somebody in the largest muscle.
Erik
My first ventures into assembly language (PDP-8) was entered on a teletype (no lowercase characters).
Is this the cause of some still writing assembler in uppercase?