41CL Routine of the Week: "UPLGID"
09-17-2014, 02:39 PM
Post: #1
 Ángel Martin Senior Member Posts: 1,046 Joined: Dec 2013
41CL Routine of the Week: "UPLGID"
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: Code:  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.

Cheers,
ÁM
09-17-2014, 02:57 PM
Post: #2
 Gene Moderator Posts: 926 Joined: Dec 2013
RE: 41CL Routine of the Week: "UPLGID"
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.
09-18-2014, 06:15 AM (This post was last modified: 09-18-2014 06:17 AM by Ángel Martin.)
Post: #3
 Ángel Martin Senior Member Posts: 1,046 Joined: Dec 2013
RE: 41CL Routine of the Week: "UPLGID"
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.
09-19-2014, 04:52 PM
Post: #4
 Monte Dalrymple Member Posts: 213 Joined: Jan 2014
RE: 41CL Routine of the Week: "UPLGID"
While you have YFNX loaded, try doing XEQ "41CL"
I couldn't resist...
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)