2024-03-19 22:37:03 +01:00
|
|
|
ASCII to Binary and Binary to ASCII Translator
|
|
|
|
|
|
|
|
Emu48 can't import programs transferred via ASCII mode. This System
|
|
|
|
RPL program will take the string that Emu48 puts on the stack when the
|
|
|
|
program was originally transferred in ASCII mode and will convert it
|
|
|
|
to a binary. If the header exists the settings will set accordingly,
|
|
|
|
and if any comments exist it will remove them. If you are loading a
|
|
|
|
text file rather than a program, this will simply remove the carriage
|
|
|
|
returns so there is nothing but line feeds. If you give it a binary
|
|
|
|
program rather than a text file, it will convert it to a text file,
|
|
|
|
making it suitable for exporting from Emu48. Remember that Emu48 adds
|
|
|
|
a 13-byte HPHP48-W header to the beginning that must be removed when
|
|
|
|
exporting ASCII files.
|
|
|
|
|
|
|
|
Simple directions:
|
|
|
|
1. Load emu48asc.bin into Emu48 with the Edit-Load Object... command
|
|
|
|
2. STO it in a variable
|
|
|
|
3. Load the file you want to translate
|
|
|
|
4. Run this program with the VAR menu softkey
|
|
|
|
5. STO the translated program in a variable (if wanted) or export it
|
|
|
|
with the Edit-Save Object... command
|
|
|
|
|
|
|
|
This can also be used on a real HP48 if you prefer to transfer ASCII
|
|
|
|
files via Xmodem, which doesn't do translation. However, it will be
|
|
|
|
very slow.
|
|
|
|
|
|
|
|
Unfortunately, this program sometimes fails on directories. I'm not
|
|
|
|
entirely sure why it doesn't work (since it properly imports some
|
|
|
|
directories) and don't have a solution at present. For these pesky
|
|
|
|
directories, you'll have to use your real HP48.
|
|
|
|
|
|
|
|
The commented System RPL source code is in emu48asc.src. This uses
|
|
|
|
two unsupported entry points, PTR 30477 and PTR 303AC, but they appear
|
|
|
|
stable and have been tested to work in revisions D, E, M, P, and R.
|
|
|
|
|
|
|
|
Program created by Eric Rechlin <eric@hpcalc.org> based on posts to
|
|
|
|
comp.sys.hp48 by John H Meyers <jhmeyers@mum.edu>. I would also like
|
|
|
|
to thank Christoph Giesselink for optimizing my program, saving about
|
|
|
|
20 bytes, as well as for correcting a major bug. The attached HP49G
|
|
|
|
version of this program is unsupported, use it on your own risk.
|
|
|
|
|
2024-03-19 22:37:54 +01:00
|
|
|
Revision 1.6, see http://www.hpcalc.org for updates.
|