From: kirkland@cadehp8.eng.utah.edu (Daniel Kirkland)
Subject: USEND and URECV, FAST IR transfer.
Keywords: USEND, URECV, FAST, IR, TRANSFER
Organization: University of Utah
Date: Thu, 28 Jan 93 05:59:23 GMT


FAST!  FAST!  FAST!

More than twice as fast (real time) as TSEND or TSEND2!
At least four times as fast as the HP48 SEND using IR!
More than twice as fast as the HP48 SEND at 9600 baud using
a cable to connect two HP48s!

Like I said FAST!

No need to store libraries (or anything else) in a variable.
USEND will send a library from level one of one HP48 to level
one of the other HP48.




BEGIN_DOC usnd.doc

USEND & URECV   
Universal IR Send and Receive
Version 1.1, January 1993
by Dan Kirkland


USEND and URECV are fast, all purpose, send and receive
programs for FAST data transfer between two HP48's.
With USEND and URECV, you can send objects directly from the
stack without storing them in a variable.
Try putting a library on stack level one and sending it!
You must use USEND on the sending HP48 and URECV on the send HP48.

                    FAST!  COMPARE!

PACMAN directory from goodies disk #7, 8308.5 bytes.
program used          SEND       TSEND (v2.0)    USEND
time in seconds     115.026       66.072         28.707

QED.font from QED1.07, 2244 bytes
program used          SEND       TSEND (v2.0)    USEND
time in seconds      42.273       23.456         6.252

A list of small variables, (unknown bytes).
program used          SEND      TSEND (v2.0)     USEND
time in seconds      52.114       31.896         10.483

All times were with flag -36 (RECV overwrite active) and
flag -39 (I/O messages suppressed) set to provide the
fastest times for SEND and TSEND.

                    
                    USEND  USAGE

USEND will send ANY type object from stack level one.
USEND uses flag #1 (user flag).

   With flag #1 clear (no 1 in the status area).

Defined variables (both global and local variables that have
something 'stored' in them) are sent and stored in the current
directory on the receiving HP48.
Undefined variable names will be sent and left on the stack
of the receiving HP48.

  SENDING LISTS

The objects in a list will be sent separatly and defined
variables in the list will be stored in the current directory.
To send a list as an complete object, either put the list as
an object in another list or set flag #1 (see below).
Defined variable names nested inside two or more list will
be sent as as names in a list. The object stored in the
variable will not be sent.
Only defined variable names are stored in the current
directory, all other objects are left on the stack of the
receiving HP48.

  With flag #1 set (a 1 showing in the status area).

Stack level one object sent as is to stack level one of the
receiving HP48.
This means that all variable names will be sent as variable
names only.
Lists will be sent as one complete object.
The receiving HP48 will receive to stack level one exactly
what was sent from level one of the sending HP48.


                    URECV  USAGE

