| 1 |
|
|---|
| 2 | ; Disclaimer:
|
|---|
| 3 | ;=============
|
|---|
| 4 | ; The sourcecode is released via www.netlabs.org CVS *ONLY*.
|
|---|
| 5 | ; You MUST NOT upload it to other servers nor republish it in any way.
|
|---|
| 6 | ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.
|
|---|
| 7 | ; It's (c) Copyright 1998-2003 by Martin Kiewitz.
|
|---|
| 8 | ; You may recompile the source and do *PRIVATE* modifications, but please keep
|
|---|
| 9 | ; in mind that modifying this code needs at least *some* assembly skill. If
|
|---|
| 10 | ; you mess up your system, because you needed to hack your way through, don't
|
|---|
| 11 | ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form
|
|---|
| 12 | ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some
|
|---|
| 13 | ; idea about new functionality *before* developing the code, otherwise I will
|
|---|
| 14 | ; definitely reject it. Also please accept, that I have some basic design
|
|---|
| 15 | ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get
|
|---|
| 16 | ; another GRUB.
|
|---|
| 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
|
|---|
| 26 | CHARSET_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
|
|---|
| 77 | CHARSET_IncludeCyrillic EndP
|
|---|