Hi,
I'm wrote a small 18F in-line assembly snippet in MPLAB referencing a local C variable. From the results I'm not referencing the C variable correctly.
Any ideas?
unsigned char count = 0;
unsigned char current_count = 10;
count = current_count;
_asm
// Loop until count is 0
start:
DECFSZ count, 1, 0
BRA start
GOTO done
done:
_endasm
I'm wrote a small 18F in-line assembly snippet in MPLAB referencing a local C variable. From the results I'm not referencing the C variable correctly.
Any ideas?
unsigned char count = 0;
unsigned char current_count = 10;
count = current_count;
_asm
// Loop until count is 0
start:
DECFSZ count, 1, 0
BRA start
GOTO done
done:
_endasm