ml text display library ver 3.0 (c) Bjorn Gahm, 1992-10-16 **************************************************************** Warning!!!! Even though this program works fine with my HP48SX-E I cannot be responsible for memory loss or even hadware damage on your HP48. English is not my native language so I appologise for all linguistic errors. **************************************************************** Version 3.0: New in this version is: * It works on the S(X) and G(X) series. * MLDISP is now a library for easier use. * MLDISP uses the current grob, if in normal mode MLDISP will write on the normal text grob. * The FONT is more complete. There are still chars that are undefined but most of the normal chars are defined. * The bug in reverse video is fixed. * It can now print all types of objects, not only strings. * All settings are in the library, the SETUP program removed. Version 2.0: * The parameters are stored in a separate variable. * There are a SETUP program to adjust the settings. * It adjusts itself to the size of the PICTgrob. (You can now have a virtual screen, but only when the pict grob is used) * The cursor is improved (it now inverts the char instead of overwrite it and does not force a scroll when in the last position on screen). * The cursor can be moved to any location on screen. (using 2 binaries) * It is possible to write in reverse video. Version 1.0: * The MLDISP1.0 uses the PICTgrob to write the text on. * It has a small font, you have 33x10 chars on the screen. **************************************************************** Library contents **************************************************************** In the MLDISP lib you will find: Pr - Prints any data PrLN - Prints and goes to the next line PrAt - Print at a position, needs on stack: 3: The data to print 2: binary y coordinate 1: binary x coordinate Pos? - Returns the position of the cursor 2: binary y coordinate 1: binary x coordinate Move - Move to a point on screen, needs on stack: 2: binary y coordinate 1: binary x coordinate Cls - Clear the screen CurOn - Switch the cursor on CurOff - Switch the cursor off CR - Interpret CR and LF separate CR+LF - Interpret CR or LF as CR+LF Inv - Sets inverted video Norm - Sets normal video MenuOn - Turns on the menubar MenuOff - Turns off the menubar **************************************************************** Library usage **************************************************************** To use just download the library and store it in the port you want to use. Eg. to store it in port 0: Recall the lib to the stack Purge the lib from memory Put 0 on stack and press STO Turn the hp off and on. MLDISP stores all its data in MLDISPpar. If MLDISPpar is not found then MLDISP will create a new one. MLDISP will use the current display, to use the PICT you must first set the HP to show the PICT. ( {#0h #0h} PVIEW ) **************************************************************** Examples **************************************************************** **** Cls **** It is a good practice to clear the screen before using MLDISP. If you want to use the normal STACK-GROB do this: \<< CLLCD MenuOff Cls ...your code here... \>> or to use the PICT-GROB: \<< ERASE {#0h #0h} PVIEW Cls ...your code here... \>> ***** Pr ***** 1: "Hello" Pr Writes Hello to the text GROB. (you will see the text flash). To see it more permanatly you have to use a program: \<< "Hello" Pr 7 FREEZE \>> will do the same thing as above but it will freeze the screen. **** PrLN **** PrLN works as Pr but it moves to the beginning of the next line. **** Move **** 2: #9h (y-coordinate) 1: #8h (x-coordinate) Move or in a program: \<< #9h #8h Move \>> moves the cursor to row 10 and column 9. Origo is upper left corner (#0h #0h). If you use too large binaries then MLDISP will move the cursor to the last position on screen. It will not make an error. **** PrAt **** Works as a combination of Move and Pr Needs on stack: 3: Data to print 2: y-coordinate 1: x-coordinate It does a Move and then Pr. **** Pos? **** Returns the position of the cursor. 2: y-coordinate 1: x-coordinate **** CurOff CurOn **** Switches off or on the cursor. **** CR CR+LF **** Chooses how CR and LF is interpreted. CR selects separate interpretation. CR+LF selects that CR or LF is interpreted as CR and LF. **** Inv Norm **** Inv selects black background and white chars. Norm selects white background and black chars. These two commands can be used to print certain parts in revesed video, or to make the whole screen inverted (Cls). **** MenuOn MenuOff **** If in TEXT-mode, if the menu is to be shown or not. ============================================================== _ Bjorn Gahm Email: d89-bga@nada.kth.se Snail: Appelstigen 2 181 61 LIDINGO SWEDEN ==============================================================