Make UDGs

Developer(s): Charlie Day
Date: 198
Type: Program
Platform(s): TS 2068

Appears on

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

Source Code

   10 DIM u(8,8)
   20 POKE 23609,12: BORDER 7: PAPER 7: INK 0: CLS 
   30 GO SUB 570
   40 FOR i=0 TO 20
   50 PRINT AT i,21;CHR$ (97+i);"=";CHR$ (144+i)
   60 NEXT i
   70 PRINT AT 12,0;"abcdefgh"
   80 PRINT AT 8,16;"\a\b";AT 9,16;"\c\d"
   90 PRINT AT 11,16;"\e\f";AT 12,16;"\g\h"
  100 PRINT AT 14,16;"\i\j";AT 15,16;"\k\l"
  110 PRINT AT 17,16;"\m\n";AT 18,16;"\o\p"
  120 PRINT AT 20,16;"\q\r";AT 21,16;"\s\t"
  130 FOR i=0 TO 7: PRINT AT (14+i),9;i+1: NEXT i
  140 PRINT BRIGHT 1; INK 7; PAPER 0;AT 5,0;"-FUNCTIONS-"'"L=LOAD Data"'"D=DELETE   "'"C=Compile  "'"S=SAVE Data"'"E=EDIT     "
  150 PRINT AT 0,2;"Character"'" Generator II"'"by"; INK 2;" Charlie Day"' INK 4;"  TRIANGLE UG"
  160 INPUT "Enter letter for UDG";a$
  170 IF CODE a$<97 OR CODE a$>117 THEN GO TO 160
  180 PRINT AT (CODE a$-97),19; FLASH 1; INK 2;">"
  190 INPUT "Enter Letter coordinate ";L$
  200 IF L$="L" THEN GO TO 800
  210 IF L$="E" THEN GO TO 650
  220 IF L$="C" THEN GO TO 320
  230 IF L$="D" THEN GO TO 460
  240 IF L$="S" THEN GO TO 860
  250 IF CODE L$<97 OR CODE L$>104 THEN GO TO 190
  260 INPUT "Enter Number coordinate ";N
  270 IF N<1 OR N>8 THEN GO TO 260
  280 LET L=((CODE L$)-96)
  290 LET u(N,L)=1
  300 PRINT AT 13+N,L-1;"\::"
  310 GO TO 190
  320 PRINT AT 8,0; FLASH 1;"Compiling"
  330 INPUT "Print out code y/n?";p$
  340 LET p=0: IF p$="y" OR p$="Y" THEN LET p=1
  350 IF p=1 THEN PRINT #1;"Turn on PRINTER"
  360 FOR j=0 TO 7
  370 LET b$="BIN "
  380 FOR h=1 TO 8
  390 LET b$=b$+STR$ u(j+1,h)
  400 NEXT h
  410 IF p=1 THEN LPRINT VAL b$;" ";
  420 POKE USR a$+j,VAL b$
  430 NEXT j
  440 IF p=1 THEN LPRINT a$;"=";CHR$ (144+CODE a$-97)
  450 GO TO 10
  460 PRINT AT 7,0; FLASH 1;"Deleting"
  470 INPUT "Enter letter coordinate ";L$
  480 IF CODE L$<97 OR CODE L$>104 THEN GO TO 470
  490 INPUT "Enter number coordinate ";N$
  500 IF CODE N$<49 OR CODE N$>56 THEN GO TO 490
  510 LET N=VAL N$
  520 LET L=((CODE L$)-96)
  530 LET u(N,L)=0
  540 PRINT AT 13+n,l-1;" "
  550 PRINT AT 7,0; FLASH 0; INK 7; PAPER 0;"D=DELETE"
  560 GO TO 190
  570 REM display grid
  580 FOR g=0 TO 64 STEP 8
  590 PLOT g,0: DRAW 0,64
  600 NEXT g
  610 FOR g=0 TO 64 STEP 8
  620 PLOT 0,g: DRAW 64,0
  630 NEXT g
  640 RETURN 
  650 PRINT FLASH 1;AT 10,0;"EDITING";: FOR x=14 TO 21: PRINT AT x,0;"        ";: NEXT x: GO SUB 570
  660 LET c=PEEK 23675+256*PEEK 23676
  670 LET j=((CODE A$)-96)
  680 FOR p=1 TO 8
  690 LET b=PEEK ((c+p-1)+8*(j-1))
  700 FOR l=8 TO 1 STEP -1
  710 LET x=INT (b/2): LET d=b-2*x: LET b=x
  720 LET u(p,l)=d
  730 IF d=0 THEN LET c$=""
  740 IF d=1 THEN LET c$="\::"
  750 PRINT AT 13+p,l-1;c$
  760 NEXT l
  770 NEXT p
  780 PRINT AT 10,0; FLASH 0; INK 7; PAPER 0;"E=EDIT     "
  790 GO TO 190
  800 PRINT FLASH 1;AT 6,0;"  LOADING  "
  810 INPUT "Enter file name for character   set";n$
  820 PRINT #1;"Start tape"
  830 LOAD n$CODE 65368,168
  840 CLS : PRINT "Load complete"'"Press any key to return"'"to Generator": PAUSE 0: RUN 
  850 PRINT FLASH 1;AT 9,0;"SAVING DATA"
  860 INPUT "Enter file name for character set";n$
  870 SAVE n$CODE 65368,168
  880 CLS : PRINT "Save Complete"'"Press any key to return to"'"Generator": PAUSE 0: RUN 
  890 STOP 
  900 SAVE "Make UDGs" LINE 1