Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvra!prestonb From: prestonb@hpcvra.CV.HP.COM (Preston Brown) Newsgroups: comp.sys.handhelds Subject: Re: hp48 graphics, timings, terminal emulator and more! Message-ID: <21580059@hpcvra.CV.HP.COM> Date: 11 Apr 90 17:08:10 GMT References: Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 17 >I have a question for hp48 gurus out there. For a given keypress I would like >to run a program. I.e. when the user presses (say) key 25.1 (up-arrow) I >would like to run the UPBAT program to move the bat up on the screen. I >have got to do this while moving the ball on the screen so I cannot use >USER mode bindings directly. You can check the keyboard directly with the KEY command. It returns 0 if no key is pressed or the keycode and 1 if a key is pressed. You will still need something like a case statement but a good way to do this is with a list of commands that you index into with the keycode. The most serious problem with real time code are the garbage collects which make the timing unpredictable. If you have a place with extra time you can execute MEM DROP to force a garbage collect, then you will have a little time free from unpredictability. Preston