On Wed, 23 Apr 2014, Charlie Hitselberger wrote: > I'm doing this on a PET, but it should be similar for VIC / C=64 / 128 > > On a BASIC 4 PET, the IRQ vector at ($0090) normally points to $E455 which > handles the jiffy clock and scankey and whatever else it does. I'm doing a > screen editor for PETTIL (a Forth) which will essentially be HEX 93 EMIT > BEGIN TIB 80 EXPECT AGAIN , or an infinite loop to accept a line of input > and then ignore it. > >> From Forth, the user types EDIT to invoke the editor mode. Then the user > will experience the same thing you get when you power up the PET, clear the > screen, and start typing/drawing. The cursor will blink, quoting will > work, inserts will be counted, etc... Just like editing PET BASIC. > However, there will be no response when the user hits return. The cursor > will move to the beginning of the next line, scrolling the screen. > > What I would like to do is use the STOP button as an escape key for editor > commands. When the user hits STOP - UP, the entire contents of the screen > (including the 24 byte line wrap table) will be saved to a buffer, and the > previous screen will be pulled out of the buffer and displayed. STOP - > DOWN will stash the entire screen and load the following screen. STOP - S > will save the buffered screens to disk or tape. STOP - L will load a group > of buffered screens from disk or tape. STOP - Q quits the editor, echoes " > OK" and returns to Forth. So that's my design. PET screen editor and Forth > block editor, as intuitive as I can make it. > > I would like to flash the screen (EOR #$80, wait 5 jiffies, EOR #$80) when > the user hits STOP. The PET will go into a loop waiting for the next > keystroke and treat it as an editor command. I don't want the screen to > flash 137 times when the user holds down the STOP key, I only want to > notice and react once to each discrete STOP key press and release event > pair. Any ideas? When writing educational software, we used to disable the stop key so students could not break out of the program. This was done by redirecting the stop vector. You could redirect it to a machine language routine. The vectors are located at: Original BASIC $210-21A Basic 2 & 4 $090-091 wlevak@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org Message was sent through the cbm-hackers mailing listReceived on 2014-04-25 17:00:02
Archive generated by hypermail 2.2.0.