![]() |
[WP34s] Not working anymore - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: [WP34s] Not working anymore (/thread-207898.html) |
[WP34s] Not working anymore - fhub - 12-27-2011 Today I finally tried to switch to the newest SVN 2083/2085 and now nothing is working anymore. :-(
First problem is the new assembler: I compiled my 4 programs PF, TVM, TRIGON and PRS together with the new option '-lib' and got a wp34s-lib.dat, but when I tried to list it in the WP34s each of the 4 Libs just displayed END, none of the program was visible.
But now my PRS program suddenly stopped with an error message "Out of range" and the command was R-SWAP.
The R-SWAP parameter is sss.nnddd, and here are a few examples how R-SWAP behaves in the current version: 10 -> errorMaybe this has something to do with the new double precision (because of the half registers), but I definitely haven't set this mode (I've checked it). Good that I still have some older versions ...
Franz
Re: [WP34s] Not working anymore - fhub - 12-27-2011 Oh my god, it's even worse! :-( I just realized that for my test polynomial this R-SWAP code shouldn't even have been reached in my PRS program, so I single-stepped through the program and found that now even simple test functions don't work anymore! For example: with 0 in the X-register the test x=1? returns true!!!
Re: [WP34s] Not working anymore - Neil Hamilton (Ottawa) - 12-27-2011 Quote: Ya know... you could supply feedback without all of the emotive angst. It would be just as helpful and not nearly so irritating. If you are willing to go with the bleeding edge of the development, you will get paper cuts now and then. Calling on the almighty for deliverance will not hasten your respite. There is (was?) a problem with the assembler up until a few minutes ago that it generated images of the wrong style for the latest calculator design. It should be fixed now. We are still trying to mix and match the images into the machine-as-a-whole. Your patience and understanding is encouraged. From where did you get the idea to use the '-lib' switch with the assembler? The SVN log maybe? I didn't exposed it in the help menu (-h) for the very good reason that it shouldn't be enabled by the end user. It is used as part of the internal tool chain. Nothing good will likely come from trying to turn it on. It works in conjunction with the new LIB tool to modify how images are created.
Re: [WP34s] Not working anymore - fhub - 12-27-2011 Quote:Could you please stop trying to tell me what I should write and how I should write it? Can't you imagine that everyone has it's own style? Quote:Yes, exactly from there!
Now I've recompiled it (or better: tried to do it) with your new SVN 2086 build and without this '-lib' switch and now guess what I get: an error message "ERROR: Too many program steps encountered (> 922 words)." Franz
Edited: 27 Dec 2011, 5:56 p.m.
Re: [WP34s] Not working anymore - Neil Hamilton (Ottawa) - 12-27-2011 Quote: Dial back your emotions and it will help all around. It is not "style" if my teenager says "Shut Up, Dawg!" to my mother. Such indiscriminate pleas to deities can offend a reasonable fraction of people.
Quote: This is telling me that you probably have more than 922 words in your program. Is that correct? If so, then the assembler is doing exactly what it should and trapping the error. If you have fewer than 922 words in your program and this is occurring, then there is a bug in the assembler and we will attempt to track it down. The reason it may have "worked" before was that the limit check had been modified (note the use of past tense) to use the wrong value -- a MUCH larger value than was legal. I recently discovered that this has been the case for a few weeks (since SVN 2062). If you used these previous versions and your jobs went through, chances are the output image was not strictly legal if you were exceeding the 922 limit. Can you provide the log spit out by the assembler after you ran with '-lib' switch on? That that would be very helpful. For example, the lines similar to these:
// Opcode map source: /home/nhamilton/Downloads/wp34s/wp34s_svn/trunk/tools/wp34s.op If your image is truly too large, you might have to assemble it with the LIB tool since that tool was designed to generate images for use with the flash. The flash has more space available than the RAM. As of now, the RAM is capable of holding 922 words and the flash 4094 words. You can look for these values at the top of the ./trunk/tools/wp34s.op file. [It might be possible to assemble a monster program with the ASM tool using the '-lib' switch but this has not been tested in this exact manner as yet.] Note that the emulator may behave differently from the actual calculator WRT to these numbers. So even if the emulator worked with these previous images, the actual calculator may not. Marcus will likely update you more completely on that matter.
Regards...
Re: [WP34s] Not working anymore - fhub - 12-28-2011 Quote:Well, "Oh my god" is in fact a very usual saying in German if you're shocked about something - and I was indeed shocked about such terrible bugs. Quote:Ok, the call in my batchfile looks like this (everything needed is in the current folder): tinyperl wp34s_asm.pl -op wp34s.op PF.wp34s TVM.wp34s TRIGON.wp34s PRS.wp34s -o wp34s-lib.dat -lib
And the assembler output is this: // Opcode map source: wp34s.op (specified)
Quote:Yes, my image is indeed too large (for RAM), but what I want is a library file (wp34s-lib.dat) containing all my programs, since now it's not possible anymore to use/load those single wp34s-n.dat files. And I've said already more than once that I can't get the LIB tool to work, so I have to do it directly with the ASM tool. Franz
Edited: 28 Dec 2011, 5:46 a.m.
Re: [WP34s] Not working anymore - fhub - 12-28-2011 I've now tracked down these 2 (maybe related) bugs about R-SWAP and tests x=1? to SVN 2071, here both appeared the first time (in SVN 2070 everything was still ok).
Re: [WP34s] Not working anymore - Marcus von Cube, Germany - 12-28-2011 I'll check it out. X=1? not working and R-SWAP, even in standard precision throws an error?
Edit: The X=1? issue should be fixed with the next revision. I still have to look after the R-SWAP problem. Edited: 28 Dec 2011, 7:56 a.m. after one or more responses were posted
Re: [WP34s] Not working anymore - fhub - 12-28-2011 Quote:Yes, x=1? e.g. gives 'true' also with 0 in X. And R-SWAP (with sss.nn in X) gives an error if nn>sss/2. Both errors since SVN2071.
Edited: 28 Dec 2011, 7:57 a.m.
Re: [WP34s] Not working anymore - fhub - 12-28-2011 BTW Marcus, I saw that there's now a new function 'RND nn', that's really a great enhancement! :-) I believe this new function will be used much more often than the ROUND function, and so I would prefer having this new RND on the keyboard on [g]0 where currently ROUND is located (and also the current keyboard label RND would better fit to this new function), and put ROUND into the catalog where also ROUNDI is. So maybe you could change this during your bugfixing, but of course only if you agree with me ... ;-)
Edited: 28 Dec 2011, 8:17 a.m.
Re: [WP34s] Not working anymore - Marcus von Cube, Germany - 12-28-2011 I found the R-SWAP error but I need a good idea on how to fix it. Hold on!
Re: [WP34s] Not working anymore - Marcus von Cube, Germany - 12-28-2011 I will not walk into Walter's territory without further consultation. Having ROUND on the keyboard is quite reasonable for the average user who wants to make the displayed result the present value of X. Being able to round to a given number of significant digits is more a matter of programming, I suppose.
Re: [WP34s] Not working anymore - fhub - 12-28-2011 Quote:Well, without going through your C-sources I can't really help you of course, but I guess that both bug may be related. Maybe the true bug is in the test function, and the R-SWAP fails because testing source, destination and number of registers returns a wrong result if nn>sss/2 !? (just a guess, but it would indeed be a coincidence if both bugs would have appeared independently in the same SVN)
And I have no clue how introducing double precision could have any influence on R-SWAP or testing x=_?
Re: [WP34s] Not working anymore - fhub - 12-28-2011 Quote:Yes, as for predators it's very dangerous to intrude into the marked territory of others. :-) Quote:Well maybe, but for programming it would even be more useful if the parameter nn (the number of digits to round) could be taken from any register - but that was already discussed for SDL/SDR too, and probably it's just too complicated to implement. Re: [WP34s] Not working anymore - Marcus von Cube, Germany - 12-28-2011 All argument taking commands support the -> indirection operator.
The bugs should be fixed. Can you try again?
Re: [WP34s] Not working anymore - Marcus von Cube, Germany - 12-28-2011 The x=1 test was affected by a bad copy and paste. I had to provide for a double precision compare against zero and one in both single and double precision (complex and real variants). I changed the code for zero and pasted it for one without updating it correctly in all places.
R-SWAP did some pointer arithmetic for range checking which needed an update.
Re: [WP34s] working again - fhub - 12-28-2011 Quote:Aaah, that's great - I must have overlooked this so far! Quote:Yep, both things are working correctly again - thanks! :-)
BTW, I just found that [g]RTN doesn't display the BEG announciator anymore (if I have a program in RAM and I'm within this program).
Re: [WP34s] working again - Marcus von Cube, Germany - 12-28-2011
Quote:Another one I have to look into... [g]RTN no longer goes to location zero if not in program mode but to location 001 instead which isn't indicated by the annunciator. Re: [WP34s] working again - fhub - 12-28-2011 Quote:Thinking a bit more about this [g]RTN it seems not so clear where this command should actually go!? If you have more than one program in RAM and you're currently within (running) e.g. program 2, then should [g]RTN really put you on line 000, which would mean you're kicked out of your program 2 and have to choose it again via the CATalog if you want to restart it! Maybe it would be better if [g]RTN would put you at the beginning of the current/active program (so a simple R/S would run it again) instead of line 000 - but I guess this won't be easy to implement (and maybe it would even require that each program has its own line numbers, i.e. start with 001 or 000).
Edited: 28 Dec 2011, 10:33 a.m.
RND nn - Gene Wright - 12-28-2011 Hey Marcus! Probably a dumb idea/question, as I haven't had enough coffee yet today. Can the round function round values in a register other than X? Usually, we round the "displayed" value to the display setting. how about rounding the value in a register in the same way?
Again, probably a way to do this already, but thought I'd ask.
Re: RND nn - fhub - 12-28-2011 Quote:No Gene, that's not possible. This would require 2 parameters (which register to round and how many digits), and I can't imagine that such double-parameters would ever be implemented. Re: [WP34s] working again - Marcus von Cube, Germany - 12-28-2011 Use GTO [dot] [up] for this! (You can leave out the h prefix: XEQ [dot] is the same as [h] GTO [dot]). Put LBL A in front of each program and a simple A will restart it.
A manual return is mainly useful to get you out of library space.
Re: RND nn - Marcus von Cube, Germany - 12-28-2011 Franz has hit the nail on the head. You will need an exchange operation before and after applying the rounding operation (ROUND or RND nn) to get this effect.
Re: [WP34s] working again - fhub - 12-28-2011 Quote:Good tips, thanks! :-) Quote:Are you sure? IIRC it didn't work this way when I last tried it - but I'm not sure, I'll check it again. Re: [WP34s] working again - fhub - 12-28-2011 Quote:Yes, I was wrong, [g]RTN gets you out of the library.
Another question, Marcus: Couldn't this be named a bit better, e.g. Lib, Bak and ??? (don't know what Lib3 is for)? And what's wp34s.dat (Lib2) really good for? Isn't this file always updated with the current RAM content when I close the emulator? And if it's automatically reloaded when I start the emulator again, then RAM and Lib2 should contain the same programs, right?
Re: RND nn - Gene Wright - 12-28-2011 Actually, I intended to say to the display setting. So a round command like this would round register XY to the number of decimal places of the display setting.
More coffee so perhaps a clearer explanation of what I meant. ;-)
Re: [WP34s] working again - fhub - 12-28-2011 And another thing, a little request: It now has already happened more than once to me that loading a program into the RAM automatically reduced the registers, and then running the program gave an error message.
Won't it be nice if this register reducing would give a short warning before or even ask if it should indeed be done (i.e. if the program should be loaded)? Something like "Reduce regs?" or "Set regs to nn?", as it is done when you try to clear a program.
Re: [WP34s] working again - Marcus von Cube, Germany - 12-28-2011 The respective chapter in the manual is still to be written. It should state: "Use local registers or start using global registers with low addresses first because high addresses may become deallocated when the program area grows." Lib 3 is the ROM contents. It was just a little bit shorter to just number the areas instead of naming them.
Lib 2 is the backup. Do a SAVE to copy RAM to lib 2. This will prevent any automatic generation of backup data that you have observed. (It happens on startup of the emulator when no valid backup is detected.)
Re: [WP34s] Not working anymore - Paul Dale - 12-28-2011 Quote: Almost all argument taking commands support ->. The exceptions are few: conversions, constants, alpha characters which you won't ever see directly and LBL which you will. I'm likely to change SKIP and BACK to not accept -> and instead increase the branch range (via the assembler if not via the keyboard too). In light of this, can anyone suggest a good use for indirect SKIP or BACK? I can come up with a couple of things where it could be used but nothing that shouts out and demands its use.
Re: [WP34s] working again - fhub - 12-28-2011 Ok, so the relations are the following: RAM <-> wp34s.datBTW, an automatic backup-file is NOT created on startup (as you wrote), you definitely have to do a SAVE to create it (I've just tested it). And for Lib3 I would really prefer the name ROM instead. OTOH what is this Lib3/ROM still good for, after WHO and deltaX have now also removed from there? Is this any area the user himself could access? Or is it just reserved for any future use?
One more question:
Edited: 28 Dec 2011, 6:05 p.m.
Re: [WP34s] working again - Marcus von Cube, Germany - 12-29-2011
Quote: The backup is created internally but not written to a file. So you just get the same information in the backup that was in the state file on startup. This is only done if no backup file is found.
Quote: This looks more like a bug than a feature. I'll check it. WHO and '[delta]X' should still be present.
Quote:
It helps you to distinguish between separate programs. Look into the vector or matrix code which has many global labels in a single program.
Re: [WP34s] working again - fhub - 12-29-2011 Quote:I believe that Pauli has removed those 2 entries from the ROM catalog - look at SVN 2087. Re: [WP34s] working again - Marcus von Cube, Germany - 12-29-2011 I've removed XROM from the CAT display.
|