Re: Color BASIC and "CURLIN" (direct versus in a program)

William Astle via Coco <coco-uNHYcr1XS/wmlAP/[email protected]>
Newsgroups gmane.comp.hardware.tandy.coco
Message-ID <[email protected]>
On 2025-10-24 13:01, Allen Huffman via Coco wrote:
>> On Oct 24, 2025, at 1:56 PM, William Astle via Coco <[email protected]> wrote:
>>
>> You can theoretically intercept PRINT but it's truly miserable to do if you need to do anything on actual character output. But you might be able to intercept PRINT, set a flag, and then intercept the command interpretation loop to reset the flag before command dispatch. That's a bit weird to accomplish, but it's doable.
>>
>> You can check how Extended Basic intercepts CLOADM or how Disk Basic intercepts PMODE to figure out how you might set a flag based on whether PRINT is running.
> 
> Thanks — I’ll look at those for examples.
> 
> I was trying to find out how it knows what token was just parsed, but the code is fancier than my brain can currently understand.

I believe you'll want to look at the "Command interpretation loop" 
(RVEC20) and the "Crunch" (RVEC23) handlers. Yes, really. The 
tokenization routine. It's a hack to work around some unfortunate 
weirdness in the structure of Basic's main loop. Incidentally, Disk 
Basic 1.1 completely replaces the entire command interpretation main 
loop in its handler, apparently needlessly (it has a reason but it's not 
really important). I mention that so you can avoid being confused about 
what it's doing.

-- 
Coco mailing list
[email protected]
https://pairlist5.pair.net/mailman/listinfo/coco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.