[Coco] Color BASIC and "CURLIN" (direct versus in a program)
Allen Huffman
alsplace at pobox.com
Thu Oct 23 21:00:31 EDT 2025
Question for those who have explored Color BASIC ROM:
I see that when a program prints the OK prompt, it does this:
LAC73 JSR LB95C MOVE CURSOR TO START OF LINE
LDX #LABE1-1 POINT X TO ‘OK’, CR MESSAGE
JSR LB99C PRINT ‘OK’, CR
LAC7C JSR LA390 GO GET AN INPUT LINE
LDU #FFFF THE LINE NUMBER FOR DIRECT MODE IS $FFFF
STU CURLIN SAVE IT IN CURLIN
Tonight I found out that when a program ends, such as hitting BREAK, the CURLIN still contains the last line that was executed. As you type your command, it is not until AFTER the input that the line is set to “direct mode”. This seems odd. The parsing of the line comes later, so it does not appear to be preserving the line in case you type “CONT” or something.
I have a RAM hook patch I am working on that lets you embed cursor movements in a PRINT command, similar to how they worked on my VIC-20. I wanted to make it NOT do that when LISTing the program or typing the line in. BUT, after a BREAK, that one line will be processing the characters. Any lines typed after that, will not.
I thought I had a clever way to know when to process the special characters (any time NOT in direct mode) but this bit of ROM code prevents that from working
Anyone been down this road?
Blog post that explains what I am working on:
https://subethasoftware.com/2025/10/17/hacking-the-color-basic-print-command-part-2/
Part 3 posts tomorrow, which adds support for up, down, left and right.
--
Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
More information about the Coco
mailing list