source: trunk/BOOTCODE/SPECIAL/CHARSET.ASM@ 43

Last change on this file since 43 was 29, checked in by Ben Rietbroek, 15 years ago

AiR-BOOT v1.06 -- Complete sourceforge mirror. (r56) [2010-02-19]
Signature-date: 2006-03-13.
Also contains binairy releases from v1.01 to v1.06, cd-rom images, etc.
If you want the whole pre v1.07 shebang, checkout this revision's trunk.
The v1.06 reference version is in 'tags/v1.06r'.
Note that this reference version uses 'NL' for 'Dutch'.

File size: 3.1 KB
Line 
1; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
2;
3; This file is part of AiR-BOOT
4;
5; AiR-BOOT is free software: you can redistribute it and/or modify it under
6; the terms of the GNU General Public License as published by the Free
7; Software Foundation, either version 3 of the License, or (at your option)
8; any later version.
9;
10; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
11; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
12; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13; details.
14;
15; You should have received a copy of the GNU General Public License along with
16; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
17;
18;---------------------------------------------------------------------------
19; AiR-BOOT / CHARSET SUPPORT
20;---------------------------------------------------------------------------
21
22; This file is only included, when compiling versions that are meant to
23; contain special characters that are not included in the Video ROM charset.
24
25; May destroy all-purpose registers (AX,BX,CX,DX), will preserve all others
26CHARSET_IncludeCyrillic Proc Near Uses si di bp
27 ; First we get the ROM charset from BIOS...
28 mov ax, 1130h
29 mov bh, 6 ; Get ROM VGA 25x80 charset
30 int 10h ; VIDEO BIOS: Get charset table pointer
31 mov bx, ds ; ES:BP point to charset (in Video-ROM)
32 mov ax, es
33 mov es, bx
34 mov ds, ax
35 mov si, bp ; DS:SI - ROM Font 25x80 and ES==CS
36 mov di, offset CharsetTempBuffer
37 mov cx, 2048
38 rep movsw ; Copy ROM-charset to Temp-Buffer
39 mov ds, bx ; DS==CS
40 mov si, offset CHARSET_Cyrillic
41 mov di, offset CharSetTempBuffer+2048
42
43 mov dl, 64 ; Decode 64 character bitmaps
44 xor al, al
45 xor ch, ch
46 DecodeLoop: ; This is an uncompressing-loop
47 mov ah, ds:[si]
48 inc si
49 mov cl, ah
50 and cl, 0Fh
51 rep stosb ; Write NULs, count: lower 4 bits
52 mov cl, ah
53 shr cl, 4
54 or cl, cl
55 jz EndOfStream
56 rep movsb
57 jmp DecodeLoop
58 EndOfStream:
59 cmp di, offset CharSetTempBuffer+3840
60 jae DecodeDone
61 add di, 768 ; Skip 3x16 char blocks
62 jmp DecodeLoop
63 DecodeDone:
64 call FX_WaitRetrace ; Wait for retrace to reduce flickering
65 mov ax, 1110h
66 mov bh, 16
67 xor bl, bl
68 mov cx, 0FFh
69 xor dx, dx
70 mov bp, offset CharSetTempBuffer ; ES:BP - New charset
71 int 10h ; VIDEO BIOS: Set new charset table
72 mov ah, 12h
73 mov bl, 30h
74 mov al, 2 ; 400 ScanLines
75 int 10h ; VIDEO BIOS: Set Scanlines
76 ret
77CHARSET_IncludeCyrillic EndP
Note: See TracBrowser for help on using the repository browser.