Alejandro Murrieta

HC08 C Beginners Guide for CodeWarrior in Variables Declaration

Discussion created by Alejandro Murrieta on May 11, 2007
Latest reply on Jun 26, 2007 by Alejandro Murrieta
Hi everybody!!:smileyhappy:

Does anybody knows about a document where it explains the way of how do special Things using C and codewarrior. Ive been using MC908AP8 for quite a while using only assembler.

Now im having some problems because i do not know how to use C with Assembler, specifically with variable declarations and how to refer to an specific memory location as a variable.

Assume that i have a C code and I invoce a function in ASM. This function stores a result in, to say, $81, now i need that in my  C code, but i have no idea how to do it. Ive tried:

count = 0x81; (failed)

#define count unsigned int 0x81; (failed)

and some other ways that ive found in the Hepl and in the forum.

An example of my code is right here

void main (void)
   asm_code();                      // (It couts something and stores the final count in $81, it wont be over FF )
   count = ????????????; ( I want to say that count = $81)
Thanks a lot, an explanation, a link to some tutorial, a link to any manual, anything, please.