source: trunk/bootcode/special/charset.asm@ 65

Last change on this file since 65 was 57, checked in by Ben Rietbroek, 10 years ago

All source-files lowercased [v1.1.1-testing]

Some standard files like 'COPYING', 'LICENSE', etc. have not been
converted to lower case because they are usually distributed uppercased.

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 IFDEF FX_ENABLED
65 call FX_WaitRetrace ; Wait for retrace to reduce flickering
66 ENDIF
67 mov ax, 1110h
68 mov bh, 16
69 xor bl, bl
70 mov cx, 0FFh
71 xor dx, dx
72 mov bp, offset CharsetTempBuffer ; ES:BP - New charset
73 int 10h ; VIDEO BIOS: Set new charset table
74 mov ah, 12h
75 mov bl, 30h
76 mov al, 2 ; 400 ScanLines
77 int 10h ; VIDEO BIOS: Set Scanlines
78 ret
79CHARSET_IncludeCyrillic EndP
Note: See TracBrowser for help on using the repository browser.