Hello all,
I don't even think that a one instruction loop in the SWI ISR (Interrupt Sub Routine) is what Simon Zhu was looking for.
Going to the ISR is using time.
I believe Simon Zhu would like the equivalent of Peg's BRA * to be put anywhere in the code and in one byte, outside any interrupt.
Looking at the HC08 Instruction Table, there is one column dedicated to "Branches" and there is no "one-byte instruction.
Therefore, my answer would be. There is no branch instruction you can use in one-byte.
Using the SWI is one way to work around by inserting a one-byte instruction to jump somewhere else where you would have the space to do a longer code.
Simon, may you please precise ?
Do you want to hack into existing ASM code to add this infinite loop ? It looks like it to me.
David,
I don't understand the last part of your contribution on the few minutes to spare. Can you please explain to me what you mean ?
Alfred.