HP Forums
Another stupid 41C question - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Another stupid 41C question (/thread-7074.html)



Another stupid 41C question - Monte Dalrymple - 10-20-2016 06:53 PM

Is the .RAW file format documented anywhere? If I download something to the 41CL I need to know how to massage the data to get everything lined up properly. Or is this even possible?

Monte


RE: Another stupid 41C question - JurgenRo - 10-20-2016 07:17 PM

(10-20-2016 06:53 PM)Monte Dalrymple Wrote:  Is the .RAW file format documented anywhere? If I download something to the 41CL I need to know how to massage the data to get everything lined up properly. Or is this even possible?

Monte

Hi Monte,
see the README file in http://www.hpmuseum.org/software/hp41uc.zip . On page 4 you find a section called RAW-Format. The link is from the site http://hp41programs.yolasite.com/. Don't know if this is what you are looking for ...
Juergen


RE: Another stupid 41C question - hth - 10-20-2016 08:11 PM

I believe the RAW format comes from dumping the actual bytes stored in memory.
Thus, you may find extra NULLs, and the last instruction may be either an END or the special .END.

A .RAW file need massaging to get it right if loaded back to memory. The main problem is the global chain that has to be built properly. You can study GETP in Extended functions module. That code works on the assumption that if the checksum is correct, the saved link chain is intact so it can be used to find the global LBLs. It updates the global link chain when loading the program.

Håkan


RE: Another stupid 41C question - JurgenRo - 10-20-2016 09:01 PM

Monte,
the direct link seems not to function. So, I've copied the respective text excerpt for your convenience:

Quote:RAW Format: Page 4
==========

[compiled code] + [1-byte checksum] + [trailer]
[1-byte checksum] - sum of all [compiled code] bytes
[trailer] - filler bytes, so that filesize = multiple 256-byte blocks

Usage: optional parameters are surrounded by <>

RAW file(s) to LIF file ( LIF name = <name> or [infile] )
/r=infile<.raw> /l<=outfile.lif> <name>

If output file is specified, [infile] can be a directory of RAW files.
For example: hp41uc /r=\rawdir\*.raw /l=hpil.lif

RAW file to P41 file ( P41 name = <name> or [infile] )
/r=infile<.raw> /p<=outfile.p41> <name>

RAW file to BIN file
/r=infile<.raw> /b<=outfile.bin>

RAW file to DAT file ( hex digits in ASCII form )
/r=infile<.raw> /d<=outfile.dat>

RAW file to TXT file ( de-compile )
/r=infile<.raw> /t<=outfile.txt> </a> </n> </x>

De-compiler Options:
/a - append text using: [ "Ãtext" ], instead of: [ >"text" ]
/n - generate line numbers
/x - use [ XROM mm,ff ] for all XROM Functions
/x23 - use [ XROM 23,ff ]: [ XROM 23,1 ], instead of [ COPYFL ]
/x25 - use [ XROM 25,ff ]: [ XROM 25,46 ], instead of [ X<>F ]
/x26 - use [ XROM 26,ff ]: [ XROM 26,10 ], instead of [ CLOCK ]
/x28 - use [ XROM 28,ff ]: [ XROM 28,27 ], instead of [ AUTOIO ]
Hope, this is of any use for you.
Juergen


RE: Another stupid 41C question - Monte Dalrymple - 10-20-2016 09:27 PM

Thank you, Juergen and Hakan.
Now I can fire up my hex editor and figure out what I need to do.


RE: Another stupid 41C question - aurelio - 10-22-2016 06:10 PM

(10-20-2016 09:01 PM)JurgenRo Wrote:  Monte,
the direct link seems not to function.
Juergen

with the right button of the mouse you can download it, thank-you Juergen
EDIT: you download the zip but cannot open it.....


RE: Another stupid 41C question - JurgenRo - 10-23-2016 07:52 PM

(10-22-2016 06:10 PM)aurelio Wrote:  
(10-20-2016 09:01 PM)JurgenRo Wrote:  Monte,
the direct link seems not to function.
Juergen

with the right button of the mouse you can download it, thank-you Juergen
EDIT: you download the zip but cannot open it.....

Hi Aurelio,
yes, you're right! Thank you for the hint!
Juergen