[Coco] Inkey loops

Allen Huffman alsplace at pobox.com
Thu Aug 1 12:27:04 EDT 2019


OS-9 lets you set a signal on data read, and go to sleep. When input comes in, the signal wakes you up and you can read. Likewise, you can be doing other things and catch that signal so you don’t need to poll. It’s been awhile since I’ve interfaced with system calls in B09, but it’s doable.

--
Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
Tips accepted: http://www.PayPal.me/AllenHuffman
Sent from my iPad.

P.S. Since 4/15/2014, I have earned over $4050! Sign up using my link and I get credit:
http://swagbucks.com/refer/allenhuffman (Ask me for the tip/howto doc.)

> On Aug 1, 2019, at 10:03 AM, coco at jechar.ca wrote:
> 
> All
> 
> In a basic09 program can you suggest the best way to make an inkey loop without too much
> cpu overhead ie perhaps using a timer function ?
> 
> My previous basic09 programs only used command line parameters rather then interactive input
> after the program was started.
> 
> Charlie
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list