1 ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
3 ;=- Tauron VGA Utilities Version 3.0 -=
\r
4 ;=- Released September 20, 1998 -=
\r
6 ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
7 ;=- Copyright (c) 1997, 1998 by Jeff Morgan =-= This code is FREE provided -=
\r
8 ;=- All Rights Reserved. =-= that you put my name some- -=
\r
9 ;=- =-= where in your credits. -=
\r
10 ;=- DISCLAIMER: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
11 ;=- I assume no responsibility whatsoever for any effect that this package, -=
\r
12 ;=- the information contained therein or the use thereof has on you, your -=
\r
13 ;=- sanity, computer, spouse, children, pets or anything else related to -=
\r
14 ;=- you or your existance. No warranty is provided nor implied with this -=
\r
16 ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
18 ; Bit positions for font maps:
\r
20 ; +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+
\r
21 ; | | | SAH | SBH | SA | SB |
\r
22 ; +-----+-----+-----+-----+-----+-----+-----+-----+
\r
24 ; SA - bits 1, 0 of Character Map A
\r
25 ; SAH - bit 2 (high order) of Charcter Map A
\r
27 ; SB - bits 1, 0 of Character Map B
\r
28 ; SBH - bit 2 (high order) of Charcter Map B
\r
31 ; Points to fonts for Map A Memory Address
\r
32 DFM_MAPA_FONT1 EQU 00H ; 0K
\r
33 DFM_MAPA_FONT2 EQU 04H ; 16K
\r
34 DFM_MAPA_FONT3 EQU 08H ; 32K
\r
35 DFM_MAPA_FONT4 EQU 0CH ; 48K
\r
36 DFM_MAPA_FONT5 EQU 20H ; 8K
\r
37 DFM_MAPA_FONT6 EQU 24H ; 24K
\r
38 DFM_MAPA_FONT7 EQU 28H ; 40K
\r
39 DFM_MAPA_FONT8 EQU 2CH ; 56K
\r
41 ; Points to fonts for Map B
\r
42 DFM_MAPB_FONT1 EQU 00H ; 0K
\r
43 DFM_MAPB_FONT2 EQU 01H ; 16K
\r
44 DFM_MAPB_FONT3 EQU 02H ; 32K
\r
45 DFM_MAPB_FONT4 EQU 03H ; 48K
\r
46 DFM_MAPB_FONT5 EQU 10H ; 8K
\r
47 DFM_MAPB_FONT6 EQU 11H ; 24K
\r
48 DFM_MAPB_FONT7 EQU 12H ; 40K
\r
49 DFM_MAPB_FONT8 EQU 13H ; 56K
\r
52 ; To set dual font mode, just set the character map select register to point
\r
53 ; to 2 different fonts. There can be up to 8 fonts resident in memory at
\r
54 ; once but only 2 can be active at a time.
\r
56 ; ** NOTE ** If you set both font maps the same you are no longer in dual font
\r
57 ; mode. But what this allows you to do is to put up to 8 fonts in VGA memory
\r
58 ; and switch between them at any time.
\r
60 ; Both fonts were made with my font editor. I just read the BIOS and
\r
61 ; modified the second font so a solid line goes through the middle of it.
\r
63 ; This procedure sets up dual font mode and loads 2 fonts into video memory.
\r
69 ; 2 different font maps
\r
70 MOV AH,DFM_MAPA_FONT1
\r
71 OR AH,DFM_MAPB_FONT5
\r
73 ; Sequencer register
\r
79 ; Load font 1 into 0K
\r
80 PUSH 16 ; Bytes per character
\r
81 PUSH 0 ; Offset of font in Video Memory
\r
83 PUSH OFFSET FONT1 ; Offset of Font in our Data Segment
\r
87 ; Load font 2 into 8K
\r
88 PUSH 16 ; Bytes per character
\r
89 PUSH 0 ; Offset of font in Video Memory
\r
91 PUSH OFFSET FONT2 ; Offset of Font in our Data Segment
\r
98 ; This procedure reset the character map select register to point to only
\r
102 ; Set both fonts to point to font 1
\r
110 ; In dual font modes, the palette is in effect half of what it is. The
\r
111 ; bottom 8 colors for the first font, and the top 8 colors for the second
\r
114 ; What I do here is to set them to the same 8 colors.
\r
115 ; Black, Blue, Green, Red, Purple, Yellow, Light Gray, and White
\r
117 SETDUALPALETTE PROC
\r
216 SETDUALPALETTE ENDP
\r
220 MOV SI,OFFSET MODE03H
\r
224 CALL SETDUALPALETTE
\r
229 ; Attribute to print text in.
\r
231 ; In dual font mode, attrubute bit 3 is the deciding factor as to which
\r
232 ; font is printed. 0001X111B where X is 0 for font 1 or 1 for font 2.
\r
233 ; The Charcter Map Select Register determines where font 1 and font 2
\r
235 ; 00011111B - Font 2, Blue Background, with color 7 text.
\r
240 MOV SI,OFFSET TEXTMSG_D
\r
244 MOV SI,OFFSET TEXTMSG_E
\r
248 MOV SI,OFFSET TEXTMSG_F
\r
251 ; 00010111B - Font 1, Blue Background, with color 7 text.
\r
256 MOV SI,OFFSET TEXTMSG_D
\r
260 MOV SI,OFFSET TEXTMSG_E
\r
264 MOV SI,OFFSET TEXTMSG_F
\r
267 ; Wait for a keypress
\r
275 ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r