The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

WP 34S : issue disassembling with latest version
Message #1 Posted by Miguel Toro on 18 Sept 2011, 2:44 p.m.

Hello,

I have issues trying to disassemble any program with three alpha characters (using wp34s_asm.exe, wp34s build 1610) :

A program like :

LBL 'INW'
<instructions>
RTN
will produce the following error message :

ERROR : Opcode 'f049' does not exist at line 2 .....

if I change for a single letter or numeric label like this :

LBL A
<instructions>
RTN

or

LBL 00 <instructions> RTN

No error is produced and the file is genereted.

Even the simplest :

LBL 'INW'
RTN

...causes the problem. I have yet to try with older versions.

What could be the proble here?

Regards,

Miguel

      
Re: WP 34S : issue disassembling with latest version
Message #2 Posted by Neil Hamilton (Ottawa) on 18 Sept 2011, 3:24 p.m.,
in response to message #1 by Miguel Toro

Hi Miguel,

I suspect what is happening is that you are disassembling an older binary with the latest 'wp34s.op' table.

Last week(?) a bunch of op-codes moved to avoid an issue Pauli discovered.

The thing to try is to get the appropriate table for when the binary was created and disassemble using that table. Check out section 5 of the Assembler document. You will want to use the '-op the_older_wp34s.op' switch.

As for getting the table, go to http://wp34s.svn.sourceforge.net/viewvc/wp34s/trunk/tools/wp34s.op?view=log and track down the version tat most closely matches the WP 34S F/W when you wrote the program.

Let me know if: 1) that works, or 2) doesn't work. :-) We'll go from there.

            
Re: WP 34S : issue disassembling with latest version
Message #3 Posted by Miguel Toro on 18 Sept 2011, 4:40 p.m.,
in response to message #2 by Neil Hamilton (Ottawa)

Thanks Neil for your answer, but here is what I did :

1. I downloaded the wp34s build 1610 on a different machine.

2. I did not use old code but simply created a new program with only :

LBL 'TST'
RTN

3. I stored in library 5 with PSTO 5. That created wp34s-5.dat

4. I tried to disassemble with :

wp34s_asm.exe -dis wp34s-5 -o prb.wp34s

and the error occurs :-(

So this is not using any old .DAT file. Could you please follow the same steps to see if you have the same result.

Thank you,

Miguel

Edited: 18 Sept 2011, 4:43 p.m.

                  
Re: WP 34S : issue disassembling with latest version
Message #4 Posted by Neil Hamilton (Ottawa) on 18 Sept 2011, 5:24 p.m.,
in response to message #3 by Miguel Toro

Hi Miguel,

Actually, what Franz mentioned is important -- just not in this case. There can be no space between the "LBL" and the first single quote.

I have just down-dated to 1610 (BTW thanks for giving that level of detail!) and entered a simple 3-line program:

LBL'ABC'
STO 01
RTN

Saved it out and disassembled on a Windows box using:

$ wp34s_asm.exe -dis wp34s-0.dat

And it worked just as expected.

Your unrecognized 'f049' is telling me that the wrong op-code table is being used. The tool is probably issuing a few commented lines before it is crapping out. These should tell you which op-code table it was using. Can you check that and let me know if it is the expected one?

Another thing to try is to force the tool to use the correct table (the one in the same directory as EXE is located) by using the '-op' switch.

Are you using a package that came from SVN or somewhere else (like the .zip)?

BTW: I will note that if you are the latest, bleeding edge from SVN, that the duplicate op-code warning has resurfaced :-( The first 2 messages are definitely harmless but I will have to check on the brand new 3rd one. When I get an email from the team telling me they have finalized the RLCS/STOS/?? data, we will fix this once and for all.

                        
Re: WP 34S : issue disassembling with latest version
Message #5 Posted by Miguel Toro on 18 Sept 2011, 5:46 p.m.,
in response to message #4 by Neil Hamilton (Ottawa)

I think that the official ZIP file comes with the wrong Op table (1519). Once I updated with the files from your link, everything worked as usual.

Many thanks for your help,

Miguel

                              
Re: WP 34S : issue disassembling with latest version
Message #6 Posted by Marcus von Cube, Germany on 19 Sept 2011, 4:00 a.m.,
in response to message #5 by Miguel Toro

My fault. I'm just uploading a new ZIP.

                  
Re: WP 34S : issue disassembling with latest version
Message #7 Posted by Neil Hamilton (Ottawa) on 18 Sept 2011, 5:30 p.m.,
in response to message #3 by Miguel Toro

Another thing...

Are you positive that the emulator and the wp34s.op table are exactly the same SVN revision? (The wp34s.op table is located in the .\trunk\tools\ directory -- same as the wp34s_asm.exe program).

Open it in notepad (or equiv). The SVN should appear in the 1st line.

            
Re: WP 34S : issue disassembling with latest version
Message #8 Posted by Miguel Toro on 18 Sept 2011, 5:11 p.m.,
in response to message #2 by Neil Hamilton (Ottawa)

Hi Neil,

This is what I get when doing the disassembling:

C:\Users\Miguel\Documents\wp34s-B\wp34s\tools>wp34s_asm -dis wp34s-5.dat -o tst. wp34s // NOTE: Detected running EXE version. Adjusting child preprocessor script name from 'wp34s_pp.pl' to 'wp34s_pp.exe' // Opcode map source: wp34s.op (local directory) // Opcode SVN version: 1519 // wp34s_asm.exe: Source file(s): wp34s-5.dat ERROR: Opcode 'f049' does not exist at line 2 at print_disassemble_normal

C:\Users\Miguel\Documents\wp34s-B\wp34s\tools>

This is from the environment that comes in the wp34s.zip file. As you can notice the SVN version is 1519 (?). So I followed the link and downloaded version 1610...and that did the trick. Now my file is recognized and the text file produced.

Thanks and regards,

Miguel

            
Re: WP 34S : issue disassembling with latest version
Message #9 Posted by Paul Dale on 18 Sept 2011, 6:16 p.m.,
in response to message #2 by Neil Hamilton (Ottawa)

Quote:
Last week(?) a bunch of op-codes moved to avoid an issue Pauli discovered.

A bad bad bad bug :-(

The "Opcode 'f049'" in the message is the start of one of the moved op-codes. The fact that is has been truncated is a sure indicator that the incorrect op-code table is being used.

- Pauli

      
Re: WP 34S : issue disassembling with latest version
Message #10 Posted by fhub on 18 Sept 2011, 4:21 p.m.,
in response to message #1 by Miguel Toro

Quote:
LBL 'INW'
Remove the space between LBL and the quoted label (i.e. LBL'INW'), wp34s_asm doesn't like that!

Franz

            
Re: WP 34S : issue disassembling with latest version
Message #11 Posted by Miguel Toro on 18 Sept 2011, 4:41 p.m.,
in response to message #10 by fhub

Hi Franz,

I am not assembling, but disassembling, so taking a generated wp34s-5.dat from the emulator and converting it into text file


[ Return to Index | Top of Index ]

Go back to the main exhibit hall