'**************************************************************************** '* PrintROMtable Subroutine * '* * '* BY: Larry Stone 1991 * '* INSPIRED BY: Code from PC Magazine posted in the Quik_BAS inter- * '* national echo by Richard Randles. 1991 * '* CONTRIBUTORS: Rob Smetana @ 914/201 1991 - provided "ItalicSlant" * '* and language for extended character sets * '* for CGA monitors in SCREEN 0 or 1. Note * '* that you can force the use of these * '* high character sets using ReadHiAscFile * '* Francois Roy - provided example code for "Elongate" * '* Mike Kelly - provide code to write 8, 14, 16, 28 & 32 * '* pixel height characters. His code also * '* enables printing high ASCII set (>= 128) * '* (except for CGA using 8 "Height" chars.) * '* Bill Beasley - provided code for "Tall" which doubles * '* pixel height, effectively providing * '* extended character heights of 16, 28, * '* 32, 56, and 64 pixels. * '* Larry Stone provided all of the rest of this code. * '* * '* Passed as argument variable: * '* ---------------------------- * '* a$ String of characters to print. * '* PR 106 byte TYPE variable PrntROM, DIMmed as PR, * '* containing the following elements: * '* * '* Passed as TYPE variable (defined in 'printrom.bi'): * '* --------------------------------------------------- * '* * '* PR.xAxis Starting column, in pixel points. * '* PR.yAxis Starting row in pixel points. * '* PR.StepX Count from 1st dot of character, right/left # pixels. * '* Example: 8 = 8 right; -8 = 8 left (prints reverse). * '* PR.StepY Count from 1st dot of character, down/up # pixels. * '* Example: 1 = 1 down; -8 = 8 up (prints bottom - up). * '* PR.CharClr The color to make each character. * '* PR.BGclr Non-zero values determine the background color * '* for the string. Background is neutral when BGclr is * '* set to 0. Set BGclr = 256 for black background. * '* PR.Shadow True or false Boolian variable. * '* PR.ItalicSlant Set to zero or 7 or -7 for no slant. Positives * '* create a forward slant (right-handed). Negative * '* numbers for backward slant (left-handed). Maximum * '* slant is 1 or -1. An attractive italic is 2 or -2. * '* PR.Inverted True or false Boolean variable - turns characters * '* upside down. * '* PR.Backwards True or false Boolean variable - makes individual * '* characters of a string print backwards. * '* PR.Underline True of false Boolean variable. * '* PR.Elongate Zero for normal size character, set to 1 for bold * '* characters, set to 2 = double wide (truly fat). * '* PR.Stencil True or false Boolean variable - makes stencil * '* PR.Height An integer specified as 8, 14, 16, 28, or 32. This * '* the height, in pixels, of the character printed. * '* NOTE: CGA can only print 8. Use PR.Tall for 16. * '* NOTE: EGA cannot do 16 or 32. PrintROMtable will force * '* 16 to 14 and will force 32 to 28. EGA can access * '* 16 by using 8 with Tall. * '* PR.Tall Boolean variable that doubles pixel height effec- * '* providing pixels heights of 16, 28, 32, 56, and 64. * '* NOTE: CGA can only access 16. * '* NOTE: EGA cannot access 32 or 64. * '* PR.StrikeThrough True or false Boolean variable - a dash is * '* placed in the middle of each character. * '* PR.Condensed True or False Boolean variable - forces 8 scan line * '* character into four scan lines. Not very readable but * '* can be used for superscripts/subscripts or that fine, * '* legal (and unreadable) print in contracts agreements. * '* Also useful for printer preview modes. * '* PR.ForceAddress True or False Boolean variable to force ROM charac- * '* ter shape table address to &HFFA6. Set this to true * '* to force systems to this memory segment. * '* PR.ScreenMode Integer variable that equals the SCREEN mode used. * '* YOU MUST SUPPLY THIS VARIABLE if you intend to use * '* screen modes above CGA ("0" defaults to CGA font sizes). * '* At the top of your code, do something like: * '* PR.ScreenMode = 9 * '* SCREEN PR.ScreenMode * '* PR.DefaultFile Integer variable that defines which font file the * '* program defaults to (for access to chars > 127). * '* PR.DiskFontLoc String defining path to the disk font files. If * '* the font files are not in your program's default path, * '* then this variable need to be addressed before your * '* program makes it's first call to PrintROMtable. * '* PR.ReadHiAscFile Integer variable to force characters > 127 to be * '* read from a font file. Use this feature with any type * '* monitor (CGA/EGA/VGA) to force any special characters * '* from font file to memory, i.e., a true copyright symbol * '* (US file, ASCII = 184), trade mark (US, ASCII = 169). * '* You can also build your own font files then load your * '* special built fonts as the upper 128 characters. * '* * '* PrintROMtable DOES NOT CHECK FOR EXISTENCE OF: * '* * '* ReadHiAscFile = 1: * '* File = rsCODES.INT - International (we want) * '* ReadHiAscFile = 2: * '* File = rsCODES.US - United States * '* ReadHiAscFile = 3: * '* File = rsCODES.POR - Portuguese * '* ReadHiAscFile = 4: * '* File = rsCODES.CAN - French-Canadian * '* * '* It is your responsibility to have your code check for * '* the appropriate file above unless your program does not * '* operate on CGA systems and/or, if your program does * '* not access the upper 128 ASCII characters and/or, your * '* program doesn't set ReadHiAscFile. * '* * '* ReadHiAscFile = -1 * '* Resets this subprogram to use ROM BIOS table for * '* characters above ASCII 127. Usage: * '* PR.ReadHiAscFile = -1: PrintROMtable a$, PR * '* * '* OUT: 1) String of characters printed to the graphics screen. * '* 2) Location and slant of displayed string are pixel based. * '* 3) Strings can be printed normal, reverse, top to bottom and * '* upside down. * '* 4) Strings can have both foreground and background colors or * '* possess a neutral, non-destructive background. * '* 5) "CPI" can be adjusted along horizontal or vertical planes * '* with StepX and StepY variables (ie, StepX = 7 would be a * '* condenced font, StepX = 8 a normal font, etc). * '* 6) Characters can be printed with a shadow. * '* 7) Characters can be printed with "right-hand" or "left-hand" * '* italicized slant. * '* 8) Characters can be inverted for mirror images along the * '* verticle plane (like a reflection on a lake). * '* 9) Characters can be printed backwards for mirror images on * '* horizontal plane (horizontal mirror images should have * '* StepX set to a negative value for a "true mirror image"). * '* 10) Characters can be elongate by 2 or 4 times normal length. * '* 11) Characters can be displayed as "stencil" characters. * '* 12) Characters can be displayed with a strike through mark. * '* 13) Characters can be 8, 14, 16, 28, or 32 pixels high. * '* 14) Characters can be printed "Tall" effectively producing hights * '* of 16, 28, 32, 56, or 64 pixels high. * '* 15) Characters can be printed "Condensed" for use as super or sub * '* script type or printer preview modes. * '* 16) The high ASCII character set (128 through 254) can be altered * '* from 1 of four, pre-defined files (1024 bytes each). * '* * '****************************************************************************