Just execute URECV on the receiving HP48.
URECV does NOT use any flags (flag #1 only needed for USEND).

                    SAMPLE PROGRAMS

SSTK    (Send Stack)     BYTES: #1332h 34.5
         Arguments:      obj#n ... obj#1 #n  ->
\<<
 \->LIST
 1
 \->LIST 
 USEND
\>>

RSTK    (Recv Stack)     BYTES: #CA2BHh 32
         Arguments:                          ->  obj#n ... obj#1

\<<
 URECV
 OBJ\->
 DROP
\>>

With flag #1 clear, USEND will send the objects in a list
seperately and will store all defined names in the HOME
directory. Set flag #1 or use this next program to send a
list so the receiving HP48 will receive it as the same list.

SLIST   (Send List)      BYTES: #49F1h 33
         Arguments:      { obj#1 ... obj#n } ->
\<<
 1
 \->LIST 
 USEND
\>>

                    COMMENTS

USEND and URECV do not require any setup (except maybe 
flag #1).
USEND and URECV are quiet. They do not display what is
being sent. If the data transfer arrow is blinking, then
everthing is okay.

USEND and URECV do not do packet checks like the built in
SEND program (and TSEND). So, don't move the HP48's once
you start the transfer.

URECV does a checksum check, so any object is sure to be
the same as the object that was sent.

With USEND, there is no longer any need to store a library
in a variable to send it. Just put the library on the stack
and send it. It will be received on the stack of the receiving
HP48 and can then be stored in the proper port with no
variable to purge.

USEND and URECV were written and tested on HP48 version E.
USEND and URECV were written in "system" RPL using supported,
unsupported, and some, as yet, undocumented ROM entry points.

Feel free to use and/or do with these programs what you wish.
I make no guarantees. If you are overly worried that these
programs (or any other program that I write) may cause you
problems, THEN DON'T USE THEM!

Any comments, questions, or suggestions send email to:

                   kirkland@ee.utah.edu

Dan Kirkland

END_DOC

BEGIN_ASC usnd.asc
%%HP: T(3)A(D)F(.);
"69A20FF7123000000050552554346550D9D209CB04E5E40D9D2019322FEF3043
9F280613CCD20F20008FB97601BA110030415C01BD010030515C08D3FEC0B053
6C63134FA613C370B33135A4A5CB916F43349485339916D9D201192020C00A38
36B21306A15644E0312040D9D205E413B3A165A4E2A3836B2130FEF304360344
230A2126DA916D9D20E4056A3836B2130BD37076040D9D205E413B3A165A4E2A
3836B213088130B204095236FEF3043603C07261204043603C0726A2126DA916
D9D20E4056A3836B2130FD5502A1702C2308F336D9D2048C46AB426881306A15
644E03D9D205E413B3A165A4E2A3836B21307EE0667326CAF0621E26B21305E1
7062726FEF304360374726449508DF0679B30BBF06FDD36D9D20E4056A3836B2
13044230FA450A9226CB916D9D20A3E26592362A170635818DA16D9D202C1267
5140487352FA3057B30B21300CA30EE170D9D207A726FB7618DA166545684456
EE2508B736990164E7613915051B50B21305E170A211631581B213043370B213
08BE40D9D206C5131DE40B21306C513B21302130050553554E44450D9D20D295
1E5E40D9D2019322FEF30439F280613CCD20F20008FB97601BA110030415C01B
D010030515C08D3FEC0B05360BD463C3706A15644E0320F04B33135A4A5CB916
F43344337039916D9D201192020C00A3836B2130F6A369FF308773557B30CB91
6DEE3211226A2170DEE3213236FEF3096C2662DF26272644E038943611436C9B
264A7E29FF308773557B308DA16DEE32D9D2050C268DA16D9D2032230522759B
136B2130DEE32B2130881304495032230300407FE30CBD30FEF3096C2662DF26
2726FEF30756605923062DF2627263915044E03FEF30756602A1702C23062DF2
3223090236CB9168D3829FF30D9D205E413B3A165A4E2A3836B21304423044E0
38C170852304337044230B21308BE40D9D206C5131DE40B21306C513B213049B
B"
END_ASC


BYTES: #D5F3h 777.5

BEGIN_UU usnd.uue
begin 640 usnd
M2%!(4#0X+466*O!_(0,````%55)%0U8%G2V0O$!>3M#9`I$C\OX#-/F"8#',
M+?`"`/B;9Q"K$0`#%,40VQ```Q7%@#WO#`LUQC8Q]&HQ/`<[$U-*6KP9]C1#
M25@SF6&=+1"1`@(,H(-C*S%@&F5$#A,"!)TM4$XQ.QI62BXZ.+82`^\_0&,P
M1#*@$F*M&=;9`DY0IH-C*S&P/0=G0-#9`N44LZ-AI>2B@V,K,8`8`RM`D"5C
M[S]`8S`,)Q8"!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