Home

Sandbox 3D – The last HP-41 Plug

image

Contents

1. 125 CLLIB 103C XQ Allows NULLing i 126 CLUB AGEB Dei gt 61 i 127 CLLIB 149 NCXQ i 128 CLUB 024 090500 ENCPON 1 0 0 0 08 129 CLLIB NC XQ 130 ABEF gt 0385 i 131 CLUB gt 132 CLLIB ABF1 133 CLLIB 2 06 A CS amp X saveofsetina SEg ______ 134 CLLIB 135 CLLIB 4 136 CLLIB ABER 1353 A353 J ISRCHR __6_______ 145 CLUB A6FG 023 JNC 04 notfound bail outwith rie 146 CLLIB 7 341 _ PORT DEP Transfer code to Main LIB 147 CLLIB oc GO 148 CLLIB A6F9 7386 gt 386 MERGE _________ 150 CLLIB 1000 gt 0098 151 CLUB 85 PORT DEP 152 CLLIB 08c XQ Unless Error Flag is set 153 CLLIB BEES SARE I m DSPERR aoonaommooomoaaaoaaaa 154 CLLIB N 155 CLLIB 156 CLLIB 020 ee 157 CLLIB 013 5 158 CLLIB 015 u 159 CLLIB 003 160 CLLIB 208 H 161 CLLIB 7389 PORT DEP Output Message 162 CLLIB i08C 60 163 CLLIB 016 gt A816 APEREX only with a Note how SRCHR is really part of the ADRID function code which also does table look ups for its own purpose This code is written around the table structure refer to the Blueprints for more details 32 ADRID ADRID 4 ADRID 55 ADRD ___________ 6 03C RCR3 __________ PUN 56 ADRID 37 ADRID 38 ADRID 59 ADRID
2. P for page 6 the Printer reserved page G for page prompt 6 F effectively calling the PLUGG functions Caution Both PLUG UNPLUG offer all the 14 available choices in YFNS including U PLUGP and U PLUGH Exercise extra caution with those two locations as they may be used by system extensions like Printer or HP IL Page 6 in particular has more strict demands on the ROM layout that makes it non suitable for the majority of ROMS A so because pages 6 and 7 on the CL dont support bank switching they unfortunately arent a good place for the HEPAX ROM Note PLUGG will also allow 4 as valid input which invokes the PGG 4 function settings More about this one will follow later O ngel M Martin Page 7 of 31 08 01 2012 nu V1 D 4 21 r3 Li LU 2 2 CATALOGS CATALOGUES The additional CATalogs are as follows Fr D n l 1 BLCAT None Borrowed from the HEPAX ROM shows the 4k blocks contents 2 BFCAT Light Lists those elusive buffers present in the system 3 MMUCAT None Lists the MMU mappings into each block 4 ROMLI B Light List the ROM Library ID s available in Flash 5 CLLIB Light Same as above with an Alpha prompt for beginning section If you re like me you ll like to have good visibility into your machine s configuration With its ROM Library and MMU settings the CL adds a few dimensions to the already rich 41C
3. 200 The maximum number of HRAM pages accepted by the function is 9 but typical HEPAX configurations have TWO pages Standard HEPAX 8k or FOUR Advanced HEPAX 16k The ROM id is assigned by giving it the same value as the page number be aware that this may conflict with other ROMS currently plugged in your CL notably CLUTI LS uses ROM id C and YFNS uses F so those two pages will have to be renumbered manually to avoid any issues For this to work the target pages must be mapped to SRAM or otherwise the byte values could obviously not be changed 4k RAM HEPAX Setup RAM page F ROM page E 8k RAM HEPAX Setup RAM pages E F ROM page D 16k RAM HEPAX Setup RAM pages C F ROM page B These three functions will prepare the CL ports to hold a properly configured HEPAX file system starting from the scratch The process can be divided into four distinct parts O ngel M Martin Page 13 of 31 08 01 2012 1 First copying the HEPAX RAM template from Flash into the appropriate number of SRAM blocks as many times as needed 2 Followed by mapping those SRAM blocks to the 41 ports and 3 Then configuring them using HEPYX so that they are enabled for the HEPAX ROM to use 4 Besides that the functions will also map the HEPX ROM image to the page preceding the first HRAM block as shown in the table above So even if they don t require any input parameter you must be fully aware that
4. X then store it in B S amp X and we move on CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB 10 CLUB 11 CLUB 12 CLUB 13 CLUB 14 CLUB 15 wo Na C E 16 CLLIB 17 CLLIB 9 2 22 CLLIB 23 CLLIB 24 CLLIB 25 CLLIB 26 CLLIB 27 CLLIB 28 CLLIB 29 CLUB 30 CLLIB 3 CLLIB 32 CLLIB foas 33 CLUB JOBE A lt gt CMS 34 CLLIB ECG RCR13 B 35 COB SEX 35 CLUB 7369 PORT DEP 37 CLUB 1032 60 CLLIB foE9 A6E9 CLLIB ALL CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB to bo AAR RAR Oh OMA A wN A For the rest K Z we ll need to read the keycode of the pressed key and act accordingly Also we need to discard any non letter key rejecting it if its keycode value is outside of the A Z range Now the show is about to start see how the key pressed value in N is compared with every possible value in the K Z range building the pointer in C S amp X by repeat one additions until coming up to its final result O ngel M Martin Page 2 of 31 08 01 2012 CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB 67 CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLI
5. add offset to it 0 ADRID put it in C 6 3 ADRID put it in A 6 3 12 ADRID put reference in A S amp X 43 ADRID bring adr to 44 ADRID keep it in A M 5 ADRID FETCH S amp X read value at address 6 ADRID 2080 S amp X value non zero ADRID NC RTN NO TERMINATE HERE 8 ADRID are they different 9 ADRID no gt FOUND 0 ADRID add offset 5 BYTES 1 51 ADRID 52 ADRID 1 53 ADRID nexaddrfeld __________ 1 4 ADRID loop back 55 ADRID FOUND ______ __ 180 56 ADRID A36B 23 1 A36C 170 PUSHADR A36D Dn RTN increase RTN adr And that s all folks easy when you know the tricks amp O ngel M Martin Page 4 of 31 08 01 2012 Appendix 4 Serial Transfer CLWRI TE source code written by Raymond Wiker using System using System IO using System IO Porte using System Threading public class CL Writer public static void Main string args int baudrate 1200 int delay 0 if args Length lt 2 Console Error WriteLine Usage Console Error WriteLine 0 file port baudrate delay CLWriter Console Error WriteLine Console Error WriteLine Where baud defaults to 0 baudrate Console Error WriteLine and delay defaults to 10 delay Console Error WriteLine Available Ports Console Error WriteLine foreach string s in SerialPort GetPortNames return Console Error WriteLine 0 s string
6. last chr but the memory requirements are much larger 18 EW replace dE x 1 provi due to all the alpha strings that would be a ace copy to 0x809 in RAM required to do so 21 15201 cum 22 4 yes skip the rest For example see below for the 16k case using 23 _ 5 remove last char 24 SES replace it pages C D E and 25 AVIEW provide feedback 26 YMCPY copy to 0x80A in RAM This would mean having to write on each page 27 YBSP remove last char the four page id s plus the pointers to the 28 replace it previous and next pages for a total of 10x or 2 NEN BINA BAO equivalent to 110 bytes 20 _ vmcPy Se Sen BR 31 LBLOO lt 32 SETUP announce last phase 33 AVIEW 809FE7 000C 34 buffer common string 35 ASTOL in temporary storage 808000 000C 36 808 build first mapping text 37 ARCLL 808FE8 000D 38 PLUG4U plug 0x808 to page F 80AFE7 000D 39 FS 00 4k case 40 GTO 01 M yes jump over 809000 000D 41 1 809 build 2nd Mapping text 42 ARCLL BO9FE8 000E 43 PLUG4L plug 0x809 to page E BOBFE7 000E 44 FS 01 8k case 80A000 000E 45 67003 7 yes jupm over 46 80A build 3er Mapping text 47 B0AFE8 000F 48 PLUG3U plug 0x80A to page D 80B000 000F 49 80B build 4th Mapping text 50 X ARCLL 51 PLUG3L plug 0x80B to portitC 52 4 configuration parameters 53 ENTER four pages 54 12 starting at page C 55 67000 4 56 LBLO03 8k case
7. necessary This function doesn t have a manual mode using R S but the displaying sequence will be halted while any key other than R S or ON is being depressed resuming its normal speed when it s released again O ngel M Martin Page 8 of 31 08 01 2012 2 2 2 Buffer CATALOG BFCAT Buffer CATalog Hot keys R S SST SHIFT D H D Deletes Buffer In manual mode H Decodes Header register In manual mode This function is very close to my heart both because it was a bear to put together and because the final result is very useful and informative It doesn t require any input parameter and runs sequentially through all buffers present in the calculator providing information with buffer id and its size 41 buffers are an elusive construct that is mainly used for 1 0 purposes Some modules reserve a memory area right above the KA registers for their own use not part of the data registers or program memory either The OS will recognize those buffers and allow them to exist and be managed by the owner module which is responsible to claim for it every time the calculator is switched on A good example is the Time module which uses it to store the alarms data Each buffer has an id number ranging from 1 to 14 Only one buffer with a given id can exist thus the maximum number present at a given time is 14 buffers assuming such hoarding modules would exit which thankfully they don t The tab
8. offer any cues in the prompt and therefore deserve special consideration The picture below shows the convention for the external pages of the 41 Port 2 Upper Page B hex Lower Page Port 4 Upper Page F hex Lower Page Lower Page E hex Valid entries for the prompt are 1 for port 1 comprising pages 8 and 9 2 for port 2 comprising pages A and B 3 for port 3 comprising pages C and C L to flag LOWER half port condition followed by the port number U to flag an UPPER half port condition followed by the port number For the U PLUG cases the prompt completes either when the number 1 4 or the letter G P H is entered and the corresponding function is launched For half port or 4k modules use the L U keys first in the un plugging prompts then the port number These keys act as toggles when pressed sequentially replacing each other in the display upon repeat usage Also during these events pressing BackArrow removes the half port condition and returns to the main prompt Remember that plugging a module into the wrong port location can create minor issues or major havoc if you re overwriting some part of the machine s configuration A good example is overwriting YFNS itself or a HEPAX RAM block Always make sure the destination is safe using BLCAT the standard CAT2 or better yet the CAT 2 Also valid entries H for page 7 the HP IL reserved
9. the previous MMU mapping to those ports will be overwritten The exception being the YFNS ROM itself as the programs will check whether it is currently mapped to the page being copied and abort if that s the case A nice built in protection to avoid getting in trouble Obviously these functions are not to be used frequently since each execution will wipe off the contents of the HRAM pages overwritten with blank FLASH templates Therefore the medium warning sign proceed with caution See the appendix 2 for a listing of the FOCAL programs that implement this functionality 2 3 2 Page Plug functions PLUGGX PLUG Page by X Pages in X 4k ROMS onl PLUGG _ PLUG page by prompt Prompts for page GE 4k ROMS only PLUGG Get plugged I D Prompts for page 6 F 4k ROMS only Plugging the HEPAX ROM into the appropriate page is accomplished by a single function using a parameter to define the page address This function is PLUGGX or Plug Page by and its prompting doppelg nger PLUGG Contrary to the port related convention of the native CL functions we re now referring to a page related one whereby the arguments of the function are the ROM id in Alpha same as usual and the page in X removing the hard coded dependency of the location used by the PLUGLxx and PLUGUXxx functions Note that PLUGG and PLUGG are mutually complementary functions as they both operate on page id and will take or return
10. to any key that alone will give you access to more than 35 functions from that single key an effective way to make it compatible with other existing key assignments saving memory KA registers and time So go ahead and get comfortable with that arrangement as your baseline Prompting functions use a technique called partial key entry dividing the data entry in two or more parts The keyboard is also re defined in that just those keys corresponding to the appropriate options are active The cues in the prompt will offer you indication of which keys are active on the keyboard and typically are intuitive enough to figure out in each case ur EJ options for none 2x 5x 10x 20x 50x and Use 0 for 20x Radix for 50 as 2 and 5 are already taken for 2x and 5x speeds n general all launchers behave in a similar manner The Back Arrow key will either cancel out entirely or remove partial entries Non active keys will blink the display and maintain the prompt Holding down the last key briefly shows the invoked function name visual feedback This will be followed by NULL if kept depressed long enough last chance to bail out Launchers are not programmable per se but They can be used in PRGM mode to enter the called upon function as a program line O ngel M Martin Page 6 of 31 08 01 2012 Port 1 Upper Page 9 hex Lower Page 8 hex Port 3 Upper Page D hex The PLUG and UPLUG launchers don t
11. 07 54 057 5 to 9 26 YCL delete from 27 YBSP back space 28 ATOX next 29 RDN 30 ADRID decode address 12 CLX 31 XTOA 13 65 07 32 33 3 34 AROT next 35 RDN 36 AVIEW show IDs 18 CLD 37 PSE pause 19 RTN 38 END A related function is YFNZ which returns the page number the YFNS is currently plugged in This can come very handy in your programs to avoid overwriting it with other modules as we ll see in the HEPAX configuration routines Another related function is PLUGG It interrogates the MMU to find out which module is plugged into a given page the input to the function placed in X This is all page driven and not based on the port number There is no restriction in the input to the page number however the returned values for pages 0 1 2 3 and 5 don t quite have the same meaning PLUGG Also uses ADRID to decode the string returned by YPEEK which provides the MMU address mapping the corresponding page In the YFNZ case there s no need to look up in the ROM id table since we know what we re looking for just need to check all pages looking for that specific string O ngel M Martin Page 11 of 31 08 01 2012 2 2 4 A wealth of a Library ROMLIB ROM Library No inputs CLLIB CL Library Prompts for A Z P Invokes PLUG A Copies id shown to Alpha One of the most notable features of the CL is its extensive ROM image library allowing you to plug almost any conceivable mod
12. 1 tmp for int i 0 i lt count i Console Write 0 x2 buffer i if i96 16 15 Console WriteLine serialport Write buffer i 1 if delay gt 0 Thread Sleep delay Console WriteLine catch EndOfStreamException nada serialport Close Angel M Martin Page 6 of 31 08 01 2012 1 Copy YFNS 1A to RAM at 80C000 and patch for items 2 5 8 These affect the operation of YIMP I did this with a variation of the PATCHIT program posted earlier 2 Execute TURBOS50 3 Execute SERINI 4 Execute BAUD12 From the documentation this should not be necessary but I had to explicitly set 1200 baud to get the transfer to work 5 The file yfns le rom has the opposite byte order of what YIMP expects so the transfer program needs to perform byte swapping Alternatively you might do the byte swapping before you do the transfer 6 Transfer the ROM I chose to transfer it to 80D000 i e put 80D000 O0FFF in the alpha register start YIMP For the transfer I used the CLWriter program that I posted a few days back with the command CLWriter exe yfns le fixed rom 1 1200 5 the file yfns le fixed rom is the byte swapped version of yfns le rom I probably should have chosen a slightly different name but that does not really matter The 5 means that I put a 5 millisecond delay after each byte It may not actually be necessary I added it be
13. 31 08 01 2012 23 z spuer HEES SET 2 3 1 Configuring the HEPAX system HEPAX Fns Launcher Prompts 4 8 6 1 D Accessible from Initializes File System Prompts for values Initializes File System Takes inputs from Stack Author Howard Owen Use these functions to initialize the HEPAX File System on the CL This is needed on the CL because this feature is disabled in the HEPAX ROM image included in the CL Library and therefore the addition here The function takes two parameters the number of HEPAX RAM pages to configure and the address of the first one These are expected to be in the Y and X registers respectively for HEPYX whereas they ll be manually entered as prompts in HEPI NI dr E REN Note that even if the first prompt is a DECIMAL entry the double quotes will remind you that the second one is in HEX with valid inputs being 8 9 and A F The procedure consists of writing a few bytes into strategic locations within each HRAM page so that the HEPAX will recognize them as being part of the HEPAX File System Those locations and byte values are shown in the table below Address x000 ROM id gt equal to the page 7 Previous HRAM page id zero if first xFE8 Next HRAM page id zero if last xFE9 Fixed value 091 xFED Fixed value 090 xFEF Fixed value 091 xFF1 Fixed value OE5 xFF2 Fixed value
14. 57 2 config parm 58 ENTER two pages 59 14 starting at page E 60 GTO00 61 LBL 01 31 4k case 62 E config parm 63 ENTER just one page 64 15 starting at page F 65 LBLOO 66 HEPINI configure HEPAX FileSys 67 E get pages below 68 69 70 PLUGGX plug HEPAX there 71 HEPDIR show we ve done it 72 END done Angel M Martin Page 1 of 31 08 01 2012 01 LBL HPX4 Entry for 4k 02 E 03 GTO 02 04 LBL HPX8 05 2 06 02 07 LBL HPX16 Entry for 8k Entry for 16k Apendix 3 MCODE Listing showing the Alphabetical sections prompting code The function CLLIB begins by building the prompt text in the display Using the OS routine PROMF2 is helpful to save bytes so there s no need to write the function name again CLLIB Alpha is cleared using CLA just to prepare for a possible copy of the ROM id to Alpha using the A hot key in run mode Then we get into a partial data entry condition waiting for a key to be pressed Back Arrow sends the execution to EXI T3 to do the housekeeping required to reset everything back to the standard OS required status disable Display resetting Keyboard bits CPU flags etc Since the valid keys are quite a lot A Z we need to use multiple conditions in the logic The first two rows are the easiest as they set up CPU flag 4 and that can be tested easily In this case we copy the mantissa sign in A to C S amp
15. A6D1 JNC 260 JNC 23d 222 C C 1 PT Dep S amp X JNC 21 ____ A6D3 1265 NCXQ A6D4 fo20 __ 0899 605 1265 NCXQ 606 1020 A6D7 _ 228 JNC 59d II 4 608 gt 27A 1 ___ C 1M 27A ABDC 27 1 DD _ 274 1 _ 27 1 lt 27A CAN 111 27A __ 1 27A _ 1 lt ABER 27A _ C C 1M _ 274 220 L keycode 320 keycode 130 keycode 230 0 keycode 330 R keycode 240 Blink Display pass 1 AG 030 RCR3 place it in 5 amp Page 3 of 31 08 01 2012 The last part is about presenting the chosen key allowing if it s held down long enough Resetting everything back to normal conditions CLNUP and see whether there actually exists such a section before we launch into a blindfold enumeration This is done by the subroutine SRCHR which will fetch the address in the ROM id table where the section starts With that we ll transfer the execution to the ROMLIB function code where the actual enumeration will take place padded value to start from as opposed to doing it from the top of the table 124 CLLIB 1379 PORT DEP CleanUp and Show
16. B CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB CLLIB E T HUN Angel M Martin 690 1130 LDIS amp X AB9E CON A AB9F 366 7 S amp X ABA 1C3 JNC 56d 1 222 1 ABA2 366 A C S amp X AGA B3 54d 4 222 1 PT ABA5 366 S amp X A846 1A3 INC 920 ________ 7 1130 10158 CON Ge ABA9 366 A C S amp X 18B 49d 3j 222 1 222 1 AGAD 366 S amp X 173 464 ABAF 222 1 6 366 S amp X A6B1 _ 163 A JNC 444 A6B2 130 LDIS amp X ABB3 6 4 366 A C S amp X 685 14B JNC 41d th A6B6 222 C C 1 PT A6B7 366 S amp X A6B8 13B JNC 39d ABB9 222 C C 1 PT ABBA 366 S amp X A6BB 12B 37 A6BC 222 C C 1 PT A6BD Dep S amp X A6BE A6BF A6CO A6C1 A6C2 JNC 35d 103 32 6 3 222 1 6 Dep S amp X 6 5 083 309 6 6 222 C C 1 PT ABC7 Dep S amp X ABC8 OES 28d ABC9 222 C C 1 PT ABCA 366 S amp X A6CB A6CC A6CD A6CE A6CF A6DO
17. CAT MMU CATalogue No inputs ADRID Gives ROM id from ADR Expects string in Alpha FYNZ FYNS Location Finder No inputs PLUGG ROM id in page by X Prompts for page Valid inputs are 4 6 F MMUCAT is really a FOCAL program that drives the function ADRI D the real engine behind it not to be confused with the capital city of a country know quite well ADRID is obviously programmable The idea is simple produce a list of the MMU mappings into the different pages showing either the ROM id or the address Flash or SRAM currently mapped to the port A loop is executed starting on page 4 and up until page F Each iteration retrieves pokes more appropriately the address written into the corresponding MMU register then searches it against the internal ROM id table written into the CL UTILS module More about this later Note that full port modules will return the ROM id attached to the lower half and the address to the upper half RAM MMU entries will return the corresponding RAM address While similar to the CAT2 concept this really has an MMU oriented perspective of things and thus is purely a 41 CL feature it ll render all entries zero if used on a regular 41 The program listing is rather simple as ADRI D does all the weight lifting under the hood 01 LBL MMUCAT 20 LBL 00 02 0 0000 21 8040 03 ASTO X 22 XTOA 04 52 4 23 ARCL Y pages 05 XEQ 00 24 YPEEK read MMU rg 06 CLX 25 YSWAP swap around
18. ECURE enable password lock none Sets SECURE mode ON 41 UNLOCK disable password lock asks for password Sets Secure mode OFF 42 XPASS change password asks old new passwords Password is changed 43 XROM ROM function Launcher Prompts for values Launches function 44 Sum of Digits number in X sum of mantissa digits Functions in BLUE are all in MCODE Functions in BLACK are MCODE entries that call FOCAL programs Functions in QUOTES italics are FOCAL programs Functions in RED denote prompting entries O ngel M Martin Page 5 of 31 08 01 2012 2 The functions in detail The following sections of this document describe the usage and utilization of the functions included in the CL UTILS module While some are very intuitive to use others require a little elaboration as to their input parameters or control options which should be covered here 2 1 Function Launchers The table below lists the launchers by function groups BAUD None Calls BAUD12 BAUD24 BAUD48 BAUD96 1 2 MMU None Calls MMUDIS MMUEN or MMU 3 TURBO None Calls the corresponding TURBO xx function 4 PLUG Prompts for port location Enter L U first when needed 5 UPLUG Prompts for port location Enter L U first when needed 6 HEPX Configuration loading for HEPAX set ups 7 Launcher of Launchers invokes any of the five above When you assign CLF
19. LC ON event causing to prompt the user for the password during the start up process 2 Function UNLOCK deactivates the security by clearing the protection flag O ngel M Martin Page 15 of 31 08 01 2012 3 Function XPASS allows the user to change the password from the default one to his her favorite one The length of the password is limited to six 6 characters i i NN Enter code up to 6 chrs long and end with R S Inputting the password is very simple but very unforgiving as well at the prompt PASSWORD just type the letters one by one until completing the word and you re done If you make a mistake the machine will switch itself off and it ll be groundhog day all over gain until you get it right Each keystroke will be acknowledged by a short tone but no change to the display so nothing like oe as you type the word If the wrong letter is entered a lower pitch sound will be heard and the calculator will go to sleep Be especially careful when entering a new password code as there is no repeat input to confirm the entry so whatever key combination you type will be taken when ending the sequence with R S The initial password factory default so to speak is ee Enter code up to 6 chrs long and end with R S Here again it comes without saying that this will only work when the CL UTILS module is mapped to a SRAM block in the MMU or otherwise none of the ROM writing will work Note th
20. V I TI E Vi 9 HIM ILL Extensions e User s Manual and Quick Reference Guide e at SOO nee E E d Photo By J rgen Keller 2011 Programmed by ngel M Martin January 2012 This compilation revision 2 G 01 Copyright O 2012 ngel Martin Published under the GNU software licence agreement Original authors retain all copyrights and should be mentioned in writing by any part utilizing this material No commercial usage of any kind is allowed Screen captures taken from V41 Windows based emulator developed by Warren Furlow See www hp41 org CLWRITE Source Code written by Raymond Wiker Cover photo Juergen Keller 2011 Inside photos Geoff Quickfall 2011 Acknowledgment This manual and the CLUTILS module would obviously not exists without the 41CL Many thanks to Monte Dalrymple for the development of the amazing CL board O ngel M Martin Page 1 of 31 08 01 2012 CL UTILS Module Extension Functions for the 41CL Table of Contents 1 Introduction 11 A word of Caution 5 12 Functions at a glance 6 2 The functions in detail 21 Function Launchers 7 2 2 Catalogues and CATalogs 9 2 3 Interrogating the MMU 12 2 4 A wealth of a Library 13 3 HEPAX and Security 3 1 Configuring the HEPAX system 14 3 2 Page Plug Functions 15 3 3 Security Functions 16 4 Advanced Territory 4 1 Using Page 4 17 4 2 Calculator Flash Backup amp Restore 17 5 Other Ext
21. W Doug Wilder David van Leeuwen HP Co HP Co David Yerka Eramco Eramco HP Co Ken Emery 2 HP Co Vaudenay Angel Martin HP Co GMAC GMAC Paul Monroe Electronics Author Compiler 08 01 2012 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 O ngel M Martin HEPX HOME ICDO IDC1 IDC2 UMAT UMTX ILBF KC135 L119 LAIT LAND LBLS MADV MATH MCHN MDP1 MDP2 MELB MILE MLBL MLRM MLT MTRX MTST MUEC NAVI NCHP NFCR NPAC NVCM OILW P3BC PANA PARI PCOD PETR PLOT PMLB POLY PPCM PRFS PRIQ QUAT RAMP REAL ROAM ROMS SANA SBOX SEAK SECY 5856 SIMM SKWD SMCH SMPL SMTS 16k 4k 4k 8k 4k 8k 8k 4k 12k 8k 4k 4k 4k 12k 4k 4k 8k 8k 4k 8k 4k 4K 8k 4k 4k 8k 8k 4k 4k 8k 8k 8k 16k 8k 4k 4k 8k 8k 4k 8k 8k 4k 8k 8k 4k 8k 4k 4k 12k 8k 4k 4k 4k 16k 4k 8k 4k 8k HEPAX Module Home Management Pac Icode ROM ML ICD BG UG IDC JMB Math JMB Matrix IL Buffer Weight amp Balance Comp AFDC 1E 003 LaitRAM XQ2 Land Navigation ROM Labels ROM Modified Advantage ROM Math Pac Machine Construction Pac AFDC 1F ROM AFDC 1F ROM Melbourne ROM Military Engineering ROM Mainframe Labels ML ROM Multi Prec Li
22. X system and the goal is to have equivalent catalogue functions to review the status and options available Each CATalog has its own idiosyncrasies but in general they feature single step modes and have hot keys to allow for specific actions like deletion of buffer navigation shortcuts and direct plugging of ROMs into a port This makes chores like searching for the correct syntax and plugging a module from the library a trivial task Both BLCAT and BFCAT are not strictly related to the CL and will also work on a standard 41 Obviously MMUCAT is only meaningful for a CL machine and will return all zeroes if the CL board is not installed CATalog functions are notoriously complex and take up a significant amount of space yet you d hopefully agree with me that the usability enhancements they provide make them worthwhile the admission price 2 2 1 Block CATALOG BLCAT Block Catalog Author VM Electronics Source HEPAX Module Lists the first function of every non empty ROM block i e Page starting with Page 3 in the 41 CX or Page 5 in the other models C CV The listing will be printed if a printer is connected and user flag 15 is enabled Non empty pages will show the first function in the FAT or VO FAT if such is the case Empty pages will show the VO ROM message next to their number Blank RAM pages will show QUASI RAM indicating their RAM in ROM space character No input values are
23. andard HP Co 118 STAT 4k Statistics Pac HP Co 119 STRE 4k Stress Analysis Pac HP Co 120 STRU 8k Structural An Pac HP Co 121 8k SUP R ROM James W Vick 122 SURV 4k Surveying Pac HP Co 123 THER 4k Thermal Pac HP Co 124 TOMS 4k Tome ROM Thomas A Bruns 125 4k ToolBox Il Angel Martin 126 TREK 4k Start Trek Angel Martin 127 TRIH 4k 83Trinh Phil Trinh 128 UNIT 4k Unit Conversion Angel Martin 129 USPS 8k Mail Delivery USPS 130 XXXA 4k Empty Not listed 131 XXXB 4k Empty Not listed 132 XXXC 4k Empty Not listed 133 XXXD 8k Empty Not listed 134 XXXE 8k Empty Not listed 135 XXXF 16k Empty Not listed 136 5 4k Alternate YFNS Monte Dalrymple 137 ENZ 4k Main YFNS Monte Dalrymple 138 414 8k 12 Module Angel Martin 139 4k Zenrom Zengrange Ltd 140 4k Programmer Zengrange Ltd Take over ROMS Other modules not included in the Library For sure many more of these abound yet these are the ones have knowledge of feel free to complete the list with your own entries and don t forget to share it with the whole community opm BO dorum 9 CCD Advanced Apps Geometry 2011 Market Forecast MONOPOLY ROM Mortar Fire Data Calculator Mountain Computer EPROM Dr Z RaceTrack Module 5 1 2 3 SUDOKU amp Sound 10 VECTOR Analysis 11 Yach Computer 4k ngel Martin 4k 4k 8k 8k 4k 4k Jean Marc Bai
24. brary MATRIX ROM MC Test ROM Muecke ROM Navigation Pac NoVoCHAP NFC ROM NavPac ROM NaVCOM 2 OilWell Module Aviation for PANAME ROM PARIO ROM Proto Coder 1A Petroleum Pac Plotter Module PPC Melb ROM Polynomial Analysis PPC ROM ProfiSet PRIDE ROM Quaternion ROM RAMPage Module Real State Pac ROAM Module SV s ROM SandMath 12k SandBox SeaKing MK5 Securities Pac Gas Module SIM Module Skwid s BarCode Speed Machine Simplex Module SandMath 8k Page 22 of 31 Electronics HP Co 1987 1985 Jean Marc Jean Marc Angel Martn 2 Zengun LaitRam Corp Warren Furlow W Doug Wilder Angel Martn HP Co HP Co Zengun Zengun PPC Members 2 David van Leeuwen Frits Ferwerda Peter Platzer Angel Martin 2 M cke Software GmbH HP Co G Isene amp A Martin Nelson F Crowe 2 2 Jim Daly 2 5 Bariziene amp JJ Dhenin Nelson F Crowe Nelson F Crowe HP Co HP Co PPC Members Martin JM Baillard PPC Members Winfried Maschke 2 Jean Marc Baillard Angel Martin HP Co Wilson B Holes Serge Vaudenay Angel Martin Angel Martin Navy Air HP Co SGS Redwood Ken Emery Alameda Mngmt Corp Phillipe J Roussel Angel Martin 08 01 2012 114 SND2 8k SandMath ll Angel Martin 115 SPEC 4k Spectral Analysis Jean Marc Baillard 116 SRVC 4k Service ROM HP Co 117 STAN 4k St
25. buffers which will show a question mark next to the id in the display This is a rather strange occurrence so most likely won t be shown but it s there just in case BFCAT has a few hot keys to perform the following actions in manual mode 1 R Sstops the automated listing and toggles it with the manual mode upon repeat pressings D for instant buffer deletion there s no way back so handle with care 3 H to decode the buffer header register Its structure contains the buffer ID as well as some other relevant information in the specific fields all buffer dependent 4 SHIFT to flag the listing to go backwards both in manual and auto modes 5 SST and BST to move the listing in manual mode until the end or beginning is reached 6 BackArrow to cancel out the process and return to the OS NA Like it is the case with the standard Catalogues the buffer listing in Auto mode will terminate automatically when the last buffer or first if running backwards has been shown In manual mode the last first entry will remain shown until you press BackArrow or R S Should no buffers are present the message BUFFERS will be shown and the catalog will terminate Note also that the catalogue will not be printed being shown only on the display MILITTTITIIITI g 5 Photo courtesy of Geoff Quickfall O ngel M Martin Page 10 of 31 08 01 2012 2 2 2 Interrogating the MMU MMU
26. cause I got timeouts but these were probably because I left out step 4 BAUD12 7 Execute PLUGIL with 80D RAM in the Alpha register 8 Verify using CATALOG 2 that I m now running YFNS 1E Ld O ngel M Martin Page 7 of 31 08 01 2012
27. eep tabs with the enumeration The same considerations made about plugging modules can be made here be careful not to overwrite anything you re using with a new ROM image as there s no check whether the target location is already used or not As you can imagine there is a lot of code sharing between ADRID and these two ROM library catalogue functions Fundamentally they all use a ROM id table within the CL UTILS ROM to look up for the string and fetch the address in Flash of the corresponding image This table is quite long occupying almost 1k in the ROM yet worth every byte The A Z prompt entry in CLLIB is a refinement of the same idea it provides a handy shortcut to start your search in the appropriate section so there s no need to review all the preceding ones which can be very lengthy considering the sheer number of them even if you used ENTER to skip sections The implementation is quite nice even if it s the author who says it have a look at the CLUTILS Blueprint if you re curious about the MCODE implementation details If the section doesn t have any ROM id starting with such letter which currently only occurs with V and W letters the message VO SUCH will be shown Non alphabetical keys are not valid entries and will cause the display to just blink and maintain the prompt Lastly selecting X will list the general purpose placeholders refer to the CL manual for details on those O ngel M Martin Page 12 of
28. ensions 5 1 Alpha and Display Utilities 19 5 2 Other Utilities 20 53 Farewell 6 Appendixes 21 O ngel M Martin Page 2 of 31 08 01 2012 O ngel M Martin Page 3 of 31 08 01 2012 CL UTILS Module Extension Functions for the 41CL 1 I ntroduction Without a doubt the 41CL can be considered in many ways to be the pinnacle of the HP 41 system It comes with a well thought out function set to manage its capabilities from the basic to the more adventurous ones which have inspired the writing of yet further extensions to that capable toolset This collection is designed to enhance and complement the YFNS function set providing easier access to the many powerful capabilities of the 41CL platform Some are function launchers grouping several functions by their area of functionality into a single prompt driven one like it s the case for the Plug Unplug functions the Baud rate TURBO and MMU settings functions A launcher of launcher sits atop these providing quick access to 35 YFNS and other functions from a single key assignment Some other extend the functionality by providing new features and more convenient alternative to manual tasks Examples of these are A fully featured ROM library CATALOG system allowing direct plugging into the port of choice Page Plug functions alternative to the Port ones including routines to handle page 4 Programs to backup and restore the complete calculator contents to from Flas
29. filename args 0 string portname args 1 if args Length gt 2 1 baudrate int Parse args 2 if baudrate 1200 amp amp baudrate 2400 amp amp baudrate 4800 amp amp baudrate 9600 1 Console Error WriteLine Invalid baudrate 0 should be one of baudrate Console Error WriteLine 1200 2400 4800 9600 return if args Length gt 3 delay int Parse args 3 if delay gt 10 Console Error WriteLine delay 0 probably too large delay return if File Exists filename Console Error WriteLine File 0 does not exist filename return FileStream fstream File Open filename FileMode Open if fstream Length gt 8192 Console Error WriteLine WARNING 0 is over 8192 bytes long 1 filename fstream Length Console Error WriteLine Will only transfer the first 8192 bytes Angel M Martin Page 5 of 31 08 01 2012 BinaryReader binReader new BinaryReader fstream SerialPort serialport 2 new SerialPort serialport PortName portname serialport BaudRate baudrate serialport Parity Parity None serialport DataBits 8 serialport StopBits StopBits One serialport Handshake Handshake None serialport Open try byte buffer new byte 8192 int count binReader Read buffer 0 8192 swap high amp low bytes for int 0 i lt count 2 byte tmp buffer i buffer i buffer i 1 buffer i
30. h configuration and set up making the HEPAX integration a simple and reliable affair Security functions to password protect your machine from prying hands Other housekeeping functions roundup the set making for a total of 44 functions tightly packed into a 4k ROM This is a design criterion as the small footprint of the module makes it ideal to share with other utility packs most notoriously the CCD OS X or its alter ego AMC OS X for the ultimate control S0 save some small exceptions there is no duplication between these two A word of caution As wise men remind us all with power comes responsibility ndiscriminate usage of some of these functions can have unpleasant consequences ranging from unexpected results and easy to recover machine lock ups to more serious ones involving loss of Flash sectors or even electrical damage in the worst scenario Functions have some built in protection to ensure that they re used properly but they are not absolutely foolproof in that such protection can always be circumvented So beware and as general rule f you don t understand something dont use it To help you with this the more dangerous functions are marked with the WARNING sign all throughout this manual Avoid them if you re not absolutely sure that you know what they are for and fully understand their operation And a ways always have fresh batteries on when using the Flash backup t had to be said so now t
31. hat we got it out of the way we re ready to dive into the CL UTILS description and usage example May you have a nice ride Note CLUTILS is designed to work paired with the XROM 15 version of YFNZ O ngel M Martin Page 4 of 31 08 01 2012 Function index at glance And without further ado here s the list of functions included in the module L Function Description Inputs Output 1 LCLUTLS 2E Module Header In a n a 2 2MMU MMU Status Yes No none YES NO skip if false ECLF Global Launcher Prompts B M P T U Launches selected Launcher 4 BAUD Baud functions launcher Prompts 1 2 4 9 Launches selected function 5 CL ID Library Prompts A Z Starts listing at selected letter 6 MMU MMU functions launcher Prompts C D E Launches selected function 7 MMUCAT MMU Catalog none Sequential list of MMU Entries 8 PLUGG Plug Page Prompts for page Plugs ROM in page 9 PLUGG Page Location MMU Prompts for page content of MMU entry for page 10 PLUGGX Plug Page by X in X Plugs ROM in page 11 PLG 4 Page 4 Plug Prompts F L S Selected ROM plugged 12 PLUG PLUG functions launcher Prompts for location ROM with ID in ALPHA is plugged 13 RONMLIB ROM Library Displays all ROMs Sequential list of ROM ID s 14 UPPG4 Clears MMU entry for page 4 none MMU entry cleared 15 TURBO TURBO functions launcher Prompts X 2 5 1 0 Launches selected function 16 UPLUG UPLUG functions Launcher Prompts for locati
32. hidden FOCAL program that writes the appropriate entries into the MMU registers so that the mapping is correct Refer to the CL manual for details on this WARNI NG Be aware that once the order is complete you ll be at the mercy of the plugged module Going back to the normal OS may not be as simple as you think specially with the Service ROM plugged which requires removing the batteries then clearing the MMU entry with the MMU disabled after you switch it back on For the other instances it is possible to exit back to the OS and thus you could execute UPPGG4 to unplug the module from the page Obviously no inputs are needed in this case Note that because of their titles being not directly key able using XEQ an intentional measure you ll have to use another approach to invoke them It s a trivial task with the CCD style CAT 2 either during the catalog run or through a previous assignment to any USER key Of course as a CL owner you re only one YPOKE away from a permanent solution if CLUTILS resides in RAM 2 4 2 Calculator Flash Backup amp Restore Backs up to Flash OK or OKALL in Alpha Restore from Flash OK or OKALL in Alpha The content is preserved during a MEMORY LOST event and the same is true with the SRAM on the CL board So using RAM for a complete calculator backup and restore is not a bad idea at all and it will allow you different setups or com
33. is is how you d get yourself out of trouble if somehow you forgot the right code do a memory lost to disable the MMU then reload the CLUTILS from flash which has the protection flag cleared Map it to the right page and enable the MMU again you re back in charge Photo by Geoff Quickfall 2011 Angel M Martin Page 16 of 31 08 01 2012 2 4 1 Using 4 As mentioned previously page 4 is special case that requires its own dedicated un plugging functions not covered by PLUGGX or the native U PLUG ones either Plugs ROM in page 4 Prompts F L S WARNING Unplugs ROM from p4 The 41 OS reserves Page 4 as a special location There are frequent checks done during strategic moments to specific locations that can be used to take control on the system even over the OS itself if that was required as it happens with the diagnostics executed from the different SERVICE ROMS Because of that only take over ROMS can be plugged in page 4 They have been written specifically for it and will either take complete control of the system like the FORTH Module or drive it from their own directive like the LAI TRAM Module Function PPG 4 prompts for the ROM to plug into the page options being just those three mentioned above FORTH LAITRAM or SERVICE modules by their initials F L S Once the selection is made the function transfer execution to a
34. iting the program in 41 RAM is strongly not recommended Backing up MMU entries may be seen as superfluous yet think about the issues arising from restoring MMU configurations that don t include CLUTILS which is from where the program is being run welcome to CL limbo Surely something to be avoided Note that CLUTILS module may reside in Flash during the process even if the FOCAL program calls upon YFWRT as the from RAM only restriction is for YFNS instead O ngel M Martin Page 18 of 31 08 01 2012 2 5 1 Alpha and Display Utilities The following functions relate to Alpha string manipulation as the main vehicle for many YFNS functions and are included in the CLUTILS for added convenience Some Input Y String Prompts for string Alpha Back Space Author W amp W GmbH Alpha Delete from Author W amp W GmbH Alpha Delete from gt Swap around Swap around gt The reason why characters and gt are so relevant is the formatting required by many of the YFNZ functions like YPEEK YPOKE PLUG etc To that effect the most useful function of this group is no doubt YI NPT which redefines the keyboard as a hex entry 0 9 A F plus a few special control characters as follows J will add character gt to the display and Alpha will add character to the display and Alpha will add the string RAM
35. k 4k 4k 4k 4k 16k 4k 4k 4k 8k 4k 8k 8k 4k 8k 8k 4k 4k 8k 4K 4K 4k 8k 8k 4k 8k 4k 4K 8k 4k 4k 4k 8k 4k 4k 4k 4k 4k 8k 8k 4k 4k 8k 4k 4k Name Advantage Pac Advantage Applications Adventure 1 Adventure 2 AECROM 13 digit AECROM AFDC1 AFDC2 Auto Finance Algebra ROM Astro ROM ALPHA ROM AMC OS X Assembler4 Assembler3 ASTRO 2010 Module Auto Start Dupl ROM AV1 ROM Aviation Pac B 52 ROM BCMW ROM Bessel ROM BLD ROM Bufferland ROM CCD Plus CCD Module CCD OS X Chemistry User ROM Chess Rubik s ROM Circuit Analysis Pac Clinical Lab Pac CL Utilities Curve Fitting Module Cv Pack ROM DisAssembler 4C Data Acquisition Pac DisAssembler 4D David Assembler 2C HP IL Development HP IL Diagnostics Diamond ROM Dyerka ROM ES41 Module ES MLDL 7B Extended I O Module Extended IL ROM 300889 FACC Financial Pac FORTH Module Fun Stuff Module Games Pac Auto Fiance 2 Module Auto Fiance 3 Module HydraComp ROM HEPAX RAM Template Page 21 of 31 HP Co J F Garnier Angel Martin Angel Martin Angel Martin Red Shift GunZen GunZen GMAC Angel Martin Elgin Knowles amp Senne A Martin amp D Wilder Angel Martin Jean Marc Baillard HP Co Beechcraft HP Co Boeing A Martin amp JM Baillard W Doug Wilder Angel Martin Angel Martin W amp W GmbH Raymond del Tondo Claude Roetlgen HP Co HP Co Angel Martin Angel Martin W Doug Wilder HP Co
36. le below lists the well known buffers that are possibly to be found on the system Buffer id Module Eprom Reason kwra __________ 1 For instance plug the AOSX module into any available port Then type SEED followed by BFCAT to see that 2 register buffer now exists in the 41 1 0 area created by the SEED function id 5 buffer size 2 properly allocated Suppose you also change the default word size to 12 bits by typing 12 WSIZE This has the effect of increasing the buffer size in one more register thus repeating BFCAT will show ND o id 5 buffer size 3 properly allocated 1 2 7 10 11 12 13 14 5 ngel M Martin Page 9 of 31 08 01 2012 Say now that you also plug the 412 module into a full port of your CL J ust doing that won t create the buffer but switching the calculator OFF and ON will or alternatively execute the HP 41Z function After doing that execute BFCAT again then immediately hit R S to stop the listing of the buffers and move your way up and down the list using SST and BST You should also see the line for the 41Z buffer as follows 1 8 buffer size 12 properly allocated If the module is not present during the CALC ON event that s to say it won t re brand the buffer id the 41 OS will mark the buffer space as reclaimable which will occur at the moment that PACKING or PACK is performed So it s possible to have temporary orphan
37. llard Forecaster Thomas Rodke MDN Canada Paul Lind William T Ziemba Jx8k SNEAP Society 4k 4k 4k JM Baillard amp Martin Angel Martin Bobby Schenk Modules included in Flash without Module I D ISENE ROM Ox0C9 Geir Isene Bus Sales Mkt Stat OxOCA Co Control Systems Ox0CB Electrical Eng Ox0CC HP AM Lend Lease amp Sav Ox0CD HP Co Test Statistics OxOCE HP Co Mechanical Eng OXOCF HP Co O ngel M Martin 8 Antennas 9 Optometry amp 11 10 Physics 11 Geometry 12 High Level Math 13 Interchang Sol 14 Module Database Page 23 of 31 OxOD1 0 002 0x0D3 0 004 0 005 0x0D6 0x0D7 HP Co HP Co HP Co HP Co HP Co UPLE MD 08 01 2012 Appendix 2 FOCAL program Listings Provided for your reference and in case you feel like experimenting with your own settings As always mind the potential conflicts with other modules when plugging stuff and pay special 4 09 LBL02 attention not to overwrite YFNS you re safe if 10 XSF flag setting using PLUGGX it won t let you to 11 TURBOS50 run as fas as possible 12 089 gt 808 prepare for 0x808 In the HEPAX configuration code the role of H AW provide Redneck Ei HEPINI is to write the appropriate words into EB CT the HRAM pages as per the description provided 46 GTO00 yes skip the rest before This could also be done using YPOKE 17 YBSP remove
38. nctions perform housekeeping tasks and are included in the CLUTILS for added convenience Some are a remake of the native YFNS with slightly improved behavior while others just add up for a rounder pack 2MMU Is the MMU enabled No Input Author Monte Dalrymple CDE HEX string to NNN String in Alpha Author Ken Emery DCD NNN to HEX string NNN in X Author W amp W GmbH XDGT Sum of Mantissa digits Number in X YFNZ Location for YFNZ No Input XROM Rom function Launcher Prompts for values Author Clifford Stern Some brief comments follow 2MMU is almost identical to MMU In the YFNS ROM but the result in RUN mode is YES NO and will follow the skip program line if false rule like the other conditional functions of the machine YFNZ is completely equivalent to YFNS in fact is just a code stub that invokes the latter It must be in the CLUTILS module for subroutine purposes Incidentally this is how PLUGGX checks for YFNS being currently mapped to the target page and discards the request if so CDE and DCD are the classic NNN to from Hex utilities also used as subroutines throughout the module and thus made available to the user as individual functions as well XROM is a well known function to directly call any function within a plug in ROM knowing its ROM id and function Written by Clifford Stern in the heydays of the 41 systems with a real inside knowledge of the internal OS routi
39. nes Both prompt inputs are to be entered as DECIMAL values XDGT is a nice utility to calculate the sum of the mantissa digits of the number in X It only occupies 16 bytes so it s hard to leave it out from any collection Farewell And with this you ve reached the end of the CLUTILS manual hope these few pages have proven useful to you in your quest to become familiar with its capabilities and whet your appetite for even more to come The 41CL is an innovative realization nothing short of incredible with amazing possibilities that open the door to yet new developments on the HP 41 platform all this still happening 33 years after the original 41 was launched Now that s what I call an achievement O ngel M Martin Page 20 of 31 08 01 2012 Appendix 1 Detailed id table in alphabetical order ID 1 A41P 2 AADV 3 ADV1 4 ADV2 5 AEC3 6 AECR 7 AFDE 8 AFDF 9 AFIN 10 ALGG 11 ALGY 12 ALPH 13 AOSX 14 ASM4 15 ASMB 16 ASTT 17 AUTO 18 AV1Q 19 AVIA 20 B52B 21 BCMW 22 BESL 23 24 25 CCDP 26 CCDR 27 CCDX 28 29 30 CIRC 31 CLIN 32 33 34 CVPK 35 DA4C 36 37 DASM 38 DAVA 39 DEVI 40 41 DMND 42 DYRK 43 E41S 44 ESML 45 EXIO 46 EXTI 47 FACC 48 FINA 49 FRTH 50 FUNS 51 52 GMAS 53 GMAT 54 HCMP 55 HEPR O ngel M Martin Size 12k 4k 16k 12k 8K 8k 8k 8k 4k 8k 4
40. on Location is removed from MMU 17 YBSP ALPHA back Space string in ALPHA Deletes rightmost character 18 YCL Clears string from gt string in ALPHA Clears from gt char to the right 19 YCL Clears string from hyphen string in ALPHA Clears from char to the right 20 YFNZ Page location of YNFS none Location in MMU 21 YINPT YY Input none HEX entry plus control chrs 22 IY Read ALL none Reads Calculator MMU from Flash 23 YSWAP swaps both sides of gt string in ALPHA Alpha swapped around gt 24 YSWAP swaps both sides of hyphen string in ALPHA Alpha swapped around 25 YWALL Y Write ALL none Writes Calculator MMU to Flash 26 SYS EXT Section Header n a 27 ADRID Address ID Flash addr in Alpha ROM ID in Alpha 28 BFCAT Buffer Catalog none Shows present buffers 29 BLCAT Block Catalog none Lists block contents 30 CDE Code HexCode in ALPHA NNN in X 31 DCH Decode NNN in X HexCode in Alpha 32 DTOA Display to ALPHA Display contents Text in Alpha 33 DTST Display Test none Shows display all lit up 34 HEPAX FileSys Init Prompts for values linitializes HEPAX File System 35 HEPX HEPAX Launcher Prompts 4 8 6 1 0 Launches selected function 36 HEPYX HEPAX FileSys Init pages in Y first page in X linitializes HEPAX File System 37 HPX4 HEPAX Config 4k CL none Configures 4k HEPAX on CL 38 HPX8 HEPAX Config 8k CL none Configures 8k HEPAX on CL 39 HPX16 HEPAX Config 16k CL none Configures 16k HEPAX on CL 40 S
41. plete configurations to be swapped back and forth directly from SRAM However SRAM will be erased if the batteries are removed from the calculator for a certain period of time longer than what it takes to reset a small glitch but shorter than it used to be for the standard 41 due to the increased current required to maintain its contents O ngel M Martin Page 17 of 31 08 01 2012 Early CL beta user Geoff Quickfall prepared a few FOCAL programs to commit the calculator contents to FLASH so that even without the batteries it ll be preserved for a restore at any later time It s a powerful concept but it doesn t come free from pitfalls if you re not careful e The first consideration is related to the Flash write function and you should read and understand all about it in the CL manual Specifically pay strong attention to the recommendations about the battery state before performing any flash write operation e The second one is that YFWALL will pick certain hard coded FLASH locations as destination for the backup so the 32k sector OxOD8000 OxODFFFF will be ERASED by YFERASE Note that earlier versions of CLUTILS used sector 0x0C8 0x0CF instead This was moved to the current location to avoid erasing the Solution Books ROMS added to said sector later on Then there s the question about having to run the programs from RAM for the flash write read to work One could assume that YFNZ is already there but it s much better to make s
42. re bank switched As always a picture is worth 1 024 words Block Addresses F000 FFFF System ROM 2 E000 EFFF D000 DFFF C000 CFFF B000 BFFF A000 AFFF 9000 9FFF 8000 8FFF 7000 7FFF 6F00 6FFF 5000 5FFF 4000 4FFF 3000 3FFF 2000 2FFF 1000 1FFF System ROM 1 HP N WF DO wo p Do UO D 0000 0 System ROM 0 Primary bank Secondary bank 2 3 3 Security functions The following group of functions are a small detour in that they aren t directly related to the CL but they come to full fruition when used on this platform _ Activate Security Author Nick Harmer Source Data File Deactivate Security Author Angel Martin Change Password Author Nick Harmer Source Data Fie Here we have a nice practical application of advanced system control Use these functions to manage a password protection scheme for your CL so nobody without authorized access can use it They were published in Data File back in 198x by Nick Harmer and implemented in Q RAM devices a k a MLDL Obvious caveat there was that removing the MLDL from the machine dismantled the whole scheme but the CL has made it possible as integral part of the core system now The protection works as follows 1 Function SECURE activates the security by setting the protection flag The execution also switches off the machine This sets up a process executed on each CA
43. the corresponding ROM id from to Alpha You could use PLUGG to interrogate the MMU about page 4 and you can use PLUGG to plug take over ROMS to page 4 by directly invoking the dedicated function PLGG 4 which will be covered in section 2 4 of the manual later on The following error conditions can happen Because of dealing with pages and not full ports PLUGGX will only work with 4k ROMS or otherwise DATA ERROR will occur Main valid page inputs are within to the 6 F range Letters other than A F will be inactive during the prompt but it will allow any numeric keys yet values less than 6 will also be rejected resulting in a DATA ERROR Also a valid input is 4 but it requires the string OK placed in ALPHA to accept it Any other value will trigger a DATA ERROR message Attempting to plug a ROM to the page currently used by YFNS will also trigger an error code Ifthe string in Alpha is not a valid ROM id you ll get BAD D as expected If the YFNS ROM is not present not mapped to the MMU or running on a standard 41 without the CL board you ll get VOWEXI STENT error O ngel M Martin Page 14 of 31 08 01 2012 The picture below taken from the HEPAX manual provides the relationship between ports and pages also showing the physical addresses in the bus and those reserved for special uses like OS Timer Printer HP IL etc Note that some pages also called 4k blocks or simply blocks a
44. to the Display and Alpha will add the string 16K to the Display and Alpha BackArrow will remove the last character or groups above or cancel out if Empty ENTER will terminate the entry process and perform AVI EW Using this function expedites the construction of the Alpha strings required by all other Y Functions make sure you have it assigned to a handy key as it s likely to be used quite frequently Display to Alpha Display Test Author Chris L Dennis Source PPC V18 N8 p14 DTOA is an elusive one to grasp but basically is the inverse of AVIEW as it copies the characters in the Display to Alpha The need for this doesn t usually present to the user as the normal text entry always involves Alpha but there are times when the reverse is also needed DTOA is used as subroutine by other functions in the module As a totally useless demo assign DTOA to any key then press it in USER mode long enough to see its name shown then release the key the words D7OA will be copied from the display to Alpha DTST Simultaneously lights up all LCD segments and indicators of the calculator display preceded by all the comma characters which BTW will be totally unnoticed if your CL is running at 50x Turbo Use it to check and diagnose whether your display is fully functional No input parameters are required Angel M Martin Page 19 of 31 08 01 2012 2 5 2 Other Utilities The following fu
45. ule ever made of which have contributed a few into your 41CL just by using one of the PLUGxx functions The input syntax requires that the correct ROM ID string be placed in Alpha and certainly there are a few of those to remember and rather similar to each other since the string is only 4 characters long These two functions come to the rescue by providing an alphabetical listing of all the module ID s so you can review them and eventually plug the ROM directly from the catalogue for convenience sake ROMLI B starts the listing at the top of the list whereas CLLI B prompts for an alphabetical section A to Z Choosing A here is of course equivalent to executing ROMLIB Both catalogues can run in auto mode of can be stopped using R S and then the listing can proceed in manual mode using SST and BST as you can expect Itis in manual mode where you can use the other shortcuts or hot keys as follows ENTER skips to the next section or previous if running backwards A will copy the id shown to Alpha will exit the catalog and invoke the PLUG function launcher SHIFT changes the direction of the listing backwards lt gt forwards BackArrow will cancel out the catalog The enumeration terminates in auto mode when the last ROM id or first one if running backwards has been reached Also keeping any key depressed in RUN mode will halt the sequence displaying until it s released again so it s easier to k
46. ure that s the case by making a copy on the fly and plugging it to the MMU under program control Such copy goes to RAM block 0x80C overwriting anything you may have plugged in there previously e Finally the programs also assume that YFNZ is plugged in page 8 that is Lower port 1 Therefore all MMU mapping to YFNS from SRAM and Flash will use that location The FOCAL code used by the function is shown below There is also a check done in MCODE looking for the string OK or OKALL to be present in Alpha If none is there the execution will end with DATA ERROR as a protection against accidental usage OK will get the Calculator content backed up whilst OKALL will also include the MMU entries into Flash Note that on either case the whole 32k sector will be used 1 LBL YWALL 2 TURBO50 run as fast as possible 3 062 gt 80 7 Copies YFNS to block 4 YMCPY in memory 5 gt plugs memory block to port 6 PLUG1L Must be run from RAM 7 0C9000 Erases 32k sector 8 YFERASE 0x0C8000 OxOCFFF 9 800 gt 009 writes calculator RAM to 10 YFWR 4k block in Flash OxOD9 11 804 gt 00 12 FS 01 writes MMU entries to 13 YFWR 4k block in Flash OxODF 14 YFNS 15 PLUG1L plugs YFNS from Flash to Port 16 END were done Should any of those default settings clash with your system setup d suggest you change it to match them as the easiest way to go around the incompatibilities Even if it s possible re wr

Download Pdf Manuals

image

Related Search

Related Contents

Targus THZ52005US  Manuel de l`utilisateur  CIGARETTES, WHISKY… ET PETITES PLONGÉES Ivresse Ivresse    Troubleshooting - medistore.com.au  Samsung HW-C700 Brugervejledning  Instruction Manual  X7DVL-E 1.1c.indb - Thomas  B - DiveSystem    

Copyright © All rights reserved.
Failed to retrieve file