[Coco] 6309's FSWI

L. Curtis Boyle curtisboyle at sasktel.net
Fri May 3 13:25:31 EDT 2013


Not a bad idea. When developing NitrOS9, we used it for debugging (either dumping values, or the PC, periodically to it in code, to figure out where code was going, how it got stuck in infinite loops, etc.).

L. Curtis Boyle
curtisboyle at sasktel.net



On May 3, 2013, at 11:16 AM, tim lindner wrote:

> I was thinking today about the 6309's V register. I decided you could use
> it to make a "Fast Software Interrupt" instruction.
> 
> So the idea is you have a subroutine that will be called often, but you
> don't want to inline. You would put the address of the subroutine in V and
> EXG V,PC to call it.
> 
> The routine would stack any registers it uses, perform the function, the
> unstack the registers and then EXG V,PC to return to the main program. You
> would save one additional register stacking because you wouldn't use V for
> any other purpose.
> 
> You could also achieve something like self-modifying code by changing the V
> register to point to alternative subroutines.
> 
> -- 
> tim lindner
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 




More information about the Coco mailing list