Post Reply 
Yet another Decoder for PX41CX & DM41X dump file
11-20-2024, 07:20 AM (This post was last modified: 11-22-2024 01:07 PM by krischik.)
Post: #1
Yet another Decoder for PX41CX & DM41X dump file
Hello,

I wrote myself another Decoder for PX41CX & DM41X dump files. It's still in early stages and doesn't yet have the functionality of the alternatives below. I still decided to make a public release to get some feedback:

* Homepage
* Download

Do read the installation pages before downloading. Especially for Linux „Compile from source“ is the suggested method of installation. But I have prepared compile instructions for all operating system.

The code is written in Ada which ich fairly easy to read. If you have and question you can ask here or on SourceForge. The open is open for contributors. The Code uses „Design by Contract“ methodology and has 162 unit tests for extra confidence in any change you make.

Alternatives which are more mature and offer more functionality:

* PX-41CX interface ( needs Excel)
* DM41 programming tool (online only)
* HP41UC User-Code Utility for HP-41 Calculator

Regards

Martin

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
11-22-2024, 01:04 PM
Post: #2
Release 1.6.1
Hello,

I just published the first update:
  • Decoder output to UTF-8 for easier reading.
  • Changed exteneded memory output to match hp41uc-code.
  • Added comments for Key assignments similar to hp41uc-code.

See sample outputs below:

Martin

Code:

; ALPHA = "␀␀␀                     "
; SIZE =  100
; ΣREG =  624
; A: 09999999999000  B: 0000002c0480fd  C: 000000002c00fd
; S: 00101010000000
; M: 000018a5ff83d3  N: 00000000000000  G: 20
; PRG = 19b .. 18e
LBL 'LBLTEST'       ; c000f8004c424c54455354
STO 00              ; 30
LBL 00              ; 01
STO 01              ; 31
LBL 99              ; cf63
STO 02              ; 32
LBL A               ; cf66
STO 03              ; 33
LBL 'Z'             ; cc02f2005a
STO 04              ; 34
LBL 'T'             ; cc00f20054
STO 05              ; 35
LBL 'TE'            ; Key:  11
STO 06              ; 36
LBL 'TES'           ; Key: -44
STO 06              ; 36
LBL 'TEST'          ; Key: -81
STO 07              ; 37
LBL 'TEST5'         ; Key:  14
STO 09              ; 39
LBL 'TEST 6'        ; Key:  84
STO 00              ; 30
LBL 'TEST--7'       ; Key: -74
RTN                 ; 85
END                 ; ca0109
GLOBAL              ; cc
RCL 00              ; 20

Code:

; STACK =  3.000000000E+02  0.000000000E+00  0.000000000E+00  0.000000000E+00
; LASTX =  6.000000000E+01
; ALPHA = "␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀SIZE 100"
; SIZE =  300
; ΣREG =  496
; A: 09999999999000  B: 0000002c0480fd  C: 000000002c00fd
; S: 00101010000000
; M: 000018a5ff83d3  N: 010800148a10ed  G: 00
; PRG = 0d3 .. 0c1
LBL 'SIZE'          ; c000f50053495a45
STO 00              ; 30
LBL 00              ; 01
RCL 00              ; 20
STO IND 00          ; 9180
DSE 00              ; 9700
GTO 00              ; b100
RTN                 ; 85
LBL B               ; cf67
300                 ; 131010
'DATA'              ; f444415441
CRFLD               ; a64b
SAVER               ; a667
RTN                 ; 85
LBL 'BCDEF'         ; Key:  15
ASTO 01             ; 9a01
'GHIJKL'            ; f64748494a4b4c
ASTO 02             ; 9a02
'MNOPQR'            ; f64d4e4f505152
ASTO 03             ; 9a03
'STUVWX'            ; f6535455565758
ASTO 04             ; 9a04
'YZ=?: '            ; f6595a3d3f3a20
ASTO 05             ; 9a05
'.abcde'            ; f62e6162636465
ASTO 06             ; 9a06
'Σ%≠<>↑'            ; f67e251d3c3e5e
ASTO 07             ; 9a07
'∡$-789'            ; f60d242d373839
ASTO 08             ; 9a08
'+456*1'            ; f62b3435362a31
ASTO 09             ; 9a09
'23/0.'             ; f532332f302e
ASTO 00             ; 9a00
RTN                 ; 85
END                 ; cc1109

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
11-24-2024, 08:12 PM
Post: #3
RE: Yet another Decoder for PX41CX & DM41X dump file
I don't need it yet, but just wanted to give you thumbs up for writing something in Ada!

