This document outlines the process for transferring files between a PC and an HP48 GX calculator emulator, using c-kermit for communication. The emulator in question is x48, and file transfers are facilitated through c-kermit.
Configuration for the emulator can be set in ~/.Xdefaults
as follows:
This section is an FAQ from here.
ASCII file headers such as %HPHP: T(3)A(D)F(.);
are created by the HP48 when an ASCII file is sent to the PC and read when a HP48 ASCII file is received from the PC. They serve to preserve various settings on the HP that affect ASCII transfers. They do not affect binary mode transfers.
Three parameters are saved: (T)ranslation Mechanism
, (A)ngle Mode
, and (F)raction Mark
.
The possible ASCII translation schemes are as follows:
To choose the favorite set, it is needed to type the number followed by the command TRANSIO
on the HP48 command line (it is the parameter translate
in the IOPAR
screen).
Depending on which translation scheme is being used, the HP48 converts a different set of characters to PC ASCII format.
Option 3
is recommended, since this forces the calculator to translate all symbols to pure ASCII (as in the table in page 27 - 16 of the HP48G series user’s guide). Choosing option 0
or 1
, all characters from code 128 to 255 would be interpreted following the current code page of the PC setup - it will be then unreadable.
Also, receiving ASCII files on the pc with black squares, it is fairly certain translation mode is set to 0
, which makes the HP receive and store all newline characters (instead of eliminating them).
The HP48 can handle two types of fractions marks - the decimal dot or comma.
This option is available from the MODES
input form (48G/GX) or menu 64.01.
With regards to the ASCII header:
F(.)
means the format is dot.F(,)
means the format is comma.Trying manually editing an ASCII file on the PC without a header, then try to send it to the HP48 using Kermit, the following results may be obtained:
As would be expected, sending files with ASCII headers to the HP48 with mismatching fraction mark settings, leads to an "Invalid Syntax"
error during transfer.
Looking at rows 2 and 3 of the table above - the object received by the HP48 is stored as a program object without the `<<
and >>
composed by two real numbers that normally can’t be done in User RPL.
In fact the resulting object is a very simple System RPL program object (the internal language of the HP48). The conclusion is that when a file is sent without an ASCII header, the HP48 translates numbers with mismatching formats into System RPL secondaries (programs) of the form:
To transfer a file from the HP48 GX emulator to a PC, follow these steps:
Note the communication port listed under wire on the HP48 GX emulator, for example, /dev/ttys004
.
Prepare the HP48 GX for transfer:
I/O -> Transfer ...
Port
to Wire
, Type
to Kermit
, and FMT
to ASC
.MYVAR
in {HOME}
.Start Kermit from the terminal and configure it for the transfer:
MYVAR
from the HP48 GX.To transfer a file from the PC to the HP48 GX emulator, you might create a file containing variables or a program. For example, a file named singlevariable
or constants
with the following content:
I/O -> Start the server
.After sending, the file constants
can be executed on the HP48 GX with EVAL
.