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.
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
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
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?
I used mixed case in assembly... upper-case instructions denotes a program counter change (other than n+1), while the rest of the instructions are in lower-case.
A pop of the ACC would be: pop ACC A pop of the PC would be: POP PC (non-8051)
That is just my preference/style.
"Is this the cause of some still writing assembler in uppercase?"
Can't speak for everyone else, but I've always done my assembler in upper case. IMHO it looks neater and is easier to follow the code - But maybe that's just habit.
Can't see anything wrong with doing it in upper case or lower case ... So long as the style is consistent.