Quick question (6809 assembly)
Posted: Tue Jun 14, 2016 2:01 pm
Apologies for asking this - it feels a little bit like I'm cluttering up the board - but being more of a Z80 man, I'm having a bit of a problem working out how to do this.
On the 6809, what's the easiest way to compare the low 8 bits of the x register (i.e. the address itself, not the contents of memory that it points to)? Basically, if the address in x ends in 0xF then I want to add on a value before my loop continues. Can't see a suitable instruction (but have probably missed it) and the only other thing I can think of is pushing x to the stack and then accessing the memory using the SP, but this seems incredibly wasteful.
Cheers.
R
On the 6809, what's the easiest way to compare the low 8 bits of the x register (i.e. the address itself, not the contents of memory that it points to)? Basically, if the address in x ends in 0xF then I want to add on a value before my loop continues. Can't see a suitable instruction (but have probably missed it) and the only other thing I can think of is pushing x to the stack and then accessing the memory using the SP, but this seems incredibly wasteful.
Cheers.
R