Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!mit-eddie!ll-xn!rsteele From: rsteele@XN.LL.MIT.EDU (Rob Steele) Newsgroups: comp.sys.handhelds Subject: HP48 terminal emulator Message-ID: <1749@xn.LL.MIT.EDU> Date: 12 Mar 90 20:08:51 GMT Reply-To: rsteele@LL-XN.ARPA.ll.mit.edu (Rob Steele) Organization: MIT Lincoln Laboratory Lines: 100 It's wierd having Kermit file transfer without terminal emulation. The following is TERM, a dumb terminal emulator for the HP48SX. It's slow and chokes easily on fast input. Still, it might be usefull to someone. It uses whatever communications parameters you establish in [I/O] [SETUP] and works by alternatly polling the keypad and the input buffer. The alpha key functions as a shift- lock. This is my first whack at programming the 48 and I would apreciate some criticism regarding style. Like, how are you supposed to comment a program? Five dollars to the first person who rewrites this to be interrupt driven. Rob Steele MIT Lincoln Laboratory They didn't hire me for my opinions. TERM, 1063 bytes, # 3B1Fh checksum %%HP: T(3)A(D)F(.); \<< # 0d \-> col \<< 1 "..........ABCDEF....GHIJKL....MNOPQR....STUVWX.... YZ........789/......456*......123-......0. +" "..........abcdef....ghijkl....mnopqr....stuvwx.... yz........789/......456*......123-......0. +" \<< DUP RCL 55 8 CHR REPL SWAP STO \>> \<< PICT DUP { # 0d # 0d } OVER { # 0d # 8d } { # 130d # 63d } SUB REPL {# 0d # 56d } # 131d # 8d BLANK REPL # 0d 'col' STO \>> \-> caps uctbl lctbl addbs nl \<< 'uctbl' addbs EVAL 'lctbl' addbs EVAL -40 CF OPENIO { # 0d # 0d } PVIEW 7 FREEZE nl EVAL WHILE 1 REPEAT IF KEY THEN IF DUP 61 == THEN DROP caps NOT 'caps' STO ELSE IF caps THEN uctbl ELSE lctbl END SWAP DUP SUB XMIT DROP END END IF BUFLEN DROP THEN 1 SRECV DROP DUP NUM CASE DUP 8 == THEN DROP2 IF col # 0d > THEN col # 6d - 'col' STO END END 13 == THEN DROP nl EVAL END 2 \->GROB PICT col # 56d 2 \->LIST ROT REPL # 6d 'col' STO+ IF col # 131d > THEN nl EVAL END END END END \>> \>> \>>