CHR

Date: 198x
Type: Program
Platform(s): TS 2068

Allows you to see how characters are designed and create your own user defined graphics (UDGs).

Appears on

Library tape of the Indiana Sinclair Timex User’s Group.

Source Code

    5 CLS : LET z=z+1
   10 IF z=1 THEN PRINT AT 8,4;"watch your input, this","program may not warn you again."
   15 IF z>=2 THEN PRINT AT 8,4;"so, your trying to get the","listing huh ? Well, it may not","happen at all"
   20 IF z=3 THEN PRINT AT 12,8;"SO LONG !": PAUSE 20: NEW 
   25 PAUSE 20: GO TO 3120
   30 LET i=0: LET ii=0: CLS : PRINT "PROGRAM :""CHR"""
   40 PRINT '"This program allows you to see"," how the characters in memory"," were designed and allowing you","to experiment or design your own"
   50 PRINT TAB 4;"CHOICES:"
   60 PRINT TAB 7;"1  view of CHR$ in memory also the user defined ones"
   70 PRINT TAB 7;"2  draw your own chars   for use in other programs       converts  BIN TO DEC/DEC TO BIN "
   80 PRINT TAB 7;"3  enter your characters","as user-defined graphics into","memory for use in other programs"
   90 PRINT '''"each selection shows BIN # and","DECIMAL # of characters shown "
  100 PRINT AT 21,0;"your choice is ?"
  105 PAUSE 0: LET t$=INKEY$
  110 IF VAL t$<1 OR VAL t$>4 THEN GO TO 100
  115 LET a=VAL t$
  120 IF a>1 THEN GO TO (380 AND a=2)+(1980 AND a=3)+(3200 AND a=4)
  130 CLS : PRINT "PROGRAM:""CHR"""
  140 PRINT ''"This section allows you to see","graphically how each character","in memory was designed"
  150 PRINT ''"Just enter the character you","want to see. It will show that","character and give you the code","where stored, and the BIN # and","DECIMAL conversion"
  155 PRINT ''"to STOP :enter the word ""menu"""''"check the graphic characters"
  160 PRINT AT 21,0;"PRESS ANY KEY TO CONTINUE": PAUSE 0: CLS 
  165 LET e=0: LET a=0: LET p=0: LET q=0: LET s$=""
  170 PRINT AT 17,0;"to print a char. OVER  another","enter ""ov""    for INVERSE char. enter ""in"""
  175 PRINT AT 21,0;" TO STOP :enter the word ""menu"""
  180 INPUT "CHR$ ? "; LINE t$: CLS 
  185 IF LEN t$>1 THEN LET p=1
  190 IF LEN t$<2 THEN PRINT AT 4,0;"CHR$ ";AT 4,5;t$;"=";TAB 24;"DECIMAL #"
  195 IF p THEN GO SUB 310
  200 FOR y=143 TO 136 STEP -1: LET a=a+1
  210 FOR x=40 TO 47
  220 PRINT AT 5+a,2;"BIN ";AT 5+a,6+e;POINT (x,y);AT 5+a,16+e;(CHR$ 144 AND POINT (x,y)=0)+(CHR$ 143 AND POINT (x,y)=1)
  230 LET s$=s$+STR$ POINT (x,y)
  240 LET e=e+1: NEXT x: LET v$="BIN "+s$
  250 PRINT AT 5+a,27;"(";VAL v$;")": LET s$="": LET v$=""
  260 LET e=0: NEXT y
  270 IF NOT p THEN PRINT AT 15,0;"CODE #=";CODE t$
  280 IF q THEN PRINT AT 15,0;t$;" OVER ";r$: LET r$=""
  290 GO TO 165
  320 IF t$="MENU" OR t$="menu" THEN GO TO 30
  330 IF t$="IN" OR t$="in" THEN INPUT "char. to be inversed ? "; LINE t$: PRINT AT 4,0;"CHR$ "; INVERSE 1;AT 4,5;t$; INVERSE 0;"=";TAB 24;"DECIMAL #": RETURN 
  340 IF t$="OV" OR t$="ov" THEN LET q=1: LET r$="": INPUT "first char. ? "; LINE r$: PRINT AT 4,0;"CHR$ ";AT 4,5;r$;"=";TAB 24;"DECIMAL #": INPUT "second char. ? "; LINE t$: PRINT OVER 1;AT 4,5;t$: RETURN 
  350 PRINT AT 17,10;"\:: BAD INPUT \::": GO TO 165
  380 CLS : PRINT "PROGRAM:""CHR"""
  390 PRINT ''"In this section you have several choices, depending on what you","want to check"
  400 PRINT 'TAB 4;"CHOICES:"
  410 PRINT TAB 7;"1  draw, on special grid, your own characters and get a","readout of BIN # and DECIMAL #"
  420 PRINT TAB 7;"2  Input BIN # and get a graphic display of the input and the equivalent DECIMAL #"
  430 PRINT TAB 7;"3  Input DECIMAL # and","get a graphic display of the","input and the equivalent BIN #"
  440 PRINT TAB 7;"4  BIN /DECIMAL/HEX","conversions"
  450 PRINT AT 19,0;"enter #5 to get main menu"
  460 PRINT AT 21,0;"your choice is ?": PAUSE 0
  465 LET t$=INKEY$
  470 IF VAL t$<1 OR VAL t$>5 THEN GO TO 460
  480 LET a=VAL t$: IF a>1 THEN GO TO (880 AND a=2)+(1170 AND a=3)+(1420 AND a=4)+(30 AND a=5)
  490 CLS : PRINT AT 0,2;"\:: DRAW YOUR OWN CHARACTER \::"
  500 PRINT AT 3,2;"CHARACTER =BIN #  & DECIMAL #"
  510 FOR x=5 TO 12
  520 FOR y=2 TO 9: PRINT AT x,y;CHR$ 144
  530 NEXT y: NEXT x: IF i THEN RETURN 
  540 PRINT AT 14,0;"Direction Keys=";CHR$ 145;" ";CHR$ 146;" ";CHR$ 147;" ";CHR$ 148;" ";CHR$ 149;" ";CHR$ 150;" ";CHR$ 151;" ";CHR$ 152
  550 PRINT TAB 2;"PRESS  p  for printer copy"
  560 PRINT TAB 9;"d  to leave \:: in grid"
  570 PRINT TAB 9;"e  to leave \u in grid"
  580 PRINT TAB 9;"n  for BIN & DECIMAL #"
  590 PRINT TAB 9;"m  menu this sect."
  595 PRINT TAB 9;"c  to clear screen"
  600 LET x=5: LET y=2: LET o=0
  610 LET f$=INKEY$
  620 IF f$="c" THEN GO TO 490
  630 IF f$="p" THEN COPY : GO TO 610
  640 IF f$="H" THEN GO TO 3200
  650 IF f$="m" THEN GO TO 380
  660 IF f$="n" THEN GO SUB 780
  670 IF f$="d" OR f$="e" THEN LET o=(1 AND f$="d")+(0 AND f$="e")
  675 IF NOT o THEN PRINT AT x,y;CHR$ 144
  680 GO TO 690+(50 AND f$="1")+(60 AND f$="2")+(70 AND f$="3")+(80 AND f$="4")
  690 LET x=x-(f$="7")+(f$="6")
  700 LET y=y-(f$="5")+(f$="8")
  710 LET x=x+(-x+5 AND x<5)+(-x+12 AND x>12)
  720 LET y=y+(-y+2 AND y<2)+(-y+9 AND y>9)
  730 PRINT AT x,y;CHR$ 143: GO TO 610
  740 LET x=x-1: LET y=y-1: GO TO 710
  750 LET x=x-1: LET y=y+1: GO TO 710
  760 LET x=x+1: LET y=y+1: GO TO 710
  770 LET x=x+1: LET y=y-1: GO TO 710
  780 LET f=0: LET r$="": LET x=4
  790 FOR a=132 TO 76 STEP -8: LET x=x+1
  800 FOR b=20 TO 76 STEP 8: LET f=f+1
  810 PRINT AT x,12+f;POINT (b,a): LET r$=r$+STR$ POINT (b,a)
  820 NEXT b: LET u$="BIN "+r$
  830 PRINT AT x,24;"(";VAL u$;")": POKE USR CHR$ 154+(x-5),VAL u$: LET u$="": LET r$=""
  840 LET f=0: NEXT a
  870 PRINT AT 6,30;CHR$ 154; BRIGHT 1;AT 8,30;CHR$ 154; BRIGHT 0;AT 10,30; INVERSE 1;CHR$ 154: INVERSE 0: RETURN 
  880 CLS : PRINT AT 1,1;"INPUT BIN TO DRAW CHARACTER": DIM w$(8,9)
  890 LET ii=0: LET i=1: GO SUB 500
  900 PRINT AT 14,0;"Input BIN #(8)digits per entry"
  910 PRINT TAB 2;"ENTER  p  for printer copy"
  920 PRINT TAB 9;"n  for decimal/bin #"
  930 PRINT TAB 9;"m  menu of this section"
  940 PRINT TAB 9;"c  to clear screen"
  950 PRINT TAB 3;"(6)cursor down (7)cursor up"
  955 IF ii THEN RETURN 
  960 LET a=1: LET g=1: PRINT "input a function letter or bin #"
  965 LET a=a+(-a+1 AND a=9)+(-a+8 AND a=0)
  970 PRINT INVERSE 1;AT a+4,11;CHR$ 62; INVERSE 0: PRINT AT a+(3 AND a>=g)+(5 AND a<g),11;CHR$ 32: PRINT AT (12 AND a=1)+(5 AND a=8),11;CHR$ 32: LET g=a
  980 INPUT "your choice ? "; LINE t$
 1000 IF t$="6" THEN LET a=a+1: GO TO 965
 1005 IF t$="7" THEN LET a=a-1: GO TO 965
 1010 IF t$="p" OR t$="P" THEN COPY : GO TO 980
 1020 IF t$="m" OR t$="M" THEN LET i=0: GO TO 380
 1030 IF t$="c" OR t$="C" THEN GO TO 880
 1040 IF t$="n" OR t$="N" THEN GO SUB 1140
 1050 IF t$="4" THEN GO TO 980
 1060 IF LEN t$<>8 THEN INPUT "BAD INPUT,TRY AGAIN "; LINE t$: GO TO 990
 1070 FOR b=1 TO 8: IF t$(b)>"1" THEN INPUT "BAD INPUT,TRY AGAIN "; LINE t$: GO TO 990
 1080 NEXT b: LET w$(a,2 TO )=t$: PRINT AT a+4,12;t$
 1090 LET w$(a,1)="BIN ": LET n=VAL w$(a)
 1100 FOR b=1 TO 8: PRINT AT a+4,10-b;(CHR$ 144 AND n/2=INT (n-n/2))+(CHR$ 143 AND n/2<>INT (n-n/2))
 1110 LET n=INT (n-n/2): NEXT b
 1120 LET a=a+1
 1130 GO TO 965
 1140 FOR b=0 TO 7: LET w$(b+1,1)="BIN ": POKE USR CHR$ 154+b,VAL w$(b+1)
 1145 PRINT AT b+5,24;"(";VAL w$(b+1);")": NEXT b
 1150 GO SUB 870: LET t$="4": RETURN 
 1170 CLS : PRINT AT 1,1;"INPUT DECIMAL # TO DRAW IN GRID"
 1180 DIM w(8): LET i=1: LET ii=1: GO SUB 500
 1190 PRINT AT 15,0;"Input decimal # (max.255)"
 1200 DIM v(8): GO SUB 910
 1210 LET a=1: LET g=1: PRINT AT 21,0;"Input function char./decimal #"
 1215 LET a=a+(-a+1 AND a>8)+(-a+8 AND a<1)
 1220 PRINT INVERSE 1;AT a+4,22;CHR$ 60; INVERSE 0: PRINT AT a+(3 AND a>=g)+(5 AND a<g),22;CHR$ 32: PRINT AT (12 AND a=1)+(5 AND a=8),22;CHR$ 32: LET g=a
 1230 INPUT "what ? "; LINE t$
 1250 IF t$="6" OR t$="7" THEN LET a=a+(t$="6")-(t$="7"): GO TO 1215
 1260 IF t$="p" THEN COPY : GO TO 1230
 1270 IF t$="m" THEN LET i=0: LET ii=0: GO TO 380
 1280 IF t$="c" THEN GO TO 1170
 1290 IF t$="n" THEN GO SUB 1390
 1300 IF t$="4" THEN GO TO 1230
 1305 IF VAL t$<0 THEN LET n=VAL t$: LET n=n+256: LET t$=STR$ n: LET n=0
 1310 IF LEN t$<2 THEN LET v$="0"+t$: LET t$=v$
 1315 IF LEN t$>3 OR VAL t$>255 THEN INPUT "BAD INPUT,TRY AGAIN "; LINE t$: GO TO 1230
 1320 FOR b=1 TO LEN t$: IF t$(b)<"0" OR t$(b)>"9" THEN INPUT "BAD INPUT,TRY AGAIN "; LINE t$: GO TO 1230
 1330 NEXT b: PRINT AT a+4,24;"(";t$;")"
 1340 LET v(a)=VAL t$: LET e=v(a)
 1350 FOR b=0 TO 7
 1360 PRINT AT a+4,9-b;(CHR$ 144 AND e/2=INT (e-e/2))+(CHR$ 143 AND e/2<>INT (e-e/2))
 1370 LET e=INT (e-e/2): NEXT b: LET a=a+1
 1380 GO TO 1215
 1390 FOR b=0 TO 7: LET e=v(b+1): POKE USR CHR$ 154+b,e:
 1400 FOR c=1 TO 8: PRINT AT b+5,20-c;("0" AND e/2=INT (e-e/2))+("1" AND e/2<>INT (e-e/2)): LET e=INT (e-e/2)
 1410 NEXT c: NEXT b: GO SUB 870: LET t$="4": RETURN 
 1420 CLS : PRINT "PROGRAM:""CHR"""
 1430 PRINT '"This section is used to convert","numbers from one form to another"
 1440 PRINT ''"CHOICES:"
 1450 PRINT TAB 9;"1  input DECIMAL to get BIN and HEX"
 1460 PRINT TAB 9;"2  input BIN  to get","DECIMAL and HEX"
 1470 PRINT TAB 9;"3  input HEX to get","BIN and DECIMAL"
 1480 PRINT '"Decimal no.'s from -255 to 65535"
 1490 PRINT '"BIN #(8 bits(00000000)=1byte)","to (2 bytes(address locations))"
 1500 PRINT '"HEX #'s 00 to FFFF (\::CAPS ONLY\::)"
 1510 PRINT AT 21,0;"PRESS ANY KEY TO CONTINUE": PAUSE 0
 1520 CLS : PRINT AT 0,0;"(use keys 6 or 7 to move cursor)"
 1530 PRINT AT 2,0;"Input=  (m=menu/p=printer/c=cls)";AT 4,3;"DECIMAL (2 digits min.)";AT 5,3;"BIN # (8 or 16 digits)";AT 6,3;"HEX (2 / 4 digits)\::CAPS ONLY\::"
 1535 LET d=PEEK 23689
 1540 LET a=1: LET g=1
 1545 LET a=a+(-a+1 AND a>3)+(-a+3 AND a<1)
 1550 PRINT INVERSE 1;AT a+3,2;CHR$ 62: PRINT AT a+(2 AND a>=g)+(4 AND a<g),2;CHR$ 32: LET g=a
 1551 IF a=1 THEN PRINT AT 6,2;CHR$ 32
 1552 IF a=3 THEN PRINT AT 4,2;CHR$ 32
 1555 IF PEEK 23689<=5 THEN INPUT "full screen,enter(p)or(c)"; LINE t$: GO TO 1565
 1560 INPUT "? "; LINE t$
 1565 IF LEN t$>1 THEN GO TO 1620
 1570 IF t$="H" THEN GO TO 3200
 1575 IF t$="c" THEN GO TO 1520
 1580 IF t$="p" THEN COPY : GO TO 1560
 1590 IF t$="m" THEN POKE 23658,0: GO TO 30
 1600 IF t$="6" OR t$="7" THEN LET a=a+(t$="6")-(t$="7")
 1610 GO TO 1545
 1620 GO TO (1630 AND SCREEN$ (4,2)=CHR$ 62)+(1730 AND SCREEN$ (5,2)=CHR$ 62)+(1860 AND SCREEN$ (6,2)=CHR$ 62)
 1630 POKE 23658,0: LET i=1: IF LEN t$>5 OR VAL t$>65535 THEN INPUT "BAD INPUT,TRY AGAIN"; LINE t$: GO TO 1565
 1635 IF PEEK 23689>d THEN POKE 23689,(d-1)
 1640 IF VAL t$<0 THEN LET n=VAL t$: LET n=n+256: LET t$=STR$ n: LET n=0
 1650 IF LEN t$<2 THEN LET u$="0"+t$: LET t$=u$
 1660 LET u$="": LET n=VAL t$
 1670 LET c=(8 AND n<256)+(16 AND n>255): DIM v$(c)
 1680 PRINT '"DEC.#";n;" ";
 1690 FOR b=c TO 1 STEP -1
 1700 LET v$(b)=("0" AND n/2=INT (n-n/2))+("1" AND n/2<>INT (n-n/2)): LET n=INT (n-n/2)
 1710 NEXT b: LET t$=v$: IF LEN t$>8 THEN PRINT "adr ";t$(1 TO 8);"/";t$(9 TO 16)
 1715 IF LEN t$=8 THEN PRINT "BIN #";t$
 1720 GO SUB 1800: LET d=PEEK 23689: GO TO 1555
 1730 POKE 23658,0: LET i=0: IF LEN t$<8 OR LEN t$>17 THEN INPUT "BAD INPUT,TRY AGAIN";t$: GO TO 1565
 1735 IF PEEK 23689>16 THEN POKE 23689,(d-1)
 1740 IF LEN t$>8 AND LEN t$<16 THEN INPUT "BAD INPUT,TRY AGAIN";t$: GO TO 1565
 1750 IF LEN t$=17 THEN LET u$=t$(1 TO 8)+t$(10 TO 17): LET t$=u$
 1760 LET c=LEN t$
 1780 IF LEN t$=8 THEN PRINT "BIN #";t$;"=";
 1790 IF LEN t$>8 THEN PRINT "address ";t$(1 TO 8);"/";t$(9 TO 16);"=";
 1800 LET c=(2 AND LEN t$=8)+(4 AND LEN t$>8): LET u$=""
 1810 LET j=1: LET k=4: FOR b=1 TO c: RESTORE 3190: FOR f=1 TO 16: READ H$,B$
 1820 IF t$(j TO k)<>B$ THEN NEXT f: PRINT ': INPUT "BAD INPUT,TRY AGAIN";t$: GO TO 1565
 1830 IF t$(j TO k)=B$ THEN LET u$=u$+H$: LET j=j+4: LET k=k+4: NEXT b
 1840 PRINT "HEX # ";u$: IF i THEN RETURN 
 1850 LET u$="BIN "+t$: PRINT "DEC.#=";VAL u$: LET d=PEEK 23689: GO TO 1555
 1860 POKE 23658,8: LET i=0: LET u$=""
 1865 IF PEEK 23689>d THEN POKE 23689,(d-1)
 1880 IF LEN t$=3 THEN LET u$="0"+t$: LET t$=u$: LET u$=""
 1890 IF LEN t$>4 THEN INPUT "BAD INPUT,TRY AGAIN";t$: GO TO 1565
 1910 LET c=LEN t$: IF c>2 THEN PRINT "HEX # ";t$;"=address BIN #";
 1920 IF c=2 THEN PRINT "HEX # ";t$;"=BIN #";
 1930 FOR b=1 TO c: RESTORE 3190: FOR f=1 TO 16: READ H$,B$
 1932 IF CODE t$(b)>96 AND CODE t$(b)<103 THEN LET q=CODE t$(b): LET q=q-32: LET t$(b)=CHR$ q
 1935 IF t$(b)<>H$ THEN NEXT f: INPUT "BAD INPUT,TRY AGAIN";t$: PRINT ': GO TO 1565
 1940 IF t$(b)=H$ THEN LET u$=u$+B$
 1950 NEXT b: IF LEN u$>8 THEN PRINT u$(1 TO 8);"/";u$(9 TO 16)
 1960 IF LEN u$<9 THEN PRINT u$
 1970 LET t$="BIN "+u$: PRINT "DEC.#=";VAL t$: LET d=PEEK 23689: GO TO 1555
 1980 CLS : PRINT "PROGRAM:""CHR"""
 1990 PRINT '"This section is used to enter","your own graphics or characters","into the user-defined graphics","(UDG)area"
 2000 PRINT "There are (11)eleven areas not","used by this program.","CHR$ 154-164(graphics k thru u)"
 2010 PRINT '"You can use this area and then","go back to other sections of","this program OR "
 2020 PRINT "you can choose to eliminate the","characters used by this basic","program and hereby insert only","your characters for use in","another program. This would","allow you a max of 21 characters CHR$ 144-164(graphic a thru u)"
 2030 PRINT AT 21,0;"PRESS ANY KEY TO CONTINUE": PAUSE 0
 2040 CLS : PRINT "If you enter your characters in","the area used by this program","(CHR$ 144-153(graphic a thru j)","and then DONOT exit this program the program will automatically","insert its graphics back into","the computer"
 2050 PRINT "BUT,if you choose to exit this","program, then the program erases itself. If you do not turn the","power off, your choice of char./graphics remain in the UDG area"
 2060 PRINT '"You then have a clear RAM and","can load from tape or keyboard aprogram to use the graphics or","chars. you have in the UDG area"
 2070 PRINT '"REMEMBER: The UDG area is erasedonly by turning the power off"
 2080 PRINT AT 21,0;"(press any key to continue)": PAUSE 0
 2100 CLS : LET r=0
 2110 PRINT AT 0,2;"CURSOR KEYS   \:: UDG AREA \::"
 2120 PRINT TAB 8;"5 & 8"; INVERSE 1;CHR$ 62; INVERSE 0;TAB 18;CHR$ 153
 2130 PRINT TAB 1;"6 & 7";TAB 16;"(k-u)";TAB 23;"(a-u)"
 2140 PRINT TAB 2;CHR$ 153;TAB 13;"(154-164)";TAB 22;"(144-164)"
 2150 PRINT INVERSE 1;AT 5,2;CHR$ 62; INVERSE 0;"DRAW";TAB 3;"DEC.";TAB 3;"HEX";TAB 3;"BIN "
 2160 FOR a=5 TO 12: FOR b=16 TO 23: PRINT AT a,b;CHR$ 144: NEXT b: NEXT a
 2165 PRINT FLASH 1;AT 14,2;CHR$ 143; FLASH 0;" FIRST SELECT UDG AREA TO BE","USED(keys 5 & 8)THEN ENTER NO""1"""
 2170 PRINT AT 20,4;"enter  m1=menu";TAB 11;"m2=menu this section"
 2180 INPUT "FIRST STEP input ? "; LINE t$
 2200 IF t$="M1" OR t$="m1" THEN GO TO 30
 2210 IF t$="M2" OR t$="m2" THEN GO TO 1980
 2220 IF t$="5" OR t$="8" THEN PRINT AT 1,18;(CHR$ 153 AND t$="5")+(CHR$ 32 AND t$="8"): PRINT AT 1,25;(CHR$ 32 AND t$="5")+(CHR$ 153 AND t$="8"): GO TO 2180
 2230 IF t$<>"1" THEN GO TO 2180
 2240 IF POINT (144,160) THEN LET r=1: PRINT AT 1,8;"          in use is";AT 2,22;"graphic or";AT 3,23;"CHR$ # "
 2250 IF POINT (200,160) THEN LET r=2: PRINT AT 1,8;"          in use is";AT 2,14;"graphics";AT 3,13;"or CHR$ #"
 2260 PRINT FLASH 1;AT 14,3;"SECOND"; FLASH 0;" STEP  now input how","many characters you are going toinsert."
 2270 PRINT ("(max is 11)" AND r=1)+("(max is 21)" AND r=2)
 2280 INPUT "how many ? "; LINE t$
 2300 IF t$="M1" OR t$="m1" THEN GO TO 30
 2310 IF t$="M2" OR t$="m2" THEN GO TO 1980
 2320 LET s=VAL t$: IF s<1 OR s>11 AND r=1 THEN GO TO 2280
 2330 IF s<1 OR s>21 AND r=2 THEN GO TO 2280
 2340 LET t=(154 AND r=1)+(144 AND r=2): LET o=(144 AND r=1)+(164 AND r=2)
 2350 PRINT AT 5,8;"w/keys";AT 6,11;CHR$ 145;CHR$ 151;CHR$ 146;AT 7,11;CHR$ 149;TAB 13;CHR$ 152;AT 8,11;CHR$ 148;CHR$ 150;CHR$ 147
 2360 PRINT AT 12,5;"CHAR.# 1";AT 9,7;"d=";CHR$ 143;AT 10,7;"e=";CHR$ 144
 2370 PRINT AT 14,1;"use keys 6/7 to move cursor for type of input you want to use  "
 2380 PRINT "(changeable during composition)"
 2390 PRINT "ENTER  n to put char. in memory"
 2400 PRINT TAB 7;"a to advance CHAR.CURSOR"
 2410 PRINT TAB 7;"c to clear grid"
 2420 PRINT "m1=main menu/m2=menu this area"
 2430 PRINT "(to get OUT of DRAW/ENTER ""b"")  ": LET j=0
 2440 LET a=1: LET b=1: LET c=1
 2445 PRINT AT 12,12;j+1
 2450 PRINT INVERSE 1;AT a+4,2;CHR$ 62; INVERSE 0: PRINT AT a+(3 AND a>=b)+(5 AND a<b),2;CHR$ 32: LET b=a
 2452 IF a=4 THEN PRINT AT 5,2;CHR$ 32
 2455 IF a=1 THEN PRINT AT 8,2;CHR$ 32
 2458 IF c=9 THEN LET c=1
 2460 PRINT INVERSE 1;AT c+4,15;CHR$ 62; INVERSE 0: PRINT AT c+3,15;CHR$ 32: IF c=1 THEN PRINT AT 12,15;CHR$ 32
 2470 IF SCREEN$ (5,2)=CHR$ 62 THEN INPUT "fnct or d=\:: e=";CHR$ o;"/use keys 1-8"; LINE t$
 2480 IF SCREEN$ (6,2)=CHR$ 62 THEN INPUT "function or DEC.#(max.255)"; LINE t$
 2490 IF SCREEN$ (7,2)=CHR$ 62 THEN INPUT "function or HEX #(00 to FF)"; LINE t$
 2500 IF SCREEN$ (8,2)=CHR$ 62 THEN INPUT "function OR BIN #"; LINE t$
 2520 IF t$="6" OR t$="7" THEN LET a=a+(t$="6")-(t$="7"): LET a=a+(-a+1 AND a>4)+(-a+4 AND a<1): GO TO 2450
 2530 IF t$="a" OR t$="A" THEN LET c=c+1: GO TO 2458
 2540 IF t$="M1" OR t$="m1" THEN GO TO 30
 2550 IF t$="m2" OR t$="M2" THEN GO TO 1980
 2570 IF t$="c" OR t$="C" THEN GO SUB 2605: LET t$="0"
 2580 IF t$="n" OR t$="N" THEN PRINT FLASH 1;AT 13,20;"WAIT"; FLASH 0: GO TO 2790
 2590 GO TO (2610 AND SCREEN$ (5,2)=CHR$ 62)+(2950 AND SCREEN$ (6,2)=CHR$ 62)+(3000 AND SCREEN$ (7,2)=CHR$ 62)+(3050 AND SCREEN$ (8,2)=CHR$ 62)
 2600 FOR e=5 TO 12: PRINT AT e,2;CHR$ 32: PRINT AT e,15;CHR$ 32: FOR f=16 TO 23: PRINT AT e,f;CHR$ o: NEXT f: NEXT e: RETURN 
 2605 FOR e=5 TO 12: FOR f=16 TO 23: PRINT AT e,f;CHR$ o: NEXT f: NEXT e: RETURN 
 2610 LET x=5: LET y=16: LET oo=0
 2620 LET f$=INKEY$
 2630 IF f$="d" OR f$="e" THEN LET oo=(1 AND f$="d")+(0 AND f$="e")
 2650 IF f$="b" THEN GO TO 2470
 2660 IF f$="n" THEN PRINT FLASH 1;AT 13,20;"WAIT"; FLASH 0: GO TO 2790
 2670 IF f$="c" THEN GO SUB 2605: LET t$="0"
 2685 IF NOT oo THEN PRINT AT x,y;(CHR$ 144 AND r=1)+(CHR$ 164 AND r=2)
 2690 GO TO 2700+(50 AND f$="1")+(60 AND f$="2")+(70 AND f$="3")+(80 AND f$="4")
 2700 LET x=x-(f$="7")+(f$="6")
 2710 LET y=y-(f$="5")+(f$="8")
 2720 LET x=x+(-x+5 AND x<5)+(-x+12 AND x>12)
 2730 LET y=y+(-y+16 AND y<16)+(-y+23 AND y>23)
 2740 PRINT AT x,y;CHR$ 143: GO TO 2620
 2750 LET x=x-1: LET y=y-1: GO TO 2720
 2760 LET x=x-1: LET y=y+1: GO TO 2720
 2770 LET x=x+1: LET y=y+1: GO TO 2720
 2780 LET x=x+1: LET y=y-1: GO TO 2720
 2790 LET h=0: FOR e=132 TO 76 STEP -8: LET g$="": LET i$="": FOR f=131 TO 187 STEP 8
 2800 LET g$=g$+STR$ POINT (f,e): NEXT f: LET i$="BIN "+g$: POKE USR CHR$ (t+j)+h,VAL i$: LET h=h+1: NEXT e: LET j=j+1
 2805 PRINT AT 13,20;"    "
 2810 IF j<9 THEN PRINT AT 4+j,25;CHR$ (t+j-1)
 2820 IF j>8 AND j<17 THEN PRINT AT 4+j-8,27;CHR$ (t+j-1)
 2830 IF j>16 THEN PRINT AT 4+j-16,29;CHR$ (t+j-1)
 2840 IF j=s THEN PAUSE 45: GO TO 2860
 2850 GO SUB 2600: GO TO 2440
 2860 CLS : PRINT "ok, you now have ";s;" UDG","characters placed in memory"
 2865 PRINT '"They will remain there untill","you turn the power off to the","computer."
 2870 PRINT "You have four choices:";TAB 5;"ENTER #1 eliminates this","program from memory so that","you can use the UDG in other","programs."
 2875 PRINT TAB 11;"#2 and you get back","to the beginning of this program However, then some of your UDG","may be replaced by those used bythe program, depending on how","many you entered and where in","memory they are."
 2880 PRINT TAB 11;"#3 for a printer copy of the UDG chars and positions"
 2882 PRINT TAB 11;"#4 to save chr$ to be loaded at a later date"
 2885 PAUSE 0: LET t$=INKEY$
 2890 IF t$="1" THEN NEW 
 2895 IF t$="2" THEN GO TO (30 AND r=1)+(3100 AND r=2)
 2900 IF t$="4" THEN GO TO 3210
 2905 IF t$<>"3" THEN CLS : GO TO 2860
 2910 CLS : FOR a=t TO t+s-1
 2920 PRINT "UDG ";CHR$ (a-47);"=";CHR$ a
 2930 NEXT a: COPY : CLS : GO TO 2870
 2950 IF VAL t$<0 OR VAL t$>255 THEN GO TO 2470
 2960 LET n=VAL t$
 2970 FOR e=1 TO 8: PRINT AT c+4,24-e;(CHR$ o AND n/2=INT (n-n/2))+(CHR$ 143 AND n/2<>INT (n-n/2)): LET n=INT (n-n/2): NEXT e
 2980 LET c=c+1: IF c=9 THEN LET c=1
 2990 GO TO 2450
 3000 LET n=0: IF LEN t$=1 THEN LET g$="0"+t$: LET t$=g$
 3010 IF LEN t$>2 THEN GO TO 2470
 3020 LET g$="": LET i$="": FOR e=1 TO 2: RESTORE 3190: FOR f=1 TO 16: READ h$,b$
 3025 IF CODE t$(e)>96 AND CODE t$(e)<103 THEN LET q=CODE t$(e): LET q=q-32: LET t$(e)=CHR$ q
 3030 IF t$(e)<>h$ THEN NEXT f: GO TO 2470
 3040 IF t$(e)=h$ THEN LET g$=g$+b$: NEXT e: LET i$="BIN "+g$: LET n=VAL i$: GO TO 2970
 3050 IF LEN t$<>8 THEN GO TO 2470
 3060 LET i$="": LET i$="BIN "+t$: LET n=VAL i$: GO TO 2970
 3100 ON ERR GO TO 5
 3110 LET z=0
 3120 FOR a=0 TO 7: POKE USR CHR$ 164+a,(255 AND a=0)+(255 AND a=7)+(129 AND a>0 AND a<7): NEXT a
 3130 RESTORE : FOR a=0 TO 9: FOR b=0 TO 7: READ c
 3140 POKE USR CHR$ (144+a)+b,c: NEXT b: NEXT a: GO TO 30
 3150 DATA 255,129,129,129,129,129,129,255,240,194,166,146,2,2,7,0,0,15,99,149,41,64,128,240
 3160 DATA 0,224,16,16,105,21,19,231,10,10,15,2,146,160,192,240,0,0,47,72,238,65,33,14
 3170 DATA 16,16,28,18,12,33,30,12,16,56,84,0,56,8,8,8,0,100,146,151,98,148,144,96
 3180 DATA 255,255,126,60,153,195,231,255
 3190 DATA "0","0000","1","0001","2","0010","3","0011","4","0100","5","0101","6","0110","7","0111","8","1000","9","1001","A","1010","B","1011","C","1100","D","1101","E","1110","F","1111"
 3200 ON ERR RESET : LET z=0: CLS : PRINT "TO RESTART PROGRAM BE SURE TO","USE RUN 3100": PAUSE 45: LIST 
 3205 STOP 
 3210 CLS : PRINT " ok, now to save the CHR$ you   have in the UDG area so that    they can be loaded automaticallylater for use in another program"
 3215 PRINT '"there are ";s;" CHR$ in the UDG"
 3220 PRINT '"THEY ARE AS FOLLOWS:"
 3225 LET b=1: FOR a=t TO t+s-1
 3230 PRINT AT b+(7 AND b<8)+(0 AND (b>7 AND b<15))+(-7 AND b>14),0+(6 AND (b>7 AND b<15))+(12 AND b>14);CHR$ (a-47);"=";CHR$ a: LET b=b+1
 3235 NEXT a: PRINT AT 17,0;"How many are to be saved ?"
 3240 PRINT '"enter ""m"" to quit or goto menu"
 3245 PAUSE 0: LET t$=INKEY$: IF t$="m" THEN GO TO 30
 3250 IF t$<"1" OR VAL t$>s THEN GO TO 3245
 3255 LET c=VAL t$: PRINT AT 17,27;c: DIM g(c+1,8): LET g(1,1)=c
 3260 PRINT AT 19,0;"Enter ea. CHR$ to be saved ie.  ""adf OR klo etc."""
 3265 INPUT "CHR$ ? "; LINE t$: IF LEN t$>c THEN PRINT AT 20,0;"YOU ENTERED TO MANY, TRY AGAIN": PAUSE 80: PRINT AT 20,0;"                               ": GO TO 3265
 3270 PRINT AT 21,0; FLASH 1;"WAIT"; FLASH 0
 3275 FOR a=2 TO c+1: PRINT AT 20,12;"# ";a-1: LET gg=CODE t$(a-1)+47: PRINT AT 21,15;CHR$ gg
 3280 LET b=0: LET s$=""
 3285 FOR y=7 TO 0 STEP -1: LET b=b+1
 3290 FOR x=120 TO 127
 3295 LET s$=s$+STR$ POINT (x,y): NEXT x
 3300 GO SUB 3500: LET g(a,b)=nn
 3310 LET s$="": NEXT y: NEXT a
 3315 CLS : PRINT "Ok, now we have ";c;" UDG. saved in  DIM G(";c;",8)"
 3320 PRINT '"If you use this program, these  will be loaded and accessed by   CODE # or GRAPHICS a,b,etc."
 3325 PRINT '"SO NOW YOU HAVE (2)TWO CHOICES :"
 3330 PRINT TAB 7;"#1 save the following    program automatically which willalso save the DATA and when     entered next time will AUTO RUN,LOAD the DATA, and enter your   CHR$ into the UDG area."
 3335 PRINT TAB 7;"#2 SAVE the DATA in DIM Gon your own commands."
 3340 PRINT AT 18,0;"YOUR CHOICE ("; FLASH 1;"1"; FLASH 0;" or "; FLASH 1;"2"; FLASH 0;")?"
 3345 PAUSE 0: LET t$=INKEY$: LET x=0
 3350 IF t$="1" THEN GO TO 6200
 3355 IF t$<>"2" THEN GO TO 3345
 3360 CLS : PRINT "OK, You are on your own"''"ENTER as direct command         SAVE""(name)""DATA G()"'''"when you enter the above programname DATA G()  you will have to enter your own program to put   the data into the UDG AREA.     Position G(1,1) will tell you   how many CHR$ are saved in DIM."
 3362 PRINT AT 18,0;"DO YOU REALLY WANT TO USE THIS  SECTION (y or n)?"
 3364 PAUSE 0: LET t$=INKEY$: IF t$="n" THEN GO TO 3315
 3365 STOP 
 3366 GO TO 3315
 3370 CLS : PRINT "THIS IS JUST A SHORT PROGRAM     < 2K (use short tape/wafer)"
 3375 PRINT ''"The program and DATA will be    SAVED by the name udg"  
 3380 PRINT ''"SO REMEMBER THE NAME": IF x THEN RETURN 
 3405 PRINT AT 11,0;"Insert cassette and put your    recorder in the record mode"
 3410 PRINT '"wait for notice that program is finished as it is saved in(2)two parts"
 3415 PRINT '"PRESS ANY KEY WHEN READY"
 3420 PAUSE 0: GO TO 7000
 3500 LET nn=0: LET pp=0
 3505 FOR f=8 TO 1 STEP -1
 3510 LET nn=nn+VAL s$(f)*2^pp
 3515 LET pp=pp+1: NEXT f
 3520 RETURN 
 5900 PRINT AT 12,3; FLASH 1;"WAIT"; FLASH 0;" loading data now"
 5910 LOAD "@udg" DATA g()
 5920 LET c=g(1,1): DELETE 6200,
 5930 GO TO 6020
 6000 PRINT AT 12,3; FLASH 1;"wait"; FLASH 0;", loading DATA now"
 6005 LOAD "udg" DATA g()
 6010 LET c=g(1,1): DELETE 6200,
 6015 PRINT AT 14,0;"\:: STOP CASSETTE ONLY \::"
 6020 PRINT ''"now LOADING chr$ into UDG AREA"
 6025 FOR a=2 TO c+1: FOR b=0 TO 7
 6030 POKE USR CHR$ (142+a)+b,g(a,b+1)
 6035 NEXT b: NEXT a
 6040 CLS : PRINT "now your CHR$ are loaded in the UDG AREA"
 6050 PRINT '"They can be accessed from withinyour program with the command   PRINT CHR$ 144 or whatever or by using the GRAPHICS a to ";: PRINT CHR$ (96+c)
 6055 PRINT '"LOCATIONS ARE AS FOLLOWS:"
 6060 FOR a=1 TO c
 6065 IF a<8 THEN PRINT AT 8+a,0;CHR$ (96+a);"=";CHR$ (143+a)
 6066 IF a>7 AND a<15 THEN PRINT AT a+1,6;CHR$ (96+a);"=";CHR$ (143+a)
 6067 IF a>14 THEN PRINT AT a-6,12;CHR$ (96+a);"=";CHR$ (143+a)
 6070 NEXT a
 6075 PRINT AT 16,0;"You can now enter any program,  enter CLEAR or NEW, the CHR$    will remain unless you turn the power off."
 6085 PRINT TAB 4;"ENTER""p"" for printer copy"
 6090 PRINT "any key entry erases the program"
 6100 PAUSE 0: LET t$=INKEY$
 6105 IF t$="p" OR t$="P" THEN COPY 
 6110 NEW 
 6200 CLS : PRINT AT 12,0;"SAVE on MICRODRIVE or CASSETTE"
 6205 PRINT TAB 12;"(m or c) ?"
 6210 PAUSE 0: LET t$=INKEY$
 6215 IF t$="c" OR t$="C" THEN GO TO 3370
 6220 LET x=1: GO SUB 3370
 6225 PRINT AT 13,0;"Be sure new wafer is in drive   and that it has been formatted."
 6230 PRINT '"If not formatted, enter ""n"""
 6235 PRINT '"If ok, then enter ""y"""
 6240 PAUSE 0: LET a$=INKEY$
 6245 IF a$="n" OR a$="N" THEN CLS : PRINT "we have to format the microwaferfist, so if you have one to use in the drive, just press the    ENTER key": PAUSE 0: PRINT '"Wait untill the drive is done   and the next notice comes up on the screen": SAVE "@1,+"
 6250 CLS : PRINT '"Wait for notice when finished asthis is saved in two parts"
 6255 GO TO 7100
 7000 DELETE ,5500: PRINT AT 20,8; FLASH 1;"SAVING PROGRAM"; FLASH 0
 7005 SAVE "udg" LINE 6000
 7006 PRINT "SECOND PART/hit ENTER KEY again"
 7010 SAVE "udg" DATA g()
 7015 PRINT AT 20,8; FLASH 1;"FINISHED"; FLASH 0;"      "
 7020 PRINT AT 21,0;"YOU MAY WANT TO VERIFY SAVE!"
 7025 STOP 
 7100 DELETE ,5500: PRINT AT 12,8; FLASH 1;"SAVING PROGRAM"; FLASH 0
 7105 SAVE "@1,udg" LINE 5900
 7110 SAVE "@2,udg" DATA g()
 7115 PRINT AT 12,8; FLASH 1;"FINISHED"; FLASH 0;"      "
 7120 PRINT AT 15,0;"YOU MAY WANT TO VERIFY SAVE"
 7125 STOP

People

No people associated with this content.

Scroll to Top