10 DIM A$(2),B$(2),D$(6)
20 OPEN "R",1,"GPCHAR.RCG",3
30 OPEN "R",2,"CHARPAR.RCG",7
40 FIELD 1,1 AS B$(0),1 AS B$(1),1 AS B$(2)
50 FIELD 2,1 AS D$(0),1 AS D$(1),1 AS D$(2),1 AS D$(3),1 AS D$(4),1 AS D$(5),1 AS D$(6)
60 PRINT CHR$(&H1A);:B$=SPACE$(19):PRINT B$"1"B$"2"B$"3"B$"4"
70 FOR I=1 TO 4:PRINT" 1 2 3 4 5 6 7 8 9 0";:NEXT
80 CHAR=0
90 GET 2,CHAR+1
100 PROPCLEN=ASC(D$(0)):CONPREFIX=ASC(D$(1)):PROPREFIX=ASC(D$(2))
110 CONPRTLEN=ASC(D$(3)):PROPRTLEN=ASC(D$(4)):DIFLAY=ASC(D$(5))
120 CHARCODE=ASC(D$(6))
130 FOR I=0 TO 39
140 GET 1,40*CHAR+1+I
150 FOR L=0 TO 2:A$(L)=B$(L)
160 NEXT
170 FOR J=0 TO 2
180 B$=A$(J)
190 FOR K=0 TO 7
200 IF K=2 AND J=2 THEN K=7:GOTO 250
210 C$=CHR$(&H1B)+"G@.."
220 IF (ASC(B$) AND 2^K)<>0 THEN C$=CHR$(&H1B)+"GD  "
230 IF J=2 THEN PRINT CHR$(&H1B)"="CHR$(50+K)CHR$(32+2*I)C$:GOTO 250
240 PRINT CHR$(&H1B)"="CHR$(34+J+K*2)CHR$(32+2*I)C$
250 NEXT
260 NEXT
270 NEXT
280 X=0:Y=0
290 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=3 ":PRINT"CODE"TAB(8)"CPF"TAB(16)"CPL"TAB(24)"PCL"TAB(32)"PPF"TAB(40)"PPL"TAB(48)"DLO"TAB(56)"JP i"TAB(64)"COPY"
300 PRINT HEX$(CHARCODE)"H"TAB(8)CONPREFIX;TAB(16)CONPRTLEN;TAB(24)PROPCLEN;TAB(32)PROPREFIX;TAB(40)PROPRTLEN;TAB(48)DIFLAY;TAB(56)CHAR;TAB(64)CHAR1;TAB(72)"Ende=X"
310 PRINT SPC(70)CHR$(13);
320 GOTO 390
330 PRINT CHR$(&H1B)"GD"CHR$(&H1B)")"CHR$(13);
340 FOR I=65 TO 73
350 PRINT CHR$(&H1B)"=6"CHR$((I-65)*8+32)" "CHR$(I)" ";
360 NEXT
370 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"(";
380 RETURN
390 U=2:V=Y-16
400 IF Y>=16 THEN 420
410 U=(Y) MOD 2:V=INT(Y/2)
420 PRINT:PRINT CHR$(&H1B)"="CHR$(34+Y)CHR$(32+2*X);
430 A$=INKEY$
440 IF A$="5" THEN 670
450 IF A$="X" THEN PRINT CHR$(&H1B)"G0":GOSUB 1180:GOTO 860                           
460 IF A$="+" THEN IF CHAR<127 THEN GOSUB 1180:CHAR=CHAR+1:GOTO 90       
470 IF A$="-" THEN IF CHAR>0 THEN GOSUB 1180:CHAR=CHAR-1:GOTO 90         
480 IF A$="" THEN 430                                                      
490 IF A$=CHR$(&H9) THEN IF X<32 THEN X=X+8
500 IF A$=CHR$(&H7F) THEN IF X>7 THEN X=X-8
510 IF A$="8" THEN IF Y>0 THEN Y=Y-1                                        
520 IF A$="2" THEN IF Y<17 THEN Y=Y+1                                       
530 IF A$="6" THEN IF X<39 THEN X=X+1                                       
540 IF A$="4" THEN IF X>0 THEN X=X-1                                        
550 IF A$=" " THEN GOSUB 330:GOTO 390
560 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 "SPC(70)CHR$(13);
570 IF A$="A" THEN 880
580 IF A$="B" THEN 980
590 IF A$="C" THEN 1020
600 IF A$="D" THEN 1050
610 IF A$="E" THEN 1080
620 IF A$="F" THEN 1110
630 IF A$="G" THEN 1140
640 IF A$="H" THEN 1270
650 IF A$="I" THEN 1290
660 GOTO 390
670 GET 1,40*CHAR+1+X
680 FOR L=0 TO 2:A$(L)=B$(L):NEXT
690 A$(U)=CHR$(ASC(A$(U)) XOR 2^V)
700 C$=CHR$(&H1B)+"G@.."
710 IF (ASC(A$(U)) AND 2^V)<>0 THEN C$=CHR$(&H1B)+"GD  "
720 IF U=2 THEN PRINT:PRINT CHR$(&H1B)"="CHR$(50+V)CHR$(32+2*X)C$;:GOTO 740
730 PRINT:PRINT CHR$(&H1B)"="CHR$(34+U+V*2)CHR$(32+2*X)C$;
740 FOR L=0 TO 2:LSET B$(L)=A$(L):NEXT
750 PUT 1,40*CHAR+1+X
760 PRTLEN=0
770 PMIN=-1:PMAX=-1
780 FOR I=0 TO 39
790 GET 1,40*CHAR+1+I
800 IF (B$(0)<>CHR$(0) OR B$(1)<>CHR$(0) OR B$(2)<>CHR$(0)) AND PMIN<0 THEN PMIN=I
810 IF B$(0)<>CHR$(0) OR B$(1)<>CHR$(0) OR B$(2)<>CHR$(0) THEN PMAX=I+1
820 NEXT
830 PRTLEN=PMAX-PMIN
840 IF DIFLAY=1 THEN PROPRTLEN=PRTLEN ELSE CONPRTLEN=PRTLEN
850 GOTO 290
860 PRINT CHR$(&H1B)"=8 ":CLOSE
870 END
880 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Character-Code";:INPUT A$
890 IF LEN(A$)<>2 THEN 880
900 IF ASC(A$)<48 THEN 880
910 IF ASC(A$)>&H39 AND ASC(A$)<&H41 THEN 880
920 IF ASC(A$)>ASC("F") THEN 880
930 A=ASC(A$)-48
940 IF A>9 THEN A=A-7
950 IF LEN(A$)=2 THEN B=A:A$=RIGHT$(A$,1):GOTO 900
960 CHARCODE=16*B+A
970 GOTO 290
980 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Constant Prefix";:INPUT A$
990 IF VAL(A$)>255 OR VAL(A$)<0 THEN 980
1000 CONPREFIX=VAL(A$)
1010 GOTO 290
1020 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Const. Print Length";:INPUT A$
1030 CONPRTLEN=VAL(A$)
1040 GOTO 290
1050 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Prop. Char. Length";:INPUT A$
1060 PROPCLEN=VAL(A$)
1070 GOTO 290
1080 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Prop. Prefix";:INPUT A$
1090 PROPREFIX=VAL(A$)
1100 GOTO 290
1110 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Prop. Print Length";:INPUT A$
1120 PROPRTLEN=VAL(A$)
1130 GOTO 290
1140 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Different Layout";:INPUT A$
1150 IF A$<>"0" AND A$<>"1" THEN 1140
1160 DIFLAY=VAL(A$)
1170 GOTO 290
1180 LSET D$(0)=CHR$(PROPCLEN)
1190 LSET D$(1)=CHR$(CONPREFIX)
1200 LSET D$(2)=CHR$(PROPREFIX)
1210 LSET D$(3)=CHR$(CONPRTLEN)
1220 LSET D$(4)=CHR$(PROPRTLEN)
1230 LSET D$(5)=CHR$(DIFLAY)
1240 LSET D$(6)=CHR$(CHARCODE)
1250 PUT 2,CHAR+1
1260 RETURN
1270 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Character-Nr.";:INPUT CHAR
1280 GOTO 90
1290 PRINT CHR$(&H1B)"G@"CHR$(&H1B)"=6 Character-Nr.";:INPUT CHAR1
1300 FOR I=0 TO 39
1310 GET 1,40*CHAR1+1+I
1320 PUT 1,40*CHAR+1+I
1330 NEXT
1340 GOTO 90
"=6 Character-Nr.";:INPUT CHAR1
1300 FOR I=0 TO 39
1310 GET 1,40*CHAR1+1+I
1320 PUT 1,40*CHAR+1+I
1330 NEXT
13