Re: 48GX to 49G+ transfer Message #3 Posted by James M. Prange on 11 Dec 2003, 2:08 a.m., in response to message #1 by adem ordna
I've got to admit that I didn't even try to follow all that. Conn4x doesn't work
with my PC, so I do my transfers via the SD card and a card reader. But files
put on the SD card by the 49g+ look just like a file transferred in binary mode
(even including a "binary transfer" header), so I expect that a similar method
would work with files transferred via Conn4x's Xmodem. Note that Conn4x doesn't
give us the option of Kermit file transfers or, for that matter, ASCII transfers
of any kind.
Note that the entry points on the 48 series and 49 series (including, I believe,
the 48gII as being in the 49 series) differ, so binary transfers between them
aren't possible. Well, with a little fooling around, they're possible, but
unless you're absolutely certain that the object code is the same on both
calculators, not a good idea. To transfer between the 48 and 49, you generally
want the decompiled form of the object.
Anyway, transfer from the 48 to the PC in Kermit ASCII mode (using something
other than Conn4x), preferably using translation mode 0 unless you intend to
edit the file on the PC, and then transfer that file from the PC to the 49.
Since the file doesn't have a valid binary transfer header, it will be stored as a
character string.
Recall the string to the stack and use the information in the ASCII transfer
header, similar to: %%HP: T(0)A(R)F(.); , to set the 49 modes. Use the
value from "T(0|1|2|3)" as a numeric argument for TRANSIO for the Translation
mode. The "A(D|R|G)" tells you how to treat objects with an Angular component;
execute DEG, RAD, or GRAD as needed depending on the letter. "F(.|,)" tells you
which of "." or "," is the Fraction mark; be sure that the calculator is set up
in accordance with this.
Edit out the ASCII transfer header. If you care to automate this,
\<< ";" POS 1. + OVER SIZE SUB \>> should be good, and works even if the
source file was written on the PC and some of the optional parameters are left
out of the header.
As the file is from a 48, set the 49 to approximate mode so that real numbers
aren't compiled as exact integers. If the file were from a 49, you'd want to use
exact mode to avoid compiling exact integers as real numbers.
If you used translation mode 2 or 3, run the following program:
%%HP: T(3)A(R)F(.);
@ Argument: Level 1: A character string.
@ Returns: Level 1: A character string translated as in Kermit ASCII
@ RECV transfers.
@ Notes: 1: Respects translation mode in IOPAR.
@ 2: If IOPAR doesn't exist in the HOME directory, then creates
@ it with default values.
@ 3: If IOPAR exists but is invalid, then errors out.
@ Checksum: # CED2h
@ Size: 30.5
@ For 49G and 49g+
@ NOT for 48S/SX/G/GX/G+!
\<<
\->STR @ Verify that an argument exists and
@ force it to be a string.
# 2F34Dh SYSEVAL @ KINVIS for 49G and 49g+.
+ @ Append any partial code.
\>>
Now compile to an object by executing either STR\-> or OBJ\->.
Finally, store the object.
It's been reported that if you have IrDA on the PC, you can treat the IrDA as a
"virtual COM port", and use Kermit with it. Certainly there are IrDA-RS232
adapters available that will allow you to use Kermit on the 49g+, assuming that
your PC has an RS-232 port. Come to think of it, I believe there are IrDA-USB
adapters too; whether they'd be treated as COM ports, I don't know.
For more on "Kermit ASCII" translations and decompiling objects, see:
http://groups.google.com/groups?threadm=boq59a%24nh2%241%40newsreader.mailgate.org
In general, search from:
http://groups.google.com/advanced_group_search?group=comp.sys.hp48 for
answers to many questions about the RPL calculators.
Regards, James
Edited: 11 Dec 2003, 2:17 a.m.
|