Hack Library V6.0 by Mika Heiskanen. Offered as-is, strictly for adventuresome hackers. [Note: This pretty much obsoletes the HACKIT library, Pro-Hackit, and most of the little hacker's goodies that you probably have floating around in your HP48. Load this and clean out all those odds 'n' ends. -jkh-] Name: COERCE Desc: Object conversions Stack: % --> # hxs --> # # --> % %% --> % C%% --> C% chr --> $ TRUE --> %1 FALSE --> %0 Name: XRCL Desc: RCL replacement Stack: $bz --> ob Calls BZ id --> ob lam --> ob PICT --> grob {seco} --> seco {romptr}--> ob {path} --> ob {} --> ob romptr --> ob hxs_addr--> ob #addr --> ob acptr --> ob %port --> Pvars %lid --> Libs With port numbers :&:lid --> lib Works for built-in libs too tagged --> ob Name: STO2 [Warmstarts my GX rev R. -jkh-] Desc: STO replacement Libraries will be immediately in use, a possible configuration object will be replaced by a TOSRRP call. The code will report if it suspects TOSRRP is not enough, in which case ON-C should be done to full execute the configuration object. Lid 4 is reserved for a crash library and no attach will be done. Stack: ( ob tag --> ) ( ob id --> ) ( ob lam --> ) ( ob symb --> ) ( grob pict --> ) ( backup %port --> ) ( lib %port --> ) Name: TIM Desc: Measure execution time in milliseconds Stack: ob --> ? %msecs Not accurate on S Name: USEND Desc: Send object via IR Stack: ? Name: URECV Desc: Receive object from IR Stack: ? Name: BZ [Requires 11K of memory to pack an object; 0K to unpack it] Desc: Compressor / Uncompressor. Very fast, efficient for large objects. Stack: $bz --> ob | ob --> $bz Name: RFU Desc: Uncompress object Stack: $rf --> ob Name: SYS Desc: SYSEVAL + some conversions Stack: hxs_addr--> ? SYSEVAL % --> %% C% --> C%% %% --> % C%% --> C% Name: COD Desc: Convert hex chars to an object. Ignores whitespace. Stack: $ --> ob Name: DCOD Desc: Convert object to hex dump. Shows rpl structure [For a straight hex conversion use ->ASC. -jkh-] Stack: ob --> $ Name: OBJFIX Desc: Fix bad download Stack: $bad --> ob Name: VARS Desc: ML VARS replacement Stack: --> {ids} Name: VARS2 Desc: SRPL VARS replacement, list nullids too Stack: --> {ids} Name: PG Desc: PURGE replacement Stack: tagged --> id --> {ids|tags} --> PICT --> Name: PG0 Desc: Purge port0 (Calls PG on 0 PVARS) Stack: --> Name: ORD Desc: ML ORDER replacement Stack: {ids} --> Name: REN Desc: Rename variable [Caution! Do not use in very-low-memory situations! -jkh-] Stack: id_old id_new --> Name: TB Desc: Tabify srpl/ml source code. Stack: $ --> $' Name: FMT Desc: Convert data strings into readable format. size determines the nibble count of each word, vars how many shall be put on each line Stack: $ %size %vars Name: ITYPE Desc: Get type number of object Stack: ob --> #type Name: CTIM Desc: Measure cycle count for instruction relative to P= 0 instruction by making a test program with Jazz assembler. Example: "A=DAT1 A" --> %13.801 (GX rev P) Stack: $ --> %cycles Name: DTEMP Desc: Dump non-bints from tempob area, as many as possible without GC Stack: --> obs Name: MEM1 Desc: Get free memory for card1, GX only Stack: --> %bytes Name: CDHD Desc: Set context properly to hidden directory Name: WKEY Desc: Get key object for next full key press Stack: ( --> ob %keycode ) Name: SC Desc: Memory scanner by Rick Grevelle Name: ->ASC Desc: Convert object to hex string [To see internal structure of RPL objects, use DCOD instead. -jkh-] Name: USE Desc: Report objects usage of ids and romptrs. Stack: ( ob --> {} ) ( rrp --> { name1 {} name2 {} .. ) Name: PMEM Desc: Return free memory in port Stack: ( %port --> %bytes ) Name: D->LIB [Code by Rick Grevelle. -jkh-] Desc: Create library Stack: ( rrp --> lib ) ( --> lib ) current directory used Name: L->DIR [Code by Rick Grevelle. -jkh-] Desc: Split library. Rick's L->DIR is still bugged: - $CONFIG is not converted - Cannot handle internal HP libraries Stack: ( lib --> rrp ) ( #lid | %lid | hxs_lid --> rrp ) Name: OB-> Desc: Split object Stack: ( arry --> obs {dims } ) ( seco --> obs %n ) ( symb --> obs %n ) ( romp --> %lid %cmd ) ( rrp --> obs %n ) ( backup --> ob id ) ( id --> $ ) ( #addr --> ob ) ( acptr --> ob ) + built-in stuff Name: ->DIR Name: ->PRG Name: ->XLIB Name: ->ALG Name: ->BAK Name: ->ID Name: ADDR ( any --> hxs_addr ) Name: LBCRC ( lib --> repaired_lib ) Name: RHASH ( #lid | %lid | hxs_lid --> hash_table ) Name: RLINK ( #lid | %lid | hxs_lid --> link_table ) Name: RCFG ( #lid | %lid | hxs_lid --> config ) Name: RMSG ( #lid | %lid | hxs_lid --> message_table ) Name: RTITLE ( #lid | %lid | hxs_lid --> $title ) Name: XGET Desc: XRECV substitute to enable downloading big objects. (FXRECV) Stack: ( id | %port --> ) Name: BZD Desc: Pack directory. Stack: ( --> ) [Note: This runs BZ on *every* object in the current directory and replaces the original objects with their BZ'd counterparts without warning. -jkh-] Name: USES Desc: Reports which vars in a directory call an id or romptr. Stack: ( rrp id | romptr --> { } ) Name: USED Desc: Report var refs for an entire dir. Stack: ( rrp --> { } ) [Note: the output is a list of the var names in the directory with each being followed by a list of all the vars which reference it. This is like the inverse of USE. -jkh-] Name: GRX2 Desc: GROB expand 2X Stack: ( grob --> bigger_grob ) [Note: DON'T USE THIS! It is buggy, and crashes often. Fixing it is left as an exercise for the student. -jkh-] Name: BY Desc: Byte size of any object Stack: ( any --> %size ) [Note: 2.5-byte ROM objects are copied to TEMPOB first. -jkh-]