HP Forums
41CL Routine of the Week: "UPLGID" - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: 41CL Routine of the Week: "UPLGID" (/thread-2152.html)

41CL Routine of the Week: "UPLGID" - Ángel Martin - 09-17-2014 02:39 PM

Hi folks, here's a new CL routine to impress your friends - using the YFNX Extreme version and the PowerCL.-

Say you want to unplug a given module using its IMDB id, irrespective of the page it's currently mapped into. Function UPLG$ in the PowerCL does something similar, but using the ROM signature (also known as page trail, i.e. the last few characters in the image) instead of the IMDB id, so doesn't quite do this job.

Fortunately the PLUG function in the YFNX is a much improved and versatile one than its YFNS precursor, and allows for this in a very simple way - see the code below:


1    LBL "UPLGID"    
2    "|- ?"    append space and ?
3    PPLUG    returns page in Alpha
4    E    
5    RIGHT$    strip unwanted text
6    "|-EMPT "    use control string
7    AROT    in the right place
8    PPLUG    unplug it
9    END    done

Doesn't get any shorter, just note that RIGHT$ is a sub-function and therefore it's entered using the XQ2 launcher - either by name of using its index# = 60.


RE: 41CL Routine of the Week: "UPLGID" - Gene - 09-17-2014 02:57 PM

Let me echo for all just how incredible the PowerCL and Sandmath 3x3 really are.

For example, I had wanted to write a short program to compute SI, the Sin(X)/X integral. I did so and only later found out that SI is built into Sandmath and is in mcode.

Spend time going through the AMMC/OSX, the PowerCL Extreme, and Sandmath 3x3 manuals. It takes time and I'm still learning, but the payoff is incredible.

My setup:

Port 4 - Library 4 bank switched rom
Page 5 - Timer
Page 6 - PowerCL Extreme bank switched ROM
Page 7 - YFNX
Page 8 - AMMC/OSX bank switched ROM
Page 9 - Hepax ROM
Page A - Sandmath 3x3
Page B - Sandmath 3x3 (2nd page)
Page C - Hepax 4K ram

Pages D, E and F are still free. This allows for the SandMatrix rom (2 pages required) or other goodies to be plugged in and used.

RE: 41CL Routine of the Week: "UPLGID" - Ángel Martin - 09-18-2014 06:15 AM

Glad to hear you're getting to know these modules, there is a lot in them and I agree it takes some time... it was challenging to put that much stuff in the manuals, I'm sure the end result can be improved.

You should use the overlays if possible, they provide very helpful visual cues to the module's functionality as well.

RE: 41CL Routine of the Week: "UPLGID" - Monte Dalrymple - 09-19-2014 04:52 PM

While you have YFNX loaded, try doing XEQ "41CL"
I couldn't resist...