I know that's your area, and to me it's great that you're combining Ada with HP calculators Smile

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
11-25-2024, 09:48 AM (This post was last modified: 11-25-2024 10:38 AM by krischik.)
Post: #4
Version 1.6.2
Hello,

I have another update. Cleaned up the output and added key assignments to the data decoded. With the decoder is on par with the alternatives.

Martin
Code:

; STACK =  6.000000000E+00  6.000000000E+00  3.600000000E+03  0.000000000E+00  6.000000000E+00
; ALPHA = "␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀"
; SIZE =  100
; ΣREG =  624
; KEY = TONE  42
; KEY = FRC -15
; KEY = INT  15
; KEY = XOR -81
; KEY = NOT -51
; KEY = AND -71
; KEY = OR -61
; KEY = HEXVIEW -13
; KEY = OCTVIEW -12
; KEY = BINVIEW -11
; KEY = HEXIN  13
; KEY = OCTIN  12
; KEY = BININ  11
; A: 099999999994f0  B: 0000002c0480fd  C: 000000002c00fd
; S: 00101010000000
; M: 000018a9ff82fb  N: 016919418e049f  G: 19
; PRG = 19b .. 18e
LBL 'LBLTEST'       ; c000f8004c424c54455354
STO 00              ; 30
LBL 00              ; 01
STO 01              ; 31
LBL 99              ; cf63
STO 02              ; 32
LBL A               ; cf66
STO 03              ; 33
LBL 'Z'             ; cc02f2005a
STO 04              ; 34
LBL 'T'             ; cc00f20054
STO 05              ; 35
LBL 'TE'            ; Key:  81
STO 06              ; 36
LBL 'TES'           ; c001f400544553
STO 06              ; 36
LBL 'TEST'          ; c201f50054455354
STO 07              ; 37
LBL 'TEST5'         ; Key:  43
STO 09              ; 39
LBL 'TEST 6'        ; Key:  44
STO 00              ; 30
LBL 'TEST--7'       ; Key: -44
RTN                 ; 85
END                 ; ca0109
GLOBAL              ; cc
RCL 00              ; 20
; MEM = 040 000000000000bf 00000000000000 00000000000000 00000000000000
; MEM = 0bc 00000000000000 00000000000000 00000000000000 ffffffffffffff
; MEM = 200 00000000000000 03ef0010bf0201 00000000000000 00000000000000
; MEM = 300 00000000000000 00000000000301 00000000000000 00000000000000

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
11-25-2024, 10:37 AM
Post: #5
RE: Yet another Decoder for PX41CX & DM41X dump file
(11-24-2024 08:12 PM)HP67 Wrote:  I don't need it yet, but just wanted to give you thumbs up for writing something in Ada!

I know that's your area, and to me it's great that you're combining Ada with HP calculators Smile

Programming in Ada is a real joy and with Ada 2022 it got even better. The new Design by Contract features are amazing.

Martin.

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
11-25-2024, 12:43 PM
Post: #6
RE: Yet another Decoder for PX41CX & DM41X dump file
@Martin - You mentioned in the thread that there are some (several?) errors in the SwissMicros conversion tool, possibly inherited from hp41uc, but regardless of where the errors came from I'd like to get them corrected.

Can you please describe (or send me) a list of all the known errors and I'll work with David to have them corrected in the near future once current projects are completed?

This applies to anyone else that may be aware of bugs in the tool, AFAICR, these have not been reported in the past, but it's possible I've missed such reports (or even forgotten - it happens).

Thanks!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-25-2024, 05:13 PM
Post: #7
RE: Yet another Decoder for PX41CX & DM41X dump file
(11-25-2024 12:43 PM)rprosperi Wrote:  Can you please describe (or send me) a list of all the known errors and I'll work with David to have them corrected in the near future once current projects are completed?

There is one problem with assigned keys. The line with the ENTER key is no Key "45" or "-45". You can try this test program:

