variable in register
Posted: Thu Aug 02, 2018 6:32 am
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:
Any idea how to achievee that?
Thanks in advance.
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}
}
Thanks in advance.