[Coco] 6309's FSWI
tim lindner
tlindner at macmess.org
Sat May 4 01:46:56 EDT 2013
On Fri, May 3, 2013 at 3:35 PM, Darren A <mechacoco at gmail.com> wrote:
> What is the benefit of using this over JSR/PULS? In native mode, two
> EXG instructions along with the PSHS and PULS in the subroutine would
> take 18+ cycles. An extended JSR along with a PSHS and a PULS
> (including PC) would take 17+ cycles.
>
> If there are no registers to preserve then the EXG method would save 1
> cycle over a JSR/RTS in native mode, but would be 3 cycles slower in
> emulation mode.
You, of course, are correct in your assessment. It turns out to be not a
savings in execution time or code size.
I was never really thinking this would be useful in emulation mode, but
in retrospect it is amazing how slow the EXG instruction is.
It still might be useful if you need to change the subroutine often. But
then you could also use self modifying code to accomplish that faster as
well.
--
tim lindner
More information about the Coco
mailing list