it is better to code it in basic. after all this is the bascom-avr forum.
The problem with asm is that it is different depending on the chip. the compiler handles this automatic.
if you use asm, you can not port your code simple to a different chip.
normally, adjusting the $regfile is sufficient.
but if you include asm, you can not port.
you can use bitwait to wait for a bit state.
of course there are cases where every tick counts, and while asm is not really supported (that you can use it does not mean it is supported) i do not want to stop anyone from coding in asm.
SBRC requires a register and a bit.
thus the Uart_status must have been a register (.def). And the fe0 was a constant from the dat file.
you need a register to load the register content; LDS will do best. :
LDS R23, USARTC0_STATUS
sbrc r23,4 ; skip if bit 4 is cleared in register r23 _________________ Mark
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum