Home » Personal collection » Acorn tapes » Commercial_Releases » box06_tape03a_acorn_micropower_draw.wav » DRAW1

DRAW1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn tapes » Commercial_Releases » box06_tape03a_acorn_micropower_draw.wav
Filename: DRAW1
Read OK:
File size: 3888 bytes
Load address: FFFF0E00
Exec address: FFFF801F
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
    5REM    *TJB
   10Q%=LOMEM:LOMEM=LOMEM+2233
   15maxprog%=Q%:progtotal%=Q%+1:program%=Q%+2:len%=Q%+1802:sizefg%=Q%+1822:name%=Q%+1902
   20E%=PAGE
   25no$="    ":no$=""
   30FORi%=9TO12:no$=no$+CHR$(E%?i%):NEXTi%
   35ONERRORGOTO130
   40MODE7:PRINTTAB(12,5)"*************"'TAB(11,6)CHR$141"*  D R A W  *"'TAB(11,7)CHR$141"*  D R A W  *"'TAB(12,8)"*************"
   45PRINTTAB(14,13)"Copyright"TAB(14,15)"T J Balls"TAB(16,17)"1982"TAB(7,21)"Ver 4.1 P"TAB(21,21)"Copy : "no$:z%=INKEY(250)
   50CLS:PRINT'''''"Do you have a printer connected";:INPUT a$
   55IF a$="YES" THEN printflag%=TRUE ELSE printflag%=FALSE
   60IF (TOP-PAGE<>14472) OR (E%?307<>67) THENFORI%=0TO2000:E%?I%=0:NEXTI%ELSEONERRORGOTO125:REME.557
   65VDU23,255,255,255,255,255,255,255,255,255
   70blank$=" "+STRING$(18,CHR$255)
   75VDU23,254,255,255,255,255,255,255,255,0
   80blank2$=CHR$18+CHR$0+CHR$0+CHR$254+CHR$254+CHR$18+CHR$0+CHR$1+CHR$8+CHR$8
   85MODE 4 :@%=&00000400
   90main%=2205:entry%=2260:edit%=2305
   95DIMrepstack%(12,2),progstack%(7,2)
  100IFE%?8=32THENFORi%=0TO19:$(name%+16*i%)="mt":NEXTi%:?progtotal%=0:?maxprog%=0:E%?8=42
  105repstack%(1,1)=0:repstack%(1,2)=0:progstack%(1,1)=0:progstack%(1,2)=0
  115*FX11,0
  120 GOTO 130
  125IF ERR<>17 THEN REPORT:PRINTERL:END
  130VDU3:MODE4:VDU26:VDU4:CLG:editflag%=FALSE:repflag%=FALSE:progflag%=FALSE:finish%=FALSE:errorflag%=FALSE:PROCsetscreen
  135?216=32:CLS:PROCmenu(main%)
  140input%=FNgetcode("NREDLPSICF")
  145ON input% GOTO 150,195,210,225,260,275,290,340,390,410
  150REM N
  155IF?progtotal%=20THENPROCbeep:PRINT TAB(0,24)"Sorry! -"''"No room for any"''"more programs":GOTO140
  160i%=0 :finish%=FALSE
  165REPEAT i%=i%+1 
  170UNTIL$(name%+16*(i%-1))="mt"
  175progno=i%
  180?progtotal%=?progtotal%+1:IF?progtotal%>?maxprog%THEN?maxprog%=?progtotal%
  185PROCnewprog
  190GOTO 135
  195REM R
  200PROCrun(FNgetno("run"))
  205GOTO 135
  210REM E
  215PROCedit(FNgetno("edit"))
  220GOTO 135
  225REM D
  230num%=FNgetno("delete")
  235$(name%+16*(num%-1))="mt"
  240IFnum%=?maxprog%THEN?maxprog%=?maxprog%-1
  245PROClistprognames
  250?progtotal%=?progtotal%-1
  255GOTO 135
  260REM L
  265progflag%=TRUE :PROClistprog(FNgetno("list"))
  270GOTO 135
  275REM P
  280IF printflag% THENPROCprint(FNgetno("print")):GOTO135 ELSEPRINTTAB(0,24);"No printer":GOTO140
  290REM S
  295PROCclear(22) :PRINT TAB(0,22);"Type in a filename"'"for this set of"''"programs"'
  300file$=FNinpstr
  305PROCclear(22) :PRINT TAB(0,22);"Place cassette"''"in recorder, press"
  310channel%=OPENOUT(file$)
  315FORi%=0TO2232
  320BPUT#channel%,Q%?i%
  325NEXT i%
  330CLOSE #channel%
  335GOTO 135
  340REM L
  345PROCclear(22) :PRINT TAB(0,22);"Type the filename"''"for the set of"''"programs"'
  350file$=FNinpstr
  355PROCclear(22) :PRINT TAB(0,22);"Place cassette"''"in recorder, press"'"PLAY"
  360channel%=OPENUP(file$)
  365FORi%=0TO2232
  370Q%?i%=BGET#channel%
  375NEXT i%
  380CLOSE #channel%
  385GOTO135
  390REM C
  395PRINTTAB(0,24)"ALL programs?"''"(YES or NO)"'';:ans$=FNinpstr
  400IFans$="YES"THENFORi%=0TO19:$(name%+16*i%)="mt":NEXT:?progtotal%=0:?maxprog%=0
  405GOTO135
  410REM F
  415PRINT TAB(0,22);"Are you sure you"''"wish to end DRAW"''"(YES or NO)";
  420answer$=FNinpstr
  425IF answer$="YES" THEN 435
  430GOTO 135
  440*FX 11,50
  445MODE 7 :@%=0 :END
  450DEF PROCsetscreen
  455  MOVE 0,0
  460  DRAW 1279,0 :DRAW 1279,1023 :DRAW 0,1023 :DRAW 0,0 
  465  MOVE 636,0 :PLOT 21,636,1023 :MOVE 640,1023 :PLOT 21,640,0
  470  VDU 28,1,30,18,1          
  475  VDU 24,644;4;1274;1018;
  480  VDU 29,641;1;
  485  MOVE 0,0
  490ENDPROC
  495DEF PROCproglines(title$,sizeflag%)
  500  LOCALx%,y%,numb%
  505  CLG:VDU5
  510  MOVE10,1013:PRINTtitle$;:IFsizeflag%THENPRINT" SIZE"
  515  MOVE0,983:PLOT21,639,983
  520  y%=970
  525  FORnumb%=2TO60STEP2
  530  IFnumb%<10THENx%=20ELSEx%=5
  535  MOVEx%,y%:PRINTnumb%
  540  y%=y%-32
  545  NEXTnumb%
  550  VDU4
  555ENDPROC
  560DEF FNgetcode(code$)
  565  LOCAL i$,i
  570  PROCoff
  575  i$=CHR$(GET AND 223)
  580  i=INSTR(code$,i$)
  585  IF i=0 THEN 575 ELSE PROCon :=i
  590DEF PROCmenu(line)
  595  LOCAL i,a$,n  :RESTORE line
  600  IF line=edit% THENPROCclearto(19)ELSEPROCclearto(21)
  605  PRINT TAB(0,0)"Select from :"
  610  READ n
  615  FOR i=2 TO 2*n STEP 2
  620  READ a$ :PRINT TAB(0,i);a$
  625  NEXT i
  630ENDPROC
  635DEF PROClistprog(no)  
  640  LOCAL space%,y%,i%,code%              
  645  IFprogflag%THENPROCproglines($(name%+16*(no-1)),sizefg%!(4*(no-1)))
  650  space%=1
  655  VDU 5
  660  y%=970
  665  FORi%=1TOlen%?(no-1)
  670  MOVE 50,y% :IF editflag% THEN VDU 18,0,0 :PRINT blank$ :VDU 18,0,1 :MOVE 50,y%
  675  code%=FNgetopcode(no,i%)
  680  IF code%>=10 THEN code%=8           
  685  IF code%=0 THEN 750
  690  ONcode%GOTO695,700,705,710,720,725,730,735,726
  695  PRINT SPC(space%);"move  "; :IF FNgetoperand(no,i%)=0 THEN PRINT"SIZE" :GOTO 745 ELSE PRINT FNgetoperand(no,i%) :GOTO 745
  700  PRINT SPC(space%);"turn  "; :IF FNgetoperand(no,i%)=0 THEN PRINT"SIZE" :GOTO 745 ELSE PRINT FNgetoperand(no,i%) :GOTO 745
  705  PRINT SPC(space%);"repeat "; :IF FNgetoperand(no,i%)=0 THEN PRINT"SIZE" :space%=space%+1 :GOTO 745 ELSE PRINT FNgetoperand(no,i%) :space%=space%+1 :GOTO 745
  710  space%=space%-1 :IF space%<1 THEN space%=1 :repflag%=TRUE
  715  PRINT SPC(space%);"end repeat" :GOTO 745
  720  PRINT SPC(space%);"pen up  " :GOTO 745  
  725  PRINT SPC(space%);"pen down" :GOTO 745   
  726  PRINTSPC(space%);"home" :GOTO745
  730  PRINT SPC(space%);"finish  " :IF space%<>1 THEN repflag%=TRUE :GOTO 745 ELSE 745
  735  PRINT SPC(space%);$(name%+16*(FNgetopcode(no,i%)-11));
  740  IF NOT sizefg%!(4*(FNgetopcode(no,i%)-11))THENPRINTELSEIFFNgetoperand(no,i%)=0THENPRINT" SIZE"ELSEPRINT" "FNgetoperand(no,i%)
  745  y%=y%-32
  750  NEXT i%
  755  MOVE 50,y% :VDU 18,0,0 :PRINTblank$ :VDU 18,0,1
  760  VDU 4
  765  PROCclear(23)
  770  IF editflag% AND repflag% THEN:PROCbeep:repflag%=FALSE:PRINTTAB(0,24)"Error in REPEAT -"''"END REPEATS":errorflag%=TRUE
  775IF editflag% AND FNgetopcode(no,len%?(no-1))<>7 THENPROCbeep:PRINTTAB(0,20)"The last line must"'"be FINISH":errorflag%=TRUE
  780ENDPROC
  785DEF PROCinputline(pno,lno)
  790  LOCAL n%,m%,i%,i$
  795  IF editflag% THENi$="MTREUDFPH"ELSEi$="MTREUDFPHK"
  800  progflag%=FALSE :repflag%=FALSE
  805  PROCclear(23)
  810  n%=FNgetcode(i$)
  815  PROCputopcode(pno,lno,n%)
  820  ONn%GOTO825,830,835,840,865,865,870,875,865,910
  825  PRINTTAB(0,23)"MOVE ..."''"how many steps"':GOTO930
  830  PRINTTAB(0,23)"TURN ..."''"how many degrees"':GOTO930
  835  PRINTTAB(0,23)"REPEAT ..."''"how many times"':repeats%=repeats%+1:GOTO930
  840  IF repeats%>0 THEN repeats%=repeats%-1 :GOTO 865
  845  IF editflag% THEN m=-1 :GOTO 935
  850  PRINTTAB(0,23)"** ERROR**"
  855  PRINT '"No 'REPEAT' to end"
  860  PROCbeep :GOTO 810
  865  m%=-1 :GOTO 935
  870  IFrepeats%=0OReditflag%THENfinish%=TRUE:GOTO865ELSEPRINTTAB(0,23)"Can't finish -"''"end repeats first":PROCbeep:GOTO810
  875  PRINTTAB(0,23)"Which program"''"(type 0 for list)"'
  880  INPUTm%:IFm%=0THENPROClistprognames:progflag%=TRUE:PROCclear(23):GOTO875
  885  IFm%=pno THENPROCbeep:PROCclear(23):PRINTTAB(0,24)"  Recursion is"''"  NOT allowed!"''"    Try again";:GOTO880
  890  IF$(name%+16*(m%-1))="mt"THENPROCclear(23):PRINTTAB(0,23)"There is no"''"program number "m%''"Try again";:GOTO 880
  895  PROCputopcode(pno,lno,10+m%)
  900  PROCclear(23):PRINTTAB(0,23)"PROGRAM: "$(name%+16*(m%-1))
  905  IF sizefg%!(4*(m%-1)) THENPRINT'"SIZE = ";:GOTO930ELSE940
  910  len%?(pno-1)=(len%?(pno-1))-2:IFlen%?(pno-1)<>255THENVDU5:VDU18,0,0:MOVE50,970-(lno-2)*32:PRINTblank$:VDU18,0,1:VDU4:ELSE945
  915  IF FNgetopcode(pno,len%?(pno-1)+1)=3THENrepeats%=repeats%-1
  920  IF FNgetopcode(pno,len%?(pno-1)+1)=4THENrepeats%=repeats%+1
  925  GOTO 945
  930  INPUT m%
  935  PROCputoperand(pno,lno,m%)
  940  PROClistprog(pno)
  945ENDPROC
  950DEF PROClistprognames
  955  LOCAL i%,y%
  960  CLG
  965  VDU 5
  970  MOVE 10,1005 :PRINT"No: Title"
  975  MOVE 0,965 :PLOT 21,639,965
  980  y%=920
  985  FORi%=1TO?maxprog%
  990  MOVE 10,y% :IF i%<10 THEN PRINT " ";
  995  PRINT i%;"  ";
 1000  IF $(name%+16*(i%-1))<>"mt"THENPRINT $(name%+16*(i%-1));" ";:IF sizefg%!(4*(i%-1))THENPRINT"SIZE"
 1005  y%=y%-45
 1010  NEXT i%
 1015  VDU 4
 1020ENDPROC
 1025DEF PROCnewprog
 1030  LOCAL name$,length,i%,n$,ch$
 1035  PRINT TAB(0,24)"Type in the name "''"for your program"'
 1040  name$=""
 1045  name$=FNinpstr
 1050  PROCmenu(entry%)
 1055  PRINT '"K - kill last line"
 1060  IF RIGHT$(name$,4)="SIZE" THEN sizefg%!(4*(progno-1))=TRUE:name$=LEFT$(name$,LEN(name$)-4)ELSE sizefg%!(4*(progno-1))=FALSE
 1065  $(name%+16*(progno-1))=name$
 1070  PROCproglines($(name%+16*(progno-1)),sizefg%!(4*(progno-1)))
 1075  length=0       
 1080  repeats%=0  
 1085  REPEAT       
 1090  length=length+1     
 1095  len%?(progno-1)=length
 1100  PROCinputline(progno,length)
 1105  length=len%?(progno-1)
 1110  IF length=255THENlength=0
 1115  UNTIL finish% OR length=30
 1120ENDPROC
 1125DEF PROCbeep
 1130  LOCAL i%
 1135  FOR i%=1 TO 3
 1140  SOUND 1,-15,150,4 :SOUND 2,-15,120,4 :SOUND 3,-15,100,4
 1145  SOUND 1,-15,75,4  :SOUND 2,-15,60,4  :SOUND 3,-15,50,4
 1150  NEXT i%
 1155ENDPROC
 1160DEF PROCedit(number%)
 1165  LOCAL i%,input%,pointer%
 1170  CLS:editflag%=TRUE:repflag%=FALSE
 1175  progflag%=TRUE:PROClistprog(number%):progflag%=FALSE
 1180  PROCmenu(edit%)
 1185  VDU 5 :MOVE 560,1013 :PRINT blank2$ :VDU 4
 1190  IF NOT errorflag% PROCclear(20)
 1195  errorflag%=FALSE
 1200  input%=FNgetcode("IDCF")
 1205  PROCclear(20)
 1210  ON input% GOTO 1215,1295,1360,1410
 1215  REM A
 1220  IF len%?(number%-1)>=30THENPRINTTAB(0,22)"No room - "''"delete a line!":GOTO1200
 1225  PRINT TAB(0,22);"Type in the number"'"of the line that"''"you wish to insert"
 1230  INPUT line%
 1235  PROCclear(22)
 1240  IF line%<1 OR line%>57 OR (line%DIV2*2)=line% THEN PRINT TAB(0,22);"The number must be"'"an ODD number    "''"from 1 to 57";:GOTO1230  
 1245  pointer%=(line%+1) DIV 2
 1250  VDU 5 :MOVE 560,1013 :PRINT line% :VDU 4
 1255  FOR i%=30 TO pointer% STEP -1
 1260  PROCputoperand(number%,i%,FNgetoperand(number%,i%-1))
 1265  PROCputopcode(number%,i%,FNgetopcode(number%,i%-1))
 1270  NEXT i%
 1275  len%?(number%-1)=len%?(number%-1)+1
 1280  PROCmenu(entry%)
 1285  PROCinputline(number%,pointer%)
 1290  GOTO 1180
 1295  REM D
 1300  PRINT TAB(0,22);"Type in the number"'"of the line that"''"you wish to delete"
 1305  INPUT line%
 1310  PROCclear(22)
 1315  IF line%<2 OR line%DIV2>len%?(number%-1) OR (line%DIV2*2)<>line% THENPRINTTAB(0,22)"Silly!  There is"''"  no such line!"''"   Try again";:GOTO1305
 1320  pointer%=line% DIV 2
 1325  FORi%=pointer%TOlen%?(number%-1)-1
 1330  PROCputoperand(number%,i%,FNgetoperand(number%,i%+1))
 1335  PROCputopcode(number%,i%,FNgetopcode(number%,i%+1))
 1340  NEXT i%
 1345  len%?(number%-1)=len%?(number%-1)-1
 1350  PROClistprog(number%)
 1355  GOTO 1200
 1360  REM C
 1365  PRINT TAB(0,22);"Type in the number"'"of the line that"''"you wish to change"
 1370  INPUT line%
 1375  PROCclear(22)
 1380  IF line%<2 OR line%DIV2>len%?(number%-1) OR (line%DIV2*2)<>line% THENPRINTTAB(0,22)"Silly!  There is"''"  no such line!"''"   Try again";:GOTO1370
 1385  pointer%=line% DIV 2
 1390  VDU 5 :MOVE 560,1013 :PRINT blank2$;line% :VDU 4
 1395  PROCmenu(entry%)
 1400  PROCinputline(number%,pointer%)
 1405  GOTO 1180
 1410  REM F
 1415  editflag%=FALSE
 1420ENDPROC
 1425DEF PROCrun(number%)
 1430  LOCAL angle%,repptr%,progptr%,curprog%,curline%,opcode%,operand%,size%,ink%,i%,n%,x%,y%,x,y
 1435  PROCoff
 1440  VDU 26 :CLG :x=640 :y=512 :MOVE x,y
 1445  repptr%=0:progptr%=0:curline%=1:curprog%=number%:ink%=5:angle%=0:size%=0
 1450  opcode%=FNgetopcode(curprog%,curline%) :operand%=FNgetoperand(curprog%,curline%)
 1455  IF operand%=0 THEN operand%=size%
 1460  IF opcode%>10 THEN n%=8 ELSE n%=opcode%
 1465  ONn%GOTO1470,1535,1565,1600,1625,1645,1665,1695,1661
 1470  REM M
 1475  move=5200
 1480  IF angle%=0 THEN x=x+operand% :GOTO 1520
 1485  IF angle%<90 THEN x=x+operand%*COS(RAD(angle%)) :y=y+operand%*SIN(RAD(angle%)) :GOTO 1520
 1490  IF angle%=90 THEN y=y+operand% :GOTO 1520
 1495  IF angle%<180 THEN x=x-operand%*COS(RAD(180-angle%)) :y=y+operand%*SIN(RAD(180-angle%)) :GOTO 1520
 1500  IF angle%=180 THEN x=x-operand% :GOTO 1520
 1505  IF angle%<270 THEN x=x-operand%*COS(RAD(angle%-180)) :y=y-operand%*SIN(RAD(angle%-180)) :GOTO 1520
 1510  IF angle%=270 THEN y=y-operand% :GOTO 1520
 1515  IF angle%<360 THEN x=x+operand%*COS(RAD(360-angle%)) :y=y-operand%*SIN(RAD(360-angle%))
 1520  x%=x+.5 :y%=y+.5 :PLOT ink%,x%,y%
 1525  curline%=curline%+1
 1530  GOTO 1450
 1535  REM T
 1540  angle%=angle%+operand%
 1545  angle%=angle% MOD 360
 1550  IF angle%<0 THEN angle%=angle%+360
 1555  curline%=curline%+1
 1560  GOTO 1450
 1565  REM R
 1570  IFrepptr%=12THENPROCbeep:PRINTTAB(0,24);"ERROR!!!"''"in Program ";$(name%+16*(curprog%-1));''"Too many REPEAT's":GOTO1745
 1575  repptr%=repptr%+1
 1580  repstack%(repptr%,2)=operand%
 1585  curline%=curline%+1
 1590  repstack%(repptr%,1)=curline%
 1595  GOTO 1450
 1600  REM E
 1605  IFrepstack%(repptr%,1)=0THENPROCbeep:PRINTTAB(0,24);"ERROR!!!"''"in Program ";$(name%+16*(curprog%-1)):GOTO1745
 1610  repstack%(repptr%,2)=repstack%(repptr%,2)-1
 1615  IF repstack%(repptr%,2)<1 THEN curline%=curline%+1 :repptr%=repptr%-1 ELSE curline%=repstack%(repptr%,1)
 1620  GOTO 1450
 1625  REM U
 1630  ink%=4
 1635  curline%=curline%+1
 1640  GOTO 1450
 1645  REM D
 1650  ink%=5
 1655  curline%=curline%+1
 1660  GOTO 1450
 1661  REM H
 1662  x=640:y=512:MOVEx,y:angle%=0
 1663  curline%=curline%+1:GOTO1450
 1665  REM F
 1670  IF progstack%(progptr%,1)=0 THEN GOTO 1745
 1675  curprog%=progstack%(progptr%,1)
 1680  curline%=progstack%(progptr%,2)
 1685  progptr%=progptr%-1
 1690  GOTO 1450
 1695  REM P
 1700  opcode%=opcode%-10
 1705  IFprogptr%=7THENPROCbeep:PRINTTAB(0,24);"ERROR!!!"''"in Program ";$(name%+16*(curprog%-1));''"Too many PROG calls":GOTO1745
 1710  progptr%=progptr%+1
 1715  progstack%(progptr%,1)=curprog%
 1720  curline%=curline%+1
 1725  progstack%(progptr%,2)=curline%
 1730  curprog%=opcode% :curline%=1
 1735  IF sizefg%!(4*(curprog%-1))THENsize%=operand%
 1740  GOTO 1450
 1745  FOR i%=1 TO 1000 :NEXT i% :VDU 30 :PRINT "Press SPACE bar";:IF printflag% THEN VDU 127,127,127 :PRINT"or P"
 1750  a$=GET$ :IF a$<>" " AND a$<>"P" THEN 1750
 1755 IF printflag% AND a$="P" THENPROCdump:GOTO1745
 1760  CLG:PROCon:PROCsetscreen
 1765ENDPROC
 1770DEF PROCclear(y%)
 1775  LOCAL i%
 1780  FOR i%=y% TO 28
 1785  PRINT TAB(0,i%);SPC(18);
 1790  NEXT i%
 1795ENDPROC
 1800DEF PROCoff
 1805  VDU 23;11,0;0;0;0
 1810ENDPROC
 1815DEF PROCon
 1820  VDU 23;11,255;0;0;0
 1825ENDPROC
 1830DEF FNinpstr
 1835  LOCAL i%,str$,input$,ch$,max%
 1840  INPUT input$
 1845  max%=10
 1850  str$=""
 1855  FOR i%=1 TO LEN(input$)
 1860  ch$=MID$(input$,i%,1)
 1865  IF ch$>="a" AND ch$<="z" THEN ch$=CHR$(ASC(ch$) AND 223)
 1870  str$=str$ + ch$
 1875  NEXT i%
 1880  IF RIGHT$(str$,4)="SIZE" THEN max%=14
 1885  IF LEN(str$)>max% THEN PROCclear(22) :PRINT TAB(0,22)"Name too long."''"10 charachters,"''"or less, please"' :GOTO 1840
 1890  IF LEFT$(str$,1)<"A" OR LEFT$(str$,1)>"Z" THEN PROCclear(22) :PRINT TAB(0,22)"Names must start"''"with a letter"''"please"' :GOTO 1840
 1895  =str$
 1900DEF PROCputopcode(prog%,line%,data%)
 1905  program%?((prog%-1)*90+(line%-1)*3)=data%
 1910ENDPROC
 1915DEF PROCputoperand(prog%,line%,data%)
 1920  LOCAL sign%,base%
 1925  sign%=SGNdata%
 1930  data%=ABSdata%
 1935  base%=(prog%-1)*90+(line%-1)*3
 1940  program%?(base%+2)=data% MOD 256
 1945  data%=data% DIV 256
 1950  IF sign%=-1 THEN data%=data%+&80
 1955  program%?(base%+1)=data%
 1960ENDPROC
 1965DEF FNgetopcode(prog%,line%)
 1970  =program%?((prog%-1)*90+(line%-1)*3)
 1975DEF FNgetoperand(prog%,line%)
 1980  LOCAL hibyte%,value%,base%,sign%
 1985  base%=(prog%-1)*90+(line%-1)*3
 1990  sign%=(program%?(base%+1))<128
 1995  hibyte%=(program%?(base%+1) AND &7F)
 2000  value%=program%?(base%+2)+256*hibyte%
 2005  IF sign% THEN =value% ELSE =value%*-1
 2010DEF PROCclearto(line%)
 2015  LOCAL i%
 2020  FOR i%=1 TO line%
 2025  PRINT TAB(0,i%);SPC(18)
 2030  NEXT i%
 2035ENDPROC
 2040DEF PROCdump
 2045  VDU2,1,13,1,27,1,65,1,8
 2050  FOR A%=HIMEM TO HIMEM+9920 STEP320
 2055  VDU 1,27,1,75,1,64,1,1
 2060  FOR C%=A% TO A%+312 STEP 8
 2065  FOR B%=0 TO 7
 2070  G%?B%=(?(B%+C%))
 2075  NEXT
 2080  CALL &D40
 2085  FOR B%=D% TO D%+7
 2090  A=?B%
 2095  VDU 1,A
 2100  NEXT
 2105  NEXT
 2110  VDU 1,13,1,10
 2115  NEXT
 2120  VDU 1,27,1,65,1,13,1,10,3
 2125ENDPROC
 2130DEF FNgetno(f$)
 2135  PRINT TAB(0,24);"Which program do"''"you wish to ";f$ :IF f$<>"delete" THEN PRINT
 2140  PROClistprognames
 2145  INPUT no%
 2150  IF no%<1 OR no%>?maxprog% OR $(name%+16*(no%-1))="mt"THENPROCclear(21):PRINTTAB(0,22);"Sorry! can't":GOTO2135
 2155=no%
 2160DEF PROCprint(no%)
 2170  VDU 2
 2175  PRINTTAB(0,22);$(name%+16*(no%-1));:VDU3:progflag%=TRUE:PROClistprog(no%):VDU2
 2180  IF sizefg%!(4*(no%-1)) THENPRINT"  SIZE":PRINTELSEPRINT
 2185  progflag%=FALSE :PROClistprog(no%):PRINT:PRINT:PRINT
 2190  VDU 3
 2195  PROCclear(22)
 2200ENDPROC
 2205DATA 10
 2210DATA "N - new program"  
 2215DATA "R - run program"    
 2220DATA "E - edit program"      
 2225DATA "D - delete program"
 2230DATA "L - list program"        
 2235DATA "P - print program"
 2240DATA "S - save programs"
 2245DATA "I - input programs"
 2250DATA "C - clear memory"
 2255DATA "F - finish"
 2260DATA 9
 2265DATA "M - move"
 2270DATA "T - turn"
 2271DATA "H - home"
 2275DATA "R - repeat"
 2280DATA "E - end repeat"
 2285DATA "P - program"
 2290DATA "U - pen up"  
 2295DATA "D - pen down" 
 2300DATA "F - finish"       
 2305DATA 4
 2310DATA "I - insert a line"
 2315DATA "D - delete a line"
 2320DATA "C - change a line"
 2325DATA "F - finish editing"

�    *TJB

Q%=�:�=�+2233
Xmaxprog%=Q%:progtotal%=Q%+1:program%=Q%+2:len%=Q%+1802:sizefg%=Q%+1822:name%=Q%+1902
E%=�
no$="    ":no$=""
!�i%=9�12:no$=no$+�(E%?i%):�i%
#��tB@
(g�7:�12,5)"*************"'�11,6)�141"*  D R A W  *"'�11,7)�141"*  D R A W  *"'�12,8)"*************"
-d�14,13)"Copyright"�14,15)"T J Balls"�16,17)"1982"�7,21)"Ver 4.1 P"�21,21)"Copy : "no$:z%=�(250)
23�:�'''''"Do you have a printer connected";:� a$
7,� a$="YES" � printflag%=� � printflag%=�
<I� (�P-�<>14472) � (E%?307<>67) ��I%=0�2000:E%?I%=0:�I%���D}@:�E.557
A+�23,255,255,255,255,255,255,255,255,255
Fblank$=" "+�18,�255)
K)�23,254,255,255,255,255,255,255,255,0
P/blank2$=�18+�0+�0+�254+�254+�18+�0+�1+�8+�8
U� 4 :@%=&00000400
Z%main%=2205:entry%=2260:edit%=2305
_$�repstack%(12,2),progstack%(7,2)
dO�E%?8=32��i%=0�19:$(name%+16*i%)="mt":�i%:?progtotal%=0:?maxprog%=0:E%?8=42
iIrepstack%(1,1)=0:repstack%(1,2)=0:progstack%(1,1)=0:progstack%(1,2)=0
s*FX11,0
x � �tB@
}� �<>17 � �:�:�
�W�3:�4:�26:�4:�:editflag%=�:repflag%=�:progflag%=�:finish%=�:errorflag%=�:�setscreen
�?216=32:�:�menu(main%)
�!input%=�getcode("NREDLPSICF")
�@� input% � �tV@,�dC@,�dR@,�da@,�TDA,�TSA,�TbA,�DTA,�tFA,�tZA
�� N
�V�?progtotal%=20��beep:� �0,24)"Sorry! -"''"No room for any"''"more programs":�tL@
�i%=0 :finish%=�
�� i%=i%+1 
��$(name%+16*(i%-1))="mt"
�
progno=i%
�J?progtotal%=?progtotal%+1:�?progtotal%>?maxprog%�?maxprog%=?progtotal%
��newprog
�
� �tG@
�� R
��run(�getno("run"))
�
� �tG@
�� E
��edit(�getno("edit"))
�
� �tG@
�� D
�num%=�getno("delete")
�$(name%+16*(num%-1))="mt"
�)�num%=?maxprog%�?maxprog%=?maxprog%-1
��listprognames
�?progtotal%=?progtotal%-1
�
� �tG@
� L
	*progflag%=� :�listprog(�getno("list"))

� �tG@
� P
K� printflag% ��print(�getno("print")):�tG@ ��0,24);"No printer":�tL@
"� S
'L�clear(22) :� �0,22);"Type in a filename"'"for this set of"''"programs"'
,file$=�inpstr
1?�clear(22) :� �0,22);"Place cassette"''"in recorder, press"
6channel%=�(file$)
;�i%=0�2232
@�#channel%,Q%?i%
E� i%
J� #channel%
O
� �tG@
T� L
YK�clear(22) :� �0,22);"Type the filename"''"for the set of"''"programs"'
^file$=�inpstr
cF�clear(22) :� �0,22);"Place cassette"''"in recorder, press"'"PLAY"
hchannel%=�(file$)
m�i%=0�2232
rQ%?i%=�#channel%
w� i%
|� #channel%
�	�tG@
�� C
�9�0,24)"ALL programs?"''"(YES or NO)"'';:ans$=�inpstr
�H�ans$="YES"��i%=0�19:$(name%+16*i%)="mt":�:?progtotal%=0:?maxprog%=0
�	�tG@
�� F
�C� �0,22);"Are you sure you"''"wish to end DRAW"''"(YES or NO)";
�answer$=�inpstr
�� answer$="YES" � �tsA
�
� �tG@
�
*FX 11,50
�� 7 :@%=0 :�
�� �setscreen
�  � 0,0
�-  � 1279,0 :� 1279,1023 :� 0,1023 :� 0,0 
�4  � 636,0 :� 21,636,1023 :� 640,1023 :� 21,640,0
�  � 28,1,30,18,1          
�  � 24,644;4;1274;1018;
�  � 29,641;1;
�  � 0,0
��
�"� �proglines(title$,sizeflag%)
�  �x%,y%,numb%
�
  �:�5
�+  �10,1013:�title$;:�sizeflag%��" SIZE"
  �0,983:�21,639,983
  y%=970

  �numb%=2�60�2
  �numb%<10�x%=20�x%=5
  �x%,y%:�numb%
  y%=y%-32
!  �numb%
&  �4
+�
0� �getcode(code$)
5  � i$,i
:
  �off
?  i$=�(� � 223)
D  i=�code$,i$)
I  � i=0 � �TB � �on :=i
N� �menu(line)
S  � i,a$,n  :� line
X-  � line=edit% ��clearto(19)��clearto(21)
]  � �0,0)"Select from :"
b	  � n
g  � i=2 � 2*n � 2
l  � a$ :� �0,i);a$
q	  � i
v�
{� �listprog(no)  
�(  � space%,y%,i%,code%              
�B  �progflag%��proglines($(name%+16*(no-1)),sizefg%!(4*(no-1)))
�  space%=1
�	  � 5
�  y%=970
�  �i%=1�len%?(no-1)
�B  � 50,y% :� editflag% � � 18,0,0 :� blank$ :� 18,0,1 :� 50,y%
�  code%=�getopcode(no,i%)
�&  � code%>=10 � code%=8           
�  � code%=0 � �dnB
�9  �code%�twB,�t|B,�dAB,�dFB,�dPB,�dUB,�dZB,�d_B,�dVB
�d  � �(space%);"move  "; :� �getoperand(no,i%)=0 � �"SIZE" :� �diB � � �getoperand(no,i%) :� �diB
�d  � �(space%);"turn  "; :� �getoperand(no,i%)=0 � �"SIZE" :� �diB � � �getoperand(no,i%) :� �diB
��  � �(space%);"repeat "; :� �getoperand(no,i%)=0 � �"SIZE" :space%=space%+1 :� �diB � � �getoperand(no,i%) :space%=space%+1 :� �diB
�8  space%=space%-1 :� space%<1 � space%=1 :repflag%=�
�&  � �(space%);"end repeat" :� �diB
�&  � �(space%);"pen up  " :� �diB  
�'  � �(space%);"pen down" :� �diB   
�  �(space%);"home" :�diB
�E  � �(space%);"finish  " :� space%<>1 � repflag%=� :� �diB � �diB
�5  � �(space%);$(name%+16*(�getopcode(no,i%)-11));
�d  � � sizefg%!(4*(�getopcode(no,i%)-11))���getoperand(no,i%)=0��" SIZE"��" "�getoperand(no,i%)
�  y%=y%-32
�
  � i%
�*  � 50,y% :� 18,0,0 :�blank$ :� 18,0,1
�	  � 4
�  �clear(23)
f  � editflag% � repflag% �:�beep:repflag%=�:�0,24)"Error in REPEAT -"''"END REPEATS":errorflag%=�
k� editflag% � �getopcode(no,len%?(no-1))<>7 ��beep:�0,20)"The last line must"'"be FINISH":errorflag%=�
�
� �inputline(pno,lno)
  � n%,m%,i%,i$
1  � editflag% �i$="MTREUDFPH"�i$="MTREUDFPHK"
   progflag%=� :repflag%=�
%  �clear(23)
*  n%=�getcode(i$)
/  �putopcode(pno,lno,n%)
4;  �n%�TyC,�T~C,�DCC,�DHC,�DaC,�DaC,�DfC,�DkC,�DaC,�tNC
90  �0,23)"MOVE ..."''"how many steps"':�tbC
>2  �0,23)"TURN ..."''"how many degrees"':�tbC
CF  �0,23)"REPEAT ..."''"how many times"':repeats%=repeats%+1:�tbC
H0  � repeats%>0 � repeats%=repeats%-1 :� �DaC
M   � editflag% � m=-1 :� �tgC
R  �0,23)"** ERROR**"
W  � '"No 'REPEAT' to end"
\  �beep :� �TjC
a  m%=-1 :� �tgC
fd  �repeats%=0�editflag%�finish%=�:�DaC��0,23)"Can't finish -"''"end repeats first":�beep:�TjC
k2  �0,23)"Which program"''"(type 0 for list)"'
p;  �m%:�m%=0��listprognames:progflag%=�:�clear(23):�DkC
ua  �m%=pno ��beep:�clear(23):�0,24)"  Recursion is"''"  NOT allowed!"''"    Try again";:�DpC
zh  �$(name%+16*(m%-1))="mt"��clear(23):�0,23)"There is no"''"program number "m%''"Try again";:� �DpC
  �putopcode(pno,lno,10+m%)
�5  �clear(23):�0,23)"PROGRAM: "$(name%+16*(m%-1))
�3  � sizefg%!(4*(m%-1)) ��'"SIZE = ";:�tbC��tlC
�m  len%?(pno-1)=(len%?(pno-1))-2:�len%?(pno-1)<>255��5:�18,0,0:�50,970-(lno-2)*32:�blank$:�18,0,1:�4:��tqC
�<  � �getopcode(pno,len%?(pno-1)+1)=3�repeats%=repeats%-1
�<  � �getopcode(pno,len%?(pno-1)+1)=4�repeats%=repeats%+1
�  � �tqC
�
  � m%
�  �putoperand(pno,lno,m%)
�  �listprog(pno)
��
�� �listprognames
�
  � i%,y%
�  �
�	  � 5
�  � 10,1005 :�"No: Title"
�  � 0,965 :� 21,639,965
�  y%=920
�  �i%=1�?maxprog%
�  � 10,y% :� i%<10 � � " ";
�  � i%;"  ";
�W  � $(name%+16*(i%-1))<>"mt"�� $(name%+16*(i%-1));" ";:� sizefg%!(4*(i%-1))��"SIZE"
�  y%=y%-45
�
  � i%
�	  � 4
��
� �newprog
  � name$,length,i%,n$,ch$
6  � �0,24)"Type in the name "''"for your program"'
  name$=""
  name$=�inpstr
  �menu(entry%)
  � '"K - kill last line"
$f  � �name$,4)="SIZE" � sizefg%!(4*(progno-1))=�:name$=�name$,�(name$)-4)� sizefg%!(4*(progno-1))=�
)"  $(name%+16*(progno-1))=name$
.?  �proglines($(name%+16*(progno-1)),sizefg%!(4*(progno-1)))
3  length=0       
8  repeats%=0  
=  �       
B  length=length+1     
G  len%?(progno-1)=length
L  �inputline(progno,length)
Q  length=len%?(progno-1)
V  � length=255�length=0
[  � finish% � length=30
`�
e� �beep
j
  � i%
o  � i%=1 � 3
t1  � 1,-15,150,4 :� 2,-15,120,4 :� 3,-15,100,4
y0  � 1,-15,75,4  :� 2,-15,60,4  :� 3,-15,50,4
~
  � i%
��
�� �edit(number%)
�  � i%,input%,pointer%
�  �:editflag%=�:repflag%=�
�0  progflag%=�:�listprog(number%):progflag%=�
�  �menu(edit%)
�%  � 5 :� 560,1013 :� blank2$ :� 4
�  � � errorflag% �clear(20)
�  errorflag%=�
�  input%=�getcode("IDCF")
�  �clear(20)
�$  � input% � �tD,�TOE,�DPE,�tBE
�	  � A
�H  � len%?(number%-1)>=30��0,22)"No room - "''"delete a line!":�tpD
�L  � �0,22);"Type in the number"'"of the line that"''"you wish to insert"
�
  � line%
�  �clear(22)
�{  � line%<1 � line%>57 � (line%�2*2)=line% � � �0,22);"The number must be"'"an ODD number    "''"from 1 to 57";:�dND  
�  pointer%=(line%+1) � 2
�#  � 5 :� 560,1013 :� line% :� 4
�  � i%=30 � pointer% � -1
�7  �putoperand(number%,i%,�getoperand(number%,i%-1))
�5  �putopcode(number%,i%,�getopcode(number%,i%-1))
�
  � i%
�)  len%?(number%-1)=len%?(number%-1)+1
  �menu(entry%)
"  �inputline(number%,pointer%)

  � �t\D
	  � D
L  � �0,22);"Type in the number"'"of the line that"''"you wish to delete"

  � line%
  �clear(22)
#�  � line%<2 � line%�2>len%?(number%-1) � (line%�2*2)<>line% ��0,22)"Silly!  There is"''"  no such line!"''"   Try again";:�TYE
(  pointer%=line% � 2
-%  �i%=pointer%�len%?(number%-1)-1
27  �putoperand(number%,i%,�getoperand(number%,i%+1))
75  �putopcode(number%,i%,�getopcode(number%,i%+1))
<
  � i%
A)  len%?(number%-1)=len%?(number%-1)-1
F  �listprog(number%)
K  � �tpD
P	  � C
UL  � �0,22);"Type in the number"'"of the line that"''"you wish to change"
Z
  � line%
_  �clear(22)
d�  � line%<2 � line%�2>len%?(number%-1) � (line%�2*2)<>line% ��0,22)"Silly!  There is"''"  no such line!"''"   Try again";:�DZE
i  pointer%=line% � 2
n+  � 5 :� 560,1013 :� blank2$;line% :� 4
s  �menu(entry%)
x"  �inputline(number%,pointer%)
}  � �t\D
�	  � F
�  editflag%=�
��
�� �run(number%)
�]  � angle%,repptr%,progptr%,curprog%,curline%,opcode%,operand%,size%,ink%,i%,n%,x%,y%,x,y
�
  �off
�"  � 26 :� :x=640 :y=512 :� x,y
�N  repptr%=0:progptr%=0:curline%=1:curprog%=number%:ink%=5:angle%=0:size%=0
�T  opcode%=�getopcode(curprog%,curline%) :operand%=�getoperand(curprog%,curline%)
�#  � operand%=0 � operand%=size%
�&  � opcode%>10 � n%=8 � n%=opcode%
�6  �n%�t~E,�dE,�T]F,�D@F,�DYF,�DmF,�tAF,�t_F,�D}F
�	  � M
�  move=5200
�'  � angle%=0 � x=x+operand% :� �dpE
�P  � angle%<90 � x=x+operand%*�(�(angle%)) :y=y+operand%*�(�(angle%)) :� �dpE
�(  � angle%=90 � y=y+operand% :� �dpE
�Y  � angle%<180 � x=x-operand%*�(�(180-angle%)) :y=y+operand%*�(�(180-angle%)) :� �dpE
�)  � angle%=180 � x=x-operand% :� �dpE
�Y  � angle%<270 � x=x-operand%*�(�(angle%-180)) :y=y-operand%*�(�(angle%-180)) :� �dpE
�)  � angle%=270 � y=y-operand% :� �dpE
�Q  � angle%<360 � x=x+operand%*�(�(360-angle%)) :y=y-operand%*�(�(360-angle%))
�$  x%=x+.5 :y%=y+.5 :� ink%,x%,y%
�  curline%=curline%+1
�  � �tjE
�	  � T
  angle%=angle%+operand%
	  angle%=angle% � 360
$  � angle%<0 � angle%=angle%+360
  curline%=curline%+1
  � �tjE
	  � R
"n  �repptr%=12��beep:�0,24);"ERROR!!!"''"in Program ";$(name%+16*(curprog%-1));''"Too many REPEAT's":�dQF
'  repptr%=repptr%+1
,#  repstack%(repptr%,2)=operand%
1  curline%=curline%+1
6#  repstack%(repptr%,1)=curline%
;  � �tjE
@	  � E
Ed  �repstack%(repptr%,1)=0��beep:�0,24);"ERROR!!!"''"in Program ";$(name%+16*(curprog%-1)):�dQF
J1  repstack%(repptr%,2)=repstack%(repptr%,2)-1
Og  � repstack%(repptr%,2)<1 � curline%=curline%+1 :repptr%=repptr%-1 � curline%=repstack%(repptr%,1)
T  � �tjE
Y	  � U
^  ink%=4
c  curline%=curline%+1
h  � �tjE
m	  � D
r  ink%=5
w  curline%=curline%+1
|  � �tjE
}	  � H
~  x=640:y=512:�x,y:angle%=0
  curline%=curline%+1:�tjE
�	  � F
�)  � progstack%(progptr%,1)=0 � � �dQF
�%  curprog%=progstack%(progptr%,1)
�%  curline%=progstack%(progptr%,2)
�  progptr%=progptr%-1
�  � �tjE
�	  � P
�  opcode%=opcode%-10
�p  �progptr%=7��beep:�0,24);"ERROR!!!"''"in Program ";$(name%+16*(curprog%-1));''"Too many PROG calls":�dQF
�  progptr%=progptr%+1
�%  progstack%(progptr%,1)=curprog%
�  curline%=curline%+1
�%  progstack%(progptr%,2)=curline%
�"  curprog%=opcode% :curline%=1
�/  � sizefg%!(4*(curprog%-1))�size%=operand%
�  � �tjE
�[  � i%=1 � 1000 :� i% :� 30 :� "Press SPACE bar";:� printflag% � � 127,127,127 :�"or P"
�&  a$=� :� a$<>" " � a$<>"P" � �dVF
�' � printflag% � a$="P" ��dump:�dQF
�  �:�on:�setscreen
��
�� �clear(y%)
�
  � i%
�  � i%=y% � 28
�  � �0,i%);�(18);
�
  � i%
�

� �off

  � 23;11,0;0;0;0
�
	� �on
  � 23;11,255;0;0;0
!�
&
� �inpstr
+  � i%,str$,input$,ch$,max%
0  � input$
5
  max%=10
:
  str$=""
?  � i%=1 � �(input$)
D  ch$=�input$,i%,1)
I1  � ch$>="a" � ch$<="z" � ch$=�(�(ch$) � 223)
N  str$=str$ + ch$
S
  � i%
X!  � �str$,4)="SIZE" � max%=14
]j  � �(str$)>max% � �clear(22) :� �0,22)"Name too long."''"10 charachters,"''"or less, please"' :� �TpG
bp  � �str$,1)<"A" � �str$,1)>"Z" � �clear(22) :� �0,22)"Names must start"''"with a letter"''"please"' :� �TpG
g  =str$
l#� �putopcode(prog%,line%,data%)
q/  program%?((prog%-1)*90+(line%-1)*3)=data%
v�
{$� �putoperand(prog%,line%,data%)
�  � sign%,base%
�  sign%=�data%
�  data%=�data%
�$  base%=(prog%-1)*90+(line%-1)*3
�$  program%?(base%+2)=data% � 256
�  data%=data% � 256
�"  � sign%=-1 � data%=data%+&80
�  program%?(base%+1)=data%
��
�� �getopcode(prog%,line%)
�*  =program%?((prog%-1)*90+(line%-1)*3)
�� �getoperand(prog%,line%)
�"  � hibyte%,value%,base%,sign%
�$  base%=(prog%-1)*90+(line%-1)*3
�$  sign%=(program%?(base%+1))<128
�(  hibyte%=(program%?(base%+1) � &7F)
�+  value%=program%?(base%+2)+256*hibyte%
�$  � sign% � =value% � =value%*-1
�� �clearto(line%)
�
  � i%
�  � i%=1 � line%
�  � �0,i%);�(18)
�
  � i%
��
�� �dump
�  �2,1,13,1,27,1,65,1,8
  � A%=� � �+9920 �320
  � 1,27,1,75,1,64,1,1
  � C%=A% � A%+312 � 8
  � B%=0 � 7
  G%?B%=(?(B%+C%))
  �
   � &D40
%  � B%=D% � D%+7
*  A=?B%
/  � 1,A
4  �
9  �
>  � 1,13,1,10
C  �
H  � 1,27,1,65,1,13,1,10,3
M�
R� �getno(f$)
WH  � �0,24);"Which program do"''"you wish to ";f$ :� f$<>"delete" � �
\  �listprognames
a  � no%
f`  � no%<1 � no%>?maxprog% � $(name%+16*(no%-1))="mt"��clear(21):�0,22);"Sorry! can't":�DWH
k=no%
p� �print(no%)
z	  � 2
C  �0,22);$(name%+16*(no%-1));:�3:progflag%=�:�listprog(no%):�2
�*  � sizefg%!(4*(no%-1)) ��"  SIZE":��
�'  progflag%=� :�listprog(no%):�:�:�
�	  � 3
�  �clear(22)
��
�� 10
�� "N - new program"  
�� "R - run program"    
�� "E - edit program"      
�� "D - delete program"
� � "L - list program"        
�� "P - print program"
�� "S - save programs"
�� "I - input programs"
�� "C - clear memory"
�� "F - finish"
�� 9
�� "M - move"
�� "T - turn"
�� "H - home"
�� "R - repeat"
�� "E - end repeat"
�� "P - program"
�� "U - pen up"  
�� "D - pen down" 
�� "F - finish"       
	� 4
	� "I - insert a line"
	� "D - delete a line"
	� "C - change a line"
	� "F - finish editing"
�
00000000  0d 00 05 0d f4 20 20 20  20 2a 54 4a 42 0d 00 0a  |.....    *TJB...|
00000010  11 51 25 3d 92 3a d2 3d  92 2b 32 32 33 33 0d 00  |.Q%=.:.=.+2233..|
00000020  0f 58 6d 61 78 70 72 6f  67 25 3d 51 25 3a 70 72  |.Xmaxprog%=Q%:pr|
00000030  6f 67 74 6f 74 61 6c 25  3d 51 25 2b 31 3a 70 72  |ogtotal%=Q%+1:pr|
00000040  6f 67 72 61 6d 25 3d 51  25 2b 32 3a 6c 65 6e 25  |ogram%=Q%+2:len%|
00000050  3d 51 25 2b 31 38 30 32  3a 73 69 7a 65 66 67 25  |=Q%+1802:sizefg%|
00000060  3d 51 25 2b 31 38 32 32  3a 6e 61 6d 65 25 3d 51  |=Q%+1822:name%=Q|
00000070  25 2b 31 39 30 32 0d 00  14 08 45 25 3d 90 0d 00  |%+1902....E%=...|
00000080  19 15 6e 6f 24 3d 22 20  20 20 20 22 3a 6e 6f 24  |..no$="    ":no$|
00000090  3d 22 22 0d 00 1e 21 e3  69 25 3d 39 b8 31 32 3a  |=""...!.i%=9.12:|
000000a0  6e 6f 24 3d 6e 6f 24 2b  bd 28 45 25 3f 69 25 29  |no$=no$+.(E%?i%)|
000000b0  3a ed 69 25 0d 00 23 0b  ee 85 e5 8d 74 42 40 0d  |:.i%..#.....tB@.|
000000c0  00 28 67 eb 37 3a f1 8a  31 32 2c 35 29 22 2a 2a  |.(g.7:..12,5)"**|
000000d0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 22 27 8a 31 31  |***********"'.11|
000000e0  2c 36 29 bd 31 34 31 22  2a 20 20 44 20 52 20 41  |,6).141"*  D R A|
000000f0  20 57 20 20 2a 22 27 8a  31 31 2c 37 29 bd 31 34  | W  *"'.11,7).14|
00000100  31 22 2a 20 20 44 20 52  20 41 20 57 20 20 2a 22  |1"*  D R A W  *"|
00000110  27 8a 31 32 2c 38 29 22  2a 2a 2a 2a 2a 2a 2a 2a  |'.12,8)"********|
00000120  2a 2a 2a 2a 2a 22 0d 00  2d 64 f1 8a 31 34 2c 31  |*****"..-d..14,1|
00000130  33 29 22 43 6f 70 79 72  69 67 68 74 22 8a 31 34  |3)"Copyright".14|
00000140  2c 31 35 29 22 54 20 4a  20 42 61 6c 6c 73 22 8a  |,15)"T J Balls".|
00000150  31 36 2c 31 37 29 22 31  39 38 32 22 8a 37 2c 32  |16,17)"1982".7,2|
00000160  31 29 22 56 65 72 20 34  2e 31 20 50 22 8a 32 31  |1)"Ver 4.1 P".21|
00000170  2c 32 31 29 22 43 6f 70  79 20 3a 20 22 6e 6f 24  |,21)"Copy : "no$|
00000180  3a 7a 25 3d a6 28 32 35  30 29 0d 00 32 33 db 3a  |:z%=.(250)..23.:|
00000190  f1 27 27 27 27 27 22 44  6f 20 79 6f 75 20 68 61  |.'''''"Do you ha|
000001a0  76 65 20 61 20 70 72 69  6e 74 65 72 20 63 6f 6e  |ve a printer con|
000001b0  6e 65 63 74 65 64 22 3b  3a e8 20 61 24 0d 00 37  |nected";:. a$..7|
000001c0  2c e7 20 61 24 3d 22 59  45 53 22 20 8c 20 70 72  |,. a$="YES" . pr|
000001d0  69 6e 74 66 6c 61 67 25  3d b9 20 8b 20 70 72 69  |intflag%=. . pri|
000001e0  6e 74 66 6c 61 67 25 3d  a3 0d 00 3c 49 e7 20 28  |ntflag%=...<I. (|
000001f0  b8 50 2d 90 3c 3e 31 34  34 37 32 29 20 84 20 28  |.P-.<>14472) . (|
00000200  45 25 3f 33 30 37 3c 3e  36 37 29 20 8c e3 49 25  |E%?307<>67) ..I%|
00000210  3d 30 b8 32 30 30 30 3a  45 25 3f 49 25 3d 30 3a  |=0.2000:E%?I%=0:|
00000220  ed 49 25 8b ee 85 e5 8d  44 7d 40 3a f4 45 2e 35  |.I%.....D}@:.E.5|
00000230  35 37 0d 00 41 2b ef 32  33 2c 32 35 35 2c 32 35  |57..A+.23,255,25|
00000240  35 2c 32 35 35 2c 32 35  35 2c 32 35 35 2c 32 35  |5,255,255,255,25|
00000250  35 2c 32 35 35 2c 32 35  35 2c 32 35 35 0d 00 46  |5,255,255,255..F|
00000260  18 62 6c 61 6e 6b 24 3d  22 20 22 2b c4 31 38 2c  |.blank$=" "+.18,|
00000270  bd 32 35 35 29 0d 00 4b  29 ef 32 33 2c 32 35 34  |.255)..K).23,254|
00000280  2c 32 35 35 2c 32 35 35  2c 32 35 35 2c 32 35 35  |,255,255,255,255|
00000290  2c 32 35 35 2c 32 35 35  2c 32 35 35 2c 30 0d 00  |,255,255,255,0..|
000002a0  50 2f 62 6c 61 6e 6b 32  24 3d bd 31 38 2b bd 30  |P/blank2$=.18+.0|
000002b0  2b bd 30 2b bd 32 35 34  2b bd 32 35 34 2b bd 31  |+.0+.254+.254+.1|
000002c0  38 2b bd 30 2b bd 31 2b  bd 38 2b bd 38 0d 00 55  |8+.0+.1+.8+.8..U|
000002d0  15 eb 20 34 20 3a 40 25  3d 26 30 30 30 30 30 34  |.. 4 :@%=&000004|
000002e0  30 30 0d 00 5a 25 6d 61  69 6e 25 3d 32 32 30 35  |00..Z%main%=2205|
000002f0  3a 65 6e 74 72 79 25 3d  32 32 36 30 3a 65 64 69  |:entry%=2260:edi|
00000300  74 25 3d 32 33 30 35 0d  00 5f 24 de 72 65 70 73  |t%=2305.._$.reps|
00000310  74 61 63 6b 25 28 31 32  2c 32 29 2c 70 72 6f 67  |tack%(12,2),prog|
00000320  73 74 61 63 6b 25 28 37  2c 32 29 0d 00 64 4f e7  |stack%(7,2)..dO.|
00000330  45 25 3f 38 3d 33 32 8c  e3 69 25 3d 30 b8 31 39  |E%?8=32..i%=0.19|
00000340  3a 24 28 6e 61 6d 65 25  2b 31 36 2a 69 25 29 3d  |:$(name%+16*i%)=|
00000350  22 6d 74 22 3a ed 69 25  3a 3f 70 72 6f 67 74 6f  |"mt":.i%:?progto|
00000360  74 61 6c 25 3d 30 3a 3f  6d 61 78 70 72 6f 67 25  |tal%=0:?maxprog%|
00000370  3d 30 3a 45 25 3f 38 3d  34 32 0d 00 69 49 72 65  |=0:E%?8=42..iIre|
00000380  70 73 74 61 63 6b 25 28  31 2c 31 29 3d 30 3a 72  |pstack%(1,1)=0:r|
00000390  65 70 73 74 61 63 6b 25  28 31 2c 32 29 3d 30 3a  |epstack%(1,2)=0:|
000003a0  70 72 6f 67 73 74 61 63  6b 25 28 31 2c 31 29 3d  |progstack%(1,1)=|
000003b0  30 3a 70 72 6f 67 73 74  61 63 6b 25 28 31 2c 32  |0:progstack%(1,2|
000003c0  29 3d 30 0d 00 73 0b 2a  46 58 31 31 2c 30 0d 00  |)=0..s.*FX11,0..|
000003d0  78 0b 20 e5 20 8d 74 42  40 0d 00 7d 14 e7 20 9f  |x. . .tB@..}.. .|
000003e0  3c 3e 31 37 20 8c 20 f6  3a f1 9e 3a e0 0d 00 82  |<>17 . .:..:....|
000003f0  57 ef 33 3a eb 34 3a ef  32 36 3a ef 34 3a da 3a  |W.3:.4:.26:.4:.:|
00000400  65 64 69 74 66 6c 61 67  25 3d a3 3a 72 65 70 66  |editflag%=.:repf|
00000410  6c 61 67 25 3d a3 3a 70  72 6f 67 66 6c 61 67 25  |lag%=.:progflag%|
00000420  3d a3 3a 66 69 6e 69 73  68 25 3d a3 3a 65 72 72  |=.:finish%=.:err|
00000430  6f 72 66 6c 61 67 25 3d  a3 3a f2 73 65 74 73 63  |orflag%=.:.setsc|
00000440  72 65 65 6e 0d 00 87 1a  3f 32 31 36 3d 33 32 3a  |reen....?216=32:|
00000450  db 3a f2 6d 65 6e 75 28  6d 61 69 6e 25 29 0d 00  |.:.menu(main%)..|
00000460  8c 21 69 6e 70 75 74 25  3d a4 67 65 74 63 6f 64  |.!input%=.getcod|
00000470  65 28 22 4e 52 45 44 4c  50 53 49 43 46 22 29 0d  |e("NREDLPSICF").|
00000480  00 91 40 ee 20 69 6e 70  75 74 25 20 e5 20 8d 74  |..@. input% . .t|
00000490  56 40 2c 8d 64 43 40 2c  8d 64 52 40 2c 8d 64 61  |V@,.dC@,.dR@,.da|
000004a0  40 2c 8d 54 44 41 2c 8d  54 53 41 2c 8d 54 62 41  |@,.TDA,.TSA,.TbA|
000004b0  2c 8d 44 54 41 2c 8d 74  46 41 2c 8d 74 5a 41 0d  |,.DTA,.tFA,.tZA.|
000004c0  00 96 07 f4 20 4e 0d 00  9b 56 e7 3f 70 72 6f 67  |.... N...V.?prog|
000004d0  74 6f 74 61 6c 25 3d 32  30 8c f2 62 65 65 70 3a  |total%=20..beep:|
000004e0  f1 20 8a 30 2c 32 34 29  22 53 6f 72 72 79 21 20  |. .0,24)"Sorry! |
000004f0  2d 22 27 27 22 4e 6f 20  72 6f 6f 6d 20 66 6f 72  |-"''"No room for|
00000500  20 61 6e 79 22 27 27 22  6d 6f 72 65 20 70 72 6f  | any"''"more pro|
00000510  67 72 61 6d 73 22 3a e5  8d 74 4c 40 0d 00 a0 13  |grams":..tL@....|
00000520  69 25 3d 30 20 3a 66 69  6e 69 73 68 25 3d a3 0d  |i%=0 :finish%=..|
00000530  00 a5 0e f5 20 69 25 3d  69 25 2b 31 20 0d 00 aa  |.... i%=i%+1 ...|
00000540  1c fd 24 28 6e 61 6d 65  25 2b 31 36 2a 28 69 25  |..$(name%+16*(i%|
00000550  2d 31 29 29 3d 22 6d 74  22 0d 00 af 0d 70 72 6f  |-1))="mt"....pro|
00000560  67 6e 6f 3d 69 25 0d 00  b4 4a 3f 70 72 6f 67 74  |gno=i%...J?progt|
00000570  6f 74 61 6c 25 3d 3f 70  72 6f 67 74 6f 74 61 6c  |otal%=?progtotal|
00000580  25 2b 31 3a e7 3f 70 72  6f 67 74 6f 74 61 6c 25  |%+1:.?progtotal%|
00000590  3e 3f 6d 61 78 70 72 6f  67 25 8c 3f 6d 61 78 70  |>?maxprog%.?maxp|
000005a0  72 6f 67 25 3d 3f 70 72  6f 67 74 6f 74 61 6c 25  |rog%=?progtotal%|
000005b0  0d 00 b9 0c f2 6e 65 77  70 72 6f 67 0d 00 be 0a  |.....newprog....|
000005c0  e5 20 8d 74 47 40 0d 00  c3 07 f4 20 52 0d 00 c8  |. .tG@..... R...|
000005d0  17 f2 72 75 6e 28 a4 67  65 74 6e 6f 28 22 72 75  |..run(.getno("ru|
000005e0  6e 22 29 29 0d 00 cd 0a  e5 20 8d 74 47 40 0d 00  |n"))..... .tG@..|
000005f0  d2 07 f4 20 45 0d 00 d7  19 f2 65 64 69 74 28 a4  |... E.....edit(.|
00000600  67 65 74 6e 6f 28 22 65  64 69 74 22 29 29 0d 00  |getno("edit"))..|
00000610  dc 0a e5 20 8d 74 47 40  0d 00 e1 07 f4 20 44 0d  |... .tG@..... D.|
00000620  00 e6 19 6e 75 6d 25 3d  a4 67 65 74 6e 6f 28 22  |...num%=.getno("|
00000630  64 65 6c 65 74 65 22 29  0d 00 eb 1d 24 28 6e 61  |delete")....$(na|
00000640  6d 65 25 2b 31 36 2a 28  6e 75 6d 25 2d 31 29 29  |me%+16*(num%-1))|
00000650  3d 22 6d 74 22 0d 00 f0  29 e7 6e 75 6d 25 3d 3f  |="mt"...).num%=?|
00000660  6d 61 78 70 72 6f 67 25  8c 3f 6d 61 78 70 72 6f  |maxprog%.?maxpro|
00000670  67 25 3d 3f 6d 61 78 70  72 6f 67 25 2d 31 0d 00  |g%=?maxprog%-1..|
00000680  f5 12 f2 6c 69 73 74 70  72 6f 67 6e 61 6d 65 73  |...listprognames|
00000690  0d 00 fa 1d 3f 70 72 6f  67 74 6f 74 61 6c 25 3d  |....?progtotal%=|
000006a0  3f 70 72 6f 67 74 6f 74  61 6c 25 2d 31 0d 00 ff  |?progtotal%-1...|
000006b0  0a e5 20 8d 74 47 40 0d  01 04 07 f4 20 4c 0d 01  |.. .tG@..... L..|
000006c0  09 2a 70 72 6f 67 66 6c  61 67 25 3d b9 20 3a f2  |.*progflag%=. :.|
000006d0  6c 69 73 74 70 72 6f 67  28 a4 67 65 74 6e 6f 28  |listprog(.getno(|
000006e0  22 6c 69 73 74 22 29 29  0d 01 0e 0a e5 20 8d 74  |"list"))..... .t|
000006f0  47 40 0d 01 13 07 f4 20  50 0d 01 18 4b e7 20 70  |G@..... P...K. p|
00000700  72 69 6e 74 66 6c 61 67  25 20 8c f2 70 72 69 6e  |rintflag% ..prin|
00000710  74 28 a4 67 65 74 6e 6f  28 22 70 72 69 6e 74 22  |t(.getno("print"|
00000720  29 29 3a e5 8d 74 47 40  20 8b f1 8a 30 2c 32 34  |)):..tG@ ...0,24|
00000730  29 3b 22 4e 6f 20 70 72  69 6e 74 65 72 22 3a e5  |);"No printer":.|
00000740  8d 74 4c 40 0d 01 22 07  f4 20 53 0d 01 27 4c f2  |.tL@..".. S..'L.|
00000750  63 6c 65 61 72 28 32 32  29 20 3a f1 20 8a 30 2c  |clear(22) :. .0,|
00000760  32 32 29 3b 22 54 79 70  65 20 69 6e 20 61 20 66  |22);"Type in a f|
00000770  69 6c 65 6e 61 6d 65 22  27 22 66 6f 72 20 74 68  |ilename"'"for th|
00000780  69 73 20 73 65 74 20 6f  66 22 27 27 22 70 72 6f  |is set of"''"pro|
00000790  67 72 61 6d 73 22 27 0d  01 2c 11 66 69 6c 65 24  |grams"'..,.file$|
000007a0  3d a4 69 6e 70 73 74 72  0d 01 31 3f f2 63 6c 65  |=.inpstr..1?.cle|
000007b0  61 72 28 32 32 29 20 3a  f1 20 8a 30 2c 32 32 29  |ar(22) :. .0,22)|
000007c0  3b 22 50 6c 61 63 65 20  63 61 73 73 65 74 74 65  |;"Place cassette|
000007d0  22 27 27 22 69 6e 20 72  65 63 6f 72 64 65 72 2c  |"''"in recorder,|
000007e0  20 70 72 65 73 73 22 0d  01 36 15 63 68 61 6e 6e  | press"..6.chann|
000007f0  65 6c 25 3d ae 28 66 69  6c 65 24 29 0d 01 3b 0e  |el%=.(file$)..;.|
00000800  e3 69 25 3d 30 b8 32 32  33 32 0d 01 40 14 d5 23  |.i%=0.2232..@..#|
00000810  63 68 61 6e 6e 65 6c 25  2c 51 25 3f 69 25 0d 01  |channel%,Q%?i%..|
00000820  45 08 ed 20 69 25 0d 01  4a 0f d9 20 23 63 68 61  |E.. i%..J.. #cha|
00000830  6e 6e 65 6c 25 0d 01 4f  0a e5 20 8d 74 47 40 0d  |nnel%..O.. .tG@.|
00000840  01 54 07 f4 20 4c 0d 01  59 4b f2 63 6c 65 61 72  |.T.. L..YK.clear|
00000850  28 32 32 29 20 3a f1 20  8a 30 2c 32 32 29 3b 22  |(22) :. .0,22);"|
00000860  54 79 70 65 20 74 68 65  20 66 69 6c 65 6e 61 6d  |Type the filenam|
00000870  65 22 27 27 22 66 6f 72  20 74 68 65 20 73 65 74  |e"''"for the set|
00000880  20 6f 66 22 27 27 22 70  72 6f 67 72 61 6d 73 22  | of"''"programs"|
00000890  27 0d 01 5e 11 66 69 6c  65 24 3d a4 69 6e 70 73  |'..^.file$=.inps|
000008a0  74 72 0d 01 63 46 f2 63  6c 65 61 72 28 32 32 29  |tr..cF.clear(22)|
000008b0  20 3a f1 20 8a 30 2c 32  32 29 3b 22 50 6c 61 63  | :. .0,22);"Plac|
000008c0  65 20 63 61 73 73 65 74  74 65 22 27 27 22 69 6e  |e cassette"''"in|
000008d0  20 72 65 63 6f 72 64 65  72 2c 20 70 72 65 73 73  | recorder, press|
000008e0  22 27 22 50 4c 41 59 22  0d 01 68 15 63 68 61 6e  |"'"PLAY"..h.chan|
000008f0  6e 65 6c 25 3d ad 28 66  69 6c 65 24 29 0d 01 6d  |nel%=.(file$)..m|
00000900  0e e3 69 25 3d 30 b8 32  32 33 32 0d 01 72 14 51  |..i%=0.2232..r.Q|
00000910  25 3f 69 25 3d 9a 23 63  68 61 6e 6e 65 6c 25 0d  |%?i%=.#channel%.|
00000920  01 77 08 ed 20 69 25 0d  01 7c 0f d9 20 23 63 68  |.w.. i%..|.. #ch|
00000930  61 6e 6e 65 6c 25 0d 01  81 09 e5 8d 74 47 40 0d  |annel%......tG@.|
00000940  01 86 07 f4 20 43 0d 01  8b 39 f1 8a 30 2c 32 34  |.... C...9..0,24|
00000950  29 22 41 4c 4c 20 70 72  6f 67 72 61 6d 73 3f 22  |)"ALL programs?"|
00000960  27 27 22 28 59 45 53 20  6f 72 20 4e 4f 29 22 27  |''"(YES or NO)"'|
00000970  27 3b 3a 61 6e 73 24 3d  a4 69 6e 70 73 74 72 0d  |';:ans$=.inpstr.|
00000980  01 90 48 e7 61 6e 73 24  3d 22 59 45 53 22 8c e3  |..H.ans$="YES"..|
00000990  69 25 3d 30 b8 31 39 3a  24 28 6e 61 6d 65 25 2b  |i%=0.19:$(name%+|
000009a0  31 36 2a 69 25 29 3d 22  6d 74 22 3a ed 3a 3f 70  |16*i%)="mt":.:?p|
000009b0  72 6f 67 74 6f 74 61 6c  25 3d 30 3a 3f 6d 61 78  |rogtotal%=0:?max|
000009c0  70 72 6f 67 25 3d 30 0d  01 95 09 e5 8d 74 47 40  |prog%=0......tG@|
000009d0  0d 01 9a 07 f4 20 46 0d  01 9f 43 f1 20 8a 30 2c  |..... F...C. .0,|
000009e0  32 32 29 3b 22 41 72 65  20 79 6f 75 20 73 75 72  |22);"Are you sur|
000009f0  65 20 79 6f 75 22 27 27  22 77 69 73 68 20 74 6f  |e you"''"wish to|
00000a00  20 65 6e 64 20 44 52 41  57 22 27 27 22 28 59 45  | end DRAW"''"(YE|
00000a10  53 20 6f 72 20 4e 4f 29  22 3b 0d 01 a4 13 61 6e  |S or NO)";....an|
00000a20  73 77 65 72 24 3d a4 69  6e 70 73 74 72 0d 01 a9  |swer$=.inpstr...|
00000a30  1a e7 20 61 6e 73 77 65  72 24 3d 22 59 45 53 22  |.. answer$="YES"|
00000a40  20 8c 20 8d 74 73 41 0d  01 ae 0a e5 20 8d 74 47  | . .tsA..... .tG|
00000a50  40 0d 01 b8 0d 2a 46 58  20 31 31 2c 35 30 0d 01  |@....*FX 11,50..|
00000a60  bd 10 eb 20 37 20 3a 40  25 3d 30 20 3a e0 0d 01  |... 7 :@%=0 :...|
00000a70  c2 10 dd 20 f2 73 65 74  73 63 72 65 65 6e 0d 01  |... .setscreen..|
00000a80  c7 0b 20 20 ec 20 30 2c  30 0d 01 cc 2d 20 20 df  |..  . 0,0...-  .|
00000a90  20 31 32 37 39 2c 30 20  3a df 20 31 32 37 39 2c  | 1279,0 :. 1279,|
00000aa0  31 30 32 33 20 3a df 20  30 2c 31 30 32 33 20 3a  |1023 :. 0,1023 :|
00000ab0  df 20 30 2c 30 20 0d 01  d1 34 20 20 ec 20 36 33  |. 0,0 ...4  . 63|
00000ac0  36 2c 30 20 3a f0 20 32  31 2c 36 33 36 2c 31 30  |6,0 :. 21,636,10|
00000ad0  32 33 20 3a ec 20 36 34  30 2c 31 30 32 33 20 3a  |23 :. 640,1023 :|
00000ae0  f0 20 32 31 2c 36 34 30  2c 30 0d 01 d6 1e 20 20  |. 21,640,0....  |
00000af0  ef 20 32 38 2c 31 2c 33  30 2c 31 38 2c 31 20 20  |. 28,1,30,18,1  |
00000b00  20 20 20 20 20 20 20 20  0d 01 db 1b 20 20 ef 20  |        ....  . |
00000b10  32 34 2c 36 34 34 3b 34  3b 31 32 37 34 3b 31 30  |24,644;4;1274;10|
00000b20  31 38 3b 0d 01 e0 11 20  20 ef 20 32 39 2c 36 34  |18;....  . 29,64|
00000b30  31 3b 31 3b 0d 01 e5 0b  20 20 ec 20 30 2c 30 0d  |1;1;....  . 0,0.|
00000b40  01 ea 05 e1 0d 01 ef 22  dd 20 f2 70 72 6f 67 6c  |.......". .progl|
00000b50  69 6e 65 73 28 74 69 74  6c 65 24 2c 73 69 7a 65  |ines(title$,size|
00000b60  66 6c 61 67 25 29 0d 01  f4 12 20 20 ea 78 25 2c  |flag%)....  .x%,|
00000b70  79 25 2c 6e 75 6d 62 25  0d 01 f9 0a 20 20 da 3a  |y%,numb%....  .:|
00000b80  ef 35 0d 01 fe 2b 20 20  ec 31 30 2c 31 30 31 33  |.5...+  .10,1013|
00000b90  3a f1 74 69 74 6c 65 24  3b 3a e7 73 69 7a 65 66  |:.title$;:.sizef|
00000ba0  6c 61 67 25 8c f1 22 20  53 49 5a 45 22 0d 02 03  |lag%.." SIZE"...|
00000bb0  18 20 20 ec 30 2c 39 38  33 3a f0 32 31 2c 36 33  |.  .0,983:.21,63|
00000bc0  39 2c 39 38 33 0d 02 08  0c 20 20 79 25 3d 39 37  |9,983....  y%=97|
00000bd0  30 0d 02 0d 13 20 20 e3  6e 75 6d 62 25 3d 32 b8  |0....  .numb%=2.|
00000be0  36 30 88 32 0d 02 12 1a  20 20 e7 6e 75 6d 62 25  |60.2....  .numb%|
00000bf0  3c 31 30 8c 78 25 3d 32  30 8b 78 25 3d 35 0d 02  |<10.x%=20.x%=5..|
00000c00  17 13 20 20 ec 78 25 2c  79 25 3a f1 6e 75 6d 62  |..  .x%,y%:.numb|
00000c10  25 0d 02 1c 0e 20 20 79  25 3d 79 25 2d 33 32 0d  |%....  y%=y%-32.|
00000c20  02 21 0c 20 20 ed 6e 75  6d 62 25 0d 02 26 08 20  |.!.  .numb%..&. |
00000c30  20 ef 34 0d 02 2b 05 e1  0d 02 30 15 dd 20 a4 67  | .4..+....0.. .g|
00000c40  65 74 63 6f 64 65 28 63  6f 64 65 24 29 0d 02 35  |etcode(code$)..5|
00000c50  0c 20 20 ea 20 69 24 2c  69 0d 02 3a 0a 20 20 f2  |.  . i$,i..:.  .|
00000c60  6f 66 66 0d 02 3f 13 20  20 69 24 3d bd 28 a5 20  |off..?.  i$=.(. |
00000c70  80 20 32 32 33 29 0d 02  44 12 20 20 69 3d a7 63  |. 223)..D.  i=.c|
00000c80  6f 64 65 24 2c 69 24 29  0d 02 49 1c 20 20 e7 20  |ode$,i$)..I.  . |
00000c90  69 3d 30 20 8c 20 8d 54  7f 42 20 8b 20 f2 6f 6e  |i=0 . .T.B . .on|
00000ca0  20 3a 3d 69 0d 02 4e 11  dd 20 f2 6d 65 6e 75 28  | :=i..N.. .menu(|
00000cb0  6c 69 6e 65 29 0d 02 53  17 20 20 ea 20 69 2c 61  |line)..S.  . i,a|
00000cc0  24 2c 6e 20 20 3a f7 20  6c 69 6e 65 0d 02 58 2d  |$,n  :. line..X-|
00000cd0  20 20 e7 20 6c 69 6e 65  3d 65 64 69 74 25 20 8c  |  . line=edit% .|
00000ce0  f2 63 6c 65 61 72 74 6f  28 31 39 29 8b f2 63 6c  |.clearto(19)..cl|
00000cf0  65 61 72 74 6f 28 32 31  29 0d 02 5d 1c 20 20 f1  |earto(21)..].  .|
00000d00  20 8a 30 2c 30 29 22 53  65 6c 65 63 74 20 66 72  | .0,0)"Select fr|
00000d10  6f 6d 20 3a 22 0d 02 62  09 20 20 f3 20 6e 0d 02  |om :"..b.  . n..|
00000d20  67 15 20 20 e3 20 69 3d  32 20 b8 20 32 2a 6e 20  |g.  . i=2 . 2*n |
00000d30  88 20 32 0d 02 6c 16 20  20 f3 20 61 24 20 3a f1  |. 2..l.  . a$ :.|
00000d40  20 8a 30 2c 69 29 3b 61  24 0d 02 71 09 20 20 ed  | .0,i);a$..q.  .|
00000d50  20 69 0d 02 76 05 e1 0d  02 7b 15 dd 20 f2 6c 69  | i..v....{.. .li|
00000d60  73 74 70 72 6f 67 28 6e  6f 29 20 20 0d 02 80 28  |stprog(no)  ...(|
00000d70  20 20 ea 20 73 70 61 63  65 25 2c 79 25 2c 69 25  |  . space%,y%,i%|
00000d80  2c 63 6f 64 65 25 20 20  20 20 20 20 20 20 20 20  |,code%          |
00000d90  20 20 20 20 0d 02 85 42  20 20 e7 70 72 6f 67 66  |    ...B  .progf|
00000da0  6c 61 67 25 8c f2 70 72  6f 67 6c 69 6e 65 73 28  |lag%..proglines(|
00000db0  24 28 6e 61 6d 65 25 2b  31 36 2a 28 6e 6f 2d 31  |$(name%+16*(no-1|
00000dc0  29 29 2c 73 69 7a 65 66  67 25 21 28 34 2a 28 6e  |)),sizefg%!(4*(n|
00000dd0  6f 2d 31 29 29 29 0d 02  8a 0e 20 20 73 70 61 63  |o-1)))....  spac|
00000de0  65 25 3d 31 0d 02 8f 09  20 20 ef 20 35 0d 02 94  |e%=1....  . 5...|
00000df0  0c 20 20 79 25 3d 39 37  30 0d 02 99 17 20 20 e3  |.  y%=970....  .|
00000e00  69 25 3d 31 b8 6c 65 6e  25 3f 28 6e 6f 2d 31 29  |i%=1.len%?(no-1)|
00000e10  0d 02 9e 42 20 20 ec 20  35 30 2c 79 25 20 3a e7  |...B  . 50,y% :.|
00000e20  20 65 64 69 74 66 6c 61  67 25 20 8c 20 ef 20 31  | editflag% . . 1|
00000e30  38 2c 30 2c 30 20 3a f1  20 62 6c 61 6e 6b 24 20  |8,0,0 :. blank$ |
00000e40  3a ef 20 31 38 2c 30 2c  31 20 3a ec 20 35 30 2c  |:. 18,0,1 :. 50,|
00000e50  79 25 0d 02 a3 1d 20 20  63 6f 64 65 25 3d a4 67  |y%....  code%=.g|
00000e60  65 74 6f 70 63 6f 64 65  28 6e 6f 2c 69 25 29 0d  |etopcode(no,i%).|
00000e70  02 a8 26 20 20 e7 20 63  6f 64 65 25 3e 3d 31 30  |..&  . code%>=10|
00000e80  20 8c 20 63 6f 64 65 25  3d 38 20 20 20 20 20 20  | . code%=8      |
00000e90  20 20 20 20 20 0d 02 ad  16 20 20 e7 20 63 6f 64  |     ....  . cod|
00000ea0  65 25 3d 30 20 8c 20 8d  64 6e 42 0d 02 b2 39 20  |e%=0 . .dnB...9 |
00000eb0  20 ee 63 6f 64 65 25 e5  8d 74 77 42 2c 8d 74 7c  | .code%..twB,.t||
00000ec0  42 2c 8d 64 41 42 2c 8d  64 46 42 2c 8d 64 50 42  |B,.dAB,.dFB,.dPB|
00000ed0  2c 8d 64 55 42 2c 8d 64  5a 42 2c 8d 64 5f 42 2c  |,.dUB,.dZB,.d_B,|
00000ee0  8d 64 56 42 0d 02 b7 64  20 20 f1 20 89 28 73 70  |.dVB...d  . .(sp|
00000ef0  61 63 65 25 29 3b 22 6d  6f 76 65 20 20 22 3b 20  |ace%);"move  "; |
00000f00  3a e7 20 a4 67 65 74 6f  70 65 72 61 6e 64 28 6e  |:. .getoperand(n|
00000f10  6f 2c 69 25 29 3d 30 20  8c 20 f1 22 53 49 5a 45  |o,i%)=0 . ."SIZE|
00000f20  22 20 3a e5 20 8d 64 69  42 20 8b 20 f1 20 a4 67  |" :. .diB . . .g|
00000f30  65 74 6f 70 65 72 61 6e  64 28 6e 6f 2c 69 25 29  |etoperand(no,i%)|
00000f40  20 3a e5 20 8d 64 69 42  0d 02 bc 64 20 20 f1 20  | :. .diB...d  . |
00000f50  89 28 73 70 61 63 65 25  29 3b 22 74 75 72 6e 20  |.(space%);"turn |
00000f60  20 22 3b 20 3a e7 20 a4  67 65 74 6f 70 65 72 61  | "; :. .getopera|
00000f70  6e 64 28 6e 6f 2c 69 25  29 3d 30 20 8c 20 f1 22  |nd(no,i%)=0 . ."|
00000f80  53 49 5a 45 22 20 3a e5  20 8d 64 69 42 20 8b 20  |SIZE" :. .diB . |
00000f90  f1 20 a4 67 65 74 6f 70  65 72 61 6e 64 28 6e 6f  |. .getoperand(no|
00000fa0  2c 69 25 29 20 3a e5 20  8d 64 69 42 0d 02 c1 87  |,i%) :. .diB....|
00000fb0  20 20 f1 20 89 28 73 70  61 63 65 25 29 3b 22 72  |  . .(space%);"r|
00000fc0  65 70 65 61 74 20 22 3b  20 3a e7 20 a4 67 65 74  |epeat "; :. .get|
00000fd0  6f 70 65 72 61 6e 64 28  6e 6f 2c 69 25 29 3d 30  |operand(no,i%)=0|
00000fe0  20 8c 20 f1 22 53 49 5a  45 22 20 3a 73 70 61 63  | . ."SIZE" :spac|
00000ff0  65 25 3d 73 70 61 63 65  25 2b 31 20 3a e5 20 8d  |e%=space%+1 :. .|
00001000  64 69 42 20 8b 20 f1 20  a4 67 65 74 6f 70 65 72  |diB . . .getoper|
00001010  61 6e 64 28 6e 6f 2c 69  25 29 20 3a 73 70 61 63  |and(no,i%) :spac|
00001020  65 25 3d 73 70 61 63 65  25 2b 31 20 3a e5 20 8d  |e%=space%+1 :. .|
00001030  64 69 42 0d 02 c6 38 20  20 73 70 61 63 65 25 3d  |diB...8  space%=|
00001040  73 70 61 63 65 25 2d 31  20 3a e7 20 73 70 61 63  |space%-1 :. spac|
00001050  65 25 3c 31 20 8c 20 73  70 61 63 65 25 3d 31 20  |e%<1 . space%=1 |
00001060  3a 72 65 70 66 6c 61 67  25 3d b9 0d 02 cb 26 20  |:repflag%=....& |
00001070  20 f1 20 89 28 73 70 61  63 65 25 29 3b 22 65 6e  | . .(space%);"en|
00001080  64 20 72 65 70 65 61 74  22 20 3a e5 20 8d 64 69  |d repeat" :. .di|
00001090  42 0d 02 d0 26 20 20 f1  20 89 28 73 70 61 63 65  |B...&  . .(space|
000010a0  25 29 3b 22 70 65 6e 20  75 70 20 20 22 20 3a e5  |%);"pen up  " :.|
000010b0  20 8d 64 69 42 20 20 0d  02 d5 27 20 20 f1 20 89  | .diB  ...'  . .|
000010c0  28 73 70 61 63 65 25 29  3b 22 70 65 6e 20 64 6f  |(space%);"pen do|
000010d0  77 6e 22 20 3a e5 20 8d  64 69 42 20 20 20 0d 02  |wn" :. .diB   ..|
000010e0  d6 1e 20 20 f1 89 28 73  70 61 63 65 25 29 3b 22  |..  ..(space%);"|
000010f0  68 6f 6d 65 22 20 3a e5  8d 64 69 42 0d 02 da 45  |home" :..diB...E|
00001100  20 20 f1 20 89 28 73 70  61 63 65 25 29 3b 22 66  |  . .(space%);"f|
00001110  69 6e 69 73 68 20 20 22  20 3a e7 20 73 70 61 63  |inish  " :. spac|
00001120  65 25 3c 3e 31 20 8c 20  72 65 70 66 6c 61 67 25  |e%<>1 . repflag%|
00001130  3d b9 20 3a e5 20 8d 64  69 42 20 8b 20 8d 64 69  |=. :. .diB . .di|
00001140  42 0d 02 df 35 20 20 f1  20 89 28 73 70 61 63 65  |B...5  . .(space|
00001150  25 29 3b 24 28 6e 61 6d  65 25 2b 31 36 2a 28 a4  |%);$(name%+16*(.|
00001160  67 65 74 6f 70 63 6f 64  65 28 6e 6f 2c 69 25 29  |getopcode(no,i%)|
00001170  2d 31 31 29 29 3b 0d 02  e4 64 20 20 e7 20 ac 20  |-11));...d  . . |
00001180  73 69 7a 65 66 67 25 21  28 34 2a 28 a4 67 65 74  |sizefg%!(4*(.get|
00001190  6f 70 63 6f 64 65 28 6e  6f 2c 69 25 29 2d 31 31  |opcode(no,i%)-11|
000011a0  29 29 8c f1 8b e7 a4 67  65 74 6f 70 65 72 61 6e  |)).....getoperan|
000011b0  64 28 6e 6f 2c 69 25 29  3d 30 8c f1 22 20 53 49  |d(no,i%)=0.." SI|
000011c0  5a 45 22 8b f1 22 20 22  a4 67 65 74 6f 70 65 72  |ZE".." ".getoper|
000011d0  61 6e 64 28 6e 6f 2c 69  25 29 0d 02 e9 0e 20 20  |and(no,i%)....  |
000011e0  79 25 3d 79 25 2d 33 32  0d 02 ee 0a 20 20 ed 20  |y%=y%-32....  . |
000011f0  69 25 0d 02 f3 2a 20 20  ec 20 35 30 2c 79 25 20  |i%...*  . 50,y% |
00001200  3a ef 20 31 38 2c 30 2c  30 20 3a f1 62 6c 61 6e  |:. 18,0,0 :.blan|
00001210  6b 24 20 3a ef 20 31 38  2c 30 2c 31 0d 02 f8 09  |k$ :. 18,0,1....|
00001220  20 20 ef 20 34 0d 02 fd  10 20 20 f2 63 6c 65 61  |  . 4....  .clea|
00001230  72 28 32 33 29 0d 03 02  66 20 20 e7 20 65 64 69  |r(23)...f  . edi|
00001240  74 66 6c 61 67 25 20 80  20 72 65 70 66 6c 61 67  |tflag% . repflag|
00001250  25 20 8c 3a f2 62 65 65  70 3a 72 65 70 66 6c 61  |% .:.beep:repfla|
00001260  67 25 3d a3 3a f1 8a 30  2c 32 34 29 22 45 72 72  |g%=.:..0,24)"Err|
00001270  6f 72 20 69 6e 20 52 45  50 45 41 54 20 2d 22 27  |or in REPEAT -"'|
00001280  27 22 45 4e 44 20 52 45  50 45 41 54 53 22 3a 65  |'"END REPEATS":e|
00001290  72 72 6f 72 66 6c 61 67  25 3d b9 0d 03 07 6b e7  |rrorflag%=....k.|
000012a0  20 65 64 69 74 66 6c 61  67 25 20 80 20 a4 67 65  | editflag% . .ge|
000012b0  74 6f 70 63 6f 64 65 28  6e 6f 2c 6c 65 6e 25 3f  |topcode(no,len%?|
000012c0  28 6e 6f 2d 31 29 29 3c  3e 37 20 8c f2 62 65 65  |(no-1))<>7 ..bee|
000012d0  70 3a f1 8a 30 2c 32 30  29 22 54 68 65 20 6c 61  |p:..0,20)"The la|
000012e0  73 74 20 6c 69 6e 65 20  6d 75 73 74 22 27 22 62  |st line must"'"b|
000012f0  65 20 46 49 4e 49 53 48  22 3a 65 72 72 6f 72 66  |e FINISH":errorf|
00001300  6c 61 67 25 3d b9 0d 03  0c 05 e1 0d 03 11 19 dd  |lag%=...........|
00001310  20 f2 69 6e 70 75 74 6c  69 6e 65 28 70 6e 6f 2c  | .inputline(pno,|
00001320  6c 6e 6f 29 0d 03 16 13  20 20 ea 20 6e 25 2c 6d  |lno)....  . n%,m|
00001330  25 2c 69 25 2c 69 24 0d  03 1b 31 20 20 e7 20 65  |%,i%,i$...1  . e|
00001340  64 69 74 66 6c 61 67 25  20 8c 69 24 3d 22 4d 54  |ditflag% .i$="MT|
00001350  52 45 55 44 46 50 48 22  8b 69 24 3d 22 4d 54 52  |REUDFPH".i$="MTR|
00001360  45 55 44 46 50 48 4b 22  0d 03 20 1d 20 20 70 72  |EUDFPHK".. .  pr|
00001370  6f 67 66 6c 61 67 25 3d  a3 20 3a 72 65 70 66 6c  |ogflag%=. :repfl|
00001380  61 67 25 3d a3 0d 03 25  10 20 20 f2 63 6c 65 61  |ag%=...%.  .clea|
00001390  72 28 32 33 29 0d 03 2a  15 20 20 6e 25 3d a4 67  |r(23)..*.  n%=.g|
000013a0  65 74 63 6f 64 65 28 69  24 29 0d 03 2f 1c 20 20  |etcode(i$)../.  |
000013b0  f2 70 75 74 6f 70 63 6f  64 65 28 70 6e 6f 2c 6c  |.putopcode(pno,l|
000013c0  6e 6f 2c 6e 25 29 0d 03  34 3b 20 20 ee 6e 25 e5  |no,n%)..4;  .n%.|
000013d0  8d 54 79 43 2c 8d 54 7e  43 2c 8d 44 43 43 2c 8d  |.TyC,.T~C,.DCC,.|
000013e0  44 48 43 2c 8d 44 61 43  2c 8d 44 61 43 2c 8d 44  |DHC,.DaC,.DaC,.D|
000013f0  66 43 2c 8d 44 6b 43 2c  8d 44 61 43 2c 8d 74 4e  |fC,.DkC,.DaC,.tN|
00001400  43 0d 03 39 30 20 20 f1  8a 30 2c 32 33 29 22 4d  |C..90  ..0,23)"M|
00001410  4f 56 45 20 2e 2e 2e 22  27 27 22 68 6f 77 20 6d  |OVE ..."''"how m|
00001420  61 6e 79 20 73 74 65 70  73 22 27 3a e5 8d 74 62  |any steps"':..tb|
00001430  43 0d 03 3e 32 20 20 f1  8a 30 2c 32 33 29 22 54  |C..>2  ..0,23)"T|
00001440  55 52 4e 20 2e 2e 2e 22  27 27 22 68 6f 77 20 6d  |URN ..."''"how m|
00001450  61 6e 79 20 64 65 67 72  65 65 73 22 27 3a e5 8d  |any degrees"':..|
00001460  74 62 43 0d 03 43 46 20  20 f1 8a 30 2c 32 33 29  |tbC..CF  ..0,23)|
00001470  22 52 45 50 45 41 54 20  2e 2e 2e 22 27 27 22 68  |"REPEAT ..."''"h|
00001480  6f 77 20 6d 61 6e 79 20  74 69 6d 65 73 22 27 3a  |ow many times"':|
00001490  72 65 70 65 61 74 73 25  3d 72 65 70 65 61 74 73  |repeats%=repeats|
000014a0  25 2b 31 3a e5 8d 74 62  43 0d 03 48 30 20 20 e7  |%+1:..tbC..H0  .|
000014b0  20 72 65 70 65 61 74 73  25 3e 30 20 8c 20 72 65  | repeats%>0 . re|
000014c0  70 65 61 74 73 25 3d 72  65 70 65 61 74 73 25 2d  |peats%=repeats%-|
000014d0  31 20 3a e5 20 8d 44 61  43 0d 03 4d 20 20 20 e7  |1 :. .DaC..M   .|
000014e0  20 65 64 69 74 66 6c 61  67 25 20 8c 20 6d 3d 2d  | editflag% . m=-|
000014f0  31 20 3a e5 20 8d 74 67  43 0d 03 52 19 20 20 f1  |1 :. .tgC..R.  .|
00001500  8a 30 2c 32 33 29 22 2a  2a 20 45 52 52 4f 52 2a  |.0,23)"** ERROR*|
00001510  2a 22 0d 03 57 1d 20 20  f1 20 27 22 4e 6f 20 27  |*"..W.  . '"No '|
00001520  52 45 50 45 41 54 27 20  74 6f 20 65 6e 64 22 0d  |REPEAT' to end".|
00001530  03 5c 13 20 20 f2 62 65  65 70 20 3a e5 20 8d 54  |.\.  .beep :. .T|
00001540  6a 43 0d 03 61 13 20 20  6d 25 3d 2d 31 20 3a e5  |jC..a.  m%=-1 :.|
00001550  20 8d 74 67 43 0d 03 66  64 20 20 e7 72 65 70 65  | .tgC..fd  .repe|
00001560  61 74 73 25 3d 30 84 65  64 69 74 66 6c 61 67 25  |ats%=0.editflag%|
00001570  8c 66 69 6e 69 73 68 25  3d b9 3a e5 8d 44 61 43  |.finish%=.:..DaC|
00001580  8b f1 8a 30 2c 32 33 29  22 43 61 6e 27 74 20 66  |...0,23)"Can't f|
00001590  69 6e 69 73 68 20 2d 22  27 27 22 65 6e 64 20 72  |inish -"''"end r|
000015a0  65 70 65 61 74 73 20 66  69 72 73 74 22 3a f2 62  |epeats first":.b|
000015b0  65 65 70 3a e5 8d 54 6a  43 0d 03 6b 32 20 20 f1  |eep:..TjC..k2  .|
000015c0  8a 30 2c 32 33 29 22 57  68 69 63 68 20 70 72 6f  |.0,23)"Which pro|
000015d0  67 72 61 6d 22 27 27 22  28 74 79 70 65 20 30 20  |gram"''"(type 0 |
000015e0  66 6f 72 20 6c 69 73 74  29 22 27 0d 03 70 3b 20  |for list)"'..p; |
000015f0  20 e8 6d 25 3a e7 6d 25  3d 30 8c f2 6c 69 73 74  | .m%:.m%=0..list|
00001600  70 72 6f 67 6e 61 6d 65  73 3a 70 72 6f 67 66 6c  |prognames:progfl|
00001610  61 67 25 3d b9 3a f2 63  6c 65 61 72 28 32 33 29  |ag%=.:.clear(23)|
00001620  3a e5 8d 44 6b 43 0d 03  75 61 20 20 e7 6d 25 3d  |:..DkC..ua  .m%=|
00001630  70 6e 6f 20 8c f2 62 65  65 70 3a f2 63 6c 65 61  |pno ..beep:.clea|
00001640  72 28 32 33 29 3a f1 8a  30 2c 32 34 29 22 20 20  |r(23):..0,24)"  |
00001650  52 65 63 75 72 73 69 6f  6e 20 69 73 22 27 27 22  |Recursion is"''"|
00001660  20 20 4e 4f 54 20 61 6c  6c 6f 77 65 64 21 22 27  |  NOT allowed!"'|
00001670  27 22 20 20 20 20 54 72  79 20 61 67 61 69 6e 22  |'"    Try again"|
00001680  3b 3a e5 8d 44 70 43 0d  03 7a 68 20 20 e7 24 28  |;:..DpC..zh  .$(|
00001690  6e 61 6d 65 25 2b 31 36  2a 28 6d 25 2d 31 29 29  |name%+16*(m%-1))|
000016a0  3d 22 6d 74 22 8c f2 63  6c 65 61 72 28 32 33 29  |="mt"..clear(23)|
000016b0  3a f1 8a 30 2c 32 33 29  22 54 68 65 72 65 20 69  |:..0,23)"There i|
000016c0  73 20 6e 6f 22 27 27 22  70 72 6f 67 72 61 6d 20  |s no"''"program |
000016d0  6e 75 6d 62 65 72 20 22  6d 25 27 27 22 54 72 79  |number "m%''"Try|
000016e0  20 61 67 61 69 6e 22 3b  3a e5 20 8d 44 70 43 0d  | again";:. .DpC.|
000016f0  03 7f 1f 20 20 f2 70 75  74 6f 70 63 6f 64 65 28  |...  .putopcode(|
00001700  70 6e 6f 2c 6c 6e 6f 2c  31 30 2b 6d 25 29 0d 03  |pno,lno,10+m%)..|
00001710  84 35 20 20 f2 63 6c 65  61 72 28 32 33 29 3a f1  |.5  .clear(23):.|
00001720  8a 30 2c 32 33 29 22 50  52 4f 47 52 41 4d 3a 20  |.0,23)"PROGRAM: |
00001730  22 24 28 6e 61 6d 65 25  2b 31 36 2a 28 6d 25 2d  |"$(name%+16*(m%-|
00001740  31 29 29 0d 03 89 33 20  20 e7 20 73 69 7a 65 66  |1))...3  . sizef|
00001750  67 25 21 28 34 2a 28 6d  25 2d 31 29 29 20 8c f1  |g%!(4*(m%-1)) ..|
00001760  27 22 53 49 5a 45 20 3d  20 22 3b 3a e5 8d 74 62  |'"SIZE = ";:..tb|
00001770  43 8b 8d 74 6c 43 0d 03  8e 6d 20 20 6c 65 6e 25  |C..tlC...m  len%|
00001780  3f 28 70 6e 6f 2d 31 29  3d 28 6c 65 6e 25 3f 28  |?(pno-1)=(len%?(|
00001790  70 6e 6f 2d 31 29 29 2d  32 3a e7 6c 65 6e 25 3f  |pno-1))-2:.len%?|
000017a0  28 70 6e 6f 2d 31 29 3c  3e 32 35 35 8c ef 35 3a  |(pno-1)<>255..5:|
000017b0  ef 31 38 2c 30 2c 30 3a  ec 35 30 2c 39 37 30 2d  |.18,0,0:.50,970-|
000017c0  28 6c 6e 6f 2d 32 29 2a  33 32 3a f1 62 6c 61 6e  |(lno-2)*32:.blan|
000017d0  6b 24 3a ef 31 38 2c 30  2c 31 3a ef 34 3a 8b 8d  |k$:.18,0,1:.4:..|
000017e0  74 71 43 0d 03 93 3c 20  20 e7 20 a4 67 65 74 6f  |tqC...<  . .geto|
000017f0  70 63 6f 64 65 28 70 6e  6f 2c 6c 65 6e 25 3f 28  |pcode(pno,len%?(|
00001800  70 6e 6f 2d 31 29 2b 31  29 3d 33 8c 72 65 70 65  |pno-1)+1)=3.repe|
00001810  61 74 73 25 3d 72 65 70  65 61 74 73 25 2d 31 0d  |ats%=repeats%-1.|
00001820  03 98 3c 20 20 e7 20 a4  67 65 74 6f 70 63 6f 64  |..<  . .getopcod|
00001830  65 28 70 6e 6f 2c 6c 65  6e 25 3f 28 70 6e 6f 2d  |e(pno,len%?(pno-|
00001840  31 29 2b 31 29 3d 34 8c  72 65 70 65 61 74 73 25  |1)+1)=4.repeats%|
00001850  3d 72 65 70 65 61 74 73  25 2b 31 0d 03 9d 0c 20  |=repeats%+1.... |
00001860  20 e5 20 8d 74 71 43 0d  03 a2 0a 20 20 e8 20 6d  | . .tqC....  . m|
00001870  25 0d 03 a7 1d 20 20 f2  70 75 74 6f 70 65 72 61  |%....  .putopera|
00001880  6e 64 28 70 6e 6f 2c 6c  6e 6f 2c 6d 25 29 0d 03  |nd(pno,lno,m%)..|
00001890  ac 14 20 20 f2 6c 69 73  74 70 72 6f 67 28 70 6e  |..  .listprog(pn|
000018a0  6f 29 0d 03 b1 05 e1 0d  03 b6 14 dd 20 f2 6c 69  |o).......... .li|
000018b0  73 74 70 72 6f 67 6e 61  6d 65 73 0d 03 bb 0d 20  |stprognames.... |
000018c0  20 ea 20 69 25 2c 79 25  0d 03 c0 07 20 20 da 0d  | . i%,y%....  ..|
000018d0  03 c5 09 20 20 ef 20 35  0d 03 ca 1d 20 20 ec 20  |...  . 5....  . |
000018e0  31 30 2c 31 30 30 35 20  3a f1 22 4e 6f 3a 20 54  |10,1005 :."No: T|
000018f0  69 74 6c 65 22 0d 03 cf  1b 20 20 ec 20 30 2c 39  |itle"....  . 0,9|
00001900  36 35 20 3a f0 20 32 31  2c 36 33 39 2c 39 36 35  |65 :. 21,639,965|
00001910  0d 03 d4 0c 20 20 79 25  3d 39 32 30 0d 03 d9 15  |....  y%=920....|
00001920  20 20 e3 69 25 3d 31 b8  3f 6d 61 78 70 72 6f 67  |  .i%=1.?maxprog|
00001930  25 0d 03 de 1f 20 20 ec  20 31 30 2c 79 25 20 3a  |%....  . 10,y% :|
00001940  e7 20 69 25 3c 31 30 20  8c 20 f1 20 22 20 22 3b  |. i%<10 . . " ";|
00001950  0d 03 e3 10 20 20 f1 20  69 25 3b 22 20 20 22 3b  |....  . i%;"  ";|
00001960  0d 03 e8 57 20 20 e7 20  24 28 6e 61 6d 65 25 2b  |...W  . $(name%+|
00001970  31 36 2a 28 69 25 2d 31  29 29 3c 3e 22 6d 74 22  |16*(i%-1))<>"mt"|
00001980  8c f1 20 24 28 6e 61 6d  65 25 2b 31 36 2a 28 69  |.. $(name%+16*(i|
00001990  25 2d 31 29 29 3b 22 20  22 3b 3a e7 20 73 69 7a  |%-1));" ";:. siz|
000019a0  65 66 67 25 21 28 34 2a  28 69 25 2d 31 29 29 8c  |efg%!(4*(i%-1)).|
000019b0  f1 22 53 49 5a 45 22 0d  03 ed 0e 20 20 79 25 3d  |."SIZE"....  y%=|
000019c0  79 25 2d 34 35 0d 03 f2  0a 20 20 ed 20 69 25 0d  |y%-45....  . i%.|
000019d0  03 f7 09 20 20 ef 20 34  0d 03 fc 05 e1 0d 04 01  |...  . 4........|
000019e0  0e dd 20 f2 6e 65 77 70  72 6f 67 0d 04 06 1e 20  |.. .newprog.... |
000019f0  20 ea 20 6e 61 6d 65 24  2c 6c 65 6e 67 74 68 2c  | . name$,length,|
00001a00  69 25 2c 6e 24 2c 63 68  24 0d 04 0b 36 20 20 f1  |i%,n$,ch$...6  .|
00001a10  20 8a 30 2c 32 34 29 22  54 79 70 65 20 69 6e 20  | .0,24)"Type in |
00001a20  74 68 65 20 6e 61 6d 65  20 22 27 27 22 66 6f 72  |the name "''"for|
00001a30  20 79 6f 75 72 20 70 72  6f 67 72 61 6d 22 27 0d  | your program"'.|
00001a40  04 10 0e 20 20 6e 61 6d  65 24 3d 22 22 0d 04 15  |...  name$=""...|
00001a50  13 20 20 6e 61 6d 65 24  3d a4 69 6e 70 73 74 72  |.  name$=.inpstr|
00001a60  0d 04 1a 13 20 20 f2 6d  65 6e 75 28 65 6e 74 72  |....  .menu(entr|
00001a70  79 25 29 0d 04 1f 1d 20  20 f1 20 27 22 4b 20 2d  |y%)....  . '"K -|
00001a80  20 6b 69 6c 6c 20 6c 61  73 74 20 6c 69 6e 65 22  | kill last line"|
00001a90  0d 04 24 66 20 20 e7 20  c2 6e 61 6d 65 24 2c 34  |..$f  . .name$,4|
00001aa0  29 3d 22 53 49 5a 45 22  20 8c 20 73 69 7a 65 66  |)="SIZE" . sizef|
00001ab0  67 25 21 28 34 2a 28 70  72 6f 67 6e 6f 2d 31 29  |g%!(4*(progno-1)|
00001ac0  29 3d b9 3a 6e 61 6d 65  24 3d c0 6e 61 6d 65 24  |)=.:name$=.name$|
00001ad0  2c a9 28 6e 61 6d 65 24  29 2d 34 29 8b 20 73 69  |,.(name$)-4). si|
00001ae0  7a 65 66 67 25 21 28 34  2a 28 70 72 6f 67 6e 6f  |zefg%!(4*(progno|
00001af0  2d 31 29 29 3d a3 0d 04  29 22 20 20 24 28 6e 61  |-1))=...)"  $(na|
00001b00  6d 65 25 2b 31 36 2a 28  70 72 6f 67 6e 6f 2d 31  |me%+16*(progno-1|
00001b10  29 29 3d 6e 61 6d 65 24  0d 04 2e 3f 20 20 f2 70  |))=name$...?  .p|
00001b20  72 6f 67 6c 69 6e 65 73  28 24 28 6e 61 6d 65 25  |roglines($(name%|
00001b30  2b 31 36 2a 28 70 72 6f  67 6e 6f 2d 31 29 29 2c  |+16*(progno-1)),|
00001b40  73 69 7a 65 66 67 25 21  28 34 2a 28 70 72 6f 67  |sizefg%!(4*(prog|
00001b50  6e 6f 2d 31 29 29 29 0d  04 33 15 20 20 6c 65 6e  |no-1)))..3.  len|
00001b60  67 74 68 3d 30 20 20 20  20 20 20 20 0d 04 38 12  |gth=0       ..8.|
00001b70  20 20 72 65 70 65 61 74  73 25 3d 30 20 20 0d 04  |  repeats%=0  ..|
00001b80  3d 0e 20 20 f5 20 20 20  20 20 20 20 0d 04 42 1a  |=.  .       ..B.|
00001b90  20 20 6c 65 6e 67 74 68  3d 6c 65 6e 67 74 68 2b  |  length=length+|
00001ba0  31 20 20 20 20 20 0d 04  47 1c 20 20 6c 65 6e 25  |1     ..G.  len%|
00001bb0  3f 28 70 72 6f 67 6e 6f  2d 31 29 3d 6c 65 6e 67  |?(progno-1)=leng|
00001bc0  74 68 0d 04 4c 1f 20 20  f2 69 6e 70 75 74 6c 69  |th..L.  .inputli|
00001bd0  6e 65 28 70 72 6f 67 6e  6f 2c 6c 65 6e 67 74 68  |ne(progno,length|
00001be0  29 0d 04 51 1c 20 20 6c  65 6e 67 74 68 3d 6c 65  |)..Q.  length=le|
00001bf0  6e 25 3f 28 70 72 6f 67  6e 6f 2d 31 29 0d 04 56  |n%?(progno-1)..V|
00001c00  1b 20 20 e7 20 6c 65 6e  67 74 68 3d 32 35 35 8c  |.  . length=255.|
00001c10  6c 65 6e 67 74 68 3d 30  0d 04 5b 1b 20 20 fd 20  |length=0..[.  . |
00001c20  66 69 6e 69 73 68 25 20  84 20 6c 65 6e 67 74 68  |finish% . length|
00001c30  3d 33 30 0d 04 60 05 e1  0d 04 65 0b dd 20 f2 62  |=30..`....e.. .b|
00001c40  65 65 70 0d 04 6a 0a 20  20 ea 20 69 25 0d 04 6f  |eep..j.  . i%..o|
00001c50  10 20 20 e3 20 69 25 3d  31 20 b8 20 33 0d 04 74  |.  . i%=1 . 3..t|
00001c60  31 20 20 d4 20 31 2c 2d  31 35 2c 31 35 30 2c 34  |1  . 1,-15,150,4|
00001c70  20 3a d4 20 32 2c 2d 31  35 2c 31 32 30 2c 34 20  | :. 2,-15,120,4 |
00001c80  3a d4 20 33 2c 2d 31 35  2c 31 30 30 2c 34 0d 04  |:. 3,-15,100,4..|
00001c90  79 30 20 20 d4 20 31 2c  2d 31 35 2c 37 35 2c 34  |y0  . 1,-15,75,4|
00001ca0  20 20 3a d4 20 32 2c 2d  31 35 2c 36 30 2c 34 20  |  :. 2,-15,60,4 |
00001cb0  20 3a d4 20 33 2c 2d 31  35 2c 35 30 2c 34 0d 04  | :. 3,-15,50,4..|
00001cc0  7e 0a 20 20 ed 20 69 25  0d 04 83 05 e1 0d 04 88  |~.  . i%........|
00001cd0  14 dd 20 f2 65 64 69 74  28 6e 75 6d 62 65 72 25  |.. .edit(number%|
00001ce0  29 0d 04 8d 1a 20 20 ea  20 69 25 2c 69 6e 70 75  |)....  . i%,inpu|
00001cf0  74 25 2c 70 6f 69 6e 74  65 72 25 0d 04 92 1e 20  |t%,pointer%.... |
00001d00  20 db 3a 65 64 69 74 66  6c 61 67 25 3d b9 3a 72  | .:editflag%=.:r|
00001d10  65 70 66 6c 61 67 25 3d  a3 0d 04 97 30 20 20 70  |epflag%=....0  p|
00001d20  72 6f 67 66 6c 61 67 25  3d b9 3a f2 6c 69 73 74  |rogflag%=.:.list|
00001d30  70 72 6f 67 28 6e 75 6d  62 65 72 25 29 3a 70 72  |prog(number%):pr|
00001d40  6f 67 66 6c 61 67 25 3d  a3 0d 04 9c 12 20 20 f2  |ogflag%=.....  .|
00001d50  6d 65 6e 75 28 65 64 69  74 25 29 0d 04 a1 25 20  |menu(edit%)...% |
00001d60  20 ef 20 35 20 3a ec 20  35 36 30 2c 31 30 31 33  | . 5 :. 560,1013|
00001d70  20 3a f1 20 62 6c 61 6e  6b 32 24 20 3a ef 20 34  | :. blank2$ :. 4|
00001d80  0d 04 a6 1f 20 20 e7 20  ac 20 65 72 72 6f 72 66  |....  . . errorf|
00001d90  6c 61 67 25 20 f2 63 6c  65 61 72 28 32 30 29 0d  |lag% .clear(20).|
00001da0  04 ab 12 20 20 65 72 72  6f 72 66 6c 61 67 25 3d  |...  errorflag%=|
00001db0  a3 0d 04 b0 1d 20 20 69  6e 70 75 74 25 3d a4 67  |.....  input%=.g|
00001dc0  65 74 63 6f 64 65 28 22  49 44 43 46 22 29 0d 04  |etcode("IDCF")..|
00001dd0  b5 10 20 20 f2 63 6c 65  61 72 28 32 30 29 0d 04  |..  .clear(20)..|
00001de0  ba 24 20 20 ee 20 69 6e  70 75 74 25 20 e5 20 8d  |.$  . input% . .|
00001df0  74 7f 44 2c 8d 54 4f 45  2c 8d 44 50 45 2c 8d 74  |t.D,.TOE,.DPE,.t|
00001e00  42 45 0d 04 bf 09 20 20  f4 20 41 0d 04 c4 48 20  |BE....  . A...H |
00001e10  20 e7 20 6c 65 6e 25 3f  28 6e 75 6d 62 65 72 25  | . len%?(number%|
00001e20  2d 31 29 3e 3d 33 30 8c  f1 8a 30 2c 32 32 29 22  |-1)>=30...0,22)"|
00001e30  4e 6f 20 72 6f 6f 6d 20  2d 20 22 27 27 22 64 65  |No room - "''"de|
00001e40  6c 65 74 65 20 61 20 6c  69 6e 65 21 22 3a e5 8d  |lete a line!":..|
00001e50  74 70 44 0d 04 c9 4c 20  20 f1 20 8a 30 2c 32 32  |tpD...L  . .0,22|
00001e60  29 3b 22 54 79 70 65 20  69 6e 20 74 68 65 20 6e  |);"Type in the n|
00001e70  75 6d 62 65 72 22 27 22  6f 66 20 74 68 65 20 6c  |umber"'"of the l|
00001e80  69 6e 65 20 74 68 61 74  22 27 27 22 79 6f 75 20  |ine that"''"you |
00001e90  77 69 73 68 20 74 6f 20  69 6e 73 65 72 74 22 0d  |wish to insert".|
00001ea0  04 ce 0d 20 20 e8 20 6c  69 6e 65 25 0d 04 d3 10  |...  . line%....|
00001eb0  20 20 f2 63 6c 65 61 72  28 32 32 29 0d 04 d8 7b  |  .clear(22)...{|
00001ec0  20 20 e7 20 6c 69 6e 65  25 3c 31 20 84 20 6c 69  |  . line%<1 . li|
00001ed0  6e 65 25 3e 35 37 20 84  20 28 6c 69 6e 65 25 81  |ne%>57 . (line%.|
00001ee0  32 2a 32 29 3d 6c 69 6e  65 25 20 8c 20 f1 20 8a  |2*2)=line% . . .|
00001ef0  30 2c 32 32 29 3b 22 54  68 65 20 6e 75 6d 62 65  |0,22);"The numbe|
00001f00  72 20 6d 75 73 74 20 62  65 22 27 22 61 6e 20 4f  |r must be"'"an O|
00001f10  44 44 20 6e 75 6d 62 65  72 20 20 20 20 22 27 27  |DD number    "''|
00001f20  22 66 72 6f 6d 20 31 20  74 6f 20 35 37 22 3b 3a  |"from 1 to 57";:|
00001f30  e5 8d 64 4e 44 20 20 0d  04 dd 1c 20 20 70 6f 69  |..dND  ....  poi|
00001f40  6e 74 65 72 25 3d 28 6c  69 6e 65 25 2b 31 29 20  |nter%=(line%+1) |
00001f50  81 20 32 0d 04 e2 23 20  20 ef 20 35 20 3a ec 20  |. 2...#  . 5 :. |
00001f60  35 36 30 2c 31 30 31 33  20 3a f1 20 6c 69 6e 65  |560,1013 :. line|
00001f70  25 20 3a ef 20 34 0d 04  e7 1d 20 20 e3 20 69 25  |% :. 4....  . i%|
00001f80  3d 33 30 20 b8 20 70 6f  69 6e 74 65 72 25 20 88  |=30 . pointer% .|
00001f90  20 2d 31 0d 04 ec 37 20  20 f2 70 75 74 6f 70 65  | -1...7  .putope|
00001fa0  72 61 6e 64 28 6e 75 6d  62 65 72 25 2c 69 25 2c  |rand(number%,i%,|
00001fb0  a4 67 65 74 6f 70 65 72  61 6e 64 28 6e 75 6d 62  |.getoperand(numb|
00001fc0  65 72 25 2c 69 25 2d 31  29 29 0d 04 f1 35 20 20  |er%,i%-1))...5  |
00001fd0  f2 70 75 74 6f 70 63 6f  64 65 28 6e 75 6d 62 65  |.putopcode(numbe|
00001fe0  72 25 2c 69 25 2c a4 67  65 74 6f 70 63 6f 64 65  |r%,i%,.getopcode|
00001ff0  28 6e 75 6d 62 65 72 25  2c 69 25 2d 31 29 29 0d  |(number%,i%-1)).|
00002000  04 f6 0a 20 20 ed 20 69  25 0d 04 fb 29 20 20 6c  |...  . i%...)  l|
00002010  65 6e 25 3f 28 6e 75 6d  62 65 72 25 2d 31 29 3d  |en%?(number%-1)=|
00002020  6c 65 6e 25 3f 28 6e 75  6d 62 65 72 25 2d 31 29  |len%?(number%-1)|
00002030  2b 31 0d 05 00 13 20 20  f2 6d 65 6e 75 28 65 6e  |+1....  .menu(en|
00002040  74 72 79 25 29 0d 05 05  22 20 20 f2 69 6e 70 75  |try%)..."  .inpu|
00002050  74 6c 69 6e 65 28 6e 75  6d 62 65 72 25 2c 70 6f  |tline(number%,po|
00002060  69 6e 74 65 72 25 29 0d  05 0a 0c 20 20 e5 20 8d  |inter%)....  . .|
00002070  74 5c 44 0d 05 0f 09 20  20 f4 20 44 0d 05 14 4c  |t\D....  . D...L|
00002080  20 20 f1 20 8a 30 2c 32  32 29 3b 22 54 79 70 65  |  . .0,22);"Type|
00002090  20 69 6e 20 74 68 65 20  6e 75 6d 62 65 72 22 27  | in the number"'|
000020a0  22 6f 66 20 74 68 65 20  6c 69 6e 65 20 74 68 61  |"of the line tha|
000020b0  74 22 27 27 22 79 6f 75  20 77 69 73 68 20 74 6f  |t"''"you wish to|
000020c0  20 64 65 6c 65 74 65 22  0d 05 19 0d 20 20 e8 20  | delete"....  . |
000020d0  6c 69 6e 65 25 0d 05 1e  10 20 20 f2 63 6c 65 61  |line%....  .clea|
000020e0  72 28 32 32 29 0d 05 23  84 20 20 e7 20 6c 69 6e  |r(22)..#.  . lin|
000020f0  65 25 3c 32 20 84 20 6c  69 6e 65 25 81 32 3e 6c  |e%<2 . line%.2>l|
00002100  65 6e 25 3f 28 6e 75 6d  62 65 72 25 2d 31 29 20  |en%?(number%-1) |
00002110  84 20 28 6c 69 6e 65 25  81 32 2a 32 29 3c 3e 6c  |. (line%.2*2)<>l|
00002120  69 6e 65 25 20 8c f1 8a  30 2c 32 32 29 22 53 69  |ine% ...0,22)"Si|
00002130  6c 6c 79 21 20 20 54 68  65 72 65 20 69 73 22 27  |lly!  There is"'|
00002140  27 22 20 20 6e 6f 20 73  75 63 68 20 6c 69 6e 65  |'"  no such line|
00002150  21 22 27 27 22 20 20 20  54 72 79 20 61 67 61 69  |!"''"   Try agai|
00002160  6e 22 3b 3a e5 8d 54 59  45 0d 05 28 18 20 20 70  |n";:..TYE..(.  p|
00002170  6f 69 6e 74 65 72 25 3d  6c 69 6e 65 25 20 81 20  |ointer%=line% . |
00002180  32 0d 05 2d 25 20 20 e3  69 25 3d 70 6f 69 6e 74  |2..-%  .i%=point|
00002190  65 72 25 b8 6c 65 6e 25  3f 28 6e 75 6d 62 65 72  |er%.len%?(number|
000021a0  25 2d 31 29 2d 31 0d 05  32 37 20 20 f2 70 75 74  |%-1)-1..27  .put|
000021b0  6f 70 65 72 61 6e 64 28  6e 75 6d 62 65 72 25 2c  |operand(number%,|
000021c0  69 25 2c a4 67 65 74 6f  70 65 72 61 6e 64 28 6e  |i%,.getoperand(n|
000021d0  75 6d 62 65 72 25 2c 69  25 2b 31 29 29 0d 05 37  |umber%,i%+1))..7|
000021e0  35 20 20 f2 70 75 74 6f  70 63 6f 64 65 28 6e 75  |5  .putopcode(nu|
000021f0  6d 62 65 72 25 2c 69 25  2c a4 67 65 74 6f 70 63  |mber%,i%,.getopc|
00002200  6f 64 65 28 6e 75 6d 62  65 72 25 2c 69 25 2b 31  |ode(number%,i%+1|
00002210  29 29 0d 05 3c 0a 20 20  ed 20 69 25 0d 05 41 29  |))..<.  . i%..A)|
00002220  20 20 6c 65 6e 25 3f 28  6e 75 6d 62 65 72 25 2d  |  len%?(number%-|
00002230  31 29 3d 6c 65 6e 25 3f  28 6e 75 6d 62 65 72 25  |1)=len%?(number%|
00002240  2d 31 29 2d 31 0d 05 46  18 20 20 f2 6c 69 73 74  |-1)-1..F.  .list|
00002250  70 72 6f 67 28 6e 75 6d  62 65 72 25 29 0d 05 4b  |prog(number%)..K|
00002260  0c 20 20 e5 20 8d 74 70  44 0d 05 50 09 20 20 f4  |.  . .tpD..P.  .|
00002270  20 43 0d 05 55 4c 20 20  f1 20 8a 30 2c 32 32 29  | C..UL  . .0,22)|
00002280  3b 22 54 79 70 65 20 69  6e 20 74 68 65 20 6e 75  |;"Type in the nu|
00002290  6d 62 65 72 22 27 22 6f  66 20 74 68 65 20 6c 69  |mber"'"of the li|
000022a0  6e 65 20 74 68 61 74 22  27 27 22 79 6f 75 20 77  |ne that"''"you w|
000022b0  69 73 68 20 74 6f 20 63  68 61 6e 67 65 22 0d 05  |ish to change"..|
000022c0  5a 0d 20 20 e8 20 6c 69  6e 65 25 0d 05 5f 10 20  |Z.  . line%.._. |
000022d0  20 f2 63 6c 65 61 72 28  32 32 29 0d 05 64 84 20  | .clear(22)..d. |
000022e0  20 e7 20 6c 69 6e 65 25  3c 32 20 84 20 6c 69 6e  | . line%<2 . lin|
000022f0  65 25 81 32 3e 6c 65 6e  25 3f 28 6e 75 6d 62 65  |e%.2>len%?(numbe|
00002300  72 25 2d 31 29 20 84 20  28 6c 69 6e 65 25 81 32  |r%-1) . (line%.2|
00002310  2a 32 29 3c 3e 6c 69 6e  65 25 20 8c f1 8a 30 2c  |*2)<>line% ...0,|
00002320  32 32 29 22 53 69 6c 6c  79 21 20 20 54 68 65 72  |22)"Silly!  Ther|
00002330  65 20 69 73 22 27 27 22  20 20 6e 6f 20 73 75 63  |e is"''"  no suc|
00002340  68 20 6c 69 6e 65 21 22  27 27 22 20 20 20 54 72  |h line!"''"   Tr|
00002350  79 20 61 67 61 69 6e 22  3b 3a e5 8d 44 5a 45 0d  |y again";:..DZE.|
00002360  05 69 18 20 20 70 6f 69  6e 74 65 72 25 3d 6c 69  |.i.  pointer%=li|
00002370  6e 65 25 20 81 20 32 0d  05 6e 2b 20 20 ef 20 35  |ne% . 2..n+  . 5|
00002380  20 3a ec 20 35 36 30 2c  31 30 31 33 20 3a f1 20  | :. 560,1013 :. |
00002390  62 6c 61 6e 6b 32 24 3b  6c 69 6e 65 25 20 3a ef  |blank2$;line% :.|
000023a0  20 34 0d 05 73 13 20 20  f2 6d 65 6e 75 28 65 6e  | 4..s.  .menu(en|
000023b0  74 72 79 25 29 0d 05 78  22 20 20 f2 69 6e 70 75  |try%)..x"  .inpu|
000023c0  74 6c 69 6e 65 28 6e 75  6d 62 65 72 25 2c 70 6f  |tline(number%,po|
000023d0  69 6e 74 65 72 25 29 0d  05 7d 0c 20 20 e5 20 8d  |inter%)..}.  . .|
000023e0  74 5c 44 0d 05 82 09 20  20 f4 20 46 0d 05 87 11  |t\D....  . F....|
000023f0  20 20 65 64 69 74 66 6c  61 67 25 3d a3 0d 05 8c  |  editflag%=....|
00002400  05 e1 0d 05 91 13 dd 20  f2 72 75 6e 28 6e 75 6d  |....... .run(num|
00002410  62 65 72 25 29 0d 05 96  5d 20 20 ea 20 61 6e 67  |ber%)...]  . ang|
00002420  6c 65 25 2c 72 65 70 70  74 72 25 2c 70 72 6f 67  |le%,repptr%,prog|
00002430  70 74 72 25 2c 63 75 72  70 72 6f 67 25 2c 63 75  |ptr%,curprog%,cu|
00002440  72 6c 69 6e 65 25 2c 6f  70 63 6f 64 65 25 2c 6f  |rline%,opcode%,o|
00002450  70 65 72 61 6e 64 25 2c  73 69 7a 65 25 2c 69 6e  |perand%,size%,in|
00002460  6b 25 2c 69 25 2c 6e 25  2c 78 25 2c 79 25 2c 78  |k%,i%,n%,x%,y%,x|
00002470  2c 79 0d 05 9b 0a 20 20  f2 6f 66 66 0d 05 a0 22  |,y....  .off..."|
00002480  20 20 ef 20 32 36 20 3a  da 20 3a 78 3d 36 34 30  |  . 26 :. :x=640|
00002490  20 3a 79 3d 35 31 32 20  3a ec 20 78 2c 79 0d 05  | :y=512 :. x,y..|
000024a0  a5 4e 20 20 72 65 70 70  74 72 25 3d 30 3a 70 72  |.N  repptr%=0:pr|
000024b0  6f 67 70 74 72 25 3d 30  3a 63 75 72 6c 69 6e 65  |ogptr%=0:curline|
000024c0  25 3d 31 3a 63 75 72 70  72 6f 67 25 3d 6e 75 6d  |%=1:curprog%=num|
000024d0  62 65 72 25 3a 69 6e 6b  25 3d 35 3a 61 6e 67 6c  |ber%:ink%=5:angl|
000024e0  65 25 3d 30 3a 73 69 7a  65 25 3d 30 0d 05 aa 54  |e%=0:size%=0...T|
000024f0  20 20 6f 70 63 6f 64 65  25 3d a4 67 65 74 6f 70  |  opcode%=.getop|
00002500  63 6f 64 65 28 63 75 72  70 72 6f 67 25 2c 63 75  |code(curprog%,cu|
00002510  72 6c 69 6e 65 25 29 20  3a 6f 70 65 72 61 6e 64  |rline%) :operand|
00002520  25 3d a4 67 65 74 6f 70  65 72 61 6e 64 28 63 75  |%=.getoperand(cu|
00002530  72 70 72 6f 67 25 2c 63  75 72 6c 69 6e 65 25 29  |rprog%,curline%)|
00002540  0d 05 af 23 20 20 e7 20  6f 70 65 72 61 6e 64 25  |...#  . operand%|
00002550  3d 30 20 8c 20 6f 70 65  72 61 6e 64 25 3d 73 69  |=0 . operand%=si|
00002560  7a 65 25 0d 05 b4 26 20  20 e7 20 6f 70 63 6f 64  |ze%...&  . opcod|
00002570  65 25 3e 31 30 20 8c 20  6e 25 3d 38 20 8b 20 6e  |e%>10 . n%=8 . n|
00002580  25 3d 6f 70 63 6f 64 65  25 0d 05 b9 36 20 20 ee  |%=opcode%...6  .|
00002590  6e 25 e5 8d 74 7e 45 2c  8d 64 7f 45 2c 8d 54 5d  |n%..t~E,.d.E,.T]|
000025a0  46 2c 8d 44 40 46 2c 8d  44 59 46 2c 8d 44 6d 46  |F,.D@F,.DYF,.DmF|
000025b0  2c 8d 74 41 46 2c 8d 74  5f 46 2c 8d 44 7d 46 0d  |,.tAF,.t_F,.D}F.|
000025c0  05 be 09 20 20 f4 20 4d  0d 05 c3 0f 20 20 6d 6f  |...  . M....  mo|
000025d0  76 65 3d 35 32 30 30 0d  05 c8 27 20 20 e7 20 61  |ve=5200...'  . a|
000025e0  6e 67 6c 65 25 3d 30 20  8c 20 78 3d 78 2b 6f 70  |ngle%=0 . x=x+op|
000025f0  65 72 61 6e 64 25 20 3a  e5 20 8d 64 70 45 0d 05  |erand% :. .dpE..|
00002600  cd 50 20 20 e7 20 61 6e  67 6c 65 25 3c 39 30 20  |.P  . angle%<90 |
00002610  8c 20 78 3d 78 2b 6f 70  65 72 61 6e 64 25 2a 9b  |. x=x+operand%*.|
00002620  28 b2 28 61 6e 67 6c 65  25 29 29 20 3a 79 3d 79  |(.(angle%)) :y=y|
00002630  2b 6f 70 65 72 61 6e 64  25 2a b5 28 b2 28 61 6e  |+operand%*.(.(an|
00002640  67 6c 65 25 29 29 20 3a  e5 20 8d 64 70 45 0d 05  |gle%)) :. .dpE..|
00002650  d2 28 20 20 e7 20 61 6e  67 6c 65 25 3d 39 30 20  |.(  . angle%=90 |
00002660  8c 20 79 3d 79 2b 6f 70  65 72 61 6e 64 25 20 3a  |. y=y+operand% :|
00002670  e5 20 8d 64 70 45 0d 05  d7 59 20 20 e7 20 61 6e  |. .dpE...Y  . an|
00002680  67 6c 65 25 3c 31 38 30  20 8c 20 78 3d 78 2d 6f  |gle%<180 . x=x-o|
00002690  70 65 72 61 6e 64 25 2a  9b 28 b2 28 31 38 30 2d  |perand%*.(.(180-|
000026a0  61 6e 67 6c 65 25 29 29  20 3a 79 3d 79 2b 6f 70  |angle%)) :y=y+op|
000026b0  65 72 61 6e 64 25 2a b5  28 b2 28 31 38 30 2d 61  |erand%*.(.(180-a|
000026c0  6e 67 6c 65 25 29 29 20  3a e5 20 8d 64 70 45 0d  |ngle%)) :. .dpE.|
000026d0  05 dc 29 20 20 e7 20 61  6e 67 6c 65 25 3d 31 38  |..)  . angle%=18|
000026e0  30 20 8c 20 78 3d 78 2d  6f 70 65 72 61 6e 64 25  |0 . x=x-operand%|
000026f0  20 3a e5 20 8d 64 70 45  0d 05 e1 59 20 20 e7 20  | :. .dpE...Y  . |
00002700  61 6e 67 6c 65 25 3c 32  37 30 20 8c 20 78 3d 78  |angle%<270 . x=x|
00002710  2d 6f 70 65 72 61 6e 64  25 2a 9b 28 b2 28 61 6e  |-operand%*.(.(an|
00002720  67 6c 65 25 2d 31 38 30  29 29 20 3a 79 3d 79 2d  |gle%-180)) :y=y-|
00002730  6f 70 65 72 61 6e 64 25  2a b5 28 b2 28 61 6e 67  |operand%*.(.(ang|
00002740  6c 65 25 2d 31 38 30 29  29 20 3a e5 20 8d 64 70  |le%-180)) :. .dp|
00002750  45 0d 05 e6 29 20 20 e7  20 61 6e 67 6c 65 25 3d  |E...)  . angle%=|
00002760  32 37 30 20 8c 20 79 3d  79 2d 6f 70 65 72 61 6e  |270 . y=y-operan|
00002770  64 25 20 3a e5 20 8d 64  70 45 0d 05 eb 51 20 20  |d% :. .dpE...Q  |
00002780  e7 20 61 6e 67 6c 65 25  3c 33 36 30 20 8c 20 78  |. angle%<360 . x|
00002790  3d 78 2b 6f 70 65 72 61  6e 64 25 2a 9b 28 b2 28  |=x+operand%*.(.(|
000027a0  33 36 30 2d 61 6e 67 6c  65 25 29 29 20 3a 79 3d  |360-angle%)) :y=|
000027b0  79 2d 6f 70 65 72 61 6e  64 25 2a b5 28 b2 28 33  |y-operand%*.(.(3|
000027c0  36 30 2d 61 6e 67 6c 65  25 29 29 0d 05 f0 24 20  |60-angle%))...$ |
000027d0  20 78 25 3d 78 2b 2e 35  20 3a 79 25 3d 79 2b 2e  | x%=x+.5 :y%=y+.|
000027e0  35 20 3a f0 20 69 6e 6b  25 2c 78 25 2c 79 25 0d  |5 :. ink%,x%,y%.|
000027f0  05 f5 19 20 20 63 75 72  6c 69 6e 65 25 3d 63 75  |...  curline%=cu|
00002800  72 6c 69 6e 65 25 2b 31  0d 05 fa 0c 20 20 e5 20  |rline%+1....  . |
00002810  8d 74 6a 45 0d 05 ff 09  20 20 f4 20 54 0d 06 04  |.tjE....  . T...|
00002820  1c 20 20 61 6e 67 6c 65  25 3d 61 6e 67 6c 65 25  |.  angle%=angle%|
00002830  2b 6f 70 65 72 61 6e 64  25 0d 06 09 19 20 20 61  |+operand%....  a|
00002840  6e 67 6c 65 25 3d 61 6e  67 6c 65 25 20 83 20 33  |ngle%=angle% . 3|
00002850  36 30 0d 06 0e 24 20 20  e7 20 61 6e 67 6c 65 25  |60...$  . angle%|
00002860  3c 30 20 8c 20 61 6e 67  6c 65 25 3d 61 6e 67 6c  |<0 . angle%=angl|
00002870  65 25 2b 33 36 30 0d 06  13 19 20 20 63 75 72 6c  |e%+360....  curl|
00002880  69 6e 65 25 3d 63 75 72  6c 69 6e 65 25 2b 31 0d  |ine%=curline%+1.|
00002890  06 18 0c 20 20 e5 20 8d  74 6a 45 0d 06 1d 09 20  |...  . .tjE.... |
000028a0  20 f4 20 52 0d 06 22 6e  20 20 e7 72 65 70 70 74  | . R.."n  .reppt|
000028b0  72 25 3d 31 32 8c f2 62  65 65 70 3a f1 8a 30 2c  |r%=12..beep:..0,|
000028c0  32 34 29 3b 22 45 52 52  4f 52 21 21 21 22 27 27  |24);"ERROR!!!"''|
000028d0  22 69 6e 20 50 72 6f 67  72 61 6d 20 22 3b 24 28  |"in Program ";$(|
000028e0  6e 61 6d 65 25 2b 31 36  2a 28 63 75 72 70 72 6f  |name%+16*(curpro|
000028f0  67 25 2d 31 29 29 3b 27  27 22 54 6f 6f 20 6d 61  |g%-1));''"Too ma|
00002900  6e 79 20 52 45 50 45 41  54 27 73 22 3a e5 8d 64  |ny REPEAT's":..d|
00002910  51 46 0d 06 27 17 20 20  72 65 70 70 74 72 25 3d  |QF..'.  repptr%=|
00002920  72 65 70 70 74 72 25 2b  31 0d 06 2c 23 20 20 72  |repptr%+1..,#  r|
00002930  65 70 73 74 61 63 6b 25  28 72 65 70 70 74 72 25  |epstack%(repptr%|
00002940  2c 32 29 3d 6f 70 65 72  61 6e 64 25 0d 06 31 19  |,2)=operand%..1.|
00002950  20 20 63 75 72 6c 69 6e  65 25 3d 63 75 72 6c 69  |  curline%=curli|
00002960  6e 65 25 2b 31 0d 06 36  23 20 20 72 65 70 73 74  |ne%+1..6#  repst|
00002970  61 63 6b 25 28 72 65 70  70 74 72 25 2c 31 29 3d  |ack%(repptr%,1)=|
00002980  63 75 72 6c 69 6e 65 25  0d 06 3b 0c 20 20 e5 20  |curline%..;.  . |
00002990  8d 74 6a 45 0d 06 40 09  20 20 f4 20 45 0d 06 45  |.tjE..@.  . E..E|
000029a0  64 20 20 e7 72 65 70 73  74 61 63 6b 25 28 72 65  |d  .repstack%(re|
000029b0  70 70 74 72 25 2c 31 29  3d 30 8c f2 62 65 65 70  |pptr%,1)=0..beep|
000029c0  3a f1 8a 30 2c 32 34 29  3b 22 45 52 52 4f 52 21  |:..0,24);"ERROR!|
000029d0  21 21 22 27 27 22 69 6e  20 50 72 6f 67 72 61 6d  |!!"''"in Program|
000029e0  20 22 3b 24 28 6e 61 6d  65 25 2b 31 36 2a 28 63  | ";$(name%+16*(c|
000029f0  75 72 70 72 6f 67 25 2d  31 29 29 3a e5 8d 64 51  |urprog%-1)):..dQ|
00002a00  46 0d 06 4a 31 20 20 72  65 70 73 74 61 63 6b 25  |F..J1  repstack%|
00002a10  28 72 65 70 70 74 72 25  2c 32 29 3d 72 65 70 73  |(repptr%,2)=reps|
00002a20  74 61 63 6b 25 28 72 65  70 70 74 72 25 2c 32 29  |tack%(repptr%,2)|
00002a30  2d 31 0d 06 4f 67 20 20  e7 20 72 65 70 73 74 61  |-1..Og  . repsta|
00002a40  63 6b 25 28 72 65 70 70  74 72 25 2c 32 29 3c 31  |ck%(repptr%,2)<1|
00002a50  20 8c 20 63 75 72 6c 69  6e 65 25 3d 63 75 72 6c  | . curline%=curl|
00002a60  69 6e 65 25 2b 31 20 3a  72 65 70 70 74 72 25 3d  |ine%+1 :repptr%=|
00002a70  72 65 70 70 74 72 25 2d  31 20 8b 20 63 75 72 6c  |repptr%-1 . curl|
00002a80  69 6e 65 25 3d 72 65 70  73 74 61 63 6b 25 28 72  |ine%=repstack%(r|
00002a90  65 70 70 74 72 25 2c 31  29 0d 06 54 0c 20 20 e5  |epptr%,1)..T.  .|
00002aa0  20 8d 74 6a 45 0d 06 59  09 20 20 f4 20 55 0d 06  | .tjE..Y.  . U..|
00002ab0  5e 0c 20 20 69 6e 6b 25  3d 34 0d 06 63 19 20 20  |^.  ink%=4..c.  |
00002ac0  63 75 72 6c 69 6e 65 25  3d 63 75 72 6c 69 6e 65  |curline%=curline|
00002ad0  25 2b 31 0d 06 68 0c 20  20 e5 20 8d 74 6a 45 0d  |%+1..h.  . .tjE.|
00002ae0  06 6d 09 20 20 f4 20 44  0d 06 72 0c 20 20 69 6e  |.m.  . D..r.  in|
00002af0  6b 25 3d 35 0d 06 77 19  20 20 63 75 72 6c 69 6e  |k%=5..w.  curlin|
00002b00  65 25 3d 63 75 72 6c 69  6e 65 25 2b 31 0d 06 7c  |e%=curline%+1..||
00002b10  0c 20 20 e5 20 8d 74 6a  45 0d 06 7d 09 20 20 f4  |.  . .tjE..}.  .|
00002b20  20 48 0d 06 7e 1f 20 20  78 3d 36 34 30 3a 79 3d  | H..~.  x=640:y=|
00002b30  35 31 32 3a ec 78 2c 79  3a 61 6e 67 6c 65 25 3d  |512:.x,y:angle%=|
00002b40  30 0d 06 7f 1f 20 20 63  75 72 6c 69 6e 65 25 3d  |0....  curline%=|
00002b50  63 75 72 6c 69 6e 65 25  2b 31 3a e5 8d 74 6a 45  |curline%+1:..tjE|
00002b60  0d 06 81 09 20 20 f4 20  46 0d 06 86 29 20 20 e7  |....  . F...)  .|
00002b70  20 70 72 6f 67 73 74 61  63 6b 25 28 70 72 6f 67  | progstack%(prog|
00002b80  70 74 72 25 2c 31 29 3d  30 20 8c 20 e5 20 8d 64  |ptr%,1)=0 . . .d|
00002b90  51 46 0d 06 8b 25 20 20  63 75 72 70 72 6f 67 25  |QF...%  curprog%|
00002ba0  3d 70 72 6f 67 73 74 61  63 6b 25 28 70 72 6f 67  |=progstack%(prog|
00002bb0  70 74 72 25 2c 31 29 0d  06 90 25 20 20 63 75 72  |ptr%,1)...%  cur|
00002bc0  6c 69 6e 65 25 3d 70 72  6f 67 73 74 61 63 6b 25  |line%=progstack%|
00002bd0  28 70 72 6f 67 70 74 72  25 2c 32 29 0d 06 95 19  |(progptr%,2)....|
00002be0  20 20 70 72 6f 67 70 74  72 25 3d 70 72 6f 67 70  |  progptr%=progp|
00002bf0  74 72 25 2d 31 0d 06 9a  0c 20 20 e5 20 8d 74 6a  |tr%-1....  . .tj|
00002c00  45 0d 06 9f 09 20 20 f4  20 50 0d 06 a4 18 20 20  |E....  . P....  |
00002c10  6f 70 63 6f 64 65 25 3d  6f 70 63 6f 64 65 25 2d  |opcode%=opcode%-|
00002c20  31 30 0d 06 a9 70 20 20  e7 70 72 6f 67 70 74 72  |10...p  .progptr|
00002c30  25 3d 37 8c f2 62 65 65  70 3a f1 8a 30 2c 32 34  |%=7..beep:..0,24|
00002c40  29 3b 22 45 52 52 4f 52  21 21 21 22 27 27 22 69  |);"ERROR!!!"''"i|
00002c50  6e 20 50 72 6f 67 72 61  6d 20 22 3b 24 28 6e 61  |n Program ";$(na|
00002c60  6d 65 25 2b 31 36 2a 28  63 75 72 70 72 6f 67 25  |me%+16*(curprog%|
00002c70  2d 31 29 29 3b 27 27 22  54 6f 6f 20 6d 61 6e 79  |-1));''"Too many|
00002c80  20 50 52 4f 47 20 63 61  6c 6c 73 22 3a e5 8d 64  | PROG calls":..d|
00002c90  51 46 0d 06 ae 19 20 20  70 72 6f 67 70 74 72 25  |QF....  progptr%|
00002ca0  3d 70 72 6f 67 70 74 72  25 2b 31 0d 06 b3 25 20  |=progptr%+1...% |
00002cb0  20 70 72 6f 67 73 74 61  63 6b 25 28 70 72 6f 67  | progstack%(prog|
00002cc0  70 74 72 25 2c 31 29 3d  63 75 72 70 72 6f 67 25  |ptr%,1)=curprog%|
00002cd0  0d 06 b8 19 20 20 63 75  72 6c 69 6e 65 25 3d 63  |....  curline%=c|
00002ce0  75 72 6c 69 6e 65 25 2b  31 0d 06 bd 25 20 20 70  |urline%+1...%  p|
00002cf0  72 6f 67 73 74 61 63 6b  25 28 70 72 6f 67 70 74  |rogstack%(progpt|
00002d00  72 25 2c 32 29 3d 63 75  72 6c 69 6e 65 25 0d 06  |r%,2)=curline%..|
00002d10  c2 22 20 20 63 75 72 70  72 6f 67 25 3d 6f 70 63  |."  curprog%=opc|
00002d20  6f 64 65 25 20 3a 63 75  72 6c 69 6e 65 25 3d 31  |ode% :curline%=1|
00002d30  0d 06 c7 2f 20 20 e7 20  73 69 7a 65 66 67 25 21  |.../  . sizefg%!|
00002d40  28 34 2a 28 63 75 72 70  72 6f 67 25 2d 31 29 29  |(4*(curprog%-1))|
00002d50  8c 73 69 7a 65 25 3d 6f  70 65 72 61 6e 64 25 0d  |.size%=operand%.|
00002d60  06 cc 0c 20 20 e5 20 8d  74 6a 45 0d 06 d1 5b 20  |...  . .tjE...[ |
00002d70  20 e3 20 69 25 3d 31 20  b8 20 31 30 30 30 20 3a  | . i%=1 . 1000 :|
00002d80  ed 20 69 25 20 3a ef 20  33 30 20 3a f1 20 22 50  |. i% :. 30 :. "P|
00002d90  72 65 73 73 20 53 50 41  43 45 20 62 61 72 22 3b  |ress SPACE bar";|
00002da0  3a e7 20 70 72 69 6e 74  66 6c 61 67 25 20 8c 20  |:. printflag% . |
00002db0  ef 20 31 32 37 2c 31 32  37 2c 31 32 37 20 3a f1  |. 127,127,127 :.|
00002dc0  22 6f 72 20 50 22 0d 06  d6 26 20 20 61 24 3d be  |"or P"...&  a$=.|
00002dd0  20 3a e7 20 61 24 3c 3e  22 20 22 20 80 20 61 24  | :. a$<>" " . a$|
00002de0  3c 3e 22 50 22 20 8c 20  8d 64 56 46 0d 06 db 27  |<>"P" . .dVF...'|
00002df0  20 e7 20 70 72 69 6e 74  66 6c 61 67 25 20 80 20  | . printflag% . |
00002e00  61 24 3d 22 50 22 20 8c  f2 64 75 6d 70 3a e5 8d  |a$="P" ..dump:..|
00002e10  64 51 46 0d 06 e0 16 20  20 da 3a f2 6f 6e 3a f2  |dQF....  .:.on:.|
00002e20  73 65 74 73 63 72 65 65  6e 0d 06 e5 05 e1 0d 06  |setscreen.......|
00002e30  ea 10 dd 20 f2 63 6c 65  61 72 28 79 25 29 0d 06  |... .clear(y%)..|
00002e40  ef 0a 20 20 ea 20 69 25  0d 06 f4 12 20 20 e3 20  |..  . i%....  . |
00002e50  69 25 3d 79 25 20 b8 20  32 38 0d 06 f9 15 20 20  |i%=y% . 28....  |
00002e60  f1 20 8a 30 2c 69 25 29  3b 89 28 31 38 29 3b 0d  |. .0,i%);.(18);.|
00002e70  06 fe 0a 20 20 ed 20 69  25 0d 07 03 05 e1 0d 07  |...  . i%.......|
00002e80  08 0a dd 20 f2 6f 66 66  0d 07 0d 15 20 20 ef 20  |... .off....  . |
00002e90  32 33 3b 31 31 2c 30 3b  30 3b 30 3b 30 0d 07 12  |23;11,0;0;0;0...|
00002ea0  05 e1 0d 07 17 09 dd 20  f2 6f 6e 0d 07 1c 17 20  |....... .on.... |
00002eb0  20 ef 20 32 33 3b 31 31  2c 32 35 35 3b 30 3b 30  | . 23;11,255;0;0|
00002ec0  3b 30 0d 07 21 05 e1 0d  07 26 0d dd 20 a4 69 6e  |;0..!....&.. .in|
00002ed0  70 73 74 72 0d 07 2b 1f  20 20 ea 20 69 25 2c 73  |pstr..+.  . i%,s|
00002ee0  74 72 24 2c 69 6e 70 75  74 24 2c 63 68 24 2c 6d  |tr$,input$,ch$,m|
00002ef0  61 78 25 0d 07 30 0e 20  20 e8 20 69 6e 70 75 74  |ax%..0.  . input|
00002f00  24 0d 07 35 0d 20 20 6d  61 78 25 3d 31 30 0d 07  |$..5.  max%=10..|
00002f10  3a 0d 20 20 73 74 72 24  3d 22 22 0d 07 3f 18 20  |:.  str$=""..?. |
00002f20  20 e3 20 69 25 3d 31 20  b8 20 a9 28 69 6e 70 75  | . i%=1 . .(inpu|
00002f30  74 24 29 0d 07 44 17 20  20 63 68 24 3d c1 69 6e  |t$)..D.  ch$=.in|
00002f40  70 75 74 24 2c 69 25 2c  31 29 0d 07 49 31 20 20  |put$,i%,1)..I1  |
00002f50  e7 20 63 68 24 3e 3d 22  61 22 20 80 20 63 68 24  |. ch$>="a" . ch$|
00002f60  3c 3d 22 7a 22 20 8c 20  63 68 24 3d bd 28 97 28  |<="z" . ch$=.(.(|
00002f70  63 68 24 29 20 80 20 32  32 33 29 0d 07 4e 15 20  |ch$) . 223)..N. |
00002f80  20 73 74 72 24 3d 73 74  72 24 20 2b 20 63 68 24  | str$=str$ + ch$|
00002f90  0d 07 53 0a 20 20 ed 20  69 25 0d 07 58 21 20 20  |..S.  . i%..X!  |
00002fa0  e7 20 c2 73 74 72 24 2c  34 29 3d 22 53 49 5a 45  |. .str$,4)="SIZE|
00002fb0  22 20 8c 20 6d 61 78 25  3d 31 34 0d 07 5d 6a 20  |" . max%=14..]j |
00002fc0  20 e7 20 a9 28 73 74 72  24 29 3e 6d 61 78 25 20  | . .(str$)>max% |
00002fd0  8c 20 f2 63 6c 65 61 72  28 32 32 29 20 3a f1 20  |. .clear(22) :. |
00002fe0  8a 30 2c 32 32 29 22 4e  61 6d 65 20 74 6f 6f 20  |.0,22)"Name too |
00002ff0  6c 6f 6e 67 2e 22 27 27  22 31 30 20 63 68 61 72  |long."''"10 char|
00003000  61 63 68 74 65 72 73 2c  22 27 27 22 6f 72 20 6c  |achters,"''"or l|
00003010  65 73 73 2c 20 70 6c 65  61 73 65 22 27 20 3a e5  |ess, please"' :.|
00003020  20 8d 54 70 47 0d 07 62  70 20 20 e7 20 c0 73 74  | .TpG..bp  . .st|
00003030  72 24 2c 31 29 3c 22 41  22 20 84 20 c0 73 74 72  |r$,1)<"A" . .str|
00003040  24 2c 31 29 3e 22 5a 22  20 8c 20 f2 63 6c 65 61  |$,1)>"Z" . .clea|
00003050  72 28 32 32 29 20 3a f1  20 8a 30 2c 32 32 29 22  |r(22) :. .0,22)"|
00003060  4e 61 6d 65 73 20 6d 75  73 74 20 73 74 61 72 74  |Names must start|
00003070  22 27 27 22 77 69 74 68  20 61 20 6c 65 74 74 65  |"''"with a lette|
00003080  72 22 27 27 22 70 6c 65  61 73 65 22 27 20 3a e5  |r"''"please"' :.|
00003090  20 8d 54 70 47 0d 07 67  0b 20 20 3d 73 74 72 24  | .TpG..g.  =str$|
000030a0  0d 07 6c 23 dd 20 f2 70  75 74 6f 70 63 6f 64 65  |..l#. .putopcode|
000030b0  28 70 72 6f 67 25 2c 6c  69 6e 65 25 2c 64 61 74  |(prog%,line%,dat|
000030c0  61 25 29 0d 07 71 2f 20  20 70 72 6f 67 72 61 6d  |a%)..q/  program|
000030d0  25 3f 28 28 70 72 6f 67  25 2d 31 29 2a 39 30 2b  |%?((prog%-1)*90+|
000030e0  28 6c 69 6e 65 25 2d 31  29 2a 33 29 3d 64 61 74  |(line%-1)*3)=dat|
000030f0  61 25 0d 07 76 05 e1 0d  07 7b 24 dd 20 f2 70 75  |a%..v....{$. .pu|
00003100  74 6f 70 65 72 61 6e 64  28 70 72 6f 67 25 2c 6c  |toperand(prog%,l|
00003110  69 6e 65 25 2c 64 61 74  61 25 29 0d 07 80 13 20  |ine%,data%).... |
00003120  20 ea 20 73 69 67 6e 25  2c 62 61 73 65 25 0d 07  | . sign%,base%..|
00003130  85 12 20 20 73 69 67 6e  25 3d b4 64 61 74 61 25  |..  sign%=.data%|
00003140  0d 07 8a 12 20 20 64 61  74 61 25 3d 94 64 61 74  |....  data%=.dat|
00003150  61 25 0d 07 8f 24 20 20  62 61 73 65 25 3d 28 70  |a%...$  base%=(p|
00003160  72 6f 67 25 2d 31 29 2a  39 30 2b 28 6c 69 6e 65  |rog%-1)*90+(line|
00003170  25 2d 31 29 2a 33 0d 07  94 24 20 20 70 72 6f 67  |%-1)*3...$  prog|
00003180  72 61 6d 25 3f 28 62 61  73 65 25 2b 32 29 3d 64  |ram%?(base%+2)=d|
00003190  61 74 61 25 20 83 20 32  35 36 0d 07 99 17 20 20  |ata% . 256....  |
000031a0  64 61 74 61 25 3d 64 61  74 61 25 20 81 20 32 35  |data%=data% . 25|
000031b0  36 0d 07 9e 22 20 20 e7  20 73 69 67 6e 25 3d 2d  |6..."  . sign%=-|
000031c0  31 20 8c 20 64 61 74 61  25 3d 64 61 74 61 25 2b  |1 . data%=data%+|
000031d0  26 38 30 0d 07 a3 1e 20  20 70 72 6f 67 72 61 6d  |&80....  program|
000031e0  25 3f 28 62 61 73 65 25  2b 31 29 3d 64 61 74 61  |%?(base%+1)=data|
000031f0  25 0d 07 a8 05 e1 0d 07  ad 1d dd 20 a4 67 65 74  |%.......... .get|
00003200  6f 70 63 6f 64 65 28 70  72 6f 67 25 2c 6c 69 6e  |opcode(prog%,lin|
00003210  65 25 29 0d 07 b2 2a 20  20 3d 70 72 6f 67 72 61  |e%)...*  =progra|
00003220  6d 25 3f 28 28 70 72 6f  67 25 2d 31 29 2a 39 30  |m%?((prog%-1)*90|
00003230  2b 28 6c 69 6e 65 25 2d  31 29 2a 33 29 0d 07 b7  |+(line%-1)*3)...|
00003240  1e dd 20 a4 67 65 74 6f  70 65 72 61 6e 64 28 70  |.. .getoperand(p|
00003250  72 6f 67 25 2c 6c 69 6e  65 25 29 0d 07 bc 22 20  |rog%,line%)..." |
00003260  20 ea 20 68 69 62 79 74  65 25 2c 76 61 6c 75 65  | . hibyte%,value|
00003270  25 2c 62 61 73 65 25 2c  73 69 67 6e 25 0d 07 c1  |%,base%,sign%...|
00003280  24 20 20 62 61 73 65 25  3d 28 70 72 6f 67 25 2d  |$  base%=(prog%-|
00003290  31 29 2a 39 30 2b 28 6c  69 6e 65 25 2d 31 29 2a  |1)*90+(line%-1)*|
000032a0  33 0d 07 c6 24 20 20 73  69 67 6e 25 3d 28 70 72  |3...$  sign%=(pr|
000032b0  6f 67 72 61 6d 25 3f 28  62 61 73 65 25 2b 31 29  |ogram%?(base%+1)|
000032c0  29 3c 31 32 38 0d 07 cb  28 20 20 68 69 62 79 74  |)<128...(  hibyt|
000032d0  65 25 3d 28 70 72 6f 67  72 61 6d 25 3f 28 62 61  |e%=(program%?(ba|
000032e0  73 65 25 2b 31 29 20 80  20 26 37 46 29 0d 07 d0  |se%+1) . &7F)...|
000032f0  2b 20 20 76 61 6c 75 65  25 3d 70 72 6f 67 72 61  |+  value%=progra|
00003300  6d 25 3f 28 62 61 73 65  25 2b 32 29 2b 32 35 36  |m%?(base%+2)+256|
00003310  2a 68 69 62 79 74 65 25  0d 07 d5 24 20 20 e7 20  |*hibyte%...$  . |
00003320  73 69 67 6e 25 20 8c 20  3d 76 61 6c 75 65 25 20  |sign% . =value% |
00003330  8b 20 3d 76 61 6c 75 65  25 2a 2d 31 0d 07 da 15  |. =value%*-1....|
00003340  dd 20 f2 63 6c 65 61 72  74 6f 28 6c 69 6e 65 25  |. .clearto(line%|
00003350  29 0d 07 df 0a 20 20 ea  20 69 25 0d 07 e4 14 20  |)....  . i%.... |
00003360  20 e3 20 69 25 3d 31 20  b8 20 6c 69 6e 65 25 0d  | . i%=1 . line%.|
00003370  07 e9 14 20 20 f1 20 8a  30 2c 69 25 29 3b 89 28  |...  . .0,i%);.(|
00003380  31 38 29 0d 07 ee 0a 20  20 ed 20 69 25 0d 07 f3  |18)....  . i%...|
00003390  05 e1 0d 07 f8 0b dd 20  f2 64 75 6d 70 0d 07 fd  |....... .dump...|
000033a0  1b 20 20 ef 32 2c 31 2c  31 33 2c 31 2c 32 37 2c  |.  .2,1,13,1,27,|
000033b0  31 2c 36 35 2c 31 2c 38  0d 08 02 1a 20 20 e3 20  |1,65,1,8....  . |
000033c0  41 25 3d 93 20 b8 20 93  2b 39 39 32 30 20 88 33  |A%=. . .+9920 .3|
000033d0  32 30 0d 08 07 1a 20 20  ef 20 31 2c 32 37 2c 31  |20....  . 1,27,1|
000033e0  2c 37 35 2c 31 2c 36 34  2c 31 2c 31 0d 08 0c 1a  |,75,1,64,1,1....|
000033f0  20 20 e3 20 43 25 3d 41  25 20 b8 20 41 25 2b 33  |  . C%=A% . A%+3|
00003400  31 32 20 88 20 38 0d 08  11 10 20 20 e3 20 42 25  |12 . 8....  . B%|
00003410  3d 30 20 b8 20 37 0d 08  16 16 20 20 47 25 3f 42  |=0 . 7....  G%?B|
00003420  25 3d 28 3f 28 42 25 2b  43 25 29 29 0d 08 1b 07  |%=(?(B%+C%))....|
00003430  20 20 ed 0d 08 20 0c 20  20 d6 20 26 44 34 30 0d  |  ... .  . &D40.|
00003440  08 25 14 20 20 e3 20 42  25 3d 44 25 20 b8 20 44  |.%.  . B%=D% . D|
00003450  25 2b 37 0d 08 2a 0b 20  20 41 3d 3f 42 25 0d 08  |%+7..*.  A=?B%..|
00003460  2f 0b 20 20 ef 20 31 2c  41 0d 08 34 07 20 20 ed  |/.  . 1,A..4.  .|
00003470  0d 08 39 07 20 20 ed 0d  08 3e 11 20 20 ef 20 31  |..9.  ...>.  . 1|
00003480  2c 31 33 2c 31 2c 31 30  0d 08 43 07 20 20 ed 0d  |,13,1,10..C.  ..|
00003490  08 48 1d 20 20 ef 20 31  2c 32 37 2c 31 2c 36 35  |.H.  . 1,27,1,65|
000034a0  2c 31 2c 31 33 2c 31 2c  31 30 2c 33 0d 08 4d 05  |,1,13,1,10,3..M.|
000034b0  e1 0d 08 52 10 dd 20 a4  67 65 74 6e 6f 28 66 24  |...R.. .getno(f$|
000034c0  29 0d 08 57 48 20 20 f1  20 8a 30 2c 32 34 29 3b  |)..WH  . .0,24);|
000034d0  22 57 68 69 63 68 20 70  72 6f 67 72 61 6d 20 64  |"Which program d|
000034e0  6f 22 27 27 22 79 6f 75  20 77 69 73 68 20 74 6f  |o"''"you wish to|
000034f0  20 22 3b 66 24 20 3a e7  20 66 24 3c 3e 22 64 65  | ";f$ :. f$<>"de|
00003500  6c 65 74 65 22 20 8c 20  f1 0d 08 5c 14 20 20 f2  |lete" . ...\.  .|
00003510  6c 69 73 74 70 72 6f 67  6e 61 6d 65 73 0d 08 61  |listprognames..a|
00003520  0b 20 20 e8 20 6e 6f 25  0d 08 66 60 20 20 e7 20  |.  . no%..f`  . |
00003530  6e 6f 25 3c 31 20 84 20  6e 6f 25 3e 3f 6d 61 78  |no%<1 . no%>?max|
00003540  70 72 6f 67 25 20 84 20  24 28 6e 61 6d 65 25 2b  |prog% . $(name%+|
00003550  31 36 2a 28 6e 6f 25 2d  31 29 29 3d 22 6d 74 22  |16*(no%-1))="mt"|
00003560  8c f2 63 6c 65 61 72 28  32 31 29 3a f1 8a 30 2c  |..clear(21):..0,|
00003570  32 32 29 3b 22 53 6f 72  72 79 21 20 63 61 6e 27  |22);"Sorry! can'|
00003580  74 22 3a e5 8d 44 57 48  0d 08 6b 08 3d 6e 6f 25  |t":..DWH..k.=no%|
00003590  0d 08 70 11 dd 20 f2 70  72 69 6e 74 28 6e 6f 25  |..p.. .print(no%|
000035a0  29 0d 08 7a 09 20 20 ef  20 32 0d 08 7f 43 20 20  |)..z.  . 2...C  |
000035b0  f1 8a 30 2c 32 32 29 3b  24 28 6e 61 6d 65 25 2b  |..0,22);$(name%+|
000035c0  31 36 2a 28 6e 6f 25 2d  31 29 29 3b 3a ef 33 3a  |16*(no%-1));:.3:|
000035d0  70 72 6f 67 66 6c 61 67  25 3d b9 3a f2 6c 69 73  |progflag%=.:.lis|
000035e0  74 70 72 6f 67 28 6e 6f  25 29 3a ef 32 0d 08 84  |tprog(no%):.2...|
000035f0  2a 20 20 e7 20 73 69 7a  65 66 67 25 21 28 34 2a  |*  . sizefg%!(4*|
00003600  28 6e 6f 25 2d 31 29 29  20 8c f1 22 20 20 53 49  |(no%-1)) .."  SI|
00003610  5a 45 22 3a f1 8b f1 0d  08 89 27 20 20 70 72 6f  |ZE":......'  pro|
00003620  67 66 6c 61 67 25 3d a3  20 3a f2 6c 69 73 74 70  |gflag%=. :.listp|
00003630  72 6f 67 28 6e 6f 25 29  3a f1 3a f1 3a f1 0d 08  |rog(no%):.:.:...|
00003640  8e 09 20 20 ef 20 33 0d  08 93 10 20 20 f2 63 6c  |..  . 3....  .cl|
00003650  65 61 72 28 32 32 29 0d  08 98 05 e1 0d 08 9d 08  |ear(22).........|
00003660  dc 20 31 30 0d 08 a2 19  dc 20 22 4e 20 2d 20 6e  |. 10..... "N - n|
00003670  65 77 20 70 72 6f 67 72  61 6d 22 20 20 0d 08 a7  |ew program"  ...|
00003680  1b dc 20 22 52 20 2d 20  72 75 6e 20 70 72 6f 67  |.. "R - run prog|
00003690  72 61 6d 22 20 20 20 20  0d 08 ac 1e dc 20 22 45  |ram"    ..... "E|
000036a0  20 2d 20 65 64 69 74 20  70 72 6f 67 72 61 6d 22  | - edit program"|
000036b0  20 20 20 20 20 20 0d 08  b1 1a dc 20 22 44 20 2d  |      ..... "D -|
000036c0  20 64 65 6c 65 74 65 20  70 72 6f 67 72 61 6d 22  | delete program"|
000036d0  0d 08 b6 20 dc 20 22 4c  20 2d 20 6c 69 73 74 20  |... . "L - list |
000036e0  70 72 6f 67 72 61 6d 22  20 20 20 20 20 20 20 20  |program"        |
000036f0  0d 08 bb 19 dc 20 22 50  20 2d 20 70 72 69 6e 74  |..... "P - print|
00003700  20 70 72 6f 67 72 61 6d  22 0d 08 c0 19 dc 20 22  | program"..... "|
00003710  53 20 2d 20 73 61 76 65  20 70 72 6f 67 72 61 6d  |S - save program|
00003720  73 22 0d 08 c5 1a dc 20  22 49 20 2d 20 69 6e 70  |s"..... "I - inp|
00003730  75 74 20 70 72 6f 67 72  61 6d 73 22 0d 08 ca 18  |ut programs"....|
00003740  dc 20 22 43 20 2d 20 63  6c 65 61 72 20 6d 65 6d  |. "C - clear mem|
00003750  6f 72 79 22 0d 08 cf 12  dc 20 22 46 20 2d 20 66  |ory"..... "F - f|
00003760  69 6e 69 73 68 22 0d 08  d4 07 dc 20 39 0d 08 d9  |inish"..... 9...|
00003770  10 dc 20 22 4d 20 2d 20  6d 6f 76 65 22 0d 08 de  |.. "M - move"...|
00003780  10 dc 20 22 54 20 2d 20  74 75 72 6e 22 0d 08 df  |.. "T - turn"...|
00003790  10 dc 20 22 48 20 2d 20  68 6f 6d 65 22 0d 08 e3  |.. "H - home"...|
000037a0  12 dc 20 22 52 20 2d 20  72 65 70 65 61 74 22 0d  |.. "R - repeat".|
000037b0  08 e8 16 dc 20 22 45 20  2d 20 65 6e 64 20 72 65  |.... "E - end re|
000037c0  70 65 61 74 22 0d 08 ed  13 dc 20 22 50 20 2d 20  |peat"..... "P - |
000037d0  70 72 6f 67 72 61 6d 22  0d 08 f2 14 dc 20 22 55  |program"..... "U|
000037e0  20 2d 20 70 65 6e 20 75  70 22 20 20 0d 08 f7 15  | - pen up"  ....|
000037f0  dc 20 22 44 20 2d 20 70  65 6e 20 64 6f 77 6e 22  |. "D - pen down"|
00003800  20 0d 08 fc 19 dc 20 22  46 20 2d 20 66 69 6e 69  | ..... "F - fini|
00003810  73 68 22 20 20 20 20 20  20 20 0d 09 01 07 dc 20  |sh"       ..... |
00003820  34 0d 09 06 19 dc 20 22  49 20 2d 20 69 6e 73 65  |4..... "I - inse|
00003830  72 74 20 61 20 6c 69 6e  65 22 0d 09 0b 19 dc 20  |rt a line"..... |
00003840  22 44 20 2d 20 64 65 6c  65 74 65 20 61 20 6c 69  |"D - delete a li|
00003850  6e 65 22 0d 09 10 19 dc  20 22 43 20 2d 20 63 68  |ne"..... "C - ch|
00003860  61 6e 67 65 20 61 20 6c  69 6e 65 22 0d 09 15 1a  |ange a line"....|
00003870  dc 20 22 46 20 2d 20 66  69 6e 69 73 68 20 65 64  |. "F - finish ed|
00003880  69 74 69 6e 67 22 0d ff                           |iting"..|
00003888
DRAW1.m0
DRAW1.m1
DRAW1.m2
DRAW1.m4
DRAW1.m5