home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Toolkit
/
FINE-PRINT.SDA
/
FONT-EDIT.BAS
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
7KB
|
250 lines
1 POKE646,1:POKE53280,14:POKE53281,6
2 PRINT:PRINTCHR$(14);" [208]LEASE [215]AIT, [211]ETTING UP..."
3 DIMB1(255):DIMB2(255):DIMB3(255):DIMB4(255):REM *SET UP BYTE ARRAYS*
4 FORX=33TO127:B1(X)=128:B2(X)=128:B3(X)=128:B4(X)=128:NEXTX
5 FORX=149TO155:B1(X)=128:B2(X)=128:B3(X)=128:B4(X)=128:NEXTX
6 FORX=161TO191:B1(X)=128:B2(X)=128:B3(X)=128:B4(X)=128:NEXTX
8 B1(129)=128:B2(129)=128:B3(129)=128:B4(129)=128
9 SA=1784:SB=56056
12 PRINT"[147] [198][201][206][197] [208][210][201][206][212] [198][207][206][212] [197][196][201][212][207][210]"
14 PRINT " [194]Y [211]TEVEN [198]ISK - [205]ARCH, 1990."
16 PRINT" *** [205][193][201][206] [205][197][206][213] ***
18 [153]" [1]...VALDIT LENHARACTER (null)ET"
20 [153]" [2]...(null)OAD LENHARACTER (null)ET"
22 [153]" [3]...(null)AVE LENHARACTER (null)ET"
24 [153]" [4]...VALXIT"
26 [161]A$
28 [139]A$[178]"1"[167]1000
30 [139]A$[178]"2"[167]2000
32 [139]A$[178]"3"[167]3000
34 [139]A$[178]"4"[167]4000
36 [137]26
1000 [143] *FONT EDITOR*
1001 [139]CH[178]0[167]CH[178]33:NW[178]1
1100 [143] *SET UP EDITOR SCREEN*
1102 [153]"LOAD LENLEFT$ATN(null)=";CH"CMD (null)(null)STR$VAL=VALDIT CLOSEWAIT"
1104 [153]
1105 [153]" TOTOTOTOTOTOTOTOTOTOTOTOTOTO"
1106 [153]" VALSTR$RIGHT$(null) (null)RIGHT$(null)STR$(null)(null) WAIT ATN(null)ATNRIGHT$(null)ATNPEEK(null)VAL LEN(null)(null)(null)ATN(null)STR$(null)"
1108 [153]" THEN FN TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB("
1110 [153]" CLOSE THEN FN LENURSOR KEYS MOVE
1112 PRINT" [167] [165] IN EDIT WINDOW AND"
1114 PRINT" [167] [165] CHARACTER SELECTION"
1116 PRINT" [167] [165] WINDOW AS NECCESSARY"
1118 PRINT" [167] [165]"
1120 PRINT" [167] [165] [[212]]OGGLE BETWEEN"
1122 PRINT" [146] EDIT WINDOW AND"
1124 PRINT" CHARACTER SELECTION"
1126 PRINT" [211]PACE-[194]AR MAKES"
1128 PRINT"[160] SELECTIONS [[197]]XIT BACK TO MAIN"
1130 PRINT"[160] MENU"
1132 PRINT"[164][164][164][164][164][164][164][164][164][164] [195][200][193][210][193][195][212][197][210] [211][197][204][197][195][212][201][207][206] [146][164][164][164][164][164][164][164][164][164]";
1135 FORX=33TO127:PRINTCHR$(X);:NEXTX
1136 PRINTCHR$(129);
1138 FORX=149TO155:PRINTCHR$(X);:NEXTX
1140 FORX=161TO191:PRINTCHR$(X);:NEXTX
1142 MD=1:REM *SET MODE TO EDIT*
1146 PRINTCHR$(34)"[157] [145][145][145][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][144]!":IFNW=1THENNW=0:GOTO1148
1147 PRINT"[145]!"
1148 PRINT"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]*"
1149 CL=55502:RL=1230
1150 XA=1:REM *SET X-AXIS TO 1*
1152 YA=1:REM *SET Y-AXIS TO 7*
1154 XB=XA:YB=YA
1200 REM *EDIT MODE*
1201 GOSUB30000:GOSUB50000
1202 GOSUB55000
1203 GETA$
1204 IFA$="[145]"ANDYA<>1THENYA=YA-1:GOTO1300:REM *CURSOR UP*
1206 IFA$=""ANDYA<>7THENYA=YA+1:GOTO1300:REM *CURSOR DOWN*
1208 IFA$="[157]"ANDXA<>1THENXA=XA-1:GOTO1300:REM *CURSOR LEFT*
1210 IFA$=""ANDXA<>4THENXA=XA+1:GOTO1300:REM *CURSOR RIGHT*
1212 IFA$=" "THEN1500:REM *TOGGLE BIT ON/OFF*
1214 IFA$="T"THEN1600:REM *TOGGLE MODES*
1216 IFA$="E"THEN1700:REM *EXIT TO MAIN ROUTINE*
1218 GOTO1203
1300 GOSUB55000
1302 GOTO1202
1500 REM *TOGGLE BIT*
1502 ON XA GOTO1520,1540,1560,1580
1504 PRINT"ERROR!"
1520 IFA(YA)=1THENA(YA)=0:GOTO1590
1522 IFA(YA)=0THENA(YA)=1:GOTO1590
1540 IFB(YA)=1THENB(YA)=0:GOTO1590
1542 IFB(YA)=0THENB(YA)=1:GOTO1590
1560 IFC(YA)=1THENC(YA)=0:GOTO1590
1562 IFC(YA)=0THENC(YA)=1:GOTO1590
1580 IFD(YA)=1THEND(YA)=0:GOTO1590
1582 IFD(YA)=0THEND(YA)=1:GOTO1590
1590 POKECL,6
1591 GOSUB40000:GOTO1201
1600 REM *TOGGLE MODE*
1602 IFMD=1THENMD=2:GOTO1610
1604 IFMD=2THENMD=1:GOTO1610
1610 IFMD=1THENPRINT"[197]DIT ":GOTO1200
1612 IFMD=2THENPRINT"[211]EL ":GOTO47000
1614 PRINT"ERROR!":END
1700 GOTO12
2000 REM *LOAD CHARACTER SET*
2002 PRINT"[147] [204][207][193][196] [195][200][193][210][193][195][212][197][210] [211][197][212]"
2004 INPUT" [197]NTER FILE NAME OR '#' TO ABORT";FL$
2006 IFFL$="#"THEN12
2007 PRINT" [204]OADING..."
2008 OPEN1,8,2,"0:"+FL$+",S,R"
2010 FORX=33TO127
2012 INPUT#1,B1(X):INPUT#1,B2(X):INPUT#1,B3(X):INPUT#1,B4(X)
2014 NEXTX
2016 INPUT#1,B1(129):INPUT#1,B2(129):INPUT#1,B3(129):INPUT#1,B4(129)
2018 FORX=149TO155
2020 INPUT#1,B1(X):INPUT#1,B2(X):INPUT#1,B3(X):INPUT#1,B4(X)
2022 NEXTX
2024 FORX=161TO191
2026 INPUT#1,B1(X):INPUT#1,B2(X):INPUT#1,B3(X):INPUT#1,B4(X)
2028 NEXTX
2030 CLOSE1:GOTO12
3000 REM *SAVE CHARACTER SET*
3002 PRINT"[147] [211][193][214][197] [195][200][193][210][193][195][212][197][210] [211][197][212]"
3004 INPUT" [197]NTER FILE NAME OR '#' TO ABORT";FL$
3006 IFFL$="#"THEN12
3007 PRINT" [211]AVING..."
3008 OPEN1,8,2,"0:"+FL$+",S,W"
3010 FORX=33TO127
3012 PRINT#1,B1(X):PRINT#1,B2(X):PRINT#1,B3(X):PRINT#1,B4(X)
3014 NEXTX
3016 PRINT#1,B1(129):PRINT#1,B2(129):PRINT#1,B3(129):PRINT#1,B4(129)
3018 FORX=149TO155
3020 PRINT#1,B1(X):PRINT#1,B2(X):PRINT#1,B3(X):PRINT#1,B4(X)
3022 NEXTX
3024 FORX=161TO191
3026 PRINT#1,B1(X):PRINT#1,B2(X):PRINT#1,B3(X):PRINT#1,B4(X)
3028 NEXTX
3030 CLOSE1:GOTO12
4000 REM *EXIT*
4002 PRINT"[147] [197][216][201][212] - [193]RE YOU SURE ([217]/[206])?"
4004 GETA$:IFA$="Y"THENPRINT:END
4006 IFA$="N"THEN12
4008 GOTO4004
30000 REM *MATRIX READ*
30002 E1=B1(CH):E2=B2(CH):E3=B3(CH):E4=B4(CH)
30004 REM *DECODE E1*
30005 FORX=1TO8:E(X)=0:NEXTX:REM *CLEAR BYTE*
30006 IFE1>=128THENA(8)=1:E1=E1-128
30008 IFE1>=64 THENA(7)=1:E1=E1-64
30010 IFE1>=32 THENA(6)=1:E1=E1-32
30012 IFE1>=16 THENA(5)=1:E1=E1-16
30014 IFE1>=8 THENA(4)=1:E1=E1-8
30016 IFE1>=4 THENA(3)=1:E1=E1-4
30020 IFE1>=2 THENA(2)=1:E1=E1-2
30022 IFE1>=1 THENA(1)=1:E1=E1-1
30106 IFE2>=128THENB(8)=1:E2=E2-128
30108 IFE2>=64 THENB(7)=1:E2=E2-64
30110 IFE2>=32 THENB(6)=1:E2=E2-32
30112 IFE2>=16 THENB(5)=1:E2=E2-16
30114 IFE2>=8 THENB(4)=1:E2=E2-8
30116 IFE2>=4 THENB(3)=1:E2=E2-4
30120 IFE2>=2 THENB(2)=1:E2=E2-2
30122 IFE2>=1 THENB(1)=1:E2=E2-1
30206 IFE3>=128THENC(8)=1:E3=E3-128
30208 IFE3>=64 THENC(7)=1:E3=E3-64
30210 IFE3>=32 THENC(6)=1:E3=E3-32
30212 IFE3>=16 THENC(5)=1:E3=E3-16
30214 IFE3>=8 THENC(4)=1:E3=E3-8
30216 IFE3>=4 THENC(3)=1:E3=E3-4
30220 IFE3>=2 THENC(2)=1:E3=E3-2
30222 IFE3>=1 THENC(1)=1:E3=E3-1
30306 IFE4>=128THEND(8)=1:E4=E4-128
30308 IFE4>=64 THEND(7)=1:E4=E4-64
30310 IFE4>=32 THEND(6)=1:E4=E4-32
30312 IFE4>=16 THEND(5)=1:E4=E4-16
30314 IFE4>=8 THEND(4)=1:E4=E4-8
30316 IFE4>=4 THEND(3)=1:E4=E4-4
30320 IFE4>=2 THEND(2)=1:E4=E4-2
30322 IFE4>=1 THEND(1)=1:E4=E4-1
30324 RETURN
40000 REM *MATRIX WRITE*
40002 B1(CH)=0
40004 FORX=1TO8
40006 IFA(X)=1THENB1(CH)=B1(CH)+(2^(X-1))
40008 NEXTX
40012 B2(CH)=0
40014 FORX=1TO8
40016 IFB(X)=1THENB2(CH)=B2(CH)+(2^(X-1))
40018 NEXTX
40020 B3(CH)=0
40022 FORX=1TO8
40024 IFC(X)=1THENB3(CH)=B3(CH)+(2^(X-1))
40026 NEXTX
40028 B4(CH)=0
40030 FORX=1TO8
40032 IFD(X)=1THENB4(CH)=B4(CH)+(2^(X-1))
40034 RETURN
44000 REM *CLEAR ROWS*
44002 FORX=1TO7:A(X)=0:NEXTX
44004 FORX=1TO7:B(X)=0:NEXTX
44005 FORX=1TO7:C(X)=0:NEXTX
44006 FORX=1TO7:D(X)=0:NEXTX
44008 RETURN
45000 FORX=55502TO55505:POKEX,6:NEXTX
45002 FORX=55542TO55545:POKEX,6:NEXTX
45004 FORX=55582TO55585:POKEX,6:NEXTX
45006 FORX=55622TO55625:POKEX,6:NEXTX
45008 FORX=55662TO55665:POKEX,6:NEXTX
45010 FORX=55702TO55705:POKEX,6:NEXTX
45012 FORX=55742TO55745:POKEX,6:NEXTX
45014 RETURN
47000 REM *SELECT A CHARACTER*
47002 POKESA,PEEK(SA):POKESB,0
47003 PRINT" ";:PRINT"[195][200][193][210]=";CH
47004 GETA$
47006 IFA$="[157]"ANDCH<>33THENPC=CH:CH=CH-1:POKESB,1:SA=SA-1:SB=SB-1:GOTO47100
47008 IFA$=""ANDCH<>191THENPC=CH:CH=CH+1:POKESB,1:SA=SA+1:SB=SB+1:GOTO47100
47009 IFA$="T"THENGOSUB44000:GOTO1600
47010 GOTO47004
47100 IFCH=128ANDPC=127THENCH=129:GOTO47002
47102 IFCH=130THENCH=149:GOTO47002
47104 IFCH=156THENCH=161:GOTO47002
47106 IFCH=160THENCH=155:GOTO47002
47108 IFCH=148THENCH=129:GOTO47002
47110 IFCH=128ANDPC=129THENCH=127:GOTO47002
47112 GOTO47002
50000 REM *WINDOW PLOT*
50002 IFA(1)=1THENPOKE1230,42:POKE55502,1
50004 IFA(2)=1THENPOKE1270,42:POKE55542,1
50006 IFA(3)=1THENPOKE1310,42:POKE55582,1
50008 IFA(4)=1THENPOKE1350,42:POKE55622,1
50010 IFA(5)=1THENPOKE1390,42:POKE55662,1
50012 IFA(6)=1THENPOKE1430,42:POKE55702,1
50014 IFA(7)=1THENPOKE1470,42:POKE55742,1
50020 IFB(1)=1THENPOKE1231,42:POKE55503,1
50022 IFB(2)=1THENPOKE1271,42:POKE55543,1
50024 IFB(3)=1THENPOKE1311,42:POKE55583,1
50026 IFB(4)=1THENPOKE1351,42:POKE55623,1
50028 IFB(5)=1THENPOKE1391,42:POKE55663,1
50030 IFB(6)=1THENPOKE1431,42:POKE55703,1
50032 IFB(7)=1THENPOKE1471,42:POKE55743,1
50034 IFC(1)=1THENPOKE1232,42:POKE55504,1
50036 IFC(2)=1THENPOKE1272,42:POKE55544,1
50038 IFC(3)=1THENPOKE1312,42:POKE55584,1
50040 IFC(4)=1THENPOKE1352,42:POKE55624,1
50042 IFC(5)=1THENPOKE1392,42:POKE55664,1
50044 IFC(6)=1THENPOKE1432,42:POKE55704,1
50046 IFC(7)=1THENPOKE1472,42:POKE55744,1
50048 IFD(1)=1THENPOKE1233,42:POKE55505,1
50050 IFD(2)=1THENPOKE1273,42:POKE55545,1
50051 IFD(3)=1THENPOKE1313,42:POKE55585,1
50052 IFD(4)=1THENPOKE1353,42:POKE55625,1
50054 IFD(5)=1THENPOKE1393,42:POKE55665,1
50056 IFD(6)=1THENPOKE1433,42:POKE55705,1
50058 IFD(7)=1THENPOKE1473,42:POKE55745,1
50060 RETURN
55000 REM *CURSOR MOVE*
55002 POKECL,6
55004 IFYA>YBTHENCL=CL+40:RL=RL+40:GOTO55008
55006 IFYA<YBTHENCL=CL-40:RL=RL-40
55008 IFXA>XBTHENCL=CL+1:RL=RL+1:GOTO55012
55010 IFXA<XBTHENCL=CL-1:RL=RL-1
55012 YB=YA:XB=XA
55017 GOSUB45000:GOSUB50000
55018 POKECL,0:POKERL,42
55020 RETURN