Online WP 34s assembler now available
#1

I've noticed quite a lot of interest in the WP 34S assembler and disassembler in the forums lately. Personally, I think it's a great tool, so I want to help others get easier access to it.

I've created a link on the WP 34S main wiki page to an online version of the assembler. The actual assembler is located here:

Online WP 34S assembler

Basically, you don't need to install Perl, you don't have to install the EXE version of the assembler, and you can get to this anywhere that you have web access.

Go to the page, enter your email address, and paste code into the big box. Then hit the button. The source code will be compiled and emailed to you at the address you provided. Also included will be the .DAT file, a .OUT file (the output of the compile) and the original .WP34S source file that you created.

Note: THIS IS EXPERIMENTAL! It may have some bugs, and it may not always work perfectly, so please be patient with it. ;-)

If you have any problems with it, please email me (bruceb @ fatcity dawt com) and I'll check into it.

I'm working on getting the disassembler available online as well.

Enjoy!

Thanks,

Bruce

#2

Hi Bruce,

Thanks for doing this! I had some vague plans for wrapping a GUI around it some day but this seems easier -- just let you do it. :-D

You might want to put another warning on your page regarding the following:

I think we have discovered an issue between the assembler and the current ZIP bundle. The ZIP bundle is quite old now (19-June-2011?) and both its emulator and calculator binary are incompatible with the assembler.

Since the WP 34s opcode map evolves on timescales that would make a fruit fly blush, the assembler must be mated to the version of emulator/calculator you are using. This is the most probable reason for the current issue.

The assembler takes an optional command line argument to read in a specified opcode map. Maybe you could provide an optional drop down box to select a specific revision. I (we) can supply a selection of these opcode map files if you think it is worth it. (Recall that one of the main reasons for building this tool was as an insurance policy to guard against this very opcode drift.)

Also, you might want a link to the assembler manual on your web page as it gives guidance on how to properly format the ASCII source.

I have used this tool more than anyone and I still generate and use the expanded syntax guidance table it can optionally create. Perhaps access to that generated output might be another option you can add. Email this guide file as well if you'd like -- its BIG at about 480KB!

In some ways this email output route takes me back to my card deck submission days. I would wait a while for my line printer output (several hours?) only to find out that I had missed a continuation character in column 6(?) of a Fortran card. Perhaps your script could detect if the assembler aborted and display this message right away rather than issuing an email to tell you it didn't recognize the opcode "FORBNIP".

This is a great service for those who don't want to get some grease on their hands, but I think for those who are comfortable with running a command-line operation, the actual assembler Perl script or self-contained EXE will give higher performance (no wait for an email) and access to the other command line options. Several of these command line switches are very useful. I particularly like turning the asterisks on ("-s 3", for example) so I can easily see my labels in a disassembly output.

BTW: Is it actually online yet? I have run 3 test jobs through it and have yet to get an email (1st job was about 10 hours ago).

Thanks again! I hope this widens the usage (and I guess I can expect to have to fix more bugs now :-)

Best regards...

Edited: 15 July 2011, 6:38 a.m.

#3

Hey Neil --

So, already we've found a bug. ;-) At the moment, the incoming mail is getting folded by the application in the wiki, so long lines are being wrapped. If this occurs, an error is thrown and the mail doesn't go out.

So that's why you've tried it a few times and haven't yet received an email. Normally you should get back a compile result within a couple of minutes MAX. Definitely let me know if you're not getting back messages and I'll investigate.

The interim workaround is make sure you don't paste in long lines (basically, comments). Anything less than 80 characters is fine and works okay. I will work on un-wrapping the lines to put them back to the original format, but for now, just avoid including comments.

Note that the mail will not be sent REGARDLESS of any errors, so if you try it today (now) with a long line, you should at least get a reply message. Of course, if you try it with something that will compile, you'll also get the output and such too.

As for the opcode tables, yes, I was mulling that over last night when I read your other reply to Gerson regarding versions. I will definitely do that. I'll have to think of a good way to (safely) make the script handle that, but it sounds like a must.

And yes, I'll also put up a link to the PDF (should have done that anyhow).

On the next iteration of the assembler, could you please either add a header when it runs that mentions the version number of the assembler, or provide a way to get it ("--version" or something)? I'm concerned about confusing people once this matures and several versions are running around in the wild. If the version number comes out in the output, or I can include it on the wiki page, then at least we'll all know what version is being executed.

Fun stuff! :-)

Thanks!

Bruce

#4

Hi Bruce,

Quote:
Anything less than 80 characters is fine and works okay.

The second one I tried was to test the error output and it was a simple (albeit, purposely incorrect) 3-liner that was all short lines. I will try something again.