Code:
DM41
08 4b000000000000 618f3c8010c190 8080800800f04c 00000000000000 
0c 0000000000618e 1a70016919c18e 0000002c048000 80000008004000 
18c 00000000000000 00000000000000 09000000cc0020 542d2d3785ca01 
190 c801f84c544553 54455354203630 543539c601f744 c401f634544553 
194 f5245445535437 1054455336c201 08544536c001f4 f2005435cc00f3 
198 02f2005a34cc00 cf6332cf6633cc 54455354300131 c000f8004c424c 
A: 09999999999000  B: 0000002c0480fd  C: 000000002c00fd
S: 00101010000000
M: 000018a5ff83d3  N: 000000000c14b0  G: 00

The correct result should be:

Code:
; ALPHA = "␀␀␀                     "
; SIZE =  100
; ΣREG =  624
; A: 09999999999000  B: 0000002c0480fd  C: 000000002c00fd
; S: 00101010000000
; M: 000018a5ff83d3  N: 000000000c14b0  G: 00
; PRG = 19b .. 18e
LBL 'LBLTEST'       ; c000f8004c424c54455354
STO 00              ; 30
LBL 00              ; 01
STO 01              ; 31
LBL 99              ; cf63
STO 02              ; 32
LBL A               ; cf66
STO 03              ; 33
LBL 'Z'             ; cc02f2005a
STO 04              ; 34
LBL 'T'             ; cc00f20054
STO 05              ; 35
LBL 'TE'            ; Key:  81
STO 06              ; 36
LBL 'TES'           ; Key: -81
STO 06              ; 36
LBL 'TEST'          ; Key:  42
STO 07              ; 37
LBL 'TEST5'         ; Key:  43
STO 09              ; 39
LBL 'TEST 6'        ; Key:  44
STO 00              ; 30
LBL 'TEST--7'       ; Key: -44
RTN                 ; 85
END                 ; ca0109

Martin

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
11-26-2024, 01:32 AM
Post: #8
RE: Yet another Decoder for PX41CX & DM41X dump file
I downloaded the binary file hp41cx_tools-main for Mac.

The first issue I had is that the program is not signed by apple.
Running: xattr -rd com.apple.quarantine hp41cx_tools-main fixed the problem.

Next issue I had is when I tried to decode a PX41CX dump.
Running: ./hp41cx_tools-main -d -v NQUEENS.txt out.txt

Gave me a bunch of errors:
Code:
$ ./hp41cx_tools-main -d -v NQUEENS.txt out.txt
 0   : 0   :- HP41CX_Tools.CommandLine.Analyze_WithoutArgument:hp41cx_tools-commandline.adb:180
 1   : 0   :- HP41CX_Tools.CommandLine.Analyze_File:hp41cx_tools-commandline.adb:82
 2   : 0   :- HP41CX_Tools.CommandLine.Analyze_File:hp41cx_tools-commandline.adb:82
 3   : 0   :- HP41CX_Tools.CommandLine.Parse:hp41cx_tools-commandline.adb:199
 4   : 0   :- HP41CX_Tools.Vector_IO.Read_File:hp41cx_tools-vector_io.adb:52 (
 4   : 0   :["PX41", "0c  0000000000019c  1a70016919c193  0000002c048000  00000000000001",
 4   : 0   : "190  00000000000000  00000000000000  00000000000000  85000000c0002f",
 4   : 0   : "194  009700b400052a  79b300049780b2  67b40061202941  b1009080908941",
 "198  39039709802967  918002960a8020  2b78b500960080  cf668a183b0120",
 "A: 00000000000000  B: 00000000000000  C: 00000000000000", "M: 00000000000000  N: 00000000000000  G: 00"])
 5   : 0   :- HP41CX_Tools.Registers.Split:hp41cx_tools-registers.adb:451 (
 5   : 0   :["0c", "", "0000000000019c", "", "1a70016919c193", "", "0000002c048000",
 5   : 0   : "", "00000000000001"])
 6   : 0   :- HP41CX_Tools.Registers.Value:hp41cx_tools-registers.adb:255 (
 6   : 0   :[])
