Post Reply 
41CL Routine of the Week: "UPLGID"
09-17-2014, 02:39 PM
Post: #1
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:


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.

Find all posts by this user
Quote this message in a reply
Post Reply 

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

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