[comp.sys.handhelds] communications program for 48SX?

DCSG@OSU-20.IRCC.OHIO-STATE.EDU (DCSG) (10/07/90)

Help! A long time ago (3-4 months), someone posted a terminal program 
for the 48SX. I copied it but since then my hard drive has hiccuped and
no more program. If the author is watching, please re-post the program.
If anybody else has a copy, pleeeeeease drag it out of your archives and
post it.     Thanks in advance.
					Wally Hallas
					technixion
					technision
					tech.

d0evert@dtek.chalmers.se (Mats Olsson) (10/09/90)

DCSG@OSU-20.IRCC.OHIO-STATE.EDU (DCSG) writes:

>Help! A long time ago (3-4 months), someone posted a terminal program 
>for the 48SX. I copied it but since then my hard drive has hiccuped and
>no more program. If the author is watching, please re-post the program.
>If anybody else has a copy, pleeeeeease drag it out of your archives and
>post it.     Thanks in advance.
>					Wally Hallas
>					technixion
>					technision

That program seems to be very interesting for me, as well!!

Mats Olsson

Chalmers institute of Technology
Sweden




        >					tech.

metcalf@akala.ifa.hawaii.edu (Tom Metcalf) (10/10/90)

In article <1990Oct9.084027.3613@mathrt0.math.chalmers.se> d0evert@dtek.chalmers.se (Mats Olsson) writes:
>DCSG@OSU-20.IRCC.OHIO-STATE.EDU (DCSG) writes:
>
>>Help! A long time ago (3-4 months), someone posted a terminal program 
>>for the 48SX. I copied it but since then my hard drive has hiccuped and
>>no more program. If the author is watching, please re-post the program.
>>If anybody else has a copy, pleeeeeease drag it out of your archives and
>>post it.     Thanks in advance.
>>					Wally Hallas
>>					technixion
>>					technision
>
>That program seems to be very interesting for me, as well!!
>
>Mats Olsson
>
>Chalmers institute of Technology
>Sweden
>
>
>
>
>        >					tech.


I saved the original posting for the terminal program so here it is.  
I have converted the keys variable to ASCII with ->ASC.

T. Metcalf




From uhccux!ames!rex!wuarchive!usc!jarthur!bgribble Fri Jul 27 13:15:22 HST 1990
Article 2579 of comp.sys.handhelds:
Path: uhccux!ames!rex!wuarchive!usc!jarthur!bgribble
>From: bgribble@jarthur.Claremont.EDU (Bill Gribble)
Newsgroups: comp.sys.handhelds
Subject: Terminal emulator
Message-ID: <7955@jarthur.Claremont.EDU>
Date: 27 Jul 90 15:39:46 GMT
Organization: Harvey Mudd College, Claremont, CA 91711
Lines: 189


In article <8534.26af45fa@ohstpy.mps.ohio-state.edu> kramer@ohstpy.mps.ohio-state.edu writes:
>Does anyone know of a dumb terminal program for the HP48sx?  

Here's the one I wrote and used for a while.  It's pretty slow, but it 
  works ok.  The functions are mostly in the comments, and you might need
  to know that orange shift = shift, blue shift = control.  

The only reason I'm posting this is that I've read and answered several 
  requests like this in the past few days.  I f anyone has any questions, 
  just email.  I'm having a quite boring summer, so I don't have anything
  better to do.  Anyway, here it is.