raised CONSTRAINT_ERROR : hp41cx_tools-registers.adb:413 length check failed
Load address: 0x104c1f000
Call stack traceback locations:
0x104c33ebb 0x104c4a2c1 0x104c4c1c3 0x104c20a9e 0x104cd0b8c

 7   : 0   :- HP41CX_Tools.Main:hp41cx_tools-main.adb:73

This is the NQUEENS.txt:
Code:

PX41
0c  0000000000019c  1a70016919c193  0000002c048000  00000000000001
190  00000000000000  00000000000000  00000000000000  85000000c0002f
194  009700b400052a  79b300049780b2  67b40061202941  b1009080908941
198  39039709802967  918002960a8020  2b78b500960080  cf668a183b0120
A: 00000000000000  B: 00000000000000  C: 00000000000000
M: 00000000000000  N: 00000000000000  G: 00

I'm obviously doing someone wrong¿?
Find all posts by this user
Quote this message in a reply
11-26-2024, 06:43 AM
Post: #9
RE: Yet another Decoder for PX41CX & DM41X dump file
(11-26-2024 01:32 AM)agarza Wrote:  I'm obviously doing someone wrong¿?

Yes, you are not using the newest version ?. There was a bug with double spaces which is now fixed. Your file has been added to my test suite (share/hp41cx_tools and test/share/hp41cx_tools_test)

What hasn't been fixed is the release version outputting trace data on the console. The development and validation versions don't do that.

Martin

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
11-26-2024, 02:50 PM
Post: #10
RE: Yet another Decoder for PX41CX & DM41X dump file
(11-26-2024 06:43 AM)krischik Wrote:  
(11-26-2024 01:32 AM)agarza Wrote:  I'm obviously doing someone wrong¿?

Yes, you are not using the newest version ?. There was a bug with double spaces which is now fixed. Your file has been added to my test suite (share/hp41cx_tools and test/share/hp41cx_tools_test)

What hasn't been fixed is the release version outputting trace data on the console. The development and validation versions don't do that.

Martin

Version 1.6.2 works on my Mac!

Suggestions:
  • Add a separator (e.g., a space) between multi-byte commands for improved readability.
  • Allow output to stdout using - (without requiring /dev/stdout).
  • Include an option to hide the byte commands (similar to the DM41 programming tool).
Find all posts by this user
Quote this message in a reply
11-26-2024, 03:30 PM
Post: #11
RE: Yet another Decoder for PX41CX & DM41X dump file
Hello,

Thanks for the suggestions but not all base functionality has been added. ALARM are still missing.

(11-26-2024 02:50 PM)agarza Wrote:  [*]Add a separator (e.g., a space) between multi-byte commands for improved readability.

There are only a few places where I can do that without breaking compatibility. Also there are key assignments and XROM commands to be considered. You can't have both without it becoming ugly.

(11-26-2024 02:50 PM)agarza Wrote:  [*]Allow output to stdout using - (without requiring /dev/stdout).

I was thinking about that was well. But then it should be both in and out so the executable can be used in/as a pipe.

(11-26-2024 02:50 PM)agarza Wrote:  [*]Allow output to stdout using - [*]Include an option to hide the byte commands (similar to the DM41 programming tool).

Once main functionality is added there will be a few switches. An optional pure Latin-1 output without Unicode characters is also on the list.

I want to make the default is the most human readable and then options for special uses.

Martin.

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2024, 12:33 PM
Post: #12
Version 1.6.3
Hello,

I have released the new Version 1.6.3. which now decoded the alarm time as well. The output has also been cleaned up an now looks like this:

Code:

