HP Forums

Full Version: 41CL Routine of the Week: "UPLGID"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.

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.
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.
While you have YFNX loaded, try doing XEQ "41CL"
I couldn't resist...
Reference URL's