I have a feeling news may not handle the keys file too well; I broke it 
  up[ into several lines, but it should be 1 long one.  The control 
  characters will most likely screw something up, but I'm too lazy to
  fix it (since I don't have a 48 currently anyway).  Here's how, though:
  replace all the control characters with a sequence of the form \###, where
  ### is the ascii (or hpascii, at least) code of the control character.
  cntrl-a, for example, is \001, cntrl-M is \013, etc.

Good luck.

                                       Bill.

======================================= cut here ===========================

keys - term2.1 keymap file.

Keys file - covert with ASC-> and store as 'keys'

%%HP: T(3)A(D)F(.);
"C2A2035200E2E2E2E2E2E2E2E2E2E2142434445464E2E2E2E2748494A4B4C4E2
E2E2E2D4E4F4051525E2E2E2E2354555657585E2E2E2E2D095A53858E2E2E2E2
E26862A282B5E2E2E2E2E2084252E5D5E2E2E2E2E21812043272E2E2E2E2E2E2
92C2F3E7E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2102030405060E2E2E2E27080E2
E2B0C0E2E2E2E2E0F0011121E2E2E2E2E2314151617181E2E2E2E2D091E23848
E2E2E2E2E228E2E2E2E2E2E2E2E2E208E2E2E2E2E2E2E2E2E218E2E2E2E2E2E2
E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2162636465666E2E2E2
E2768696A6B6C6E2E2E2E2D6E6F6071727E2E2E2E2374757677787E2E2E2E2D0
97A73880E2E2E2E2E228738393F2E2E2E2E2E208435363A2E2E2E2E2E2181323
33D2E2E2E2E2E2E203E202B2130F"


term2.1 - dumb terminal emulator for the hp48

%%HP: T(3)A(R)F(.);
\<< "" ""                @ initial values for some variables - string and line.
  \<<                    @ write: the string display program.
    WHILE DUP SIZE       @ DISP's the string it's given in chunks of 21.
21 >
    REPEAT DUP 1 21      @ shows string by 21's
SUB 7 DISP nl DUP        
SIZE 22 SWAP SUB    
DUP 'line' STO 
    END 7 DISP           @ shows the last < 21 char bit
  \>>
  \<< NUM \-> nbr        @ cntrl: deals with control-type characters.
    \<<
      CASE nbr 8 ==      @ deletes 1 char from the string
        THEN string
DUP SIZE 2 - 1 SWAP
SUB 'string' STO
string write
        END nbr 13       @ screen cr
==
        THEN nl ""
'line' STO
        END nbr 7        @ beep on control - G
==
        THEN 1000
.2 BEEP
        END
      END
    \>>
  \>>
  \<< DUP NUM \->        @ snd - send a character.  
outkey nbr               @ really deals with program control characters
    \<<                  
      CASE nbr DUP
128 < SWAP 13 \=/ AND    @ gets a normal char out
        THEN outkey
XMIT DROP
        END nbr 13       @ pads cr's with lf's
==
        THEN outkey
10 CHR + XMIT DROP
        END nbr 128      @ orange-shift flag
==
        THEN 2 CF
          IF 1 FS?
          THEN 1 CF
          ELSE 1 SF
          END
        END nbr 129      @ blue-shift flag 
==
        THEN 1 CF
          IF 2 FS?
          THEN 2 CF
          ELSE 2 SF
          END
        END nbr 130      @ alpha key: send break
==
        THEN SBRK
nl
"  -- Break sent --"
write
        END nbr 131      @ quit: del key
==
        THEN 4 SF
        END nbr 132      @ control - backspace: start kermit send  
==
        THEN kermit
        END nbr 133      @ shift - backspace: kermit receive
==
        THEN RECV
        END nbr 134      @ toggle buffer dump: shift - alpha
==
        THEN
          IF 5 FS?
          THEN 5 CF
          ELSE 5 SF
          END
        END
      END
    \>>
  \>>
  \<< LCD\-> { # 0h      @ newline
# 8h } { # 83h
# 37h } SUB # 83h
# 40h BLANK { # 0h
# 0h } 3 ROLL GOR
\->LCD "" 'line' STO
  \>>
  \<<                    @ kermit send: send [filename]
"Term 2.1 Kermit Send"
"File name:" INPUT
DUP SIZE 11 SWAP
SUB "'" + "'" SWAP
+ STR\-> SEND CLLCD 2
CF TERM2.1                @ cheesy way to get back in program
  \>> 'kermit' STO        @ program startup shit
'nl' STO 'snd' STO
'cntl' STO 'write'
STO 'string' STO
'line' STO 1 CF 2
CF 3 CF 4 CF CLLCD
  DO BUFLEN               @ check for incoming characters 
    IF DROP DUP 
    THEN                 
      IF DUP 40 > 5       @ dump buffer if toggle set 
FS? AND
      THEN BUFLEN
DROP SRECV DROP2
      ELSE ""             @ clear string buffer
'string' STO 1 SWAP
        FOR dobuf 1       @ read 1 char at a time
SRECV DROP
          IF DUP          @ if it's not a control character
NUM 31 >             
          THEN            @ sto+ it in the string
'string' SWAP STO+
          ELSE
'line' string STO+
line write cntl ""
'string' STO
          END
        NEXT 'line'       @ make sure to start writing at old text pos
string STO+ line
write
      END
    ELSE DROP
    END KEY               @ read keyboard input
    IF
    THEN \-> k
      \<<
        CASE 1 FS?
          THEN 0
          END 2 FS?
          THEN 1
          END 1 FS?
2 FS? AND NOT
          THEN 2
          END
        END 100 * k
+ keys SWAP DUP SUB
snd
      \>>
    END
  UNTIL 4 FS?
  END { cntl snd
write string line
kermit nl } PURGE
CLOSEIO 1 CF 2 CF 3
CF 4 CF 5 CF
\>>