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.
the error is now : Build target 'Target 1' assembling TEST2.A51... TEST2.A51(1): error A315: unknown #directive 'INCLUDE' Target not created
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).
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
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.
Uppercase is fine for mnemonics, directives, etc, but lower (or mixed) case is definitely better for identifiers.
And comments should certainly not be written in ALL-CAPS.