[Coco] Keypress Poller

Arthur Flexser flexser at fiu.edu
Sun Feb 17 15:07:38 EST 2008


If you do a JSR $A1C1, the ascii value of the key pressed should be in the A
register, with a zero indicating no keypress.  (You want to keep looping back to
it until you get a nonzero value.)  JSR $A1B1 will give you a blinking cursor
while it waits for a keypress.  (This is from memory, after a lapse of a fair
number of years.)

Art

On Sun, 17 Feb 2008, Charles Shrader wrote:

> Hi fellow Coco Fans!
> 
> My latest "hobby" is in full swing now.  Got my Coco 3 running and I
> just received EDTASM+ and some joysticks from "Cloud 9".  I programmed
> in that assembler program I was having problems with and it works great
> using the EDTASM Cartridge.
> 
> I'm going to learn assembler little by little.  I'm hoping to write a
> very simple routine that simply polls for a keypress (not including any
> 'system keys' and writes the keypress to the screen in the upper left
> hand corner.  The program then polls for the next press and displays
> that character to the right of the first one.  Maybe later I'll get
> fancy and try to code handling a backspace key press, but not yet.  Does
> anyone know if there's a subroutine I can call that polls for a
> keypress?  Does the ASCII value of the keypress end up in a register
> after a key is pressed?
> 
> My Coco 3 ROCKS!!  :-)  Thanks Mark (of Cloud 9) for helping me get back
> into the hobby!
> 
> Thanks!
> 
> Chuck
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.20.7/1283 - Release Date:
> 2/16/2008 2:16 PM
>  
> 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 




More information about the Coco mailing list