Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!ira.uka.de!sun1.ruf.uni-freiburg.de!horlache From: horlache@sun1.ruf.uni-freiburg.de (Ullrich Horlacher) Newsgroups: comp.sys.handhelds Subject: another INPUT-command (was, re: progr. ALPHA) Message-ID: <1990Aug9.201843.3144@sun1.ruf.uni-freiburg.de> Date: 9 Aug 90 20:18:43 GMT Distribution: comp Organization: Rechenzentrum der Universitaet Freiburg, Deutschland Lines: 123 I was just about to write a question about a programmable ALPHA (using in an own INPUT-command) when I read the following mail, which represents ABSOLUTELY that, what I wanted to post by myself: >From: UUCP%"bio_zwbb@jhunix.UUCP" 8-AUG-1990 14:21:15.45 > > First let me say that, in responding to Mr. Wickes' timely and >helpful answer to my question concerning the lack of a programmable >alpha-on in the 48, it is most definitely *NOT* my intention to start a >flame war or a round of HP-bashing, nor to second-guess the 48 design >team. What I *do* wish to do is to initiate a round of constructive user >feedback so that HP might better meet users' needs in future products. >(...) > I have recently tried to write a work-around for this problem, but >with little success. Using "0 WAIT" to catch keypresses while displaying >the graphics screen works, but is too slow when key location numbers must >be converted to alpha characters using user commands (as opposed to >(...) I have the same problem: I want an input-command, which can control the whole screen AND which doesn't erase it when invoking it. The main-reason is, that I have a lot of games (*shame*) programmed on the 28, which I wanted to port to the 48. The PROMPT and INPUT command don't fit exactly the behavior of the IN-command (a programm of my own for the 28), so I converted my IN-programm to the 48. But I'm not happy with its speed. Also I have problems with the type-ahead- buffer, which works not proberly. Say: sometimes some keys are not recognized. I would be very happy, if someone post a better and flexibel input-programm. Nevertheless, here is my version: IN is a program for interactive input, like INPUT in BASIC or readln in Pascal. It returns the input-string to the stack. If you press the ALPHA-key, the program is HALTed and you can do other things, like visit variables, and then CONTinue the program. Program: IN %%HP: T(3)A(R)F(.); \<< \->INL \-> s p t \<< s "" \=/ s ":" + s IFTE 's' STO "" WHILE DUP s SWAP + "_" + p DISP DO UNTIL KEY END DUP 51 \=/ REPEAT DUP IF 61 == THEN DROP LCD\-> \-> s d \<< HALT s "" d \->LCD \>> END DUP IF 55 == THEN DROP 1 OVER SIZE 1 - SUB ELSE t DUP ROT POS 1 + IF DUP 1 \=/ THEN GET + ELSE DROP2 END END END DROP s OVER + p DISP \>> \>> ------------------------------------------------------------------------------ Program: ->INL @ converting-table %%HP: T(3)A(R)F(.); { 93 "." 92 "0" 82 "1" 83 "2" 84 "3" 72 "4" 73 "5" 74 "6" 62 "7" 63 "8" 64 "9" 11 "A" 12 "B" 13 "C" 14 "D" 15 "E" 16 "F" 21 "G" 22 "H" 23 "I" 24 "J" 25 "K" 26 "L" 31 "M" 32 "N" 33 "O" 34 "P" 35 "Q" 36 "R" 41 "S" 42 "T" 43 "U" 44 "V" 45 "W" 46 "X" 52 "Y" 53 "Z" 94 " " } ----------------------------------------------------------------------------- use: 2: 1: IN e.g.: 2: "Value" 1: 3 IN or << CLLCD "Value" 3 IN 'VALUE' STO >> ==> +----------------------+ | | |Value:_ | | | | | +----------------------+ #----------------------------------------------------------------------------# this mail came from Framstag! | asta@dulruu51.bitnet (sometimes known as Ulli Horlacher) | asta@rz.uni-ulm.dbp.de University of Ulm/Danube W-Germany | asta@main01.rz.uni-ulm.de "Waiting for the prompt" -Marillion | framstag@dtupev5a.bitnet #----------------------------------------------------------------------------#