source: trunk/TOOLS/INTERNAL/PACKFONT.BAS@ 30

Last change on this file since 30 was 29, checked in by Ben Rietbroek, 14 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: 1.1 KB
Line 
1$COMPILE EXE
2
3$INCLUDE "CRTC.inc"
4
5Open "CYR.BIN" For BINARY As #1
6Get$ #1, 1024, CyrillicFont$
7Close #1
8
9Compressed$ = "": CurPos%=0
10Do
11 NULcount% = 0
12 Do
13 incr CurPos%: incr NULcount%
14 Loop Until Asc(CyrillicFont$,CurPos%)<>0
15 Decr NULcount%
16 CharCount% = 0: StartPos% = CurPos%
17 Do
18 incr CurPos%: incr CharCount%
19 Loop Until Asc(CyrillicFont$,CurPos%)=0
20 Decr CurPos%
21 Shift Left CharCount%, 4
22 Compressed$ = Compressed$+Chr$(CharCount%+NULcount%)+Mid$(CyrillicFont$,StartPos%,CurPos%-StartPos%+1)
23Loop Until CurPos%=>1020
24Open "COMPRESS.BIN" For BINARY As #2
25Put$ #2, Compressed$
26Close #2
27end
28
29NewFont$ = @CRTC_Font_ROM_25x80
30Mid$(NewFont$, 2049, 768) = Left$(CyrillicFont$, 768)
31Mid$(NewFont$, 3584, 256) = Right$(CyrillicFont$, 256)
32
33CRTC_LoadFont_25x80 StrPtr32(NewFont$)
34cls
35for a%=0 to 255
36 print chr$(a%);
37 if (a% and 15)=15 Then print
38next a%
39end
40
41Open "KOI8.F16" For BINARY As #1
42Get$ #1, 4096, CyrillicFont$
43close #1
44
45print CyrillicFont$
46CyrillicFont$ = Mid$(CyrillicFont$, 3073, 1024)
47Open "CYRILLIC.BIN" For BINARY As #2
48Put$ #2, CyrillicFont$
49Close #2
Note: See TracBrowser for help on using the repository browser.