[Coco] Intercepting commands like POKE?
michaelkline704
michaelkline704 at gmail.com
Thu Jan 4 13:05:59 EST 2024
Would the program Colorkit help provide clues to your project if it was disassembled and analysed?Michael Sent from my Galaxy
-------- Original message --------From: William Astle via Coco <coco at maltedmedia.com> Date: 1/4/24 11:56 (GMT-06:00) To: coco at maltedmedia.com Cc: William Astle <lost at l-w.ca> Subject: Re: [Coco] Intercepting commands like POKE? > I have a project where I’d like to intercept things like PRINT@ and POKE. Does anyone here know anything about that? I don’t even know where to begin, outside of using a 64K machine and going in to ROM-to-RAM mode and just patching BASIC.You'll want to be looking at the "COMVEC" stuff and "RVEC20" as they're named in Unravelled. In particular, you'll want to look at how Extended Basic intercepts CLOAD and CSAVE. To really understand what's going on, you'll want to trace what happens in the interpretation loop at $AD9E. You do have to be careful with RVEC20 since both Extended Basic and Disk Basic 1.1 intercept it. You'll have to re-implement a part of the interpretation loop to intercept commands properly but you can see what's needed by looking at Extended Basic's RVEC20 handler. (Disk Basic 1.1 doesn't actually add anything to the interpretation loop. It only does so to work around a bug in Extended Basic 1.0.)You definitely do *NOT* want to try intercepting commands via the "GETNCH" ($9F) routine as suggested by others. You could do it, but you *really* don't want to. Doing so will slow everything down some amount instead of just command processing and you don't actually have the full context when that routine is called since it's called from all over the place.-- Coco mailing listCoco at maltedmedia.comhttps://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list