[Color Computer] [Coco] 6809 Test and Set instruction?
Arthur Flexser
flexser at fiu.edu
Tue Jul 11 03:05:00 EDT 2006
On Tue, 11 Jul 2006, James Diffendaffer wrote:
> I think he was asking if the 6809 has an instruction similar to the
> 680x0 test-and-set instruction.
>
> That is, one instruction that tests the state of a bit and sets it.
> The condition code register would let you know the previous state.
> This prevents an interrupt or task switch from changing the bit
> between the time you test it and setting it so that you can restore
> the proper state later without screwing it up for another task.
That shouldn't be an interrupt problem with the 6809, I wouldn't think, since
interrupt servicing restores the condition code register to its entry value when
the RTI occurs, no?
Art
More information about the Coco
mailing list