Quote:
As for the opcode tables, yes, I was mulling that over last night when I read your other reply to Gerson regarding versions. I will definitely do that. I'll have to think of a good way to (safely) make the script handle that, but it sounds like a must.

Let me know where, and I will supply you with a little group of these. Paul's compressed format is not that large (<30K?? each).

I have not done much (successful) CGI but I assume a dropdown box might be the answer.

Note that if you don't give it anything, it uses its internal table (usually the appropriate choice). It only goes to the external table if you request it to.

Gerson's issue is a bit more fundamental -- the current ZIP is too old to work with any version. But it did highlight the potential issue for compatible versions.

Quote:
On the next iteration of the assembler, could you please either add a header when it runs that mentions the version number of the assembler, or provide a way to get it ("--version" or something)? I'm concerned about confusing people once this matures and several versions are running around in the wild. If the version number comes out in the output, or I can include it on the wiki page, then at least we'll all know what version is being executed.

This is actually there now. Use the "-svn" switch. I had changed my local code (not committed yet) a few days ago to make that the default (n it you use "-no_svn" to turn it off!). With the current one and the "-svn" switch, you get something like this (again, you won't need this switch in the next bump -- but it won't hurt if its supplied):

$ ../trunk/tools/wp34s_asm.pl -svn 8queens.wp34s -o temp.dat
// Opcode SVN version: 1199
// CRC16: 520A
// Total words: 32
// Total steps: 31

As is noted in the help (or the doc -- I can't recall which), there is subtle difference in using "-o FILE" and redirection in disassembly. With the first, these statistics comments still go to the screen. With direction, they get bundled into the output. That may or may not be useful to you. (Its really a bug but I don't want to change it.)

#5

I've added the -svn switch to the output, so that will be helpful.

The dokuwiki plugin I use for displaying a form is somewhat limited. I tried experimenting with another plugin, but it didn't work. I'm going to create a second version of the assembler page and see if I can get that working. If so, that will make the addition of the disassembler much easier.

In any case, the aseembler should be working fine now.

thanks,

bruce

#6

Looking gooood!

I tried both a working sample and a purposely broken sample and got both in emails.

I am still not exactly sure why the script could not be rigged to say "Oops! That was silly of you!" when the assembler throws an error but at least it is up and running! (Likely shows my naive view on the web I/F :-)

Great job. Now I have to get the next improvements done and out the door. As far as I can see, the next improvements should be absolutely compatible from the user interface point-of-view, so no changes to your side expected.

Let me know if/when you might want some of the op-code translation maps. Just drop me a note on the back channel.

Cheers...

#7

Email is a bit safer. I'm super cautious about the potential exploits of publishing scripts which run live. I'm still considering it though. ;-) With this approach (email), the results are sent to the party who needs it, there are no issues with exploits, and the turn around is pretty quick.

I may have to put up a captcha to avoid getting caught by the spam bots, but so far they're staying away. :-)

thanks,

Bruce

Oh, and I did contact you via the Museum link. Not sure if that went to the right place or not, but yes, please do send those to me. bruceb at fatcity dawt com.

#8

Quote:
Oh, and I did contact you via the Museum link. Not sure if that went to the right place or not, but yes, please do send those to me. bruceb at fatcity dawt com.

That goes to a different location so I will get it when I get home. Thanks...



Possibly Related Threads…
Thread Author Replies Views Last Post
  [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 3,124 12-10-2013, 11:37 PM
Last Post: Les Bell
  WP-34S (Emulator Program Load/Save) Barry Mead 1 1,760 12-09-2013, 05:29 PM
Last Post: Marcus von Cube, Germany
  DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 2,452 12-04-2013, 11:14 AM
Last Post: Barry Mead
  WP 34S/43 ?'s Richard Berler 3 1,997 11-10-2013, 02:27 AM
Last Post: Walter B
  My FrankenCulator (wp-34s) FORTIN Pascal 4 2,088 11-09-2013, 06:18 PM
Last Post: FORTIN Pascal
  WP 34S Owner's Handbook Walter B 5 2,584 11-09-2013, 05:34 PM
Last Post: Harald
  wp 34s overlay and programming. FORTIN Pascal 6 2,837 11-08-2013, 01:28 PM
Last Post: Nick_S
  m.dy in display of WP-34S Harold A Climer 3 1,899 11-05-2013, 11:28 AM
Last Post: Andrew Nikitin
  WP 34s : An old problem coming back Miguel Toro 2 1,692 11-05-2013, 03:00 AM
Last Post: Marcus von Cube, Germany
  [WP 34s] Pressure Conversion Factors Timothy Roche 8 3,080 11-04-2013, 07:17 PM
Last Post: Dave Shaffer (Arizona)

Forum Jump: