Home
META KERNEL
Contents
1. 46 ASO PONT SEG Sa Stare tese ttn EE Q 46 437 8 FONT6 reU 46 ASS DI rao ente cea a dr 46 4 39 SF2 CF2 FS 2 FC 2 FS C2 FC C2 STOF2 RCLF2 BA F 46 440 SREPL HHN Oe ERG E LM AN LM MA LIE 46 GL 46 PE Z DIMS Uh n E SNR 46 443 C OMEN DEN oda entr 46 444 i ic Se Re 46 D EMEN EWEPICI Gd CREE 46 2 46 WGRB2ZENT IPRGSS Qata dne etti iei ime S 47 APPEN DIXES 48 1 INTRODUCTION ASSEMBLY LANGUAGE 48 2 INTRODUCTION 85 ite Ug e div ev OENE TAS 48 3 TT IPS ANB TRIGKS eee eret eee i ee treo tvi ii edidi itte i D E 48 3 1 Meta n u vi RE 48 3 2 STARTED EXITED
2. vas eases 48 32 1 Remove the header display 3 2 2 Edit compressed files in ae red ett ipee t edi e egt at erecta na d e ig eto 3 3 Meta Kernel and Erable uie INI pN a 3 3 1 STARTOEEand TOFF example ee bte atr ec teste tome eiTe tede bora ate een E Ra 4 THE MK FORPROGRAMMERS tbe tee 4 1 Customizing the Filer cnra s Ap e ed tede e eeu ete ad ie tes 4 1 1 sno AEE Lack sabes tobe 41 2 FILER CUSTOM Format 4 1 3 Explanation of each component sese a System Binary 1 and GROB sese b System binary 2 2 System binary 3 d Internal calls e Custom program f Explanation forthe string of addresses e Eee tte detinent as nee S eene Haee ene eea g Explanations about teet reet ee et e ER h Warning and yery erret rnnt eee eren eater reet ne epis 4 2 Machine Language entry points list te nin et tenen 4 2 1 MINI DISP 4 2 2 MINI FONT ADDRESS 4 2 3 DISPLAY SBR 4 2 4 EDIT SBR 4 2 5 FEI EERZADR Uere 4 2 6 SCAN FON iced set oett a tete rhe s 4 2 7
3. nete ent rede tees 37 2 13 3 Program example ione e n o e ere P o E NEU OT Ra e sr EI RO ER Er in eniro a 38 2447 SATURN instruclions i deiade ep etoile tine ta rere ite Ro Euntes e eese e dor ee ve Le etna 38 Meta Kernel Contents 5 2 14 1 Assigning O Om i ub cede Pee Ue p HAE P d 2 14 2 Loading a value or C 2 14 3 Loading a register value into another register uere tire e m n te ER ge rU ere rep b e Eds 39 2 14 4 Exchatnge Detween two Teglsters l n oa in deu ean 39 2 14 5 ai a kika e Rees 39 2 14 6 S btractioii aes sa humana E ua Gana hasa 39 2 14 7 Increment and decrements ede erret nO eme iie o e oO eere ei eg 39 2 14 8 Right nibbles shifting divide by 10 urgere e def einn 39 2 14 9 Left nibbles shifting multiply by 16 inerenti 39 2 14 10 Right bit shifting divide by 2 x 2 14 11 Right circular nibble shitting sn nan qki UD ROO eO tee redes 2 14 12 Eeft circularmibble shifting eei hee eie tr RED I Et EE ER REED 2 14 13 Logical AND 2 14 14 Logical OR 2 14 15 Logical NOT 2 14 16 Mathematical NOT m Nhat ote ien 2 14 17 Loading value intoa R teet ee rebut eri eni e quee o Hs 2 14 18
4. Q 16 8 EQUATIONIEDITORS E IIS n Qu u EN RENE u D u ITS Sq Ts bs 17 9 MATRDCEDITOR ay aS una oe guis 23 TO GROB EDITOR PICTURE2 he Bete a oe Bn RL 24 110 oii ge cm 27 UTILITIES S a aq S 31 1 EFONTEDITOR EDB o gusten ahi etn eniti eaae ies 31 2 MACHINE LANGUAGE COMPILER MASD3 r enters senten rinse 32 3 rx a aS kunpan Saa AA A A E sole uuu E aaa s 43 4 MISCELLANEOUS UTILITIES a n un A unuy 43 APPENDIXES au M 48 1 INTRODUCTION ASSEMBLY LANGUAGE ana l nD n n a Su s E A aa a assess estate usuy si 48 2 INTRODUCTION TO SYSTEM RPL n nenne tern nnns sese s sette 48 3 TIPS AND MUI CENE 48 4 THE MK EOR PROGRAMMERS reet aes ele Q edt ess epe IU SSS ushana 50 5 METAKERNEL 3 0 PREVIEW esee ice texere rene ee bae pec spouted ie erbe esee eee ticae se e 61 Meta Kernel Contents 3 Table of Contents USING THE META KERNEL 9
5. style EOL Sets clears the bold style l EN Displays the font list Gets back to the Edit menu 6 3 3 Using styles You can modify the style of the current selected text by pressing a style menu key If there is no selection the text you will then type will be of the chosen style If you move the cursor the style will be the one under the cursor 6 3 4 Using fonts If you press the menu a choose box shows all the fonts which have the same height as the current editing font If there is a selection the font will be applied on this selection otherwise it will be used for the text you will then type If you move the cursor the font will be the one under the cursor 14 Using the Meta Kernel Meta Kernel The Meta Kernel can use up to 247 fonts inside one text For a font to be recognized by the MK so that it will appear in the FONT choose box it just has to be saved in the HOME directory or in a port 0 2 to 31 If several fonts use the same ID the MK only takes the first one in the order of the search HOME then 0 2 31 ID O is reserved for the system font ID gt 247 will be ignored Example Type the text THIS 15 A SIMPLE EXAMPLE RAD NUZ HEX D HOMES 3 12 40 17 0 3 e THIS IS SIMPLE co Jud Put the cursor on the 11 character S in SIMPLE Press the menu key Tiri RAD HYZ HEX 2 0 HOMES i 13 41 17 0
6. PROLOG GDOINS 5 5 to create a prolog length 3 object Test is the opposite of Test For example if Test is HZ C H Test is H 2C R The test instructions dealing with the hardware register HS 1 8 SR B xhi B and SB B cannot be inverted Once blocks are defined special instructions can be used in them These instructions called EXIT and UP allow to jump to the end or to the beginning of a block These instructions are equivalent to t Beginnina EXIT GOTO EXITC GOC End EXITHC G HC End TH H H EXIT TH H H HP GOTO Beginning UPC GOC Beginning UPHC GOHC Beginning 7 8 UP 7 8 Beginning 3 End Note do not make confusion between EXIT and UP instructions which are GOTOs and EXIT and UP after a test which are GOYES s EXIT and UP can jump to the beginning or to the end of an upper level block by specifying the number of blocks to exit after the UP or EXIT instructions These instructions Are equivalent to t Beagz t Begi UFZ GOTO Bese UPS GOTO Beas EXITI Endi EXITS GOTO Ends 3 Endi 3 Endz Ends Note EXIT1 is equivalent to EXIT and UP1 is equivalent to UP Using SKIPELSE SKEC or SKENC instructions two blocks create an IFNOT THEN ELSE structure These instructions Are equivalent to Or in high level language SEIPYES GOYES B
7. Stata ices ate a ee tea E 44 SSI MM Su ua 44 E ETE GI uh n a Susu SQ 44 417 HEADER REI u nee ee RU ie ete ed 45 4 18 4 19 4 20 Contents Meta Kernel 421s ALT RUE TUMULI a 45 2422 ee oe 45 p T uu muhu Qa k a aaa chet 45 424 CHOOSE MMA Bakalan cA e DU 45 425 EDIT lu 45 426 VISIT WB 2 aga Adee EN ae 45 227 EDITE 0 ES 45 428 AUSTRUM eR EU LIE AL 45 450 qOWI Nc ma Da hei on noise cte en acepten ten ic 45 230 a one censo caca dcl obe A a sik M ba HU LU MD T 45 431 ASM 45 PEPA 46 433 dta tedio tabes en ate cuc Macer ees 46 434 SNDISP TD TS RR E T 46 BOSS ce SON R T
8. ete meten 4 2 8 5 e tor URN e Pe eue 4 2 9 CMD SIZE ete 4 2 10 GET PATH 465 uie te OT AUR 4 2 11 DECONFIG RAM 4 2 12 RECONFIGARAM 4 2 13 GET BOND Meta Kernel Contents 7 4 2 14 INET DISPLAY EINE ge n tav 53 4 2 15 CHANGE FLAG 4 2 16 GET ASCIIE KEY gh eee ePi terr Fe P 54 4 2 17 GET KEY ia e ha tr P a E ee n eee a d 54 4 2 18 RUN KEY 22520 t eden o teens ru te O 54 4 2 19 MINI DISP VAL 2 54 4 2 20 MINI DISP AWBP iieri tech ei savas rr ST RS 54 4 2 21 um huayusa n Aa 54 4 2 22 JUPE 54 4 2 23 4 2 24 SCANCSKEY i amp aiti veliti te e i vetus iacet Pb pav veau ae De e PETER ga 54 4 2 25 NEWz ADR 54 4 2 26 rites evi tire irr e ote dE ir et EO 54 4 2 27 C IN3 4 2 28 3 4 2 29 OUT C IN3 4 2 30 OUT CA IN3 4 2 31 DISP_DEC 4 2 32 MULT BAC
9. So it makes one change and goes to the next occurrence of the search string Equivalent to EB and repeated until the end of the text So every occurrence of the search string is replaced by the replace string from the cursor position to the end of the text without confirmation 6 2 4 Miscellaneous Goes to the beginning of the next word Clears the text between the cursor and the beginning of the previous word Clears the text between the cursor and the beginning of the next word Displays the style menu Goes to the interactive stack Consult Page 13 uates the selection and replaces it with the result E g 28 is selected it will be replaced by 342626143326 Equivalent to HRL T The current editing is suspended you can do what you want except a reboot and get back to the text with f Erin Go Goes to the beginning of the previous word 6 3 Styles 6 3 1 Generalities Styles can be used inside text strings There are four styles Bold italic underline inverse Several styles can be used on the same portion of text More than one font can also be used in the same text but they must have the same height 6 3 2 Style menu RAD HEX DD HOME 12 2 12 0 i NORMAL TEXT BOLD ITALIC 45212 ABCIZ UNDERL ARSIZ 12 27 922 UNDE mite Font 93 Sets clears the italic style Sets clears the underlined style Sets clears the
10. sTable p Note 3 Using an external table is much faster than using constants On the other hand constants are project dependant which is not the case of an external table c Tokens Program prolog 02090 E List Program or Algebraic end 0312B i List prolog 02A74 H List end 0312B SYMBOLIC Algebraic prolog 02AB8 UHIT Unit prolog 02ADA d cst System Binary of cst value given in hexadecimal System Binary of cst value given in decimal Host System Binary hexadecimal value If the SB exists in ROM its address is used System Binary decimal value If the SB exists in ROM its address is used PTR cst Address FTE 4E2CF generates 2 4 ACPTR csti cst Extended pointer ROMPTE LIEH XLIB real Real number Long real number Ux reall Complex number DXX reall Long complex number Character string Special characters can be included by typing and the ASCII value on two hexadecimal characters iD name Global name LAM name Local name TAG chrez Tagged object xxliibHMame XLIB identified by its name If it is a standard HP48 command like the address is used instead of an XLIB object HES Size Data Binary integer 02A4E Size is in hexadecimal and Data is a set of hexadecimal characters Example HBS 5 2 GROBE Size Data GROB
11. xbi P HULL Check if it s the NULL object TRSKIP If yes do nothing Meta Kernel Utilities 48 5 Save the working directory xIF Is it compressed file xTHEH s xBZDH Xi If yes uncompress it xELSE xiIFEHD xIFERE Check if the history file exists Fe ID CHECK B2 RCL 1 If not create it with a null list xDROP OF ID STO xi xIFEHD Save the history entry ID xSTU xSHHP Go to the previous directory p EXITED THO CODE IRPL xFHTH xSHHP Save the working directory ITE If the user pressed ENTER xSHAP Get the entry in the history file ID xiF xHEHD xTHEH If it was a compressed file 1 Compress it again xIFERE xBz xERETHEH xIFEHD xIFEHD xSHHP TRUE FALSE ip Remove the entry the history xTHIL ID BZ STO xSHHP xEVHL Go to the previous directory jn 3 3 Meta Kernel and Erable Erable is a very powerful Algebra system for the HP48GX Combined with the Meta Kernel you will get one of the best handheld computer algebra system far better than the TI 92 Here is an example of an STARTEQW file which allow to use all Erable s functions from the Equation Writer by pressing CST This STARTEQW was written by Erable s author Bernard Parisse You will find more information
12. 16 6 4 4 Big strings Cd tims ee Ee e IERI E TR 16 6 5 Nyon Pup 16 7 dep enm ipe oap ibi aid ied pen pe 16 8 BOUATIONIEDITOR S Da buntu tite p 17 8 1 First ViewoT EQW et E PUERO regu a E RH d HERE HERI 17 8 1 1 TintrO dU Gti ON su 17 8 1 2 8 1 3 Editing xeu OE EUR RII ed ose n eta IN RENI ML ES 8 2 Creating qualionsg ied egeo Rt oem pte t edi ene dca deese i bh aves Aw 8 2 1 8 2 2 Exiting EQW nre n t 8 2 3 Numbers and names 8 2 4 Addition subtraction and AEAEE Ea EEEN EE 18 8 2 5 Complex numbers and expression u a e aee I E ae are aie 18 8 2 6 Moving in the equation 8 2 7 Divisions 8 2 8 Exponents 8 2 9 SQUALE TOOL see nee e A RE EO CE ID FORET I qe e EE drei OO toe e usss 8 2 10 Nilh Squat T00E I pi nee temere paires 8 2 11 Parenthesized argument functions 8 2 12 User FUNCH ONS Ee o e debes p ER qhapaq s HP 8 2 13 Parenthesized terms zo eee ere Ent oi ER 8
13. 58 4 3 4 On dE ETE 58 4 3 5 ID ka ADEE eM sisan biuk M sy Su 58 4 3 6 ER 58 43 FILER_FRCL 4 3 8 JEU A SEHEN IOS M ECTS 58 4 3 9 NBI HNIC 58 4 3 10 4 3 11 4 3 12 4 3 13 4 3 14 4 3 15 4 3 16 REC 4 3 17 MINDPIEDIEOR RERUM 4 3 18 KEY 4 3 19 UPSTACK ADR 4 3 20 WAITKEY ADR 4 3 21 COMMANDEINE ADR etn P tud ue did 60 4 3 22 T TT 60 4 3 23 SAVE ARG 4 3 24 Oy Ub P NIGEL EON 60 5 METAKERNEL 3 0 PREVIEW 55 05 5550 heec tee nahe tbv beet HI rep 61 Contents Meta Kernel Using the Meta Kernel 1 Installation OFF Switch off your calculator by pressing Put the ROM card into the slot 1 of the HP48 it must the port 1 Turn the 48 on After a short time the Meta Kernel is installed RAD XVZ HEX cop HOME gt 23 17 01 JAN 5 4 3 e ain MATR LIST HYP REAL BASE 2 General presentation The Meta Kernel is an application card that changes the standard environment A good knowledge of the standard environment is required as the MK uses it and adds several functions Please read the HP48 GX User s Guide about it With the new stack display and command lin
14. lt GOTO E gt e GOTO GOTOL GO VLHG GOSUBL GOSBYL or cannot be used after a HST test A label name must follow aGOYES GOTO GOYLHG GOSUB GOSUBL or GOSBYL a Equality and inequality tests Syntax Reg1 Reg2 f Regftit Reg2 f Example FASC E T RD H Note The HP inequality character may be used b Lower and greater tests Syntax Reg1 lt Reg2 f Reg1 lt Reg2 f Example HzC E gt Note HP lower or equal and greater or equal characters may be used c Nullity tests Syntax Reg 0 f RegitO f Example H amp 8 E TEG HS Note The HP inequality character may be used 2 14 24 Working with some bits of A or C register RegBIT v a RegBIT v a where Reg is A or C vis 0 or 1 reset or set and a is the bit number Examples ABIT 8 5 7CBIT 1 3 GOYES TOTO 2 14 25 Operations on PC A PC PC A PC A PC 0 2 14 26 Working with the Hardware Status Register SB H SR 6 5 5B H 7HM B SE B MP H 7HST 235 2 14 27 Working with P P P 1 P 1 1 1 P a CPES a C C P i C P 1 2 14 28 Jump instructions GOTO label GOTOL Jabel or GOLOHG Jabel GOVLHG Cet Cst is an hexadecimal number GOVLHG labe label is a constant or a label in absolute mode GOYLHG COMAAHD Command is an entry in the STARTEXT table GOSUB Jabel GOSUBL Jabel GOSBYL Cst is a hexadecimal
15. nera Rightmost stack display format RAD XYZ HEX HOMES STARTSEND are ae font6 RAD XYZ HEX HOMES 1i g 2 DISP2 T DISPZ o DROP Sending DISPZ SSEND gt This iz the comand lined START KERN STARTIENITE BAK rii Leftmost stack display format RAD XYZ HEX HOMES ISTenrsewo Gr T KERN aru a e ISTART Using the Meta Kernel 11 11 as Silent keystrokes 13 M J amp n 15 STRETSEND Current font for EQW stack display RAD XYZ coop HOME gt 12 JAn 13 STRRTSEND 2 t 728291 1 1ee rT gt 4 KERN STARTIENITE BAR ISTART Keystrokes click No purge confirmation in the Filer Purge confirmation in the Filer Reserved for internal use Reserved for internal use 15 On stack algebraics display RAD XYZ oo HOME gt gt 2 L 9 9 J 1 1ee rr I armarios era rri 16 Standard stack display for algebraics RAD XYZ HEX HOMES 12 43 JAn 13 1 K w wwwwF 123 STARTSEND 1 Z I cOsiO00 C T SIN X y2X START KERN ait Ga ee START stack display Mini font for EQW RAD NUZ HOMES 13 J n is STRRTSEND 2 893 108 FT gt I 04 0 START KERN STARTIENITE BAK rii 17 Current font for algebraic
16. 1 INSTALLATION Dept ue DOPO PURO e iere 9 2 GENERAL PRESENTATION Sa a Sun e e er re e eir iile e e un eh teris 9 3 STACK DISPLAY 3 1 Display 3 1 1 SI atus ERAI LM E MESSEN 3 1 2 Ning TEM IM CEP E MEME 3 1 3 Menudabels 3 2 Display configur tion de o ree t aed a ERR e SER e ERRARE Erde 32 1 Changing the display font 3 2 2 Modifying the current font 3 2 3 Changing the mini font 4 CONFIGORATION M 4 1 MEK v riables EE 4 2 MK user and system flags MKUF nennen 11 5 INTERACTIVE STACK 6 COMMAND LINE 6 1 Generalities 6 2 Editing menu 6 2 1 Major options Ss 6 2 2 the Selection tne eee dee e bee ieu eben 14 6 2 3 Searchropetations occi era ete ordo Venu ci aasma awas 14 6 2 4 Miscellaneous 6 3 Styles 6 3 1 Generalities 6 3 2 Style MeN e ES 6 3 3 Using styles 6 3 4 Using fonts 6 4 Miscellaneous command line options eese eene nnne eene EEE tne tenerent enne 15 6 4 1 Full screen mode 6 4 2 A to ind nt Moders u 15 6 4 3 Special keystrokes for System
17. FES ROOM Equivalent to GOSE L Ba3BE 1 Size Makes the code inside the brackets fit the given size by adding zeros if necessary Only three levels of brackets can be used 2 15 Masd directives PirHaime Add the specified directory in the search path list ILIHE cAr Change the char identifying link labs to chr OFF Shut down the screen This speeds up the HP48 by 13 ILOCAL cAr Change the char identifying local labs to chr message Display the message on the screen The output file will be unit H HREDFF Masd will not display ghost labels IHO CODE Masd will not generate a 02DCC prolog but will directly output the data 11 16 Switch to 1 16 mode 11 15 Switch to 0 15 mode Switch to mode LASH Switch to ASM mode Clear the a compilation flag 42 Utilities Meta Kernel IFL 1 3 Set the a compilation flag FL 28 Compile the end of the line if flag a is set 2FL 1 3 Compile the end ol the line if flag a is clear IRESDLLIT Adar Switch to absolute mode The program begins at the address Addr Note always consider the prolog 02DCC and code length to be the beginning of the program even if NO CODE is set HBSRDR Addr If in absolute mode add whites nibbles to continue at the specified address If not possible errors I
18. tes ee ud reae eiie edet 3l 2 MACHINE LANGUAGE COMPILER MASD n n n nn 32 2 1 Generalities ML Machine Language aaa aaa hasan ashuan usan N su uses 32 2 2 Launching Masd 5 tee DER eed Be diee ee aep edet idis 32 2 3 Generalities on iMasd Synidx eue a er e d e Fo e ER EE ERU A REESE ER PUER FERE QUSS PEERS 32 2 4 njcm M 32 25 Using labels ot e RU qe i EU qe EOS DER qe pe e RED Rie 32 2 6 33 2 7 TIU EE 33 2 6 SKIDS Ges date ie a e ap NIB e IL NEN een GNE da 34 2 9 MAGEOS es ete ORE ERR ENG Ss ee ei ism d o p e tue mts 35 2 10 Filename conventions igit e ee oa Me en ea Ries ree Hed 35 uuo Eos 35 242 CHEGUOMN AEE REG Aere td err tee RE dere tee RS 35 2 13 J SysRPE mode ento wanasaq CR ER e P E C RC n En e E E ERROR RC 2 13 1 Instructions a Constants aero Re E ORCI t OR OI eere b Exteriial Ginventry points table ete need nemen ener eene eire rem dere agieren c Decimal value System Binary e Unnamed local yariables een eee D Nei Uu HU 2 132 Special keystrokes in the command Lime
19. 02B1E LIEDAT Size Data Library data 02B88 BRK Size Data Backup 02B62 LIB Size Data Library 02B40 Size Data Extended1 02BAA 2 Size Data Extended2 02BCC Size Data Extended3 02BEE 4 Size Data Extended4 02C01 ARRAY Size Data Array 029E8 36 Utilities Meta Kernel LHEARRAY Size Linked Array 02A0A CODE Size Pats Code object 02DCC HIBB Size ataor Includes directly hexadecimal data no prolog 372 or CONS Size Expr CHE x Character object IHCLUB FileHame Includes the content of the file FileName IHCLUDE FileHame Includes the source of the file FileName to be compiled Like in ASM mode LABEL Jabel Defines a label like in ASM mode EQU CstHame Csat or Defines a constant Like DC in ASM mode EQUE CetHame Exp or DEFINE CstNam Exp EQUCP Interleave Defines a constant Like DCCP in ASM mode fst Hamz Note A constant can be defined in ASM or RPL mode and may be used in both modes d Decimal value System Binary If the instruction is not yet recognized and if it is a decimal value Masd generates a system binary e Unnamed local variables Then Masd tries to match the instruction with declared local variables A local environment is set using Gi vari 2 ss uari 229 with N lt 23 These variables have names during compile time but the
20. 3 e THIS IS A IMPLE EXAMPLE EEGIN EnD cut cory FASTE DEL Press CJ six times Press iT RAD XYZ HD HOMES 3 2 1 THIS IS A EXAMPLE ESSEN cur cory PASTE DEL 1 12 1 0CT Go to the menu and press RAD XYZ 2 D HOMES 1 13 42 17 0 3 THIS IS A 40 282 EXAMPLE 7907 UNDE Font EDIT Now select the word E DEG HYZ 2 HOME 3 05 6 0 15 3 2 1 THIS IS SIMPLE EsAMPLE Eo EnD T 27927 UNDE miu Go to the menu and press Billi There may be other fonts than shown below MiniFnt 1 ini Bold Mini Carre 1 41 gt Choose the font you want here ROBOT 8 with the up and down arrows and press CENTER DEG YZ 2 D 2 05 10 DEC 15 3 Tt THIS IS SIMPLE 4313123 ERE Ee 27927 UNDE miu 6 4 Miscellaneous command line options 6 4 1 Full screen mode By default if you press the key at the end of a line the cursor will be placed on the first character of the next line With the it is possible to go out of the lines with the MK system flag 5 4 FZ to enable the full screen mode if you like this mode a good idea is to place a 5 in the program STARTUP If you go beyond the end of a line and press a character key spaces will automatically be inserted before the character you
21. Copy and paste functions are available SUB copies the selected expression on the stack REPL pastes the expression on level 1 either onto the selection or where the edit cursor is These commands are accessible in the menu or on keyboard ETRE f23 Ln Gy Meta Kernel Using the Meta Kernel 19 8 3 5 Deletions There are different ways to delete a part of an equation e n selection mode typing numbers or characters suppresses the current selection To enter a new expression that does not begin with a number or a name pressing e deletes the selection and goes into edit mode delete a one argument function just select this function and press DEL To delete one argument of a two argument function select it and press Press 555 to delete all arguments but the one selected 8 3 6 Evaluations Selected expressions can be processed by RPL commands E AL EXPHH The result replaces the old selection These commands are accessible through menus or on keyboard VAD m Cv Gm Gy cu 8 3 7 Custom program evaluation An external program may be applied on the current selection By pressing CST the program STRRTEGH situated the is called with the current selection on the stack level 1 This program must return the new expression on the stack level 1 For example the following program transforms all the INV functions by 1 C OC IHVEORRO
22. GROB2 Mini font for algebraic GROEZ 18 Current font for algebraics editing in EQW On stack grobs display RAD XYZ HEX HOMES Mini font for algebraics editing in EQW Standard stack display for grobs RAD XYZ HOMES 2 INO CODE 5 1 Graphic 21 2 I 2 INO CODEe RPL 1 Graphic 21 GANY us Er 113142621133 TTS Robul Er 113142601133 TTS 20 Mini font menu labels Standard menu labels RAD XUZ HEX mo RAD HEX mo HOME gt 15 Jan 23 HOME 15 4 JAN 23 5 5 4 123 4 123 3 STRRTSEHD 3 STRRTSEHD 2 L 7 6791 2 789 1 AtB gt 1 R B gt an i Ge NAME KERN STARTIS TARTLEXITEI EAK 21 Normal stack display Display the stack using the HP SysRPL syntax RAD XVZ RAD KUZ HEX mo Sas ID STARTSEND 14 05 J n i5 2 ARRY 728 3 123 1 1 lt lt xALG gt LAM A 3 STRRTSEND SMS va el ID E 2 789 21 i gt A mE NAME START KERN STARTLERITE EAK NAME START KERN EXITE 22 52 adds i HO CODE lt CE lt CF at the beginning of 52 just convert an object into System RPL without adding any the source and at the end Therefor it can be use directly by header MASD 23 The stack display is recursive When an object contains a The stack display is not recursive reference to an other object the stack displ
23. 2 DUP 0 lt gt HHILE DUP 0O S 1 DUPSO IT Du OUPSO ITE GoTo BEG END DEL L SLOW II Use CA and to travel in the list Press LENTER_ to insert the command in the text Meta Kernel Utilities 37 To cancel the search without inserting a command press ON Inserting a bloc program lt then maintained will If no Command Line exists create one with ASSEMBLY MODE EHO CODE IRPL HE SystemRPL MODE s the position of the cursor If a Command Line exits insert and indent a SystemRPL program bloc 2 13 3 Program example To find or understand the syntax of a particular object use 52 to produces syntax source As in ASM mode RPL source must end with a THO CODE ONE Mu first program Turn into mode CODE i SAVE LOADRPL gt IRPL Turn into SuzEFL mode THO mu 2 14 SATURN instructions syntax In this section xis an integer number between 1 and 16 his a hexadecimal digit aisa1to 16 or a 0 to 15 number depending of the current mode 0 15 1 16 fis a field A B X XS P WP Mor S Reg is a working register A B C or D SReg is save register RO R1 R2 R3 or R4 Exp is an expression Cstis a constant The value is given hexadecimal or decimal using a leading or respectively DReg is a pointer register DO or D1 Data is memory data pointed by DO or D1 It means PATH
24. FFFFFFFFFFFFFFFF By default expressions are calculated at the end of the compilation of the project Masd be forced to compile expressions using the directive But be careful if an expression uses a label that is not already declared this will cause an error on the expression and not on the COMPEXP directive can be forced to compile the last expression using the COMFE directive with the same remarks than for This can be useful when local labs are used in an expression 2 8 Skips Skips are a first step from ML to a third generation language even if they are only another way to write SATURN instructions The basement of Skips is the Block structure A block is enclosed in 2 and can be inside another block The following instructions deal with blocks SKIPS instructions Equivalents SKIP 2 GOTO 5 5 SKIPL 3 GOTOL 5 5 SKIPC 2 2 Goo 5 5 SEC F Goo 5 5 SEIPHC 2 5 5 SENC i 3 5 5 Test SEIPYES i 7 TestGOYES 5 5 Testi 3 TestGOYES 5 5 Test 3 Mest GOES 5 5 SELE 2 GOSUB 5 5 SEUBL 3 GOSUBL 5 5 u Defines a block generates no code STRING o 3 tn2H2 C GOING 5 5 to create a character string CODE 3 rB CC GOING 5 5 to create a code object STROBI FROLOG
25. System Binary Out 3 Matrix List of list 2 Index String 1 List 4 3 3 GET X Y I Address Cass Description Recall a cell In 4 Matrix List of list 3 Index String 2 X System Binary 1 Y System Binary Out 3 Matrix List of list 2 Index String 1 Object 4 3 4 Address 4 Description Put an object into a cell The matrix has to be split using INNERCOMP 54AF ex 123 456 INNERCOMP 3 123 2 456 1 lt 2 gt In First row 5 Rown 4 Number of rows System Binary 3 X System Binary 2 Y System Binary 1 Object Out First row 2 Rown 1 Number of rows System Binary 4 3 5 DIMS Address FECSB Description Give the dimensions of a matrix In 1 Matrix list of lists Out If it s a matrix 4 Matrix 3 X System Binary 2 Y System Binary 1 TRUE or 1 FALSE 4 3 6 FILER FNAME Address CHSBH Description See page 52 4 3 7 FILER FRCL Address EBSEF Description See page 52 4 3 8 FILER_NEXTADR Address Cesid Description See page 52 4 3 9 SURPRISE Address CBSIE Description Just try 4 3 10 INPUT Address Description SysRPL INPUT works like InputLine 4zF44 This INPUT command takes 10 arguments more in complete documentation 58 Utilities Meta Kernel 4 3 11 4 3 12 4 3 13 4 3 14 4 3 15 4 3 16 4 3 17 4 3 18 4 3 19 CTRL Address Description Paramet
26. to add an integral sign The current selection is the equation to be integrated Press and C to move around the integral arguments and type them 5 edit mode press to insert an integral sign Type the arguments press C to move to the next one 8 2 16 Summations gt In selection mode press to add a summation sign The selection is the function to be summed Press to move around the arguments and type them gt edit mode press a to insert a summation sign Type the arguments press C to move to the next one 8 2 17 Where function e selection mode press oHm to add a where function The current selection is the base expression Press to move to the next argument the variable and its value e edit mode press to insert a where sign Type the arguments press C to move to the next one 8 3 Manipulating equations 8 3 1 Modifying equations with EQW To edit an equation with EQW press CYO when the equation is on level 1 of the stack 8 3 2 Modifications EDI To edit a variable name or a bigger expression with the command line editor select it and press cy GD EQUATION It can also be edited with HP s EQUATION WRITER by typing CENTER 8 3 3 Temporary exit to the stack CONT CONT It is possible to go temporarily to the stack by pressing c ON Press c again to get back to EQW in the same state as before halting 8 3 4 paste functions
27. CJ to cancel Goes tothe interactive stack Press ON to return to PICTURE2 Line P1 and P3 are the ends lam Pattern fill Motif The pattern must be a 8x8 grob found on the stack level 1 in B amp W or in grayscale 26 Using the Meta Kernel Meta Kernel Cx Filled box Plan P1 and P3 are two opposite corners 227 REPL Takes the grob on stack level 1 It may be positioned with the arrow keys It is validated by pressing does REPL and drops the grob E does a GOR and drops the grob E does a GXOR and drops the grob or C cancels CN s Spline curve P1 and P3 are the ends P2 defines the tangent lines 11 Filer The Filer is a file utility that eases directory and port access MEMORY to execute it The first screen lets you choose the directory 11 1 Ports and directories screen META KERNEL S FILER Port 00 25022 P 2252 The tree screen shows list of ports and directories Press to go throughout the list Press C CENTER or to go in the selected location Press or LI to exit to Filer 11 2 File selection screen Henory 24160 Select 0 CIMESSRGE ARRAY 260 R 1125 REAL 10 wEb2ua CODE 279 On this screen are shown the free memory the total size of the selected files a list of files and the menu Press Cn to move in the file list In each line there are five fields the s
28. Ca 6 C62 number Character of the given ASCII code LIB Program PrgNumber ol the library LibNumber Libhumbsr THCLUBDE Includes a given variable content in the line VarHame External program beginning amp zD9DHh a EHE must close the program T NoEval amp B amp EH which causes the next object not to be evaluated To type press G2 PROG To edit an external program begin it with so it won t be evaluated when L ENTER J is pressed 16 Using the Meta Kernel Meta Kernel CODE Hexa Creates a CODE object with the following binary data Length is calculated DBJ Hexa Creates an object with the following binary data GREY Creates a four grayscale grob XxY Hexa Puts the address of the corresponding name if it exists in the entry points table Consult page 36 To type press Com 8 Equation editor The program EQW can easily create edit and manipulate algebraic objets in their hand written style For example here is a mathematical equation E F Ot oa Here is how it usually appears on the stack E fiB 128 2323 12 And now here is the same equation typed with EQW 1 x 4 a This EQW display is also used in the stack display RAD XYZ HEX HOME gt x 1 j co 81 First
29. DO Address of an entry structure Address 5n name length 2n name Uses DO D1 Aa Da Ca RSTK 2 4 2 51 GetNextAdr Address FECC4 Description Returns a pointer to the next table entry Use GetFirstAdr first values of Da and D1 must be preserved The table is sorted by addresses Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines Out Carry Set if no more entries DO Address of an entry structure see GetFirstAdr Uses DO D1 Aa Da Ca RSTK 2 4 2 52 RclPath Address FECS Description Finds the address of a file Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines In DC ResZone on 256b filename syntax ends with an ASCII 0 Out Carry Set if no file found D1 Address of the file Uses Aw Ba Cw RSTK4 DO D1 4 3 SysRPL entry points Here is a list of entry points inside the Meta Kernel They can be used by programmers for programs to take advantage of the MK Of course if these entry points are used the program won t run without the MK Call a routine with FTE in MASD or with 4 8 4 GET INDEX Address FECSS Description Create an index for a fast access In 1 Matrix List of list Out 2 Matrix list of list 1 Index Strings 4 3 2 GET 1 Address CHBEH Description Recall a row from a matrix In 3 Matrix List of list 2 Index String Meta Kernel Utilities 57 1 Row nb
30. FS 2 FC 2 52 2 FC C2 STOF2 RCLF2 BA EGER HF Equivalent to SF CF FS 7 FE 7C and STOF with the new Meta Kernel flags Consult Page 11 SREPL Does a find replace in a character string The main string is at level 3 the find string at level 2 and the replace string at level 1 Every occurrence of the find string in the main string will be replaced by the replace string The find and replace strings may have different lengths AR LST HEB Converts an array into a list of lists and vice versa Eg ff i 21 34 1ic HEMSTOiC d Z i 8 4 h Note All the objects must be of the same type DIMS MA Puts the size of the array contained in a list of lists on stack level 2 and 1 on stack level one If it is not an array returns 0 t 1 z 3 3 3 BINS B cC 1 ABC 3 i 2 NOYAL 3 33 23 3 1 gt MINIFONT EH Sets the mini font object on stack level 1 as the system mini font MINIFONTO Mj Returns the current system mini font on the stack FNT2GRB PRG Converts an MK font to a grob font common 6 7 or 8 x 2048 grob This program is on the floppy disk 46 Utilities Meta Kernel 4 46 GRB2ENT PRG Converts a grob font to font The grob in at level 3 the name is a character string at level 2 and the identifier a real number at level 1 This program is on the floppy disk Meta Kernel Utilities 47 Appendixes 1 Introduction to
31. H to specify HOMEDIR as the root X where x is a port number to specify a port as root This root is followed by a list of directories ending with the name of the file 4 TOTO TITI TUTU specifies the TUTU file in the TITI directory stored in the TOTO backup of the fourth port specifies the YOU file in the ME directory the HOMEDIR 2 11 Units A unit is a part of a project which can be compiled separately and stored in a file The generated unit code can then be included in the project final code without recompiling it A unit can use labels and constants defined in the calling program and the calling program can use labels and constants defined in the unit Any source can be changed into a unit by placing a UHIT directive in the source In the calling source file type USES FileHame to include a unit Note 1 A unit is smaller in memory than the source file it comes from Note 2 Using a unit is a very fast operation faster than compiling the source Note 3 Tools libraries can be created and distributed without sharing the source code 2 12 Library creation Libraries can be created with Masd using the following instructions LIB MESSAGE VISIBLE HIDDEN and LCONFIG Here is a source producing a library PHO CODE code prolog 62DCC LIE beginning of lib t libraru name library title iza4 z libraru romid in decimal MESSAGE message table t Hezzage Message m 3 VIS
32. In D1 zone starting address Ca number of nibbles to blank SCAN KEY Address CHIZE Description Keyboard handler Does a keyboard scan updates the keyboard buffer and the keystate Use it when interrupts are disabled NEW_ADR Address EHB135 Description Moves an object at the end of the temporary zone Moves an object in the temporary RAM at the end of this zone so that i661 object resize and RESIZE PLUS can be used on it RESIZE PLUS Address Description Resize up a character string 54 Utilities Meta Kernel 4 2 27 4 2 28 4 2 29 4 2 30 4 2 31 4 2 32 4 2 33 4 2 34 4 2 35 4 2 36 4 2 37 4 2 38 4 2 39 Resize up the last character string the temporary RAM In ROa string address DO new end of the character string C IN3 Address Chere Description Equivalent to C IN2 but in the MK card A IN3 Address CHSFA Description Equivalent to A IN2 but in the MK card OUT C IN3 Address Description Equivalent to OUT C IN but in the MK card OUT CA IN3 Address Chery Description Equivalent OUT C ASIN but in the MK card DISP_DEC Address Ceids Description Displays a decimal number In DO screen address Ca number to be displayed ST11 inverse white on black ST10 1 to display leading zeros MULT_BAC Address CHi4H Description Ca Aa GREY Address Description Tests if a grob is in grayscale In D1 grob address Out Carry set if grob is i
33. Q sauna nun aasawa an tanqa ahua aT BETIS a aes 55 4 2 33 GREY9 55 4 2 34 4 2 35 4 2 36 4 2 37 4 2 38 4 2 39 4 2 40 E 56 4 2 41 56 4 2 42 E E A 56 4 2 43 ZONE qua aaa Ia 56 4 2 44 OFF SBR 4 2 45 Hill ETT n TULIT ana alaq S lun wahansi sss 4 2 46 G dU RR ER RUE 4 2 47 GetText 4 2 48 RENE IO UU D D T 4 2 40 AS Ro au pto ea Re EIE a E ERU 4 2 50 E 57 4 2 51 GetNextAdr DEG EORR EEG HT ERR 57 4 2 52 y 57 4 3 entry points EE E EEE aa 57 4 3 1 ADS DIA Copa au EE ee 57 4 3 2 EA 57 4 3 3 GETSX Y D pesa Mea ot se
34. TABLE EXT will refer to the table TABLE EXT in Port 4 in the backup DIR1 For more details please read page 36 Kas Used by the filer for file transfer By default Kermit is used exists it is called with the object on level 2 and the name on level 1 Consult page 27 Used for the error messages display The error is found in two character strings on levels 2 and 1 STRETERE STARTEGH Called by EQW equation editor when CST is pressed FILER CUSTOM Called by the Filer when is pressed 42 user and system flags MKUF MKSF The Meta Kernel adds a new series of flags Use 2 5 2 2 F572 F CCS FS 702 like the functions CF SF By default all flags are cleared MK System flags 1 to 64 are used by the MK to change parameters MK User flags 1 to 64 can be used by any program that runs under the MK Flag Cleared Set SF Z 1 Multiline for stack display at all levels No multiline for stack display except level 1 RAD HYZ HEX Mo RAD XYZ HEX mo HOME HOME gt 2 Second level And simple text 1 FONTE gt SEONT 2 4 SF2 Te SF HEX RAD 2 61 MENU START KERN STARTISTARTIENITE EAR START KERN STARTISTARTIENITEL EAR 2 Strings displayed on multiple lines Strings displayed on only one line RAD XYZ HEX mo RAD XYZ HEX Mo HOME HOME 1 SAV
35. TIZER 3 TMATCH DROP gt 8 4 Cursor mode 8 4 1 Switching to cursor mode To get into cursor mode press 8 4 2 Movement Arrow keys direct the cursor movement The movement is faster when cy is held To go directly to a border hold and press one arrow key When the cursor stops a box is drawn around the underlying expression 8 4 3 Exiting cursor mode There are two ways to return to selection mode C returns to the same state prior to entering in cursor mode whereas ENTER jJ makes the expression under the cursor which appears in a box the new selection This is a fast way to select a particular part of an equation 8 5 Miscellaneous functions 8 5 1 Menu use MENU To show the menu press a menu key or The menu may be hidden by pressing When switching to cursor mode the menu is automatically hidden 8 5 2 Zoom EQW can draw the equation using the system mini font by pressing PRG or This key used any mode second keystroke returns to the stack font 8 5 3 Grob The current selection may be pushed onto the stack as a graphic object by pressing or Em This function is the same as the RPL command GROB2 8 6 Error messages An error message remains displayed as long as a key is pressed to keep from destroying the expression incomplete One cannot exit from EQW or perform certain functions when the equation is not complete Expression Glo
36. array of an other type set the MK flag 27 9 3 Reference 9 3 1 Keys Arrows lt P Movement and Arrows with c Arrows with Page by page movement Border movement Clears the current cell fills it with the null element 9 3 2 Menu keys EDIT Edits the current cell in the command line editor Edits the current cell in the best environment E I TE Makes the cells narrower and displays one additional column WID Makes the cells wider and displays one less column EDT EO If the box is visible makes the cursor move to the next column after entry on by default If the box is visible makes the cursor move to the next row after entry TE Selects the cursor speed m Inserts a row of null elements Deletes the current row E Inserts a column of null elements Meta Kernel Using the Meta Kernel 23 EUN Deletes the current column FAI Copies the current cell to stack level 1 FI Copies the object on stack level 1 to the current cell tiTH Activates the interactive stack km BI Set the selection s lower right corner El Copies the selection on the stack level 1 as a symbolic matrix FASTE Copies the matrix on the stack level 1 to the current position Erase the selection 10 Grob editor Picture2 PICTURE2 creates and modifies graphic objects similar to PICTURE
37. different from space and A label begins with a star and ends with Separation character Biaboop is the BigLoop label declaration Be careful about upper and lower cases Three types of labels can be used 32 Utilities Meta Kernel Global labels A global label is a label that can be used everywhere in the project like global variables in Pascal or C Local labels A Local lab is a label that is only accessible in a local section like local variables in Pascal or C A local section starts at the beginning of a source after a global label after a link see link section or after a LUCHAL directive A local section finishes at the end of a source before a link before a global label or before i directive A local label is identified by as the first character Link labels A link label is a label that exists only in the link where it is declared like a private clause in Object Pascal A link label is identified by a as the first character Note 1 In projects using less global labels is better because a global label is longer to compile and because it gives a better program structure A good habit is to use global labels to cut the program in subroutines and to use local labels inside these subroutines Note 2 The Meta Kernel command line is able to find labels in a source Press blue shift GOT 2 6 Using constants It is possible to define constants It i
38. is moved from YFESE to SFBBB CMD SIZE Address Description Computes the command line size Out Aa number of characters GET PATH Address CHECI Description Finds the relative path of a directory D1 buffer address Ca maximum length If ST2 0 the path is taken from the HOME directory to the current directory if ST2 1 00 starting directory address Da ending directory address DECONFIG RAM Address CEBC Description Moves the RAM from 8884 to Bii Useful if you plan to make your own interrupt handler If your RAM based program call this entry point the return address RTN will be recalculated RECONFIG_RAM Address Description Moves the RAM from back to GET FONT Address CHBDH Description Returns the address of a given font Call SCAN FONT once before using this routine In Ab font id Out ROa font address INIT DISPLAY LINE Address CHHEI Description Initializes the display routines This routine initializes the registers necessary for the MK display routines In Ca screen width in nibbles CHANGE_FLAG Address CHHES Description Updates the ST flags 0 to 3 and RO for the display routine Computes some parameters for the display routines when special characters are encountered font control characters Meta Kernel Utilities 53 4 2 16 4 2 17 4 2 18 4 2 19 4 2 20 4 2 21 4 2 22 4 2 23 4 2 24 4 2 25 4 2 26 ASCII KEY Address
39. it is a very efficient and very fast compressor You will find the BZPlus package http www hpcalc org utils compress The problem with the compressor is that if you want to edit the file you must uncompress the file manually edit it compress it again then store it With STARTED and EXITED you won t have to do that anymore The idea is to check if a file is a compressed file with STARTED if yes uncompress it and when leaving the command line compress it with EXITED The main difficulty is that the Meta Kernel can edit more than one text at the same time Then you must save the history of the edited files in order to know if the file was compressed or not The history will be saved in the HOME directory with the name CHECK BZ STARTED is called by the Meta Kernel just before editing an object and finds the object on the first stack level Sometimes the MK calls STARTED without any valid object in this case you find the object on the stack EXITED is called by the Meta Kernel just after exiting the command line by pressing ENTER or ON When the user press ENTER the MK pushes two objects on the stacks as follow 2 Object 1 TRUE If the user has pressed ON only FALSE is pushed on the first stack level The following STARTED and EXITED use both System RPL and User RPL they may be enhanced very easily by using only System RPL Anyway it is a good example of how to use the MASD in RPL mode THO CODE
40. messages on the screen to explain what is processed Linking FileName Compiles the FileName file The main file is called Main Uplink Ends the compilation of a file Compil Glab Compiles global jumps Compil Exp Calculates expressions Garbage Reconfigures the memory Ghost LabelHame _ an unused label If Masd detects one or more syntax error it will push a list describing all errors on the stack This list is used by to find the location of errors and let the user correct them Errors may be notified at the wrong place For example if a label is not correctly defined the errors will be located on the calling instructions 2 4 Links Links are source files that can be linked during compile time equivalent to the I directive in PASCAL and include in C When a link call is encountered Masd stops compiling the current link compiles the new one and then continues compiling the first one Syntax FiisHame links the file called FileName Note 1 A link can call other links Note 2 You can not use more than 256 links in your project Note 3 To know how Masd looks for files see the File search section Note 4 Links are useful to cut projects in independent parts to allow fast and easy access to source code 2 5 Using labels A label is a marker in the program The principal use of labels is to determine jump destinations A label is a set of less than 128 characters
41. or BRT1 Note For instructions that use two working registers only the pairs A B B C C D and A C are available For instructions like Reg1 Reg1 you can write only Reg Example is the same as R L R 2 14 1 Assigning 0 to a register Syntax Reg 0 f Example H amp H 2 14 2 Loading a value in A or C LC and LA instructions allow to load a constant value into A or C register LC loads x nibbles into C LH loads x nibbles into A Example LC 8188 Note LC 12 allow to load 12 decimal into the 3 first nibbles of C The number of nibbles used is the number of characters necessary to write the value including the So 12 will take three nibbles 38 Utilities Meta Kernel 2 14 3 2 14 4 2 14 5 2 14 6 2 14 7 2 14 8 2 14 9 2 14 10 2 14 11 2 14 12 2 14 13 2 14 14 2 14 15 Characters loads the hexadecimal value of x characters into C x must be between 1 and 8 LHRHSC x if the counterpart for A Example LCRHSC T HP MASO LC x ExporbLH x Exp load the result of an expression into C or A using x nibbles Example LC zS3igBuf f er tDat alf f zet Loading a register value into another register Syntax Reg1 Reg2 f Example A B Exchange between two registers Syntax Reg1Reg2EX f Example CBE H Addition Syntax Reg1 Reg1 Reg2 f or Reg1 Reg2 f Example C C H R or C A A Note if Heg and Reg2 are same this cause to multiply t
42. view of EQW In this document equation stands for all algebraic objects 8 1 1 Introduction EQW is a special environment in which the keyboard is redefined and limited to specific operations 8 1 2 Modes EQW provides three modes of operation e Selection mode 1 B 8 5 F t dt or 4 e Editing mode In most cases selection and edit modes are used to enter equations e Cursor mode used to navigate rapidly through the equation x F t dt 8 1 3 Editing During editing keys behave in different ways depending on the current mode In selection mode a part of the equation is inverted or boxed If a function key is pushed the function is applied on the selection Meta Kernel Using the Meta Kernel 17 In edit mode a flashing cursor is ready to insert new characters The next sections explain how to enter and edit an equation 8 2 Creating equations 8 21 Running EQW EQUATION Type Gy CENTERD to run EQW with a new equation 8 2 2 Exiting EQW To validate the current equation on the stack press CENTER J To get out of EQW and lose all changes made on the equation press ON There may be some times when EQW can t draw the equation as fast as you type but all keystrokes are processed none are lost In this case EQW draws the equation only when there is enough time to do so 8 23 Numbers and names Type real numbers and names the same way as in the command line In edit
43. with two addresses in binary that point to the beginning and the end of the code to be disassembled The syntax used is Masd syntax in mode 0 15 Each line contains an address and an instruction If the MK system flag 7 is set with 5 2 addresses not shown except for the destinations of jumps In this case the resulting source may be then reassembled if needed Example default AEP S4 GOSBYL 86796 LC pingi HEr4z C A H GOHC HEr4z HEr4r GOVLHG 13959 r SF2 GOSBYL 86736 LC Biss 42 C A A GOHC HET42 GOVLHG 135569 4 Miscellaneous Utilities These utilities are found in the MDGKER library Some of the following commands are marked Dangerous which means that incorrect use of them can corrupt memory Use them at your own risk Returns a character string containing the hexadecimal numbers that form the object on stack level 1 in memory H returns S4 E2BiBi4 Inverse of it converts a hexadecimal character string to the objects coded in it Dangerous Example 4 7HzBS3C2H2B2i28 gt returns i 3 41 gt H Example H 42 Ho 43 SoH Converts a character string into its hexadecimal form every character is converted to two characters Example HI 5 gt returns S434 Meta Kernel Utilities 43 44 HS Inverse of SH Every couple of hexadecimal characters gives an ASCII character Example S485 H 5 returns HP 45 CD Does a H on th
44. 2 9358 2588 D085 ps 0085 008 P1 5510 goaa PF 83 There three coordinates shown P1 P2 and P3 P1 is the current cursor position it is underlined To put the cursor on one coordinate press CL C29 or In the case of the ellipse P3 is the center of the ellipse and P1 is a corner of the enclosing box P2 is not used When the ellipse is correctly positioned with P1 and P3 it is necessary to fix it on the grob With no menu displayed press mm to fix it in white to fix it in light gray white for a two level grayscale to fix it in dark gray black for a two level grayscale to fix it in black 24 Using the Meta Kernel Meta Kernel a to fix itin XOR mode every pixel of the ellipse will be the opposite of the underlying pixel Or press C or to cancel the ellipse These color keys are displayed in the third page of the menu The other simple shapes are with the shortcut keys Circle P3 is the center and P1 is a point of the circle Line P1 and are the two ends Em Box P1 and P3 are two opposite corners Plan filled box P1 and are two opposite corners SIN Spline curve P1 and are the ends P2 is the tangential point 079 GXOR Merges another grob see the reference part here with a LED grob A surface can be filled w
45. 2 14 Differentiation 8 2 15 Integration 8 2 16 Summations 8 2 17 Mhere futictionl ie nd goo b toe uh 8 3 MGni pill ating CQUAHONS PH 8 3 1 Modifying equations with EQ W 8 3 2 Modifications 8 3 3 Temporary exit to the stack 8 3 4 Copy paste f nctiOn EE obec hace ete dette ett vets 8 3 5 Ib ONS a M c E 4 Contents Meta Kernel 8 3 6 8 3 7 Custom program evaluation 6 4 Cursor mode 8 4 1 Switching to cursor mode 8 4 2 Movement 8 4 3 Exi ne cursor fodere ER EE e dM 6 5 Miscellaneous functions initi datei reser REC Re gru 8 5 1 Menu Se M 8 5 2 Vos E kaa 8 5 3 iS MP EUR E 8 6 a sucess 8 7 vum 21 8 8 Key reference for oue n RO RUD e TO EIE E Te ede ere d ceo E a Ee eR 21 8 8 1 Selection mode 8 8 2 Edit mode 8 8 3 Selection and edit mode common keys 8 8 4 Cursor mode 9 MATRIX EDITOR 9 1 Presentation aot tea 9 2 9 3 Reference J sashan E e dete ted
46. B This is an integer that tells the FILER how many pages the menu will use For example if you want two pages 12 labels then GROB 131 n would be a 131 16 GROB and SB1 would be 2 b System binary 2 This integer allows you to control when the program will be started There are 5 possibilities SB Program Control You can run the program everywhere VAR PORT BACKUP LIB Only when you VAR Won t run if you are in a library Won t run if you are in a backup Will run only in port home of the port System binary 3 This integer tells the filer how the associated program will be run This also allows you to access all the filer s internal subroutines There are two categories of custom programs internal calls and custom calls NOTE You can use a Binary integer instead of System Binary it is easier to manage with the User RPL compiler _ lo A 50 Utilities Meta Kernel d Internal calls The internal calls are included so that you can access the built in functionalities of the filer from inside your custom menu For these calls you don t need to put a program in the file unless you want to allow a shortkey Ex Left Shift 2 If you use a shortkey then add any program you want because it won t be run at all You should use the smallest possible program ex TakeOver 40788 internal empty program o Operation Bip Info Hexa View Arbo
47. CHEFS Description Keyboard handler Gets an ASCII character or a key number if not in ALPHA mode This routine handles the shifts and alpha displays Out STO Oif ASCII STO 1 if key number GET_KEY Address Description Keyboard handler Out Carry set if no character in the keyboard buffer Aa key code if carry cleared RUN KEY Address Cing Description Key assignment This routine associates an assembly code with a key Syntax GOSBYL _ GOIH4 HO_KEY_ROUTIWE 81 GOIH4 _ 01 is the A key code GOIH4 KEY x X xx key code same as in External 88 GOIN4 HOT HRHDLED KEY x a bip routine for example MINI DISP VAL Address CHiBB Description Displays a hexa value in mini font In DO screen address Bw number to be displayed Ca number of digits to be displayed ST11 inverse white on black ST10 1 to display leading zeros MINI DISP AWP Address Celie Description Displays a hexadecimal value in mini font In DO screen address Awp number to be displayed P number of digits 1 ST11 white on black ST10 1 to display leading zeros TRUP Address Description Copy up Equivalent to 4653 but works even after a DECONFIG RAM when RAM is at BBBBBJ TRDN Address 2 Description Copy down Equivalent to B F but works even after a DECONFIG RAM when RAM is at BEIGE ZEROM Address Description Resets a memory zone to 0
48. E 5 GOSBYL ROOM C 2 4 GOSBYL z GETTEMP 3 LORD epa A Da ce 2 C RSTK D C A 1 SRVEeGOSBVL ROO IER Er s CIT ITE E Er 5 1131542 00138 TTS 3 Digital clock in status area Analog clock in status area RAD HYZ HEX wo RAD XYZ HEX Mo HOMES 13 37 Jhn 15 HOME gt 5 3 4 4 2 3 2 2 arua Hv REAL BASE Hv REAL BASE 4 Noauto indentation in command line editing Auto indentation in command line editing 5 Cursor can not go out of the text Full page editing 6 Strings take only one line for GF B2 Multi line strings for GROEZ 7 9545 with addresses RSH gt without the addresses makes labels 8 The current font is normally used in stack display Mini font in stack display the current font must be a font6 RAD XYZ HEX mo RAD XYZ HEX mo HOME gt Honts 5 9 2 78 SF I sre 60 SF HEN RAD 2 01 MENU 1 lt 2 DISPZ T Press OQ ke t 1 2 DISP2 T Press DISPZ WAIT DROP i DISP 0 NAIT DROP 1 Sending 1 DISP2 DIS ksEND gt gt BSEDD gt gt Gru tiamarrmarmoisuaqzra START KERN a Gia Ga 9 The current font is normally used in command line editing Mini font in command line editing the current font must be a Meta Kernel RAD XYZ HEX 2 o HOME DROP 72 2 SSeno gt M is the command T o E DD M
49. IB H Logical NOT Syntax Reg1 Reg1 1 f Meta Kernel Utilities 39 Example C C 1 A 2 14 16 Mathematical NOT Syntax Reg1 Reg1 f Example C C 2 14 17 Loading value into a R Register Syntax RReg Reg f Example R amp A Note Heg can only be A or C 2 14 18 Loading value into A or C from a R register Syntax Reg RReg f Example 1 Note Heg can only be A or C 2 14 19 Exchange between A or C and a R register Syntax RegRRegEX f Example ARIES 3 Note Reg can only be A or C 2 14 20 Memory write POKE Theses instructions write the value of A or C at the address pointed to by DO or D1 Syntax Data Reg f or Data Reg x Example bHTi C H or bHT a H i 8 Note Reg can only be A or C 2 14 21 Memory read PEEK Theses instructions load into A or C the data pointed to by DO or D1 Syntax Reg Data f or Reg Data x Example C DAT1 A or A DATH Note Reg can only be A or C 2 14 22 DO and D1 modifications a Loading DO and D1 Syntax DReg hhor DReg hhhh or DReg hhhhh or DReg 2 Exp or DReg 4 Exp or DReg 5 Exp Example 45 DPistSrtoatat s b Exchanges between A or C and DO or D1 Loading or field A into DO or D1 Syntax DReg Reg Example b8 R Note Heg can only be A or C Loading the four low nibbles of A or C into DO or D1 Syntax DReg RegS Example bH AS Note Heg can only be A or C Exchanging A or C field and DO or D1 Syntax RegDR
50. IBLE yisible list t VisibleHamel z Hame of File Hames cantainins VisibleNames Z uizible objects 3 HIDDEH hidden list t HiddenHamei z Hame of File Hames containing HiddenhHamez z hidden objects Meta Kernel Utilities 35 LCUHFIG DConfiagHame 2 13 SysRPL mode z Hame of the file containing z ihe Config Object end of lib can switch to SysRPL mode also called System RPL or External using the directive In RPL mode lots of things are changing Separation characters don t change Characters of ASCII number below 32 Comments begin with and end at the end of the line or begin with lt and end with gt 2 13 1 Instructions In RPL mode Masd interprets instructions in the following order a Constants If a constant exists with the same name the constant value is used on 5 nibbles Example TOTO TOTO will produce 2 4 b External entry points table If an entry in the external table exists with the same name the value associated with this entry is used BzlExt will produce pBinsc Note 1 Use the TableCreator program on your PC to create the table Note 2 This table be stored anywhere in the HP 48 memory Create STARTEXT text file in the HOMEDIR with the file name of the External table on the first line and on the second line Example of a STARTEXT file for a table stored in the Table backup to the fourth port
51. Kernel 25 pixel in the gray grob if both or set they become a black pixel To convert a two level grayscale grob into a four level one type DUF 3GEET REY Contrary of GEE T takes a four level grayscale grob and returns two B amp W grobs 10 2 2 Keys GO Exits PICTURE2 Switches off the calculator Switches on or off the coordinates display Switches on or off the menu display Position the cursor at P1 and set P1 as the current cursor Stores the current cursor position in P1 EM l E Position the cursor at P2 and set P2 as the current cursor h aBla KK u h hlHB YW IZ II IIIISIIWI IeIKIWHUWIIIIIIII IIIIIIIINKWII IKUVIEiIWE Position the cursor at P2 uu _ Stores the current cursor position in P3 EE S SA Inverts the color of the pixel under the cursor Copies P1 coordinates in P3 Switches between P1 and P3 as cursor No effects if P2 is the current cursor Puts the cursor coordinates on the stack as a complex number Puts the cursor coordinates on the stack as a list of two binary numbers Does a SUB The grob boxed between P1 and P3 is put on the stack as a grob Cancels the current shape line circle and returns to normal cursor mode Clears the whole grob Switches between the zoomed and the normal view Puts the current grob on the stack Arrows Cx Cursor movement i and Arrows Pa
52. Loading value into A or C from a R register 2 14 19 Exchanse between A or C and a R regist r o esi denen et die i a A Pri Dio e T Ree e HE Rand 2 14 20 Memory write nete re EORR IER Un RE EROR He DU te Ie o ERR 2 14 21 Memory read PEEK 2 14 22 DO and D1 modifications a Loading DO and 1 M b Exchanges between A or C and DO or iue eet Edi een a eA E E e d d ee Loading A or C field A into DO or DJ tnr entente enero tenen AE AOA neigen ER eate Loading the four low nibbles of A or C into DO or D1 a eet 40 Exchanging A or C field A and DO or DI tee e 40 Exchanging the 4 first nibbles of A or C and DO or D1 40 c Increment and decrement of DO and 1 40 2 14 23 Working Tegisters te8tS oreet dei dest RD deti e Gee be a 41 a Equality and inequality tests 42er edet eie b eee ae Geb ted eb t e e re ie ed en 41 b Lower and greater tests eee ere eee Ee rre eere ees RU ee Ee te ch e RETE e h o ba 41 Nullity tests 2 14 24 Working with some bits of A or C register enne enne nennen nenne teen nente enne nne E emen 41 2 14 25 Operations on PC e in EP eene oet ngo e i vette ege dede t Dee tee ee ber papse 41 2 14 26 Working with the Hardware Status Registe
53. META KERNEL 1 TB TIE EDIT Manual ROM Version 2 30 July 1998 Dec 1998 Cut down version Credits Jean Yves Avenard Cyrille de Brebisson Christian Bourgeois Etienne de Foras G rald Squelart Thanks to Jake Schwartz without whom this English manual wouldn t exist Paul Courbis the Voyage is our bible All at Maubert Electronic Hewlett Packard for the HP48 and the RPLMAN doc And in no particular order alphabetic amp Victor Achiaga Al Arduengo Jonathan Aidan Stephane Albi S bastien Casartelli Jorge Costa Stephane Doat Damien Harper Joe Horn Stephen Janin Christian Meland Bernard Parisse 1996 1998 MDG Corp No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means mechanical electronic photocopying recording or otherwise without prior written permission of MDG Corp Printed in France 2 Contents Meta Kernel Contents USING 5 9 1 INSTADDATION te nee REIHE A O a eee 9 2 GENERAPE PRESENTATION S can eor nnnm RR 9 3 du mE 9 4 CONEIGURATION SL unkun sky Sek at eed iet RR Nt Bal ta ea tad orae eae 10 5 INTERACTIVE STAGK 5 aite Ntra ER eran EB 13 6 IS a ink vitate d eati nit c E Lus she LA tul 13 y COMMAND PIBRARYX RR
54. OCOS See the examples at the end of this chapter to handle more cases Arrow keys move the selection They behave different ways depending on the type of selection Here are the movement keys when the selection is inverted selects the first argument of the current function or if the selection is already a number or a name then selection becomes a box CA selects the upper function of the selection select the previous or next argument of the upper function Here are the movement keys when the selection is in a box CAD goes back into inverted selection mode C and CE select the previous or next number or name in hierarchical order This keys are useful to rapidly move around the whole equation To rapidly select a part of the equation even far from the selection use the cursor mode see the Cursor Mode section 8 2 7 Divisions Press C to insert a division Division is applied on the edited object or the current selection To go out of the division use BoB until the whole division is selected 8 2 8 begins the exponent on the edited object or the selection Use CAD or C amp J to go out of the exponent 8 2 9 Square root e In selection mode applies a square root on the selection e edit mode qx inserts a square root eventually with an implied multiply 18 Using the Meta Kernel Meta Kernel 8 2 10 Nth square root e selection mode places the selection
55. Size in nibbles to inverse OFF SBR Address Caius Description Turns off the machine real Off OFF in ML doesn t reboot if libraries have changed InitTable Address Description Initializes memory zones for SysRPL table routines Initializes pointers used by the following routines which deal with the System RPL entry point table There are examples on the floppy disk in the file EXAMPLES2 DIR Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines Out Carry set if no table has been found Uses RSTK 5 Aw Cw Ba DO D1 Da plus the following memory zones b bytes n nibbles DC e amp Eezzone BE4AS 256b table name DCHbExternals BEd22 on 5n number of entries DC TableText BE42r on 5n address of the first entry DCiTabieHash BEd2C on 5n address of the hash table DC amp T ables 4 on 5n address of the pointers table sorted by addresses DC TabiePort 4 on 2n port number of the table DC EciPort BESHF on 2n port number of the table GetAdr Address FECAL Description Returns the address associated with a name Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines In DO Address of the text to find followed by a separation character Out Carry Set if name not found Address Uses Aw Cw Ba Da D0 D1 RSTK 5 DC Resfone BE4A3 256b name saved GetText Address FECAS Description Returns a pointer to the name associate
56. Up MaxUp Down Maxdown Select same as ENTER Updir Downdir Previous menu Next menu EVAL Swap header Display or remove file s details Type amp size EDIT COPY MOVE RCL PURGE RENAME CRDIR ORDER SEND Nn vss ela nm oo gt ele s oio o HALT2 EDITB e Custom program If you are going to run a custom program there are 7 ways to call the program Every time the filer will place the working path on the stack Examples i for HOME inmbid 5 for a port sz 2 if you are working in port 2 in the backup FOO DIR If you launch the program in the VAR then your program will start in the current directory The possible calls are 1 ect is the resulting stack that will appear just before your program is run SB Type of call 10 Recalls only the path 1 Path 11 Recalls the name and the object for the currently selected object 3 Path 2 Object 1 Name 12 Multiple objects selected n Path 5 Object 2 4 Name 2 3 Object 1 2 Name 1 1 Number of objects System Binary 13 The FILER will call your program after each object The FILER will place the following on the stack each time and call your program for each object selected 3 Path 2 Object 1 1 Name 1 14 Recalls the name of the current object only 2 Path 1 Name 15 Recalls all the names selected n path 3 Name2 2 1 1 Number
57. a are stored in the same area as temporary data When there is a bug in a ML program you have best chance to lost your data s So be very careful when programming in ML ML is a processor dependent language so what you will learn on the HP 48 will not be useful on other processor On the other hand the programming techniques you will acquire are not dependent of the hardware and then will be reusable 2 2 Launching Masd To compile a program put the string on the top of the stack and type ASF or use the ASM menu of the MENGE library 2 3 Generalities on Masd Syntax Masd expects a character string called source on the top of the stack A source is a set of instructions comments and separation characters and ends with a carriage return and an sign Masd is case sensitive so be careful as lt baricie gt and lt BOUCLE gt are two different labels Separation characters are those with an ASCII number below 32 They include spaces tabs line feed and carriage return Some instructions need a parameter called field Separation characters between an instruction and the field are spaces tabs and points Therefore H E be used instead of R E R Comments be placed everywhere between two instructions They begin with or and finish at the end of the current line Directives change the way Masd interprets your source Theses instructions begin with a and will be explained later While Masd is working it displays
58. about Erable at http www fourier ujf grenoble fr pp parisse english html STHRTEGH ERABLE amp U I SIMP 2 TRIG S IHTDER 4 UB PLUT 6 CFG T HRIT 3 i CHOOSES IF DUP EXPA COLC ERPLIH SINCOS TESPA LHCOLC TSIMP i B BRCE STARTEGH gt TRIGLIH TEIGCOS TANSSC THH2SC2 HALFTAW B BRCK STHRTEGH gt deri RISCH PF LHP lt B BHCE STHRTEGH 22 I NEH VA x DUF VE STO gt 3 2 REPLACE amp REPLACE N z 4 ALG V b IHPUT2 STR EXEC gt 3 3 COMMAND lt COMMAND lt 4 ALG V 3 IHPUT2 STR EVAL gt gt 4 ISL Va EXEC gt gt B BRCK STHRTEGH gt i ERASE AHD PLOT ERASE DUP STEG i B4645h LIBEVAL b 2 ADD TO PLOT lt DUF TYPE 5 IF THEH OVER ELSE OVER 2 LIST END STEQ id B4e45h LIBEVAL gt S PLUT lt 4 LIBEVAL gt 2 A STHRTEGH gt m amy anm uua at amm m amy amm at amy Lua at amm manm her amm atm Meta Kernel Utilities 49 I COMPLEX MODE 13 SF 2 3 E REHL MODE i3 CF b S IHTEGER ARIT 18 SF 2 3 A P LYH ARIT CF b B BRCK STRRTEGH 2 CHS re im conj STHRTEGH gt SHHP 1 1 SUB STR i CHOOSES IF THEH EVHL EHD EHD IMP 3 3 1 STARTOFF and TOFF example Here is a completely useless program But like all completely useless programs it is completely essential This is a screen saver program it wil
59. are available by pressing simultaneously a SHIFT key and another one mode Insert the character V UAR Suspend the current environment Page Up NUM i 1 cy Evaluate the current line and replace it with the result Example DEG XYZ HEN z wo PRG DEG XYZ HEN z Mo PRG 215 215 2 05 56 2 05 5 DEC 1 lt 1 4 snum _ 8 141592653594 coro eno peL Liston T Inre Page Left Page Down co gt Page Right TIME BEGIN C4 STAT END CS 6 fz3 m CD Extend Reduce the selection to the left lt ELE Extend Reduce the selection to the right Insert and indent SystemRPL program bloc see the MASD chapter for more information Auto Completion see the MASD chapter for more information 7 Command library A command library is a special library which extends the 5 function The MK command library adds new keywords they can be typed on the command line and used in programs External Boolean true FALSE External Boolean false binaru External of the given address E g 3188h external PHP To type press oA Hexa External of the given address 3188 is equivalent to 3188h To type press Cz e binary System binary of the given number To type press
60. assembly language in complete documentation 2 Introduction to System RPL in complete documentation 3 Tips and tricks 3 1 Meta Kernel and UFL UFL Universal Font Library is an attempt to normalize the use of fonts in HP48 programs The idea is to allow all programs to share the same fonts instead of having as many fonts as software UFL is a standard library It provides two different fonts the normal font or the mini font The Meta Kernel is able to work only with the last one since the MK provides many more powerful features in font management such as more than 240 different fonts at the same time while UFL can manage only one Also you can change the system font without restarting your HP48 with an ON C You will find more information about the UFL at this URL http www engr uvic ca aschoorl ufl The Meta Kernel uses its own mini font but may use the UFL mini font Just execute these few lines or add them in the STARTUP file 1 MIHIFONT 3 22 STARTED and EXITED examples 3 2 1 Remove the header display When you edit files it may be useful to have the whole screen available Using the STARTED and EXITED capabilities it is very easy to remove the header while editing and restore it after STARTED B HERDER ERITED 2 HEADER 3 2 2 Edit compressed files When you are short in memory it may be useful to compress some files BZ was written by Mika Heiskanen http www hut fi mheiskan
61. ays it 24 PR 3 14 14 JAn 13 250 O DD PRG MES 2 14 15 J h is PROG e 1 ih PRG e 63198 260 2ASAG e _618F7 PRG 1E10000 e 28580 Lf SLON L INFO In the normal stack display 21 CF2 displays the addresses of all the unknown objects RAD XYZ HEX mo HOME gt 1 PRG 12635 PRG 12 poate The CHOOSE2 boxes use the current font talic Minitel 8 Cursive 1 Carre B ED 272 UNDE mium FONT EDIT RAD XYZ mo HOME gt 1 PRG HRRDBUFF PRG HARDBUFF d GROBDIM DROP CORE 12 Using the Meta Kernel Meta Kernel 27 The symbolic matrix writer will give an ARRAY only for the Matrix Writer gives of for any object each time the of real and complex matrix contains objects of the same type But beware of memory lost if you try to use a RPL command on it 28 MASD in assembly mode by default MASD in SystemRPL mode by default 29 Normal Header Erable Header shows the current mode of Erable complex real symbolic approximate content of the variable 30 When exiting an environment Equation Writer Matrix Writer When exiting an environment Equation Writer Matrix Writer EDG the result is put LASTCMD EDG the result is not put in LASTCMD 31 64 Not used reserved for future version
62. bal Expected some functions e g differentiate integrate one of the arguments must be a variable name First Argument Two argument functions must be typed after the first argument Hizzina Euro eq MS One argument delete must be applied on a two arguments or user function Edit RPL commands EVAL require selection mode 20 Using the Meta Kernel Meta Kernel 1 Ars Functi DEL a sedd CN must be used on a one argument function like SIN fz3 can not be used on the whole equation Risebraic To paste an expression the first level of the stack must contain an algebraic object Expected Ton Feu The stack is empty Arguments Command RPL commands like SWAP DUP are forbidden in equations Forbidden 8 7 Examples MAN Press ex 89 20 83 CUDOCOCD COCOS C O GI 8339 rr G3 CO F T dT 1 x Jo 8 1 2 TO COS X ex sin x Type the expression cos x Co GED CA CHED 5B Maync CA CO Save it on the stack CX Differentiate it Simplify it Rebuild the expression Co Em Change into move on the last INV CENTER GD C C1 E89 G
63. bject to its graphical representation The object is on stack level 2 A real number at level 1 gives the desired height e 1 Mini font 2 Stack font 3 Big font 44 Utilities Meta Kernel 4 17 4 18 4 19 4 20 4 21 4 22 4 23 4 24 4 25 4 26 4 27 4 28 4 29 4 30 4 31 0 Big font but if the object is an algebraic the MK equation editor is used to draw it If the system flag2 6 is set the carriage returns in a string are used to draw multiple lines otherwise if this flag 6 is cleared the string will only be drawn on one line Example S1HZx3 680602 returns Graphic 3i x 3 gt ET Defines the number of lines of the status area O 1 or 2 HEADER Returns the current status area height INPUT2 Works like 1HPLT but uses the Meta Kernel environment DISP2 Works like 15 but uses the current system font defined with FOHT so that up to 9 lines can be written HALT2 Works like but returns to the Meta Kernel stack T returns to the standard HP stack A Note DEBUG 55 and in the PRG RUN menu have been rewritten to work under the Meta Kernel 82 Converts an object into a character string in Masd format in RPL mode 84 Converts an object into a character string like the standard 5 EDIT uses it CHOOSE2 Works like CHOOSE but uses the current system font EDIT Starts editing the object on
64. but is more powerful for bitmap creation Grobs can be in two or four level grayscale and every drawing is made in real time with or without zoom 10 1 Usage In this part basis functions will be used to create a sample grob See the reference part for a complete list of functions First create a four level grayscale grob Type GREY 131 641 ENTER D HER oD HOME DOC HLT XU HEX 1 m i 2 2 1 RAD HLT Graphic 158 x 1009 4 3 E GREY 150 1004 maratan ENTER Jrzx The blank grob is displayed on the stack Then edit it Press There are two ways to use 2 functions PREV e Using the menu To display the menu press C D and c CNXD cycle through the menu pages e With Shortcut keys Hold C amp and press the first letter of a function to launch it When you don t know the letter corresponding to a function search the function in the menu the shortcut letter is displayed bold Now draw an ellipse using the menu Press 2 display the menu if necessary The ellipse is called by the menu key IUD Press hide the menu To call an ellipse with the shortcut keys hold and press E for Ellipse remember the bold E on the menu key The ellipse can be shaped using the arrow keys Press anytime to Zoom Press EEX z a second time to get back to the normal view Press CD to display the cursors coordinates C gt pa Soda re S38
65. current address 11 4 4 Menu Searches an hexadecimal string Searches the next occurrence Goes to a given address Pushes the current object on the RPL stack This command is very useful to recover data from a corrupted card invalid Card bata Pushes the current address on the RPL stack as a binary integer Exits the Hexa Editor Jumps to the next assembly instruction VAR Jumps to the next RPL object Goes in edit mode Using the Meta Kernel Meta Kernel 11 4 3 Edit mode Very dangerous use at your own risk EDIT Use the arrow keys to move press a hexadecimal key from 0 to F to put the digit at the cursor position Press cy again to exit the Edit Mode Meta Kernel Using the Meta Kernel 29 Utilities 1 Font Editor EDF EDF is a font editor It is accessed through the CHARS menu where the current font can be edited Any font can be edited by pushing it on the stack and pressing 11 Font editing When EDF is launched scan mode is active the font is displayed on the screen and the cursor is moved by the arrow keys The current character number is displayed on the bottom of the screen here 67 Gee e 22 4 Z 4 lt gt ABCOEFGHIJKLMNO FeRSTUVWXYZONI S abedefghigkimno S DELI EZAECHO1 ECHO MODIF MOF Switches to edit mode On the left of the screen
66. d to an address Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines Address Out Carry Set if address not found D1 Address of the text 2n for the length followed by the characters Uses Aa Ba Da DO D1 RSTK 2 56 Utilities Meta Kernel 4 2 48 GetFirst Address FECES Description Finds the first name beginning with the given text Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines In DO Address of the text to find followed by a separation character Out Carry Set if no name found D1 Address of the text 2n for the length followed by the characters Uses Aw Ba Cw RSTK 4 DO D1 Da DC ResZzone BETAS 9 saving of the name to find on 256 bytes 4 2 49 GetNext Address FECES Description Finds the next name beginning with the given text Use GetFirst first values of Bb Da and D1 must be preserved Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines DO Address of the text to find followed by a separation character Out Carry Set if no name found D1 Address of the text 2n for the length followed by the characters Uses Aw Ba Cw RSTK4 DO D1 Da DC Resfone BE4A3 saving of the name to find on 256 bytes 4 2 50 GetFirstAdr Address FECBE Description Returns a pointer to the first table entry Warning Port 2 must be at address 40000 Use the DECONFIG and RECONFIG routines Out
67. e RightShift2CO LeftShift 40 For example for the LeftShift ENTER run the internal command 7059 ERPCOBODUP 89 at the end 3 Out If the key is in the list 2 program 1 TRUE Otherwise 1 FALSE UPSTACK ADR Address FECES Description Internal programs list Recalls the programs list used by the Interactive Stack See KEY_PARAM Out 1 String 4 3 20 WAITKEY ADR Address FECEE Meta Kernel Utilities 59 Description Internal programs list Recalls the programs list used by the Kernel See KEY PARAM Out 1 String 4 3 21 COMMANDLINE ADR Address FECYS Description Internal programs list Recalls the programs list used by the command line editor See KEY_PARAM Out 1 String 4 3 22 MATRIX ADR Address Description Internal programs list Recalls the programs list used by the Matrix Writer See KEY PARAM Out 1 String 4 3 23 SAVE ARG Address FECTS Description Save the LASTARG This program is very useful while you want to run a User RPL command and you don t want this program to save the last arg See LOAD ARG too Ex THO CODE EGU FECTS EQU L HD HEG FECTD SAVE AREG xbi P LORD ARG FD In case of errors the program will restore the good stack 4 3 24 LOAD ARG Address FECTD Description Restore the LASTARG saved by SAVE ARG See above 60 Utilities Meta Kernel 5 MetaKernel 3 0 Preview are some screens shot Juste pour le plaisir des y
68. e new utilities are provided e Equation editor EQW sse Page 17 Matrix editor Page 23 e editor PICTURE2 see Page 24 File tility FILER se eoi Page 27 e Symbolic assembler MASD Page 32 e Library Page 35 System RPL Development Kit Pages 16 36 3 Stack display 3 1 Display The display is divided in three parts the command line belongs to the stack RAD XYZ 1 MEZ 1 12 16 17 0 Status area lt Stack Command line gt B4 c Jem Menu The stack and status area can be resized in height see below 3 1 14 Status area The status area shows the current HP48 GX state Error messages current path calculator modes are displayed in this area Here are the new state flags DEG Degrees ALG Algebraic entry mode HEH Hexadecimal base RAD Radians FRG Program entry mode DEC Decimal base GRO Grads Beeper Octal base uZ Rectangular coordinates HLT A program has been halted EIM Binary base Raz Polar coordinates UR User keyboard ROM or write protected Ras Spherical coordinates ills User keyboard for the next RAM in port 2 keystroke WE Read write RAM card in port 2 The status area occupies two text lines by default Its height can be changed to one
69. e content of a Code object 46 CD Ei Inverse of gt hexadecimal string is placed inside a Code object 47 Returns the memory address of the object on stack level 1 Example i H returns 2 2 address of the real number 1 48 Ao Puts the object pointed to by the given address on stack Dangerous Example amp iB RHch A returns 49 PEEK El Reads memory Level 2 contains the starting address a binary number level 1 gives the number of nibbles to be read a binary number A hexadecimal string is returned on the stack Example 8 104 PEEK returns Z363BiB8SbH 4 10 POKE Writes memory Level 1 contains the hexadecimal string level 1 the start address Dangerous i Example i8i1h C changes the contrast 4 41 SREV El Reverses the order of the characters in a string Example 48 SRE returns 84 4 12 PRG LST Transforms a program to a list and vice versa Example SHAP DROP 2 PELG LST returns FRG SWAP DROP END 4 13 ORAM Creates new copy of the object in memory equivalent to HEHGE but it also works with ROM objects Example EHH returns FEG ISAAS 63188 the program in ROM 4 14 Reads the address at a given address binary number on stack level 1 Example 3i188h returns 318bh 4 45 R SB fg Transforms a real number to a system binary and vice versa Example 32 5 returns 8 28h 4 16 OGROB2 Hii Transforms an o
70. ede i e A ic eee d Ie 9 3 1 Keys 9 3 2 Men eder Ret emiten e i em Pe ce e i e e Ee ERES 10 2 102 10 2 References i eee rete deterret RS 10 2 1 Commands 10 2 2 ROY E 10 2 3 C 11 FIER C lij Ports and directories screen issued ee Reese eiie dede er de ie te dede ee dea dide dede ce 11 25 Faleselectioscreen c iG eun TL3 dpa e EE Rete dte Ib Rn ene 26 114 1 11 4 2 KEYS E 28 11 4 3 Edit eee erepti tae HR 29 UTILITIES 31 1 FONTEDITOR EDB 4 eec S i nae erat E ee c eet 31 l 1 FONE CUI G dE 31 1 2 CHARS mode a aea ea E 31 1 3 25510 With CHARS atero eta ete ete bie eda
71. egEX Example ABIES Note Heg can only be A or C Exchanging the 4 first nibbles of A or C and DO or D1 Syntax RegDRegXS Example ADi S Note Reg can only be A or C c Increment and decrement of DO and D1 Syntax DReg DReg Cst or DReg Cst Syntax DReg DReg Cst or DReg Cst Example 12 51 58 Note 1 The Saturn processor is not able to add a constant greater than 16 to a register but if cst is greater than 16 Masd will generate as many instructions as needed 40 Utilities Meta Kernel Note 2 Even if adding constants to a register is very useful big constants should be avoided because this will slow down execution and generate a big program Note 3 After adding a constant greater than 16 the carry should not be tested 2 14 23 Working registers tests Notes Atestis always followed by RTHYES G YES SKIPYES EXIT UP GOTO GOTOL GOVLHG GOSUB GOSUBL or GOSBYL e ET is the same as ETHTES e arrow may be followed by a label name then replacing GUE or may be followed by a skip block which is equivalent to the inverse of the test followed by SKIPYES to reproduce a IF THEN structure Example 3 is the same as THRC H gt e SEIPTEZS may be omitted if followed by a skip block gt e Ifthe test if followed by a GOTO GOTOL GOVLNG GOSUB GOSUBL or GOSB L Masd compiles the inverse of the test to reproduce a GOYES with a larger range Example H 2C H GOTO Bis the same as
72. election number if the object is selected an icon depending on the file type the name the type and the size of the file Press to select or deselect a file Press CB on a directory or a library to go into it Press CO to go out of the current directory of library For all the commands that require a list of files if there is no selection the current line will be taken as the selection You can change the header in order to display the number of objects available and the working path here port 0 home MENU idobs 00 ESSRGE ARRAY 260 REAL 10 CODE 273 2062 Font GROE 2052 LIST 62 248 NOVE RCL INFO AREO To hide the type and the size of every objects press Henory 110122 Select 0 CIMESSRGE R 1125 wEb2ua d s KFODT 711600 cory Move RCL FIC 11 3 Menu Some commands work only in a special mode for example only in the HOME directory When you try to run these commands in an incorrect mode a beep is produced ELIT Edits the current object ED 6 CORY Copies the selected objects You define the destination with the tree screen select the destination a port or a directory Meta Kernel Using the Meta Kernel 27 and press or 8 Moves the selected objects to the destination you selects in the tree screen VEL RCL Puts the selected objects on the stack CO GD QE Gives infor
73. er a number followed by an alpha inserts an implicit multiply Fast access to the character not needed e Creates user function e Next argument or creates another argument in a user function 8 8 3 Selection and edit mode common keys ENTER Saves changes and exits Discards changes and exits CON CON HALT temporary exit a second returns to EQW at the same place OFF Switches between stack font and little font Display the first page of the menu Menu next page PREV 1 Menu previous page 2 0 Turn off the menu aces the expression from the stack the equation 8 8 4 Cursor mode Arrows Movement and Fast movement Border movement Back in selection mode no changes to the selection Back in selection mode the new selection is the part of the equation that is pointed to by the cursor CON Discards changes and exits 22 Using the Meta Kernel Meta Kernel 9 Matrix editor The Matrix Editor is a matrix oriented environment B o CR B 3 2 10 605 G04 91 Presentation MK Matrix Editor can be used like the standard Matrix Writer but it adds new features Not only real and complex matrixes can be edited but also symbolic charac
74. erized outer loop like Parrtiut erboop 5389050 Takes 9 arguments more in complete documentation INIT CMD Address Description Initializes the command line CMP PLUS Address Caen Description Adds a character to the command line string DISP_CALL Address Capos Description Text display In 2 Character string 1 if carriage returns to be interpreted BZU Address CHisb Description Uncompress with BZU Uncompress the compressed strings using Mika Heiskanen s algorithm from his BZ program In 1 Strings without its BZ prolog Out 1 Object KER PARAM Address CHISI Description OuterLoop Internal version of the ParOuterLoop This program doesn t create a local environment to save the menus therefore you can use unnamed local variables MINI_EDITOR Address Description Mini editor on one screen line In 3 String if boolean on level 2 is TRUE 2 Boolean 1 Line number where the command line has to be put Out 2 String 1 Boolean TRUE if line validated by ENTER else FALSE If the boolean is TRUE the editor is initialised with the character string on level 2 KEY PARAM Address FECSZ Description Recall a program associated to a key Assigns a program to key Recalls the corresponding program 3 Key code 2 Shift code 1 program list string The list is as follow in MASD format STRIHG E ais 1 if in alpha mode else 0 xx is the code of the key plus the ML shift cod
75. est IF HOT A THEH 34 Utilities Meta Kernel i Begi EXIT GOTO Endz X and not End1 S UP GOTO Begi Endi EHD SEELSE End ELSE B 2 H i H 1 ERIT GOTO Ende UP GOTO Beas Endz EHD 2 9 Macros If data are to be included in a project they can be entered in a source file using But a simpler way is to include data from an external file which is a macro The macro file must be a character string a graphic a code object or a list In case of a string or a code Masd includes only the data part after the length In case of a graphic only the graphic data will be included no length no dimensions In case of a list only the first object of the list will be included following the previous rules The syntax is FileName Note To know how Masd looks for the FileName file see the following section 2 10 Filename conventions Masd sometimes needs to find a file in the HP 48 memory The file can be found either by specifying the complete file name and location or only the file name to be search in the search path list The initial search path list contains the current directory the upper directory and so on to the HOME directory Note You can add a directory in the search path list using RepHame where RepName identifies a directory name using the full pathname rules explained below To specify a full path use
76. eux Pretty Print on numerical matrices DEG Rez HEX wo DEG Raz wo HOME 06 11 0 15 HOMES 06 13 0 15 2 3 1 2 1 456 7 89 HA 61112 10 11 12 eo Tn 44 S IRI CECI esa Symbolic matrices DEG Rez HEX D DEG Rez HEX oD HOME 06 14 0 15 HOMES 06 15 0 15 i SIMD 5 6 aut id JA B 12 10 12 16 TATARE mmm yoga Tira Symbolic Expressions DEG Rez HEX D DEG Rez HEX D HOME gt 0 6 12 0 15 tHOMEZ 06 i2 DEC 15 2 1 1 PP ni BEER dx Tn 82 2 Units in pretty print DEG Rez HEX co HOME 06 232 0 15 2 200000 2 ms 1 DEG HEN oD HOMES HLT 06 31 DEC 15 1 vl CONSTio amp MEE Gimme ERA to EQNS 1 FILER ercu TEST Tyre List aroe Gree Algebraic Mode HOME gt Rt 45 TT ET Equation Writer 3 Edit symbolic matrices unit objects INFORM2 Speed up every menus of the HP48GX by up to 500 times Modular Select exactly what you want to use in the MetaKernel Meta Kernel Utilities 61 And MUCH MORE Coming Soon 62 Utilities Meta Kernel
77. ge by page cursor movement Arrows Position the cursor on a border Menu keys In cursor mode DOT in white In shape mode fixes the shape in white m In cursor mode DOT in light gray white in B amp W In shape mode fixes the shape in light gray m In cursor mode DOT in dark gray black in B amp W In shape mode fixes the shape in dark gray 80 In cursor mode DOT in black In shape mode fixes the shape in black In cursor mode DOT in XOR mode In shape mode fixes the shape in XOR mode G like but only inverses the high weighted bit plan try it F Cancels the current shape and returns to normal cursor mode 1 Puts a white pixel Puts a light gray pixel white in B amp W Puts a dark gray pixel black in B amp W Puts black pixel 10 2 3 ALPHA keys To use these keys hold down Suspends the current editing and edits the grob found on stack level 1 Useful to edit a pattern for a pattern fill Press to return to the other grob editing Box P1 and P3 are two opposite corners Circle P3 is the center P1 is a point on the circle Executes the program stored DOF ICT Ellipse P3 is the center P1 is a corner of the enclosing box Surface Fill In B amp W inverses the surface color In grayscale the wanted color must be then defined with m E Press 889 or
78. ges the CP value to CP N nc By default Inc is a decimal number It can be typed in hexadecimal with a leading 27 Expressions An expression is a mathematical operation that is calculated while compiling Terms of this operation are hexadecimal or decimal values constants or labels An expression stops on a separation character DCCP 5 Data bi mompatarfiB z H2 DB 65o 54DHP LDCOBOUDDP U 4S5 are correct expressions Notes A hexadecimal value must begin with a and a decimal value must begin with a The amp character equals to the address of the current instruction in absolute mode or to the offset of the current instruction in standard mode This value has no meaning in itself but may be used to calculate the distance between a label and the current instruction The value of a label is the address of the label in absolute mode or the offset of the label in the program in normal mode This value has no meaning in itself but may be used to calculate the distance between a label and the current instruction Meta Kernel Utilities 33 Entries from the STARTEXT table may be used In an ambiguous case 5 may either be an addition DUF 5 or entry DUP 5 add around the word GUP 5 There is no priority precedence in operations 1 2 3 9 instead of 7 Use parentheses to set priorities You can t use more than three level of parenthesis Calculations are done on 64 bits X divide by 0
79. gt 8 8 Key reference for EQW Selection mode o ee e awetedseletin Boxed selection Previous argument Previous variable or number 21 Meta Kernel Using the Meta Kernel gt Next argument if on last argument go to upper Next variable or number if on last argument go to upper function function Upper function Inverted selection First argument of the selected function First argument Last argument Argument left roll Argument right roll First name or number of the selection boxed selection ST SUE copies the selection to the stack EXPHHEs the selection COLET s the selection Line command editing Whole equation selection Adds removes parentheses One argument function deletion Argument deletion in a two argument function or in a user function Deletes all but the selection Variable or name edition c Clears selection goes into edit mode SIN J COS TAN J Inserts a one argument function csi Inserts a function the selection becomes the first argument except for and Z where the selection becomes the main ri argument 5 SPC Next argument or create another argument in a user function Co Creates a complex number selection is the real part Digit character Deletes the selection starts editing 8 8 2 Edit mode Digit character Adds a charact
80. he register by two Subtraction Syntax Reg1 Reg1 Reg2 for Reg1 Reg2 f Example C C B or C B H Note The following instructions are also available H B H f B C E f C A C f p c b f Increment and decrement Syntax Reg Reg Cst f or Reg Cst f Reg Reg Cst f or Reg Cst f Example H2H i amp H orRH iB H H RH i8 HorRH iB H Note 1 The Saturn processor is not able to add a constant greater than 16 to a register but if cst is greater than 16 Masd will generate as many instructions as needed Note 2 Even if adding constants to a register is very useful big constants should be avoided because this will slow down execution and generate a big program Note 3 Adding a constant greater than 1 to a P WP XS or S field is a bugged SATURN instruction problem with carry propagation Use these instructions with care Note 4 After adding a constant greater than 16 to a register the carry should not be tested Right nibbles shifting divide by 16 Syntax RegSR f Example ASF H Left nibbles shifting multiply by 16 Syntax RegSL f Example ASL H Right bit shifting divide by 2 Syntax RegSRB f Example RSRB Right circular nibble shifting Syntax RegSRC f Example ASEC H Left circular nibble shifting Syntax RegSLC f Example RSL C H Logical AND Syntax Reg1 Reg1 amp Reg2 f or Reg1 amp Reg2 f Example C C amp B or CEB H Logical OR Syntax Reg1 Reg1 Reg2 f or Reg1 Reg2 f Example C C B R or C
81. ht shift ST0 1 2 3 text attributes bold italic underline inverse ST8 display carriage returns as characters if set ST9 display Out DO next line address in the grob Aa last written character address Da number of remaining characters ST8 setif a CR has been read D1 end of displayed text in the grob EDIT SBR Address CHESS Description Mini edit used by FIND in the command line Call INIT DISPLAY LINE before using this routine 52 Utilities Meta Kernel 4 2 5 4 2 6 4 2 7 4 2 8 4 2 9 4 2 10 4 2 11 4 2 12 4 2 13 4 2 14 4 2 15 In R4a screen address Ca maximum number of characters D1 buffer address ST9 display Out Cary setif has been pressed clear exit by FILER ADR Address Description Address of the main FILER program SCAN FONT Address CHESA Description Rebuild the font table This function forces the MK to search through all ports to build the font table RECONFIG Address CEBBR1 Description Reconfigures the second card After a DECONFIG this routine reconfigures the second port card at CHEE hidden by the MK card and the bank switcher at rF BB DECONFIG Address CEBAS Description Deconfigures the second card This routine is used to gain direct access to the second card without deconfiguring the MK The second port card is moved from where it is hidden by the MK card to 6868 The bank switcher
82. i font is a Libr aru Data object This format is very popular in the HP48 s world particularly with programs which use UFL Universal Font Library In order to know how to use the UFL with the Meta Kernel check the column Tricks and Tips 4 Configuration 10 Using the Meta Kernel Meta Kernel 4 1 variables Some programs can be executed on some events in place of the default programs They must be stored in the directory Executed at each reboot 2 STARTUP STARTED Executed just before entering in command line for editing an object The object to be edited can be found on stack level 1 This program must leave the object to be edited on the stack level 1 EXITED Executed when the user stops the command line editing Level 2 contains the object and level 1 if the user has pressed CENTER or only FALSE for ON For example these two programs can be used to change the display while editing try STARTED x HEADER and EXITED 2 3HEHDEE gt Executed when the automatic OFF is called after a certain amount of idle time You can make a screen saver ul remember the HP48 GX works on batteries Defines the amount of idle time before an automatic OFF or It must be binary integer in Ticks 1 s 8192 Ticks STHETEXT Contains a string that is the path using the MASD syntax to the entries points list Example 4 DTRL
83. ith a given color Place the cursor on the surface to be filled press Fill and then in case of a four level grayscale grob the corresponding color C or e A pattern can be used to fill a surface see the reference part To leave a trail behind the cursor like DOT press a color G0 SE or EB To stop the trail press C To change only one pixel press WI CST or G5 corresponding to the color keys To exit press the modified grob will be put on the stack 10 2 Reference 10 2 1 Commands These commands can be typed in the command line or called from RPL programs PICTUEEZ The graphic editor which works with the PICT EDITE The graphic editor which works with the grob on stack level 1 PICT Stores the grob on stack level 1 in the PICT like FICT T but it also works the four level grayscale grobs FICT Puts the current PICT grob on the stack GREY If the grob on stack level one is in four level grayscale returns 1 else 0 GBLAHE Equivalent to but creates a four level grayscale grob GREY Takes two B amp W grobs on the stack and creates one four level grayscale grob with them The grob on level 2 defines the low weighted bits a pixel in this grob becomes a light gray pixel in the gray grob a pixel in the grob on level 1 becomes a dark gray Meta Kernel Using the Meta
84. l displays points in the screen until you press a key If you want the Meta Kernel to run this program after two minutes of idle time put 32848 the TOFF file STARTOFF PICT LOD PICT 6 8 D RHHD 131 RB RHHD 64 R B 2 LIST PIXON UNTIL KEY EHD DROP TEST PICT 4 for Programmers 41 Customizing the Filer 4 1 1 Overview The filer is completely customizable You can run your own programs from inside the filer These programs can utilize all of the functionality of the filer which the internal functions use You can also access all internal functions This customization is accomplished using a custom menu that displays labels for each of your custom programs In the filer if you press CST or CUSTOM in the built in menu the filer will try to find the file FILER CUSTOM This file is used to create your custom menu 4 1 2 FILER CUSTOM Format FILER CUSTOM is a list with the following arguments GR B i83i n This is the GROB that will be displayed in the menu area when you press CST You can also use a program that gives a GROB as a result Sustem Binaru i Number of pages for the menu t System binary 2 Execution Type Sustem binaru 3 Exit type 1 Program which will be run by the filer DSustem binary 41 Shortcut key for the program t entry just as above for each custom program 3 4 1 3 Explanation of each component a System Binary 1 and GRO
85. lines 3 2 1 Changing the display font To use a different font put it on the stack and execute FUHT consult Page 46 Fonts are displayed on the stack like this Example Ft 8 8 SYSTEM this is the standard display font for the MK The first number 8 is the font height in pixels the second number 8 is the id of the font then the name SY STER 8 Two examples with a font8 and a font6 RAD 1 oD RAD HVZ HEN 1 EQHUNIT i 14 20 25 JuL SE EQNUDITZ i 14 29 25 JUL 1 x GROB SRC mem GOSUBL EFFRCE GOSUEL EFFACE ST 0 sT 0 S sT ie GOSUBL PxY FONT 64 If the current font is a font6 6 pixel high the MK system flags 8 and 9 force respectively the stack display and the command line to use the mini font RAD HYZ ME id 31 25 JUL 1 2 GRO SRC GOSUBL EFFACE x REPAY Siz 5 5150 9 51 4 ii ST 0 14 PRY HINT FONT 1114 GRDE PC SR SLIES S TRRT MENU PUTIL 3 2 2 Modifying the current font CHAR The current display font may be modified with the CHARS menu GRO Consult Page 31 On the floppy disk there are two programs named GRB2FNT PRG and FNT2GRB PRG which convert MK fonts to or from common 8x2048 grobs Consult Page 46 3 2 3 Changing the mini font It is possible to change the MK mini font used in the status area and the menu labels Use the commands FIHIFOHT and A min
86. mation about the current object Name type size address CRC To go to the tree screen 2 Clears the selected objects If the MK flag 12 is clear default you will be prompt for a confirmation BB Ga Renames the current object This command is available only in the VAR Orders the selected files in the order of the selection The other files follow Evaluates the current object Some programs that normally do not work in port 2 can work using this command Sends the selected files with KERMIT with the current I O settings If the variable STRFT EHD exists in the HOME directory it is used to send the files level 2 the object level 1 the name Suspend the Filer and return to the RPL stack m m B E lt Goes to the hexadecimal editor at the beginning of the current object Views the current file if it is a string Edits the current object with the best environment Lun 7 MENU 885888 88 8828 888888 88 e 589 Starts the custom mode if the FILER CUSTOM is defined By default the Filer displays the memory available and the selected objet s number It can display the number of objects and the working path 11 4 HEXA Editor The screen shows 64 nibbles and their ASCII value Each line represents 16 nibbles separated by 8 On the bottom of the screen are written the assembly instruction and the RPL object at the
87. mode with the flashing cursor the character amp is directly available by pressing DEL A Note in EQW the key locks the alpha mode by pressing it once corresponding to amp amp SF Therefore to type a name either hold press the character keys or press once then press the character keys and press to unlock the alpha mode 8 2 4 Addition subtraction and multiplication To enter and press CX C and The operation is applied the edited number name the current selection To enter implicit multiply do not press An implicit multiply is automatically inserted in the following cases number followed by an alpha character or a prefix function a function whose name is before arguments for example C7 e An alpha character followed by a prefix function 8 2 5 Complex numbers and expressions To enter a complex number or expression type in the real part then C and then the imaginary part A complex expression is considered as a two argument function equivalent to A complex number is stored directly in the final equation whereas a complex expression like A B is converted to R E i 8 2 6 Moving in the equation Before going further here are the movement keys In fact entering an equation with EQW is not far from the RPN way no parenthesis are needed For example to type 5 2 press then select 5 typing CO and then type C
88. n absolute mode cause an error if the directive is not an even address BER Masd will generate a source defining all constants and labels used in the program instead of the program ICOBMPEXP Cause Masd to calculate all previous expressions iCOMPEX Cause Masd to calculate last expression 2 16 Error messages Invalid File The file is not source or a macro must end with a Too manu links Only 256 links are supported May be due to a recursion Unknown Inztr Unknown instruction Bad Field Incorrect field 8 15 Expected An integer between 0 and 15 is expected 1 16 Expected An integer between 1 and 16 is expected Error Stack Size You use more than three brackets Size Too Small Program between brackets is too big Close Size There are more 3 than Label Expected A label name is expected Consi Expected A hexadecimal number is expected Can t Find Can t find the label or the file Lab Already A label or a constant is already declared with the same name Heed An opening was expected Heed gt A closing gt was expected Forbidden Operation not allowed Bad Expression Error in expression dump too No comments 3 Disassembler The disassembler converts binary code into a source string There are two ways to use it with a Code on the stack level 1 or
89. n grayscale BEEP Address Cine Description Do a beep if the system flag 56 is clear KEY_REPEAT Address CISC Description Keyboard handler routine Repeats a routine associated with a key Syntax G SBVL KEY_FEPERT zkeumask in out mask e g 02040 for Q OUT 040 IN 02 GOTO KEY_REPEAT_ROUTINE GOTO END _KEY_REFEAT KEY_NO Address ChHi e Description Waits for all keys to be released HEX_DEC Address CHi amp 4d Description Hexa to decimal conversion In Ca hexa to be converted Out Aa decimal result A DIV C Address Description Ba Aa SET BIT Address CISC Description Sets a bit in a bit field D1 bit field address Aa bit number to be set to 1 Meta Kernel Utilities 55 4 2 40 4 2 41 4 2 42 4 2 43 4 2 44 4 2 45 4 2 46 4 2 47 CLEAR Address FECSF Description Clears a bit in a bit field In D1 bit field address Aa bit number to be clear BIT Address Description Tests a bit in a bit field In D1 bit field address Aa bit number to be tested Out Carry set to the value of the tested bit BZU SBR Address CHITA Description BZU BZ Uncompression Uncompress data using Mika Heiskanen algorithm in his program BZ In DO Address of the object to decompress strings without the B prolog BZ D1 Address where you want to uncompress INV ZONE Address CHISE Description Invert a memory zone DO Address zone Ca
90. nning Displays the menu of the text which is composed of every line that begins with the character useful in assembly language Goes to the beginning of the selection 6 Edits the selection with the best environment Meta Kernel Using the Meta Kernel 13 6 2 2 Operations on the selection Note the selection marks are lost when the text is modified Sets the beginning of the selection Sets the end of the selection Lm Copies the selection on the stack level 1 Copies the selection on the stack level 1 and clears it in the text 4 rm Puts the object on the stack level 1 into the text at the cursor position 6 2 3 Search operations I Displays a screen where you can type the search string When you press enter this string is put on stack level 1 The character stands for any character Then the selection is placed on the first occurrence of this string after the cursor position Displays a screen where you can type the search string and the replace string The search string is put on stack level 1 and the replace string on level 2 Then the selection is placed on the first occurrence of the search string The change is not done yet Selects the next occurrence of the search string the string on stack level 1 BS Replaces the selection by the replace string the string on stack level 2 Equivalent then
91. number GOSBYL label label is a constant or a label in absolute mode GOSBYL COMAAHD COMMAND is an entry in the STARTEXT table GOC label GOHC Jabel GOTOC Jabel sameasSKIFHC i GOTO label GOTOHC JabelJsameasSKIFC i GOTO label 2 RTH RTHSEM RTI Meta Kernel Utilities 41 ETHE ETHHC ETH YES after a test 2 14 29 Exchanges between C and RSTK C ESTE and RSTE C instructions allow to push to or pop data from the Saturn return stack 2 14 30 Input output instructions GUT C5 QUT C A IN and C2 1H Note 1 Hz iH and iH instructions are bugged they only work on even addresses So use H2 1Hz and iHz which are ROM calls to H2 1H and C 1H instructions Note 2 if the beginning of ROM is not usable because it is recovered by RAM use Hz 1H3 and C IHZ which are calls to H2 11H and C iH instructions the Meta Kernel Card Note 3 Gili T2 C IH is a ROM call that does GUT C C IH Note 4 is the same but in the Meta Kernel card works even if lower ROM is recovered 2 14 31 Processor control instructions Working mode modification SETDEC SETHEX other instructions UNCHGF COHFIG RESET SHUTDH INTOFF RSI SREG BUSCE BUSCO BUSCO 2 14 32 New instructions of Masd GOIHC Jabel Equivalent to LE 5 1 abe1 amp amp is the address of the instruction GOIHA Jabel Equivalent to LA 253 1abe1 amp amp is the address
92. of names selected System Binary 16 Recalls the current object only in a string of addresses 2 Path 1 String Meta Kernel Utilities 51 17 Recalls the selected objects in a string of addresses 2 Path 1 String f 9 h Explanation for the string of addresses This string recalled by the filer is a list of addresses You can use it only in ML or with FILER FRCL FILER FNAME and FILER_NXTADR for SysRPL use FILER FRCL Takes a String of addresses and recalls the first object FILER FNAME C0304 Same thing but recalls the first name object FILER NXTADR 0314 Takes a string of addresses and removes the first addresses And FALSE if there are some addresses left TRUE if not The string format is Prolog 02A2C Size AdrName1 AdrObject1 AdrName2 AdrObject2 Each address is on 5 nibbles Explanations about the name For all calls except 14 and 15 the name is the real filename If you call the program from a library then the name will be the name of the library itself Like Strwrt i 4 321 However for 14 and 15 if you have selected a library the name will be a real number that is the library number For 13 if the object is a library then the name will be a L plus the Id number Example For Library 1303 the name will be 11303 NOTE You can browse every library but can only run your programs from an attached library Warning and very important point
93. of the instruction Program prolog 02090 and epilog 0312B Alabel In absolute mode places the address of the label Blabel In absolute mode places the address of the label 5 SAAAA ARA or Includes hexadecimal data Example i2HCb54586838B HIBHEX hhhh hhh AAAR AAA Includes hexadecimal data in reverse order Example 4 12 3HEC is equivalent to CBR3z1 Exp or Places the value of Exp in the code on x nibbles COWS x Exp or at Exp tHecii Includes ASCII data The end of the string is the next or carriage return Example Hellot To output a character put it twice IHCLUDE fFileame Includes directly the specified file as data Includes the value of Cst on 5 nibbles 123 is equivalent to amp B amp iz3 czt Includes a system binary of value Cst Oo cst Includes a system binary of value Cst If this number already exists in ROM its address is used instead GOIHS Jab G5 Jab Sameas lt 21 1 with x 5 4 or 2 Useful to create a jump table GOIH4 Ish G4 Jab GOIHS Jab lab GOIHZ Jab GE Jab SAVE Equivalent toGOSE L B amp r7 3B LOAD Equivalent toGOSE L B amp rbz EFL Equivalent to HZbHTB H DB 5 gt LOADRPL Equivalent toGO LHG 13859 IHTOFFS Equivalent to G SB L 61115 IHTOHZ Equivalent toGOSE L BIBES EREDE C Equivalent to 60561 iBFeB RES 5 Equivalent to 60561
94. or zero lines with the MK command HERDEE consult Page 45 3 1 2 Stack With the MK up to nine lines can be viewed on the stack as you can change the font height 6 7 or 8 pixels and the status area height The maximum number of lines displayed by objects be changed with H ISP consult Page 46 More configuration capabilities are provided by the Meta Kernel system flags MKSF consult Page 11 Algebraics and grobs may be displayed directly in the stack use the MKSF to configure how and when they are displayed Meta Kernel Using the Meta Kernel 9 RAD XYZ MD HOMES 32 23 JUL 5 2 EQUATION 1 gt z 3 4 3 Menu labels Menu label style depends on the type of the stored object RAD XYZ HEX MEZ e EH 4 gt 2 1 iia LIST PROG eec 153454 Directory Program code Grob Real complex algebraic expression matrix List variable binary integer Character string By default labels are written using the MK mini font If the MK system flag 20 is set with z amp 5 2 standard menu font is used instead L pir Td LIST PROG JECTS TRIN 3 2 Display configuration New display fonts can be created and used The number of lines displayed on the stack differs with the font height With a font8 8 pixels height 5 to 7 lines may be viewed with a font7 6 to 8 lines with a font6 7 to 9
95. r essent nennen 41 2 14 27 WOorla esWith C 41 2 14 28 ceu 41 2 14 29 Exchanges between Cand et ord e 42 2 14 30 Input output Instr ctions 4 en emi etri E ED Ore ye ele Rte 2 14 31 Processor control instructions 2 14 32 New instructions of Masd etai a ae e tpe ere qe e erbe DDD M sd directives s ase aem e at ete S as ied as Ua ae Sea sa su Sy 2 16 Error messages iau sese A seine eau edv px yc dee pm e A Get beet i uQ u Bu ite eA 3 IDISASSEMBEER amp oat ies vd B D IO RD epa 4 MISCEELANEOUS UTILITIES IRE ORENSE OE TREE KI TORIS Te E OE H perc MD clo rr 4 3 2 in as e b qe D HER Mo 44 Lt entnehmen E s A 44 AG oi o me EE PIENE 44 Ix sasa watan S n EN NE 44 Me assesses eeepc 44 dtm SR 44 2 10 SPOKE ES 44 411 4 12 4 13
96. s 5 Interactive stack The interactive stack works the same way as the standard one but at a greater speed and it is possible to edit many objects simultaneously in the command line editor it is possible to go temporarily to the interactive stack and to edit another object recursively It is also possible to the editing environment Current stack level Eb Interactive Stack Operations n indicates the current level Copies the current level object on the command line at the cursor position Shows information about the current level object size CRC Equivalent to nP ICE Equivalent to n ROLL Equivalent to n FELLE FEG Equivalent to n L IST FUH Equivalent to n DUFH m am Equivalent to n BEOPH 6 Command line 6 1 Generalities The Meta Kernel improves editing with new functions COPY PASTE FIND REPLACE text style Bold italic underline inverse Styles can only be used inside strings they will be ignored and lost in any other object EDI You can edit an object by pressing CD when the object is on stack level 1 There are other ways to edit an object explained after 6 2 Editing menu There are four pages in the menu plus the Style menu 6 2 1 Major options Goes to a given line number Goes to a given position in number of characters from the begi
97. s In order to save room we used list of addresses So if you modify the directory structural in your programs using STO PURGE etc then NEVER USE CALL 13 And if you are a very experienced programmer you can use calls 16 and 17 4 0 Machine Language entry points list 4 2 1 4 2 2 4 2 3 4 2 4 Here is a list of entry points inside the Meta Kernel They can be used by experienced programmers for programs to take advantage of the MK Of course if these entry points are used the program won t run without the MK Call a routine with GGSBYL Chace Rf means the R register with the field f Example Ca describes the register C field A Input and output registers are described in the In and out sections MINI DISP Address Ceb4e Description Displays a Mini font character string In Ca number of characters D1 String address DO display starting address in a 131 x grob ST11 inversion white on black MINI FONT ADDRESS Address Description Mini font address in the card E g b8 Cee47 A DATS A DISPLAY_SBR Address Cee4c Description Main display routine Call INIT_DISPLAY_LINE before using this routine In ROb font identifier Ris font height 2 1 DO Starting display address in a grob D1 String address Da number of characters R2a display grob width in nibbles Ba left margin in characters Ca right margin in characters 574 display left shift 575 display rig
98. s useful to identify a memory address by a name rather by the address itself For example instead of typing Di amp BiBB every time it is needed it is better to declare DC Resuli 86166 at the beginning of the project and then to 52 1 when needed Constant declaration DCE CetHame Exprezszionor ERIE CstHame Expression or DEFINE CstHame Expression DC CstHame CetivalueorEGl CetHame Cst Value CstValue is a hexadecimal number A decimal number can be typed with a leading character DC Foo 18 15 5 Foo 16 Note 1 A constant cannot be given the same name as a declared label Note 2 The name of a constant follows the same rules as the name of a label Note 3 A constant value is always stored on 5 nibbles introduces a programming register called CP Constant Pointer which helps to define constants CP is defined by or CPE Expression CP is defined on 5 nibbles its initial value is 80100 Increment Constant declares a constant with the current CP value and then increase CP by Increment Note Increment is a hexadecimal value to use a decimal value put a leading For example if CP equals to 10 5 Foo defines a Foo constant with a value of 10 and then change the value of CP to 15 Several constants can be defined starting from CP ing CstHamed CztHamei CatHameH i defines N constants CstNamex with a value of CP x nc and then chan
99. stack level 1 with the command line editor VISIT Starts editing the object stored in the given variable name with the command line editor EDITB Equivalent to ED 1T but uses the best adapted environment command line equation editor graphic editor depending on the object type VISITB Equivalent to 151 but uses the best adapted environment command line equation editor graphic editor depending on the object type EQW Launches the equation editor with the expression given on stack level 1 FILER Launches the filer ASM Launches the assembler with the source string on stack Meta Kernel Utilities 45 4 32 4 33 4 34 4 35 4 36 4 37 4 38 4 39 4 40 4 41 4 42 4 43 4 44 4 45 ER Edits the error after assembling There must be string at level 2 and the errors list at level 1 8 gt Starts the disassembler Consult Page 43 NDISP Defines the maximum number of lines taken by an object displayed on stack including grobs and algebraics FONT Sets the font object on stack level 1 as the system font FONT Returns the current system font on the stack FONTS FONT6 Returns the standard Meta Kernel fonts 6 and 8 A Note there is FONT7 in the MDG menu but it is empty Not enough space left KERNEL Returns nothing It is used to test if the Meta Kernel is present if a program needs it SF2 CF2
100. ter strings program etc arrays For example here is how the following symbolic matrix A B 1 2 1 C is represented on the stack as a list of lists H E 1 UB gt IB A B Z gt Dd B c DU 33 To view and edit it under the Matrix Editor press the down arrow or execute the command EP 1 TE 1 1 1 A B EDIT WI0 HID G0 gt GO SLON The symbolic Matrix Writer is powerful enough to manage any knid of datas For example you can edit you contacts list With some external tools you can also transform the Symbolic Matrix Writer into a spreadsheet 9 2 Usage Two modes are available one to create a new matrix the other to edit an existing matrix MATRIX To create a new matrix press CENTER An empty matrix is displayed where any object can be entered When CENTER is pressed if all the elements in the matrix are of the same type an Arras of is pushed on the stack the content is displayed for real and complex numbers and strings otherwise a list of list is created this is a multi typed array In the second mode when an existing array is edited if a new element is entered outside the matrix the other empty cells will be filled with null elements corresponding to the matrix type 0 for reals for strings HORE for multi typed arrays etc PS For some security reasons only arrays of real and complex are created If you want to create an
101. the character is displayed eight times bigger on the right in its normal size gets back to the CHARS mode s ERIAREN The cursor is the big character view on the left It is moved with the arrow keys and C inverts the pixel under it 1 2 CHARS mode The chars mode is the default mode when EDF is launched The cursor is moved by the arrow keys BT pushes the current character the command line Press to exit pushes the current character on the command line and exits to the command line 13 session with CHARS We will add a point inside the character CHAR i Press to enter in CHARS Use the arrows to move to the C character Press RIN to edit it Use the arrows to move to the center of the character press Cto put a point Press ON to return to the stack display See how the characters have changed RAD XYZ HOMES 83 5 oizs4q5e 722i5t4 ienEXDEFGHIJKL YZEN 1 s GE Ce s Oe ee Meta Kernel Utilities 31 A Note that this only affects the current font The next will destroy the changes make them permanent do FOHT and store the changed font 2 Machine Language Compiler Masd 21 Generalities on ML Machine Language As the Saturn processor directly executes ML the operating system can not control what a ML program is doing On the HP 48 calculator user dat
102. type 6 4 2 Auto indent mode By default when you press 2 to insert a carriage return the cursor is then always placed on the first column of the display The MK implements the auto indent mode so that when you type a carriage return the cursor will be placed under the first character of the upper line Useful when programming 4 SFZ to enable auto indent mode Meta Kernel Using the Meta Kernel 15 6 4 3 Special keystrokes for System RPL In the command line some keystrokes help to type characters that are specific to System RPL and also to easily find System RPL commands only by typing the first letters of the command These keystrokes are detailed on page 37 6 4 4 strings editing As specified in the HP48 GX User s Manual you can not type character strings that are bigger than the half of the free memory The MK uses a new memory handler so that when you edit strings and only strings you can have more characters than the half of the free memory and still press ENTER J because the MK does not evaluate the string but places it directly on the stack You will never get an Insufficient Memory when validating a character string For other objects types the MK built in S TE will usually works if there is or less as much free memory as the object size so the object may be viewed But when L ENTER Jis pressed the 5 may have Insufficient Memory 6 5 Shortcuts The Shortcuts
103. under the root Press and type the outside term exchange the two arguments read the Modifications section Ay e edit mode inserts a root Type the outside term Press and then type the inside expression 8 2 11 Parenthesized argument functions n selection mode press the function key to apply it on the selection If the function needs more than one argument the selection is used as the first one press to go and type the next arguments e edit mode press the function key or type its name followed by and then the arguments 8 2 12 User functions These functions are created by the user and are not handled directly by the HP 48GX C Type the function name press cy Cc and type the first argument To add an argument press src 8 2 13 Parenthesized terms C EQW draws equations with the fewest possible parentheses To add explicit parentheses around the selection press c 8 2 14 Differentiation e n selection mode press SIN to insert a differentiate sign the selection is the function to be differentiated Press and type the variable of differentiation e edit mode press to insert differentiate sign type the variable of differentiation press and type the equation to be differentiated See the Evaluations section to discover how to differentiate a function without exiting from EQW 8 2 15 Integration e n selection mode press
104. y are implemented as unnamed local variables which are faster to access than named local variables A local variable is recalled by typing its name Data can be stored a local variable by typing its name with a leading or Note 1 Local variable are available until the next local definition Note 2 The local environment is not closed automatically use HEHE or other provided words Example i labeli labelz labelH 3 will become HULLLAM lt H gt HDUPH DOBIHD or iLAMBIND if there is only one variable And labeli iGETLAN labeli 1 labeil iIPUTLAN Program example if AB FF n HULLLAMN THO HOUPH DOBIND B R zGETLRHHM iPLUTLHH HBHD Notes on RPL mode switches back to ASM mode using the AS directive 2 13 2 Special keystrokes in the command line In the command line editor some keystrokes help to enter characters that are specific to System RPL and also to easily find a command auto completion followed by Cc displays a comma maintained and c displays a semicolon In alpha mode followed by VAR displays a vertical bar In alpha mode maintained and VAR displays an anti slash gt Auto completion works as follow Type the first characters of the command for example Pi Press and maintain it Press SPC once The screen will now display all the commands that begin with DU PUMP DEG tho connate 4 45 4 fua 3 0 lt gt
Download Pdf Manuals
Related Search
Related Contents
Xerox 7328 Family Fuser Modules ASRock B85M-GL Quick Start Manual DEGRAISSANT VEGE Samsung HT-C550 Käyttöopas SYNCHRONY Surgical Guideline AW32151_1.0 - Med-El 品番 ICR-B90RM 取扱説明書 Manual de usuario Copyright © All rights reserved.
Failed to retrieve file