; STACK =  1.200009000E+01  1.204202500E+01  9.999595990E+03  1.200009000E+01  1.200000000E+01
; ALPHA = ⊤REP:MAX⊤
; SIZE =  100
; ΣREG =  624
; KEY = TONE  42
; KEY = FRC -15
; KEY = INT  15
; KEY = XOR -81
; KEY = NOT -51
; KEY = AND -71
; KEY = OR -61
; KEY = HEXVIEW -13
; KEY = OCTVIEW -12
; KEY = BINVIEW -11
; KEY = HEXIN  13
; KEY = OCTIN  12
; KEY = BININ  11
; A: 09999999999000  B: 0000022d0680fd  C: 000000022d00fd
; S: 00100010000000
; M: 002018a5ff83d3  N: 00000000000000  G: 00
; ALARM = 2025-01-01 08:00:00.0 0024:00:00.0 ⊤WAKE UP⊤
; ALARM = 2025-02-11 10:12:34.5 0000:00:01.0 ⊤REP:MIN⊤
; ALARM = 2025-04-12 12:00:00.9 9999:59:59.9 ⊤REP:MAX⊤
; ALARM = 2025-07-22 12:00:00.0 ⊤↑LBLTEST⊤
; ALARM = 2025-11-12 09:12:34.0
; REG000 =  2.207202500E+01  2.207202500E+01  2.207202500E+01  2.207202500E+01
; REG004 =  2.207202500E+01  2.207202500E+01  2.207202500E+01  2.207202500E+01
; REG008 =  0.000000000E+00  2.207202500E+01 ⊤↑LBLTE⊤          0.000000000E+00
; REG096 =  0.000000000E+00  0.000000000E+00  0.000000000E+00  2.207202500E+01
; PRG = 19b .. 174
LBL ⊤LBLTEST⊤       ; c000f8004c424c54455354
STO 00              ; 30
LBL 00              ; 01
STO 01              ; 31
LBL 99              ; cf63
STO 02              ; 32
LBL A               ; cf66
STO 03              ; 33
LBL ⊤Z⊤             ; cc02f2005a
STO 04              ; 34
LBL ⊤T⊤             ; cc00f20054
STO 05              ; 35
LBL ⊤TE⊤            ; Key:  81
STO 06              ; 36
LBL ⊤TES⊤           ; c001f400544553
STO 06              ; 36
LBL ⊤TEST⊤          ; c201f50054455354
STO 07              ; 37
LBL ⊤TEST5⊤         ; Key:  43
STO 09              ; 39
LBL ⊤TEST 6⊤        ; Key:  44
STO 00              ; 30
LBL ⊤TEST--7⊤       ; Key: -44
RTN                 ; 85
END                 ; ca0109
LBL ⊤CLOCK⊤         ; c600f600434c4f434b
DMY                 ; a68f
CLK24               ; a687
⊤WAKE UP⊤           ; f757414b45205550
24.00               ; 12141a1010
ENTER               ; 83
01.012025           ; 10111a101112101215
ENTER               ; 83
08.0000             ; 10181a10101010
XYZALM              ; a69d
CLA                 ; 87
0                   ; 10
ENTER               ; 83
12.112025           ; 11121a111112101215
ENTER               ; 83
09.1234             ; 10191a11121314
XYZALM              ; a69d
⊤↑LBLTEST⊤          ; f85e4c424c54455354
0                   ; 10
ENTER               ; 83
22.072025           ; 12121a101712101215
ENTER               ; 83
12.0000             ; 11121a10101010
XYZALM              ; a69d
CLA                 ; 87
⊤REP:MIN⊤           ; f75245503a4d494e
0.00010             ; 101a1010101110
ENTER               ; 83
11.022025           ; 11111a101212101215
ENTER               ; 83
10.12345            ; 11101a1112131415
XYZALM              ; a69d
CLA                 ; 87
⊤REP:MAX⊤           ; f75245503a4d4158
9999.59599          ; 191919191a1519151919
ENTER               ; 83
12.042025           ; 11121a101412101215
ENTER               ; 83
12.00009            ; 11121a1010101019
XYZALM              ; a69d
RTN                 ; 85
END                 ; cc190d
GLOBAL              ; c8
RCL 00              ; 20
; MEM = 040 000000000000bf 00000000000000 00000000000000 00000000000000
; MEM = 0bc 00000000000000 00000000000000 00000000000000 ffffffffffffff
; MEM = 200 00000000000000 03ef0010bf0201 00000000000000 00000000000000
; MEM = 300 00000000000000 30130100000301 00000000000000 00000000000000

Quotes are the configuration parameter. You can choose between ⊤, ', " and `. More options follow later.

Martin

https://uiq3.sf.net/rpn-45/
Developer RPN-45, FX-602P Simulator, FX-603P Simulator
HP16C, HP35s, HP-Prime, FX-602P, FX-603P, PC-1403



Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)