Displaying String on Free42 & DM42
|
02-13-2018, 02:48 AM
(This post was last modified: 02-13-2018 02:51 AM by Bill (Smithville NJ).)
Post: #5
|
|||
|
|||
RE: Displaying String on Free42 & DM42
I have updated the routines to now include both "Big Char" and "Small Char" fonts as specified in Free42.
I have also changed the way the programs interface. So if you have previously tried these, please download these and review the changes below. There are two routines: FONTS.raw: Creates 2 x 128 Matrix "CHARS" for storing alpha characters. Row 1 contains "Big Chars", Row 2 contains "Small Chars" FONTS just needs to be run once. As long as Matrix "CHARS" remains in memory, no need to rerun. DISPLAY.RAW: Displays the Alpha Register on the screen at a specific location Upon entry to DISPLAY, the Alpha Register contains the string to display, and X and Y registers contains screen coordinates, X=Row, Y=Column The calling program should initialize FONTS (if needed), put a string in the Alpha Register and the screen coordinates into X & Y. The Display routine includes the ability to switch back and forth between the two Char sizes and to display subscripts and superscripts. The ARROW characters are used as "Mode Change" characters. Just place an Arrow Character in the Alpha String where you wish to switch modes. Modes are as follows: Left Arrow - Switch to "Small Chars" Right Arrow - Switch to "Big Chars" Up Arrow - Switch to Superscript Down Arrow - Switch to Subscript To display the arrows in lieu of doing a mode switch, then put two of them in sequence. Fir example, two Left Arrows in a row would print the Left Arrow on the screen in lieu of switching to "Small Chars". NOTE 1: DISPLAY ALWAYS starts out in "Big Chars". NOTE 2: DISPLAY includes a "SIZE 150" command. If your calling program requires a larger SIZE, then you need to change this. NOTE 3: DISPLAY uses Register 97-99 and 101 - 145. The attached ZIP file contains FONTS.raw, DISPLAY.raw, S1.raw and S2.raw plus screen images for S1 and S2. S1 is a sample program that displays both "Big Chars" & "Small Chars" on the screen for comparison purposes. S2 is a sample program that demonstrates subscripts and superscripts. Attached file XLS.zip includes excel program listings with my comments. I would appreciate any comments, suggestions, recommendations that you may have. There has been no attempt to preserve the Stack. Likewise there are no tricky stack manipulations. Bill Smithville, NJ Fonts-Display-S1-S2.zip (Size: 4.07 KB / Downloads: 33) xls.zip (Size: 47.34 KB / Downloads: 25) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)