variable in register

Other misc things
Post Reply
joaopa
Member
Posts: 46
Joined: Sat Mar 15, 2014 5:42 pm

variable in register

Post by joaopa »

Hello,

I want to put the value of a variable in the register A of the Z80. Is it possible? Here is an example of I want to do:

Code: Select all

int main(void)
{
uint8_t variable_1=3,variable_2=4, result;
result=variable_1+variable_2;
#asm
ld a, result                         <---------------  It is moraly whait I want to do
#endasm}
}
Any idea how to achievee that?
Thanks in advance.
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Can you give a bit more context as to what you're trying to do? - That will help guide an appropriate answer!
Post Reply