Hello Kef,
Thanks for the input. I did vaguely recall that I had previously seen functions that returned the state of some of the CCR flags, but did not realize that the IRQ pin was amongst them.
For simple functions like these, I usually like to check out the code that they generate, to determine bytes and cycles. In this case, the source code would have been a macro rather than a function (as there is no JSR and RTS generated). The method used is somewhat unorthodox, to say the least. The following would be the equivalent assembly code.
bih B1 clra dcb 0x65B1: lda #01
How does it work when the branch is not taken? The 0x65 value is an opcode for cphx #, so the instruction becomes
cphx #0xA601. This does nothing except potentially change some CCR flags.
How is it possible to implement a branch within a macro? Can the equivalent of bih *+4; be done with inline code?
Regards,
Mac