Home » Personal collection » Acorn ADFS disks » Electron » Micropower.ADF » Draw/DRAW1

Draw/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 ADFS disks » Electron » Micropower.ADF
Filename: Draw/DRAW1
Read OK:
File size: 37FB bytes
Load address: FFFF1D00
Exec address: FFFF8023
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
   60ONERRORGOTO125: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"
  310OSCLI"SAVE "+file$+" "+STR$~Q%+" "+STR$~(Q%+2233)
  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"
  360OSCLI"LOAD "+file$+" "+STR$~Q%
  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%=�
<��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"
6+�"SAVE "+file$+" "+�~Q%+" "+�~(Q%+2233)
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"
h�"LOAD "+file$+" "+�~Q%
�	�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 12 ee 85 e5  |ntflag%=...<....|
000001f0  8d 44 7d 40 3a f4 45 2e  35 35 37 0d 00 41 2b ef  |.D}@:.E.557..A+.|
00000200  32 33 2c 32 35 35 2c 32  35 35 2c 32 35 35 2c 32  |23,255,255,255,2|
00000210  35 35 2c 32 35 35 2c 32  35 35 2c 32 35 35 2c 32  |55,255,255,255,2|
00000220  35 35 2c 32 35 35 0d 00  46 18 62 6c 61 6e 6b 24  |55,255..F.blank$|
00000230  3d 22 20 22 2b c4 31 38  2c bd 32 35 35 29 0d 00  |=" "+.18,.255)..|
00000240  4b 29 ef 32 33 2c 32 35  34 2c 32 35 35 2c 32 35  |K).23,254,255,25|
00000250  35 2c 32 35 35 2c 32 35  35 2c 32 35 35 2c 32 35  |5,255,255,255,25|
00000260  35 2c 32 35 35 2c 30 0d  00 50 2f 62 6c 61 6e 6b  |5,255,0..P/blank|
00000270  32 24 3d bd 31 38 2b bd  30 2b bd 30 2b bd 32 35  |2$=.18+.0+.0+.25|
00000280  34 2b bd 32 35 34 2b bd  31 38 2b bd 30 2b bd 31  |4+.254+.18+.0+.1|
00000290  2b bd 38 2b bd 38 0d 00  55 15 eb 20 34 20 3a 40  |+.8+.8..U.. 4 :@|
000002a0  25 3d 26 30 30 30 30 30  34 30 30 0d 00 5a 25 6d  |%=&00000400..Z%m|
000002b0  61 69 6e 25 3d 32 32 30  35 3a 65 6e 74 72 79 25  |ain%=2205:entry%|
000002c0  3d 32 32 36 30 3a 65 64  69 74 25 3d 32 33 30 35  |=2260:edit%=2305|
000002d0  0d 00 5f 24 de 72 65 70  73 74 61 63 6b 25 28 31  |.._$.repstack%(1|
000002e0  32 2c 32 29 2c 70 72 6f  67 73 74 61 63 6b 25 28  |2,2),progstack%(|
000002f0  37 2c 32 29 0d 00 64 4f  e7 45 25 3f 38 3d 33 32  |7,2)..dO.E%?8=32|
00000300  8c e3 69 25 3d 30 b8 31  39 3a 24 28 6e 61 6d 65  |..i%=0.19:$(name|
00000310  25 2b 31 36 2a 69 25 29  3d 22 6d 74 22 3a ed 69  |%+16*i%)="mt":.i|
00000320  25 3a 3f 70 72 6f 67 74  6f 74 61 6c 25 3d 30 3a  |%:?progtotal%=0:|
00000330  3f 6d 61 78 70 72 6f 67  25 3d 30 3a 45 25 3f 38  |?maxprog%=0:E%?8|
00000340  3d 34 32 0d 00 69 49 72  65 70 73 74 61 63 6b 25  |=42..iIrepstack%|
00000350  28 31 2c 31 29 3d 30 3a  72 65 70 73 74 61 63 6b  |(1,1)=0:repstack|
00000360  25 28 31 2c 32 29 3d 30  3a 70 72 6f 67 73 74 61  |%(1,2)=0:progsta|
00000370  63 6b 25 28 31 2c 31 29  3d 30 3a 70 72 6f 67 73  |ck%(1,1)=0:progs|
00000380  74 61 63 6b 25 28 31 2c  32 29 3d 30 0d 00 73 0b  |tack%(1,2)=0..s.|
00000390  2a 46 58 31 31 2c 30 0d  00 78 0b 20 e5 20 8d 74  |*FX11,0..x. . .t|
000003a0  42 40 0d 00 7d 14 e7 20  9f 3c 3e 31 37 20 8c 20  |B@..}.. .<>17 . |
000003b0  f6 3a f1 9e 3a e0 0d 00  82 57 ef 33 3a eb 34 3a  |.:..:....W.3:.4:|
000003c0  ef 32 36 3a ef 34 3a da  3a 65 64 69 74 66 6c 61  |.26:.4:.:editfla|
000003d0  67 25 3d a3 3a 72 65 70  66 6c 61 67 25 3d a3 3a  |g%=.:repflag%=.:|
000003e0  70 72 6f 67 66 6c 61 67  25 3d a3 3a 66 69 6e 69  |progflag%=.:fini|
000003f0  73 68 25 3d a3 3a 65 72  72 6f 72 66 6c 61 67 25  |sh%=.:errorflag%|
00000400  3d a3 3a f2 73 65 74 73  63 72 65 65 6e 0d 00 87  |=.:.setscreen...|
00000410  1a 3f 32 31 36 3d 33 32  3a db 3a f2 6d 65 6e 75  |.?216=32:.:.menu|
00000420  28 6d 61 69 6e 25 29 0d  00 8c 21 69 6e 70 75 74  |(main%)...!input|
00000430  25 3d a4 67 65 74 63 6f  64 65 28 22 4e 52 45 44  |%=.getcode("NRED|
00000440  4c 50 53 49 43 46 22 29  0d 00 91 40 ee 20 69 6e  |LPSICF")...@. in|
00000450  70 75 74 25 20 e5 20 8d  74 56 40 2c 8d 64 43 40  |put% . .tV@,.dC@|
00000460  2c 8d 64 52 40 2c 8d 64  61 40 2c 8d 54 44 41 2c  |,.dR@,.da@,.TDA,|
00000470  8d 54 53 41 2c 8d 54 62  41 2c 8d 44 54 41 2c 8d  |.TSA,.TbA,.DTA,.|
00000480  74 46 41 2c 8d 74 5a 41  0d 00 96 07 f4 20 4e 0d  |tFA,.tZA..... N.|
00000490  00 9b 56 e7 3f 70 72 6f  67 74 6f 74 61 6c 25 3d  |..V.?progtotal%=|
000004a0  32 30 8c f2 62 65 65 70  3a f1 20 8a 30 2c 32 34  |20..beep:. .0,24|
000004b0  29 22 53 6f 72 72 79 21  20 2d 22 27 27 22 4e 6f  |)"Sorry! -"''"No|
000004c0  20 72 6f 6f 6d 20 66 6f  72 20 61 6e 79 22 27 27  | room for any"''|
000004d0  22 6d 6f 72 65 20 70 72  6f 67 72 61 6d 73 22 3a  |"more programs":|
000004e0  e5 8d 74 4c 40 0d 00 a0  13 69 25 3d 30 20 3a 66  |..tL@....i%=0 :f|
000004f0  69 6e 69 73 68 25 3d a3  0d 00 a5 0e f5 20 69 25  |inish%=...... i%|
00000500  3d 69 25 2b 31 20 0d 00  aa 1c fd 24 28 6e 61 6d  |=i%+1 .....$(nam|
00000510  65 25 2b 31 36 2a 28 69  25 2d 31 29 29 3d 22 6d  |e%+16*(i%-1))="m|
00000520  74 22 0d 00 af 0d 70 72  6f 67 6e 6f 3d 69 25 0d  |t"....progno=i%.|
00000530  00 b4 4a 3f 70 72 6f 67  74 6f 74 61 6c 25 3d 3f  |..J?progtotal%=?|
00000540  70 72 6f 67 74 6f 74 61  6c 25 2b 31 3a e7 3f 70  |progtotal%+1:.?p|
00000550  72 6f 67 74 6f 74 61 6c  25 3e 3f 6d 61 78 70 72  |rogtotal%>?maxpr|
00000560  6f 67 25 8c 3f 6d 61 78  70 72 6f 67 25 3d 3f 70  |og%.?maxprog%=?p|
00000570  72 6f 67 74 6f 74 61 6c  25 0d 00 b9 0c f2 6e 65  |rogtotal%.....ne|
00000580  77 70 72 6f 67 0d 00 be  0a e5 20 8d 74 47 40 0d  |wprog..... .tG@.|
00000590  00 c3 07 f4 20 52 0d 00  c8 17 f2 72 75 6e 28 a4  |.... R.....run(.|
000005a0  67 65 74 6e 6f 28 22 72  75 6e 22 29 29 0d 00 cd  |getno("run"))...|
000005b0  0a e5 20 8d 74 47 40 0d  00 d2 07 f4 20 45 0d 00  |.. .tG@..... E..|
000005c0  d7 19 f2 65 64 69 74 28  a4 67 65 74 6e 6f 28 22  |...edit(.getno("|
000005d0  65 64 69 74 22 29 29 0d  00 dc 0a e5 20 8d 74 47  |edit"))..... .tG|
000005e0  40 0d 00 e1 07 f4 20 44  0d 00 e6 19 6e 75 6d 25  |@..... D....num%|
000005f0  3d a4 67 65 74 6e 6f 28  22 64 65 6c 65 74 65 22  |=.getno("delete"|
00000600  29 0d 00 eb 1d 24 28 6e  61 6d 65 25 2b 31 36 2a  |)....$(name%+16*|
00000610  28 6e 75 6d 25 2d 31 29  29 3d 22 6d 74 22 0d 00  |(num%-1))="mt"..|
00000620  f0 29 e7 6e 75 6d 25 3d  3f 6d 61 78 70 72 6f 67  |.).num%=?maxprog|
00000630  25 8c 3f 6d 61 78 70 72  6f 67 25 3d 3f 6d 61 78  |%.?maxprog%=?max|
00000640  70 72 6f 67 25 2d 31 0d  00 f5 12 f2 6c 69 73 74  |prog%-1.....list|
00000650  70 72 6f 67 6e 61 6d 65  73 0d 00 fa 1d 3f 70 72  |prognames....?pr|
00000660  6f 67 74 6f 74 61 6c 25  3d 3f 70 72 6f 67 74 6f  |ogtotal%=?progto|
00000670  74 61 6c 25 2d 31 0d 00  ff 0a e5 20 8d 74 47 40  |tal%-1..... .tG@|
00000680  0d 01 04 07 f4 20 4c 0d  01 09 2a 70 72 6f 67 66  |..... L...*progf|
00000690  6c 61 67 25 3d b9 20 3a  f2 6c 69 73 74 70 72 6f  |lag%=. :.listpro|
000006a0  67 28 a4 67 65 74 6e 6f  28 22 6c 69 73 74 22 29  |g(.getno("list")|
000006b0  29 0d 01 0e 0a e5 20 8d  74 47 40 0d 01 13 07 f4  |)..... .tG@.....|
000006c0  20 50 0d 01 18 4b e7 20  70 72 69 6e 74 66 6c 61  | P...K. printfla|
000006d0  67 25 20 8c f2 70 72 69  6e 74 28 a4 67 65 74 6e  |g% ..print(.getn|
000006e0  6f 28 22 70 72 69 6e 74  22 29 29 3a e5 8d 74 47  |o("print")):..tG|
000006f0  40 20 8b f1 8a 30 2c 32  34 29 3b 22 4e 6f 20 70  |@ ...0,24);"No p|
00000700  72 69 6e 74 65 72 22 3a  e5 8d 74 4c 40 0d 01 22  |rinter":..tL@.."|
00000710  07 f4 20 53 0d 01 27 4c  f2 63 6c 65 61 72 28 32  |.. S..'L.clear(2|
00000720  32 29 20 3a f1 20 8a 30  2c 32 32 29 3b 22 54 79  |2) :. .0,22);"Ty|
00000730  70 65 20 69 6e 20 61 20  66 69 6c 65 6e 61 6d 65  |pe in a filename|
00000740  22 27 22 66 6f 72 20 74  68 69 73 20 73 65 74 20  |"'"for this set |
00000750  6f 66 22 27 27 22 70 72  6f 67 72 61 6d 73 22 27  |of"''"programs"'|
00000760  0d 01 2c 11 66 69 6c 65  24 3d a4 69 6e 70 73 74  |..,.file$=.inpst|
00000770  72 0d 01 31 3f f2 63 6c  65 61 72 28 32 32 29 20  |r..1?.clear(22) |
00000780  3a f1 20 8a 30 2c 32 32  29 3b 22 50 6c 61 63 65  |:. .0,22);"Place|
00000790  20 63 61 73 73 65 74 74  65 22 27 27 22 69 6e 20  | cassette"''"in |
000007a0  72 65 63 6f 72 64 65 72  2c 20 70 72 65 73 73 22  |recorder, press"|
000007b0  0d 01 36 2b ff 22 53 41  56 45 20 22 2b 66 69 6c  |..6+."SAVE "+fil|
000007c0  65 24 2b 22 20 22 2b c3  7e 51 25 2b 22 20 22 2b  |e$+" "+.~Q%+" "+|
000007d0  c3 7e 28 51 25 2b 32 32  33 33 29 0d 01 4f 0a e5  |.~(Q%+2233)..O..|
000007e0  20 8d 74 47 40 0d 01 54  07 f4 20 4c 0d 01 59 4b  | .tG@..T.. L..YK|
000007f0  f2 63 6c 65 61 72 28 32  32 29 20 3a f1 20 8a 30  |.clear(22) :. .0|
00000800  2c 32 32 29 3b 22 54 79  70 65 20 74 68 65 20 66  |,22);"Type the f|
00000810  69 6c 65 6e 61 6d 65 22  27 27 22 66 6f 72 20 74  |ilename"''"for t|
00000820  68 65 20 73 65 74 20 6f  66 22 27 27 22 70 72 6f  |he set of"''"pro|
00000830  67 72 61 6d 73 22 27 0d  01 5e 11 66 69 6c 65 24  |grams"'..^.file$|
00000840  3d a4 69 6e 70 73 74 72  0d 01 63 46 f2 63 6c 65  |=.inpstr..cF.cle|
00000850  61 72 28 32 32 29 20 3a  f1 20 8a 30 2c 32 32 29  |ar(22) :. .0,22)|
00000860  3b 22 50 6c 61 63 65 20  63 61 73 73 65 74 74 65  |;"Place cassette|
00000870  22 27 27 22 69 6e 20 72  65 63 6f 72 64 65 72 2c  |"''"in recorder,|
00000880  20 70 72 65 73 73 22 27  22 50 4c 41 59 22 0d 01  | press"'"PLAY"..|
00000890  68 1b ff 22 4c 4f 41 44  20 22 2b 66 69 6c 65 24  |h.."LOAD "+file$|
000008a0  2b 22 20 22 2b c3 7e 51  25 0d 01 81 09 e5 8d 74  |+" "+.~Q%......t|
000008b0  47 40 0d 01 86 07 f4 20  43 0d 01 8b 39 f1 8a 30  |G@..... C...9..0|
000008c0  2c 32 34 29 22 41 4c 4c  20 70 72 6f 67 72 61 6d  |,24)"ALL program|
000008d0  73 3f 22 27 27 22 28 59  45 53 20 6f 72 20 4e 4f  |s?"''"(YES or NO|
000008e0  29 22 27 27 3b 3a 61 6e  73 24 3d a4 69 6e 70 73  |)"'';:ans$=.inps|
000008f0  74 72 0d 01 90 48 e7 61  6e 73 24 3d 22 59 45 53  |tr...H.ans$="YES|
00000900  22 8c e3 69 25 3d 30 b8  31 39 3a 24 28 6e 61 6d  |"..i%=0.19:$(nam|
00000910  65 25 2b 31 36 2a 69 25  29 3d 22 6d 74 22 3a ed  |e%+16*i%)="mt":.|
00000920  3a 3f 70 72 6f 67 74 6f  74 61 6c 25 3d 30 3a 3f  |:?progtotal%=0:?|
00000930  6d 61 78 70 72 6f 67 25  3d 30 0d 01 95 09 e5 8d  |maxprog%=0......|
00000940  74 47 40 0d 01 9a 07 f4  20 46 0d 01 9f 43 f1 20  |tG@..... F...C. |
00000950  8a 30 2c 32 32 29 3b 22  41 72 65 20 79 6f 75 20  |.0,22);"Are you |
00000960  73 75 72 65 20 79 6f 75  22 27 27 22 77 69 73 68  |sure you"''"wish|
00000970  20 74 6f 20 65 6e 64 20  44 52 41 57 22 27 27 22  | to end DRAW"''"|
00000980  28 59 45 53 20 6f 72 20  4e 4f 29 22 3b 0d 01 a4  |(YES or NO)";...|
00000990  13 61 6e 73 77 65 72 24  3d a4 69 6e 70 73 74 72  |.answer$=.inpstr|
000009a0  0d 01 a9 1a e7 20 61 6e  73 77 65 72 24 3d 22 59  |..... answer$="Y|
000009b0  45 53 22 20 8c 20 8d 74  73 41 0d 01 ae 0a e5 20  |ES" . .tsA..... |
000009c0  8d 74 47 40 0d 01 b8 0d  2a 46 58 20 31 31 2c 35  |.tG@....*FX 11,5|
000009d0  30 0d 01 bd 10 eb 20 37  20 3a 40 25 3d 30 20 3a  |0..... 7 :@%=0 :|
000009e0  e0 0d 01 c2 10 dd 20 f2  73 65 74 73 63 72 65 65  |...... .setscree|
000009f0  6e 0d 01 c7 0b 20 20 ec  20 30 2c 30 0d 01 cc 2d  |n....  . 0,0...-|
00000a00  20 20 df 20 31 32 37 39  2c 30 20 3a df 20 31 32  |  . 1279,0 :. 12|
00000a10  37 39 2c 31 30 32 33 20  3a df 20 30 2c 31 30 32  |79,1023 :. 0,102|
00000a20  33 20 3a df 20 30 2c 30  20 0d 01 d1 34 20 20 ec  |3 :. 0,0 ...4  .|
00000a30  20 36 33 36 2c 30 20 3a  f0 20 32 31 2c 36 33 36  | 636,0 :. 21,636|
00000a40  2c 31 30 32 33 20 3a ec  20 36 34 30 2c 31 30 32  |,1023 :. 640,102|
00000a50  33 20 3a f0 20 32 31 2c  36 34 30 2c 30 0d 01 d6  |3 :. 21,640,0...|
00000a60  1e 20 20 ef 20 32 38 2c  31 2c 33 30 2c 31 38 2c  |.  . 28,1,30,18,|
00000a70  31 20 20 20 20 20 20 20  20 20 20 0d 01 db 1b 20  |1          .... |
00000a80  20 ef 20 32 34 2c 36 34  34 3b 34 3b 31 32 37 34  | . 24,644;4;1274|
00000a90  3b 31 30 31 38 3b 0d 01  e0 11 20 20 ef 20 32 39  |;1018;....  . 29|
00000aa0  2c 36 34 31 3b 31 3b 0d  01 e5 0b 20 20 ec 20 30  |,641;1;....  . 0|
00000ab0  2c 30 0d 01 ea 05 e1 0d  01 ef 22 dd 20 f2 70 72  |,0........". .pr|
00000ac0  6f 67 6c 69 6e 65 73 28  74 69 74 6c 65 24 2c 73  |oglines(title$,s|
00000ad0  69 7a 65 66 6c 61 67 25  29 0d 01 f4 12 20 20 ea  |izeflag%)....  .|
00000ae0  78 25 2c 79 25 2c 6e 75  6d 62 25 0d 01 f9 0a 20  |x%,y%,numb%.... |
00000af0  20 da 3a ef 35 0d 01 fe  2b 20 20 ec 31 30 2c 31  | .:.5...+  .10,1|
00000b00  30 31 33 3a f1 74 69 74  6c 65 24 3b 3a e7 73 69  |013:.title$;:.si|
00000b10  7a 65 66 6c 61 67 25 8c  f1 22 20 53 49 5a 45 22  |zeflag%.." SIZE"|
00000b20  0d 02 03 18 20 20 ec 30  2c 39 38 33 3a f0 32 31  |....  .0,983:.21|
00000b30  2c 36 33 39 2c 39 38 33  0d 02 08 0c 20 20 79 25  |,639,983....  y%|
00000b40  3d 39 37 30 0d 02 0d 13  20 20 e3 6e 75 6d 62 25  |=970....  .numb%|
00000b50  3d 32 b8 36 30 88 32 0d  02 12 1a 20 20 e7 6e 75  |=2.60.2....  .nu|
00000b60  6d 62 25 3c 31 30 8c 78  25 3d 32 30 8b 78 25 3d  |mb%<10.x%=20.x%=|
00000b70  35 0d 02 17 13 20 20 ec  78 25 2c 79 25 3a f1 6e  |5....  .x%,y%:.n|
00000b80  75 6d 62 25 0d 02 1c 0e  20 20 79 25 3d 79 25 2d  |umb%....  y%=y%-|
00000b90  33 32 0d 02 21 0c 20 20  ed 6e 75 6d 62 25 0d 02  |32..!.  .numb%..|
00000ba0  26 08 20 20 ef 34 0d 02  2b 05 e1 0d 02 30 15 dd  |&.  .4..+....0..|
00000bb0  20 a4 67 65 74 63 6f 64  65 28 63 6f 64 65 24 29  | .getcode(code$)|
00000bc0  0d 02 35 0c 20 20 ea 20  69 24 2c 69 0d 02 3a 0a  |..5.  . i$,i..:.|
00000bd0  20 20 f2 6f 66 66 0d 02  3f 13 20 20 69 24 3d bd  |  .off..?.  i$=.|
00000be0  28 a5 20 80 20 32 32 33  29 0d 02 44 12 20 20 69  |(. . 223)..D.  i|
00000bf0  3d a7 63 6f 64 65 24 2c  69 24 29 0d 02 49 1c 20  |=.code$,i$)..I. |
00000c00  20 e7 20 69 3d 30 20 8c  20 8d 54 7f 42 20 8b 20  | . i=0 . .T.B . |
00000c10  f2 6f 6e 20 3a 3d 69 0d  02 4e 11 dd 20 f2 6d 65  |.on :=i..N.. .me|
00000c20  6e 75 28 6c 69 6e 65 29  0d 02 53 17 20 20 ea 20  |nu(line)..S.  . |
00000c30  69 2c 61 24 2c 6e 20 20  3a f7 20 6c 69 6e 65 0d  |i,a$,n  :. line.|
00000c40  02 58 2d 20 20 e7 20 6c  69 6e 65 3d 65 64 69 74  |.X-  . line=edit|
00000c50  25 20 8c f2 63 6c 65 61  72 74 6f 28 31 39 29 8b  |% ..clearto(19).|
00000c60  f2 63 6c 65 61 72 74 6f  28 32 31 29 0d 02 5d 1c  |.clearto(21)..].|
00000c70  20 20 f1 20 8a 30 2c 30  29 22 53 65 6c 65 63 74  |  . .0,0)"Select|
00000c80  20 66 72 6f 6d 20 3a 22  0d 02 62 09 20 20 f3 20  | from :"..b.  . |
00000c90  6e 0d 02 67 15 20 20 e3  20 69 3d 32 20 b8 20 32  |n..g.  . i=2 . 2|
00000ca0  2a 6e 20 88 20 32 0d 02  6c 16 20 20 f3 20 61 24  |*n . 2..l.  . a$|
00000cb0  20 3a f1 20 8a 30 2c 69  29 3b 61 24 0d 02 71 09  | :. .0,i);a$..q.|
00000cc0  20 20 ed 20 69 0d 02 76  05 e1 0d 02 7b 15 dd 20  |  . i..v....{.. |
00000cd0  f2 6c 69 73 74 70 72 6f  67 28 6e 6f 29 20 20 0d  |.listprog(no)  .|
00000ce0  02 80 28 20 20 ea 20 73  70 61 63 65 25 2c 79 25  |..(  . space%,y%|
00000cf0  2c 69 25 2c 63 6f 64 65  25 20 20 20 20 20 20 20  |,i%,code%       |
00000d00  20 20 20 20 20 20 20 0d  02 85 42 20 20 e7 70 72  |       ...B  .pr|
00000d10  6f 67 66 6c 61 67 25 8c  f2 70 72 6f 67 6c 69 6e  |ogflag%..proglin|
00000d20  65 73 28 24 28 6e 61 6d  65 25 2b 31 36 2a 28 6e  |es($(name%+16*(n|
00000d30  6f 2d 31 29 29 2c 73 69  7a 65 66 67 25 21 28 34  |o-1)),sizefg%!(4|
00000d40  2a 28 6e 6f 2d 31 29 29  29 0d 02 8a 0e 20 20 73  |*(no-1)))....  s|
00000d50  70 61 63 65 25 3d 31 0d  02 8f 09 20 20 ef 20 35  |pace%=1....  . 5|
00000d60  0d 02 94 0c 20 20 79 25  3d 39 37 30 0d 02 99 17  |....  y%=970....|
00000d70  20 20 e3 69 25 3d 31 b8  6c 65 6e 25 3f 28 6e 6f  |  .i%=1.len%?(no|
00000d80  2d 31 29 0d 02 9e 42 20  20 ec 20 35 30 2c 79 25  |-1)...B  . 50,y%|
00000d90  20 3a e7 20 65 64 69 74  66 6c 61 67 25 20 8c 20  | :. editflag% . |
00000da0  ef 20 31 38 2c 30 2c 30  20 3a f1 20 62 6c 61 6e  |. 18,0,0 :. blan|
00000db0  6b 24 20 3a ef 20 31 38  2c 30 2c 31 20 3a ec 20  |k$ :. 18,0,1 :. |
00000dc0  35 30 2c 79 25 0d 02 a3  1d 20 20 63 6f 64 65 25  |50,y%....  code%|
00000dd0  3d a4 67 65 74 6f 70 63  6f 64 65 28 6e 6f 2c 69  |=.getopcode(no,i|
00000de0  25 29 0d 02 a8 26 20 20  e7 20 63 6f 64 65 25 3e  |%)...&  . code%>|
00000df0  3d 31 30 20 8c 20 63 6f  64 65 25 3d 38 20 20 20  |=10 . code%=8   |
00000e00  20 20 20 20 20 20 20 20  0d 02 ad 16 20 20 e7 20  |        ....  . |
00000e10  63 6f 64 65 25 3d 30 20  8c 20 8d 64 6e 42 0d 02  |code%=0 . .dnB..|
00000e20  b2 39 20 20 ee 63 6f 64  65 25 e5 8d 74 77 42 2c  |.9  .code%..twB,|
00000e30  8d 74 7c 42 2c 8d 64 41  42 2c 8d 64 46 42 2c 8d  |.t|B,.dAB,.dFB,.|
00000e40  64 50 42 2c 8d 64 55 42  2c 8d 64 5a 42 2c 8d 64  |dPB,.dUB,.dZB,.d|
00000e50  5f 42 2c 8d 64 56 42 0d  02 b7 64 20 20 f1 20 89  |_B,.dVB...d  . .|
00000e60  28 73 70 61 63 65 25 29  3b 22 6d 6f 76 65 20 20  |(space%);"move  |
00000e70  22 3b 20 3a e7 20 a4 67  65 74 6f 70 65 72 61 6e  |"; :. .getoperan|
00000e80  64 28 6e 6f 2c 69 25 29  3d 30 20 8c 20 f1 22 53  |d(no,i%)=0 . ."S|
00000e90  49 5a 45 22 20 3a e5 20  8d 64 69 42 20 8b 20 f1  |IZE" :. .diB . .|
00000ea0  20 a4 67 65 74 6f 70 65  72 61 6e 64 28 6e 6f 2c  | .getoperand(no,|
00000eb0  69 25 29 20 3a e5 20 8d  64 69 42 0d 02 bc 64 20  |i%) :. .diB...d |
00000ec0  20 f1 20 89 28 73 70 61  63 65 25 29 3b 22 74 75  | . .(space%);"tu|
00000ed0  72 6e 20 20 22 3b 20 3a  e7 20 a4 67 65 74 6f 70  |rn  "; :. .getop|
00000ee0  65 72 61 6e 64 28 6e 6f  2c 69 25 29 3d 30 20 8c  |erand(no,i%)=0 .|
00000ef0  20 f1 22 53 49 5a 45 22  20 3a e5 20 8d 64 69 42  | ."SIZE" :. .diB|
00000f00  20 8b 20 f1 20 a4 67 65  74 6f 70 65 72 61 6e 64  | . . .getoperand|
00000f10  28 6e 6f 2c 69 25 29 20  3a e5 20 8d 64 69 42 0d  |(no,i%) :. .diB.|
00000f20  02 c1 87 20 20 f1 20 89  28 73 70 61 63 65 25 29  |...  . .(space%)|
00000f30  3b 22 72 65 70 65 61 74  20 22 3b 20 3a e7 20 a4  |;"repeat "; :. .|
00000f40  67 65 74 6f 70 65 72 61  6e 64 28 6e 6f 2c 69 25  |getoperand(no,i%|
00000f50  29 3d 30 20 8c 20 f1 22  53 49 5a 45 22 20 3a 73  |)=0 . ."SIZE" :s|
00000f60  70 61 63 65 25 3d 73 70  61 63 65 25 2b 31 20 3a  |pace%=space%+1 :|
00000f70  e5 20 8d 64 69 42 20 8b  20 f1 20 a4 67 65 74 6f  |. .diB . . .geto|
00000f80  70 65 72 61 6e 64 28 6e  6f 2c 69 25 29 20 3a 73  |perand(no,i%) :s|
00000f90  70 61 63 65 25 3d 73 70  61 63 65 25 2b 31 20 3a  |pace%=space%+1 :|
00000fa0  e5 20 8d 64 69 42 0d 02  c6 38 20 20 73 70 61 63  |. .diB...8  spac|
00000fb0  65 25 3d 73 70 61 63 65  25 2d 31 20 3a e7 20 73  |e%=space%-1 :. s|
00000fc0  70 61 63 65 25 3c 31 20  8c 20 73 70 61 63 65 25  |pace%<1 . space%|
00000fd0  3d 31 20 3a 72 65 70 66  6c 61 67 25 3d b9 0d 02  |=1 :repflag%=...|
00000fe0  cb 26 20 20 f1 20 89 28  73 70 61 63 65 25 29 3b  |.&  . .(space%);|
00000ff0  22 65 6e 64 20 72 65 70  65 61 74 22 20 3a e5 20  |"end repeat" :. |
00001000  8d 64 69 42 0d 02 d0 26  20 20 f1 20 89 28 73 70  |.diB...&  . .(sp|
00001010  61 63 65 25 29 3b 22 70  65 6e 20 75 70 20 20 22  |ace%);"pen up  "|
00001020  20 3a e5 20 8d 64 69 42  20 20 0d 02 d5 27 20 20  | :. .diB  ...'  |
00001030  f1 20 89 28 73 70 61 63  65 25 29 3b 22 70 65 6e  |. .(space%);"pen|
00001040  20 64 6f 77 6e 22 20 3a  e5 20 8d 64 69 42 20 20  | down" :. .diB  |
00001050  20 0d 02 d6 1e 20 20 f1  89 28 73 70 61 63 65 25  | ....  ..(space%|
00001060  29 3b 22 68 6f 6d 65 22  20 3a e5 8d 64 69 42 0d  |);"home" :..diB.|
00001070  02 da 45 20 20 f1 20 89  28 73 70 61 63 65 25 29  |..E  . .(space%)|
00001080  3b 22 66 69 6e 69 73 68  20 20 22 20 3a e7 20 73  |;"finish  " :. s|
00001090  70 61 63 65 25 3c 3e 31  20 8c 20 72 65 70 66 6c  |pace%<>1 . repfl|
000010a0  61 67 25 3d b9 20 3a e5  20 8d 64 69 42 20 8b 20  |ag%=. :. .diB . |
000010b0  8d 64 69 42 0d 02 df 35  20 20 f1 20 89 28 73 70  |.diB...5  . .(sp|
000010c0  61 63 65 25 29 3b 24 28  6e 61 6d 65 25 2b 31 36  |ace%);$(name%+16|
000010d0  2a 28 a4 67 65 74 6f 70  63 6f 64 65 28 6e 6f 2c  |*(.getopcode(no,|
000010e0  69 25 29 2d 31 31 29 29  3b 0d 02 e4 64 20 20 e7  |i%)-11));...d  .|
000010f0  20 ac 20 73 69 7a 65 66  67 25 21 28 34 2a 28 a4  | . sizefg%!(4*(.|
00001100  67 65 74 6f 70 63 6f 64  65 28 6e 6f 2c 69 25 29  |getopcode(no,i%)|
00001110  2d 31 31 29 29 8c f1 8b  e7 a4 67 65 74 6f 70 65  |-11)).....getope|
00001120  72 61 6e 64 28 6e 6f 2c  69 25 29 3d 30 8c f1 22  |rand(no,i%)=0.."|
00001130  20 53 49 5a 45 22 8b f1  22 20 22 a4 67 65 74 6f  | SIZE".." ".geto|
00001140  70 65 72 61 6e 64 28 6e  6f 2c 69 25 29 0d 02 e9  |perand(no,i%)...|
00001150  0e 20 20 79 25 3d 79 25  2d 33 32 0d 02 ee 0a 20  |.  y%=y%-32.... |
00001160  20 ed 20 69 25 0d 02 f3  2a 20 20 ec 20 35 30 2c  | . i%...*  . 50,|
00001170  79 25 20 3a ef 20 31 38  2c 30 2c 30 20 3a f1 62  |y% :. 18,0,0 :.b|
00001180  6c 61 6e 6b 24 20 3a ef  20 31 38 2c 30 2c 31 0d  |lank$ :. 18,0,1.|
00001190  02 f8 09 20 20 ef 20 34  0d 02 fd 10 20 20 f2 63  |...  . 4....  .c|
000011a0  6c 65 61 72 28 32 33 29  0d 03 02 66 20 20 e7 20  |lear(23)...f  . |
000011b0  65 64 69 74 66 6c 61 67  25 20 80 20 72 65 70 66  |editflag% . repf|
000011c0  6c 61 67 25 20 8c 3a f2  62 65 65 70 3a 72 65 70  |lag% .:.beep:rep|
000011d0  66 6c 61 67 25 3d a3 3a  f1 8a 30 2c 32 34 29 22  |flag%=.:..0,24)"|
000011e0  45 72 72 6f 72 20 69 6e  20 52 45 50 45 41 54 20  |Error in REPEAT |
000011f0  2d 22 27 27 22 45 4e 44  20 52 45 50 45 41 54 53  |-"''"END REPEATS|
00001200  22 3a 65 72 72 6f 72 66  6c 61 67 25 3d b9 0d 03  |":errorflag%=...|
00001210  07 6b e7 20 65 64 69 74  66 6c 61 67 25 20 80 20  |.k. editflag% . |
00001220  a4 67 65 74 6f 70 63 6f  64 65 28 6e 6f 2c 6c 65  |.getopcode(no,le|
00001230  6e 25 3f 28 6e 6f 2d 31  29 29 3c 3e 37 20 8c f2  |n%?(no-1))<>7 ..|
00001240  62 65 65 70 3a f1 8a 30  2c 32 30 29 22 54 68 65  |beep:..0,20)"The|
00001250  20 6c 61 73 74 20 6c 69  6e 65 20 6d 75 73 74 22  | last line must"|
00001260  27 22 62 65 20 46 49 4e  49 53 48 22 3a 65 72 72  |'"be FINISH":err|
00001270  6f 72 66 6c 61 67 25 3d  b9 0d 03 0c 05 e1 0d 03  |orflag%=........|
00001280  11 19 dd 20 f2 69 6e 70  75 74 6c 69 6e 65 28 70  |... .inputline(p|
00001290  6e 6f 2c 6c 6e 6f 29 0d  03 16 13 20 20 ea 20 6e  |no,lno)....  . n|
000012a0  25 2c 6d 25 2c 69 25 2c  69 24 0d 03 1b 31 20 20  |%,m%,i%,i$...1  |
000012b0  e7 20 65 64 69 74 66 6c  61 67 25 20 8c 69 24 3d  |. editflag% .i$=|
000012c0  22 4d 54 52 45 55 44 46  50 48 22 8b 69 24 3d 22  |"MTREUDFPH".i$="|
000012d0  4d 54 52 45 55 44 46 50  48 4b 22 0d 03 20 1d 20  |MTREUDFPHK".. . |
000012e0  20 70 72 6f 67 66 6c 61  67 25 3d a3 20 3a 72 65  | progflag%=. :re|
000012f0  70 66 6c 61 67 25 3d a3  0d 03 25 10 20 20 f2 63  |pflag%=...%.  .c|
00001300  6c 65 61 72 28 32 33 29  0d 03 2a 15 20 20 6e 25  |lear(23)..*.  n%|
00001310  3d a4 67 65 74 63 6f 64  65 28 69 24 29 0d 03 2f  |=.getcode(i$)../|
00001320  1c 20 20 f2 70 75 74 6f  70 63 6f 64 65 28 70 6e  |.  .putopcode(pn|
00001330  6f 2c 6c 6e 6f 2c 6e 25  29 0d 03 34 3b 20 20 ee  |o,lno,n%)..4;  .|
00001340  6e 25 e5 8d 54 79 43 2c  8d 54 7e 43 2c 8d 44 43  |n%..TyC,.T~C,.DC|
00001350  43 2c 8d 44 48 43 2c 8d  44 61 43 2c 8d 44 61 43  |C,.DHC,.DaC,.DaC|
00001360  2c 8d 44 66 43 2c 8d 44  6b 43 2c 8d 44 61 43 2c  |,.DfC,.DkC,.DaC,|
00001370  8d 74 4e 43 0d 03 39 30  20 20 f1 8a 30 2c 32 33  |.tNC..90  ..0,23|
00001380  29 22 4d 4f 56 45 20 2e  2e 2e 22 27 27 22 68 6f  |)"MOVE ..."''"ho|
00001390  77 20 6d 61 6e 79 20 73  74 65 70 73 22 27 3a e5  |w many steps"':.|
000013a0  8d 74 62 43 0d 03 3e 32  20 20 f1 8a 30 2c 32 33  |.tbC..>2  ..0,23|
000013b0  29 22 54 55 52 4e 20 2e  2e 2e 22 27 27 22 68 6f  |)"TURN ..."''"ho|
000013c0  77 20 6d 61 6e 79 20 64  65 67 72 65 65 73 22 27  |w many degrees"'|
000013d0  3a e5 8d 74 62 43 0d 03  43 46 20 20 f1 8a 30 2c  |:..tbC..CF  ..0,|
000013e0  32 33 29 22 52 45 50 45  41 54 20 2e 2e 2e 22 27  |23)"REPEAT ..."'|
000013f0  27 22 68 6f 77 20 6d 61  6e 79 20 74 69 6d 65 73  |'"how many times|
00001400  22 27 3a 72 65 70 65 61  74 73 25 3d 72 65 70 65  |"':repeats%=repe|
00001410  61 74 73 25 2b 31 3a e5  8d 74 62 43 0d 03 48 30  |ats%+1:..tbC..H0|
00001420  20 20 e7 20 72 65 70 65  61 74 73 25 3e 30 20 8c  |  . repeats%>0 .|
00001430  20 72 65 70 65 61 74 73  25 3d 72 65 70 65 61 74  | repeats%=repeat|
00001440  73 25 2d 31 20 3a e5 20  8d 44 61 43 0d 03 4d 20  |s%-1 :. .DaC..M |
00001450  20 20 e7 20 65 64 69 74  66 6c 61 67 25 20 8c 20  |  . editflag% . |
00001460  6d 3d 2d 31 20 3a e5 20  8d 74 67 43 0d 03 52 19  |m=-1 :. .tgC..R.|
00001470  20 20 f1 8a 30 2c 32 33  29 22 2a 2a 20 45 52 52  |  ..0,23)"** ERR|
00001480  4f 52 2a 2a 22 0d 03 57  1d 20 20 f1 20 27 22 4e  |OR**"..W.  . '"N|
00001490  6f 20 27 52 45 50 45 41  54 27 20 74 6f 20 65 6e  |o 'REPEAT' to en|
000014a0  64 22 0d 03 5c 13 20 20  f2 62 65 65 70 20 3a e5  |d"..\.  .beep :.|
000014b0  20 8d 54 6a 43 0d 03 61  13 20 20 6d 25 3d 2d 31  | .TjC..a.  m%=-1|
000014c0  20 3a e5 20 8d 74 67 43  0d 03 66 64 20 20 e7 72  | :. .tgC..fd  .r|
000014d0  65 70 65 61 74 73 25 3d  30 84 65 64 69 74 66 6c  |epeats%=0.editfl|
000014e0  61 67 25 8c 66 69 6e 69  73 68 25 3d b9 3a e5 8d  |ag%.finish%=.:..|
000014f0  44 61 43 8b f1 8a 30 2c  32 33 29 22 43 61 6e 27  |DaC...0,23)"Can'|
00001500  74 20 66 69 6e 69 73 68  20 2d 22 27 27 22 65 6e  |t finish -"''"en|
00001510  64 20 72 65 70 65 61 74  73 20 66 69 72 73 74 22  |d repeats first"|
00001520  3a f2 62 65 65 70 3a e5  8d 54 6a 43 0d 03 6b 32  |:.beep:..TjC..k2|
00001530  20 20 f1 8a 30 2c 32 33  29 22 57 68 69 63 68 20  |  ..0,23)"Which |
00001540  70 72 6f 67 72 61 6d 22  27 27 22 28 74 79 70 65  |program"''"(type|
00001550  20 30 20 66 6f 72 20 6c  69 73 74 29 22 27 0d 03  | 0 for list)"'..|
00001560  70 3b 20 20 e8 6d 25 3a  e7 6d 25 3d 30 8c f2 6c  |p;  .m%:.m%=0..l|
00001570  69 73 74 70 72 6f 67 6e  61 6d 65 73 3a 70 72 6f  |istprognames:pro|
00001580  67 66 6c 61 67 25 3d b9  3a f2 63 6c 65 61 72 28  |gflag%=.:.clear(|
00001590  32 33 29 3a e5 8d 44 6b  43 0d 03 75 61 20 20 e7  |23):..DkC..ua  .|
000015a0  6d 25 3d 70 6e 6f 20 8c  f2 62 65 65 70 3a f2 63  |m%=pno ..beep:.c|
000015b0  6c 65 61 72 28 32 33 29  3a f1 8a 30 2c 32 34 29  |lear(23):..0,24)|
000015c0  22 20 20 52 65 63 75 72  73 69 6f 6e 20 69 73 22  |"  Recursion is"|
000015d0  27 27 22 20 20 4e 4f 54  20 61 6c 6c 6f 77 65 64  |''"  NOT allowed|
000015e0  21 22 27 27 22 20 20 20  20 54 72 79 20 61 67 61  |!"''"    Try aga|
000015f0  69 6e 22 3b 3a e5 8d 44  70 43 0d 03 7a 68 20 20  |in";:..DpC..zh  |
00001600  e7 24 28 6e 61 6d 65 25  2b 31 36 2a 28 6d 25 2d  |.$(name%+16*(m%-|
00001610  31 29 29 3d 22 6d 74 22  8c f2 63 6c 65 61 72 28  |1))="mt"..clear(|
00001620  32 33 29 3a f1 8a 30 2c  32 33 29 22 54 68 65 72  |23):..0,23)"Ther|
00001630  65 20 69 73 20 6e 6f 22  27 27 22 70 72 6f 67 72  |e is no"''"progr|
00001640  61 6d 20 6e 75 6d 62 65  72 20 22 6d 25 27 27 22  |am number "m%''"|
00001650  54 72 79 20 61 67 61 69  6e 22 3b 3a e5 20 8d 44  |Try again";:. .D|
00001660  70 43 0d 03 7f 1f 20 20  f2 70 75 74 6f 70 63 6f  |pC....  .putopco|
00001670  64 65 28 70 6e 6f 2c 6c  6e 6f 2c 31 30 2b 6d 25  |de(pno,lno,10+m%|
00001680  29 0d 03 84 35 20 20 f2  63 6c 65 61 72 28 32 33  |)...5  .clear(23|
00001690  29 3a f1 8a 30 2c 32 33  29 22 50 52 4f 47 52 41  |):..0,23)"PROGRA|
000016a0  4d 3a 20 22 24 28 6e 61  6d 65 25 2b 31 36 2a 28  |M: "$(name%+16*(|
000016b0  6d 25 2d 31 29 29 0d 03  89 33 20 20 e7 20 73 69  |m%-1))...3  . si|
000016c0  7a 65 66 67 25 21 28 34  2a 28 6d 25 2d 31 29 29  |zefg%!(4*(m%-1))|
000016d0  20 8c f1 27 22 53 49 5a  45 20 3d 20 22 3b 3a e5  | ..'"SIZE = ";:.|
000016e0  8d 74 62 43 8b 8d 74 6c  43 0d 03 8e 6d 20 20 6c  |.tbC..tlC...m  l|
000016f0  65 6e 25 3f 28 70 6e 6f  2d 31 29 3d 28 6c 65 6e  |en%?(pno-1)=(len|
00001700  25 3f 28 70 6e 6f 2d 31  29 29 2d 32 3a e7 6c 65  |%?(pno-1))-2:.le|
00001710  6e 25 3f 28 70 6e 6f 2d  31 29 3c 3e 32 35 35 8c  |n%?(pno-1)<>255.|
00001720  ef 35 3a ef 31 38 2c 30  2c 30 3a ec 35 30 2c 39  |.5:.18,0,0:.50,9|
00001730  37 30 2d 28 6c 6e 6f 2d  32 29 2a 33 32 3a f1 62  |70-(lno-2)*32:.b|
00001740  6c 61 6e 6b 24 3a ef 31  38 2c 30 2c 31 3a ef 34  |lank$:.18,0,1:.4|
00001750  3a 8b 8d 74 71 43 0d 03  93 3c 20 20 e7 20 a4 67  |:..tqC...<  . .g|
00001760  65 74 6f 70 63 6f 64 65  28 70 6e 6f 2c 6c 65 6e  |etopcode(pno,len|
00001770  25 3f 28 70 6e 6f 2d 31  29 2b 31 29 3d 33 8c 72  |%?(pno-1)+1)=3.r|
00001780  65 70 65 61 74 73 25 3d  72 65 70 65 61 74 73 25  |epeats%=repeats%|
00001790  2d 31 0d 03 98 3c 20 20  e7 20 a4 67 65 74 6f 70  |-1...<  . .getop|
000017a0  63 6f 64 65 28 70 6e 6f  2c 6c 65 6e 25 3f 28 70  |code(pno,len%?(p|
000017b0  6e 6f 2d 31 29 2b 31 29  3d 34 8c 72 65 70 65 61  |no-1)+1)=4.repea|
000017c0  74 73 25 3d 72 65 70 65  61 74 73 25 2b 31 0d 03  |ts%=repeats%+1..|
000017d0  9d 0c 20 20 e5 20 8d 74  71 43 0d 03 a2 0a 20 20  |..  . .tqC....  |
000017e0  e8 20 6d 25 0d 03 a7 1d  20 20 f2 70 75 74 6f 70  |. m%....  .putop|
000017f0  65 72 61 6e 64 28 70 6e  6f 2c 6c 6e 6f 2c 6d 25  |erand(pno,lno,m%|
00001800  29 0d 03 ac 14 20 20 f2  6c 69 73 74 70 72 6f 67  |)....  .listprog|
00001810  28 70 6e 6f 29 0d 03 b1  05 e1 0d 03 b6 14 dd 20  |(pno).......... |
00001820  f2 6c 69 73 74 70 72 6f  67 6e 61 6d 65 73 0d 03  |.listprognames..|
00001830  bb 0d 20 20 ea 20 69 25  2c 79 25 0d 03 c0 07 20  |..  . i%,y%.... |
00001840  20 da 0d 03 c5 09 20 20  ef 20 35 0d 03 ca 1d 20  | .....  . 5.... |
00001850  20 ec 20 31 30 2c 31 30  30 35 20 3a f1 22 4e 6f  | . 10,1005 :."No|
00001860  3a 20 54 69 74 6c 65 22  0d 03 cf 1b 20 20 ec 20  |: Title"....  . |
00001870  30 2c 39 36 35 20 3a f0  20 32 31 2c 36 33 39 2c  |0,965 :. 21,639,|
00001880  39 36 35 0d 03 d4 0c 20  20 79 25 3d 39 32 30 0d  |965....  y%=920.|
00001890  03 d9 15 20 20 e3 69 25  3d 31 b8 3f 6d 61 78 70  |...  .i%=1.?maxp|
000018a0  72 6f 67 25 0d 03 de 1f  20 20 ec 20 31 30 2c 79  |rog%....  . 10,y|
000018b0  25 20 3a e7 20 69 25 3c  31 30 20 8c 20 f1 20 22  |% :. i%<10 . . "|
000018c0  20 22 3b 0d 03 e3 10 20  20 f1 20 69 25 3b 22 20  | ";....  . i%;" |
000018d0  20 22 3b 0d 03 e8 57 20  20 e7 20 24 28 6e 61 6d  | ";...W  . $(nam|
000018e0  65 25 2b 31 36 2a 28 69  25 2d 31 29 29 3c 3e 22  |e%+16*(i%-1))<>"|
000018f0  6d 74 22 8c f1 20 24 28  6e 61 6d 65 25 2b 31 36  |mt".. $(name%+16|
00001900  2a 28 69 25 2d 31 29 29  3b 22 20 22 3b 3a e7 20  |*(i%-1));" ";:. |
00001910  73 69 7a 65 66 67 25 21  28 34 2a 28 69 25 2d 31  |sizefg%!(4*(i%-1|
00001920  29 29 8c f1 22 53 49 5a  45 22 0d 03 ed 0e 20 20  |)).."SIZE"....  |
00001930  79 25 3d 79 25 2d 34 35  0d 03 f2 0a 20 20 ed 20  |y%=y%-45....  . |
00001940  69 25 0d 03 f7 09 20 20  ef 20 34 0d 03 fc 05 e1  |i%....  . 4.....|
00001950  0d 04 01 0e dd 20 f2 6e  65 77 70 72 6f 67 0d 04  |..... .newprog..|
00001960  06 1e 20 20 ea 20 6e 61  6d 65 24 2c 6c 65 6e 67  |..  . name$,leng|
00001970  74 68 2c 69 25 2c 6e 24  2c 63 68 24 0d 04 0b 36  |th,i%,n$,ch$...6|
00001980  20 20 f1 20 8a 30 2c 32  34 29 22 54 79 70 65 20  |  . .0,24)"Type |
00001990  69 6e 20 74 68 65 20 6e  61 6d 65 20 22 27 27 22  |in the name "''"|
000019a0  66 6f 72 20 79 6f 75 72  20 70 72 6f 67 72 61 6d  |for your program|
000019b0  22 27 0d 04 10 0e 20 20  6e 61 6d 65 24 3d 22 22  |"'....  name$=""|
000019c0  0d 04 15 13 20 20 6e 61  6d 65 24 3d a4 69 6e 70  |....  name$=.inp|
000019d0  73 74 72 0d 04 1a 13 20  20 f2 6d 65 6e 75 28 65  |str....  .menu(e|
000019e0  6e 74 72 79 25 29 0d 04  1f 1d 20 20 f1 20 27 22  |ntry%)....  . '"|
000019f0  4b 20 2d 20 6b 69 6c 6c  20 6c 61 73 74 20 6c 69  |K - kill last li|
00001a00  6e 65 22 0d 04 24 66 20  20 e7 20 c2 6e 61 6d 65  |ne"..$f  . .name|
00001a10  24 2c 34 29 3d 22 53 49  5a 45 22 20 8c 20 73 69  |$,4)="SIZE" . si|
00001a20  7a 65 66 67 25 21 28 34  2a 28 70 72 6f 67 6e 6f  |zefg%!(4*(progno|
00001a30  2d 31 29 29 3d b9 3a 6e  61 6d 65 24 3d c0 6e 61  |-1))=.:name$=.na|
00001a40  6d 65 24 2c a9 28 6e 61  6d 65 24 29 2d 34 29 8b  |me$,.(name$)-4).|
00001a50  20 73 69 7a 65 66 67 25  21 28 34 2a 28 70 72 6f  | sizefg%!(4*(pro|
00001a60  67 6e 6f 2d 31 29 29 3d  a3 0d 04 29 22 20 20 24  |gno-1))=...)"  $|
00001a70  28 6e 61 6d 65 25 2b 31  36 2a 28 70 72 6f 67 6e  |(name%+16*(progn|
00001a80  6f 2d 31 29 29 3d 6e 61  6d 65 24 0d 04 2e 3f 20  |o-1))=name$...? |
00001a90  20 f2 70 72 6f 67 6c 69  6e 65 73 28 24 28 6e 61  | .proglines($(na|
00001aa0  6d 65 25 2b 31 36 2a 28  70 72 6f 67 6e 6f 2d 31  |me%+16*(progno-1|
00001ab0  29 29 2c 73 69 7a 65 66  67 25 21 28 34 2a 28 70  |)),sizefg%!(4*(p|
00001ac0  72 6f 67 6e 6f 2d 31 29  29 29 0d 04 33 15 20 20  |rogno-1)))..3.  |
00001ad0  6c 65 6e 67 74 68 3d 30  20 20 20 20 20 20 20 0d  |length=0       .|
00001ae0  04 38 12 20 20 72 65 70  65 61 74 73 25 3d 30 20  |.8.  repeats%=0 |
00001af0  20 0d 04 3d 0e 20 20 f5  20 20 20 20 20 20 20 0d  | ..=.  .       .|
00001b00  04 42 1a 20 20 6c 65 6e  67 74 68 3d 6c 65 6e 67  |.B.  length=leng|
00001b10  74 68 2b 31 20 20 20 20  20 0d 04 47 1c 20 20 6c  |th+1     ..G.  l|
00001b20  65 6e 25 3f 28 70 72 6f  67 6e 6f 2d 31 29 3d 6c  |en%?(progno-1)=l|
00001b30  65 6e 67 74 68 0d 04 4c  1f 20 20 f2 69 6e 70 75  |ength..L.  .inpu|
00001b40  74 6c 69 6e 65 28 70 72  6f 67 6e 6f 2c 6c 65 6e  |tline(progno,len|
00001b50  67 74 68 29 0d 04 51 1c  20 20 6c 65 6e 67 74 68  |gth)..Q.  length|
00001b60  3d 6c 65 6e 25 3f 28 70  72 6f 67 6e 6f 2d 31 29  |=len%?(progno-1)|
00001b70  0d 04 56 1b 20 20 e7 20  6c 65 6e 67 74 68 3d 32  |..V.  . length=2|
00001b80  35 35 8c 6c 65 6e 67 74  68 3d 30 0d 04 5b 1b 20  |55.length=0..[. |
00001b90  20 fd 20 66 69 6e 69 73  68 25 20 84 20 6c 65 6e  | . finish% . len|
00001ba0  67 74 68 3d 33 30 0d 04  60 05 e1 0d 04 65 0b dd  |gth=30..`....e..|
00001bb0  20 f2 62 65 65 70 0d 04  6a 0a 20 20 ea 20 69 25  | .beep..j.  . i%|
00001bc0  0d 04 6f 10 20 20 e3 20  69 25 3d 31 20 b8 20 33  |..o.  . i%=1 . 3|
00001bd0  0d 04 74 31 20 20 d4 20  31 2c 2d 31 35 2c 31 35  |..t1  . 1,-15,15|
00001be0  30 2c 34 20 3a d4 20 32  2c 2d 31 35 2c 31 32 30  |0,4 :. 2,-15,120|
00001bf0  2c 34 20 3a d4 20 33 2c  2d 31 35 2c 31 30 30 2c  |,4 :. 3,-15,100,|
00001c00  34 0d 04 79 30 20 20 d4  20 31 2c 2d 31 35 2c 37  |4..y0  . 1,-15,7|
00001c10  35 2c 34 20 20 3a d4 20  32 2c 2d 31 35 2c 36 30  |5,4  :. 2,-15,60|
00001c20  2c 34 20 20 3a d4 20 33  2c 2d 31 35 2c 35 30 2c  |,4  :. 3,-15,50,|
00001c30  34 0d 04 7e 0a 20 20 ed  20 69 25 0d 04 83 05 e1  |4..~.  . i%.....|
00001c40  0d 04 88 14 dd 20 f2 65  64 69 74 28 6e 75 6d 62  |..... .edit(numb|
00001c50  65 72 25 29 0d 04 8d 1a  20 20 ea 20 69 25 2c 69  |er%)....  . i%,i|
00001c60  6e 70 75 74 25 2c 70 6f  69 6e 74 65 72 25 0d 04  |nput%,pointer%..|
00001c70  92 1e 20 20 db 3a 65 64  69 74 66 6c 61 67 25 3d  |..  .:editflag%=|
00001c80  b9 3a 72 65 70 66 6c 61  67 25 3d a3 0d 04 97 30  |.:repflag%=....0|
00001c90  20 20 70 72 6f 67 66 6c  61 67 25 3d b9 3a f2 6c  |  progflag%=.:.l|
00001ca0  69 73 74 70 72 6f 67 28  6e 75 6d 62 65 72 25 29  |istprog(number%)|
00001cb0  3a 70 72 6f 67 66 6c 61  67 25 3d a3 0d 04 9c 12  |:progflag%=.....|
00001cc0  20 20 f2 6d 65 6e 75 28  65 64 69 74 25 29 0d 04  |  .menu(edit%)..|
00001cd0  a1 25 20 20 ef 20 35 20  3a ec 20 35 36 30 2c 31  |.%  . 5 :. 560,1|
00001ce0  30 31 33 20 3a f1 20 62  6c 61 6e 6b 32 24 20 3a  |013 :. blank2$ :|
00001cf0  ef 20 34 0d 04 a6 1f 20  20 e7 20 ac 20 65 72 72  |. 4....  . . err|
00001d00  6f 72 66 6c 61 67 25 20  f2 63 6c 65 61 72 28 32  |orflag% .clear(2|
00001d10  30 29 0d 04 ab 12 20 20  65 72 72 6f 72 66 6c 61  |0)....  errorfla|
00001d20  67 25 3d a3 0d 04 b0 1d  20 20 69 6e 70 75 74 25  |g%=.....  input%|
00001d30  3d a4 67 65 74 63 6f 64  65 28 22 49 44 43 46 22  |=.getcode("IDCF"|
00001d40  29 0d 04 b5 10 20 20 f2  63 6c 65 61 72 28 32 30  |)....  .clear(20|
00001d50  29 0d 04 ba 24 20 20 ee  20 69 6e 70 75 74 25 20  |)...$  . input% |
00001d60  e5 20 8d 74 7f 44 2c 8d  54 4f 45 2c 8d 44 50 45  |. .t.D,.TOE,.DPE|
00001d70  2c 8d 74 42 45 0d 04 bf  09 20 20 f4 20 41 0d 04  |,.tBE....  . A..|
00001d80  c4 48 20 20 e7 20 6c 65  6e 25 3f 28 6e 75 6d 62  |.H  . len%?(numb|
00001d90  65 72 25 2d 31 29 3e 3d  33 30 8c f1 8a 30 2c 32  |er%-1)>=30...0,2|
00001da0  32 29 22 4e 6f 20 72 6f  6f 6d 20 2d 20 22 27 27  |2)"No room - "''|
00001db0  22 64 65 6c 65 74 65 20  61 20 6c 69 6e 65 21 22  |"delete a line!"|
00001dc0  3a e5 8d 74 70 44 0d 04  c9 4c 20 20 f1 20 8a 30  |:..tpD...L  . .0|
00001dd0  2c 32 32 29 3b 22 54 79  70 65 20 69 6e 20 74 68  |,22);"Type in th|
00001de0  65 20 6e 75 6d 62 65 72  22 27 22 6f 66 20 74 68  |e number"'"of th|
00001df0  65 20 6c 69 6e 65 20 74  68 61 74 22 27 27 22 79  |e line that"''"y|
00001e00  6f 75 20 77 69 73 68 20  74 6f 20 69 6e 73 65 72  |ou wish to inser|
00001e10  74 22 0d 04 ce 0d 20 20  e8 20 6c 69 6e 65 25 0d  |t"....  . line%.|
00001e20  04 d3 10 20 20 f2 63 6c  65 61 72 28 32 32 29 0d  |...  .clear(22).|
00001e30  04 d8 7b 20 20 e7 20 6c  69 6e 65 25 3c 31 20 84  |..{  . line%<1 .|
00001e40  20 6c 69 6e 65 25 3e 35  37 20 84 20 28 6c 69 6e  | line%>57 . (lin|
00001e50  65 25 81 32 2a 32 29 3d  6c 69 6e 65 25 20 8c 20  |e%.2*2)=line% . |
00001e60  f1 20 8a 30 2c 32 32 29  3b 22 54 68 65 20 6e 75  |. .0,22);"The nu|
00001e70  6d 62 65 72 20 6d 75 73  74 20 62 65 22 27 22 61  |mber must be"'"a|
00001e80  6e 20 4f 44 44 20 6e 75  6d 62 65 72 20 20 20 20  |n ODD number    |
00001e90  22 27 27 22 66 72 6f 6d  20 31 20 74 6f 20 35 37  |"''"from 1 to 57|
00001ea0  22 3b 3a e5 8d 64 4e 44  20 20 0d 04 dd 1c 20 20  |";:..dND  ....  |
00001eb0  70 6f 69 6e 74 65 72 25  3d 28 6c 69 6e 65 25 2b  |pointer%=(line%+|
00001ec0  31 29 20 81 20 32 0d 04  e2 23 20 20 ef 20 35 20  |1) . 2...#  . 5 |
00001ed0  3a ec 20 35 36 30 2c 31  30 31 33 20 3a f1 20 6c  |:. 560,1013 :. l|
00001ee0  69 6e 65 25 20 3a ef 20  34 0d 04 e7 1d 20 20 e3  |ine% :. 4....  .|
00001ef0  20 69 25 3d 33 30 20 b8  20 70 6f 69 6e 74 65 72  | i%=30 . pointer|
00001f00  25 20 88 20 2d 31 0d 04  ec 37 20 20 f2 70 75 74  |% . -1...7  .put|
00001f10  6f 70 65 72 61 6e 64 28  6e 75 6d 62 65 72 25 2c  |operand(number%,|
00001f20  69 25 2c a4 67 65 74 6f  70 65 72 61 6e 64 28 6e  |i%,.getoperand(n|
00001f30  75 6d 62 65 72 25 2c 69  25 2d 31 29 29 0d 04 f1  |umber%,i%-1))...|
00001f40  35 20 20 f2 70 75 74 6f  70 63 6f 64 65 28 6e 75  |5  .putopcode(nu|
00001f50  6d 62 65 72 25 2c 69 25  2c a4 67 65 74 6f 70 63  |mber%,i%,.getopc|
00001f60  6f 64 65 28 6e 75 6d 62  65 72 25 2c 69 25 2d 31  |ode(number%,i%-1|
00001f70  29 29 0d 04 f6 0a 20 20  ed 20 69 25 0d 04 fb 29  |))....  . i%...)|
00001f80  20 20 6c 65 6e 25 3f 28  6e 75 6d 62 65 72 25 2d  |  len%?(number%-|
00001f90  31 29 3d 6c 65 6e 25 3f  28 6e 75 6d 62 65 72 25  |1)=len%?(number%|
00001fa0  2d 31 29 2b 31 0d 05 00  13 20 20 f2 6d 65 6e 75  |-1)+1....  .menu|
00001fb0  28 65 6e 74 72 79 25 29  0d 05 05 22 20 20 f2 69  |(entry%)..."  .i|
00001fc0  6e 70 75 74 6c 69 6e 65  28 6e 75 6d 62 65 72 25  |nputline(number%|
00001fd0  2c 70 6f 69 6e 74 65 72  25 29 0d 05 0a 0c 20 20  |,pointer%)....  |
00001fe0  e5 20 8d 74 5c 44 0d 05  0f 09 20 20 f4 20 44 0d  |. .t\D....  . D.|
00001ff0  05 14 4c 20 20 f1 20 8a  30 2c 32 32 29 3b 22 54  |..L  . .0,22);"T|
00002000  79 70 65 20 69 6e 20 74  68 65 20 6e 75 6d 62 65  |ype in the numbe|
00002010  72 22 27 22 6f 66 20 74  68 65 20 6c 69 6e 65 20  |r"'"of the line |
00002020  74 68 61 74 22 27 27 22  79 6f 75 20 77 69 73 68  |that"''"you wish|
00002030  20 74 6f 20 64 65 6c 65  74 65 22 0d 05 19 0d 20  | to delete".... |
00002040  20 e8 20 6c 69 6e 65 25  0d 05 1e 10 20 20 f2 63  | . line%....  .c|
00002050  6c 65 61 72 28 32 32 29  0d 05 23 84 20 20 e7 20  |lear(22)..#.  . |
00002060  6c 69 6e 65 25 3c 32 20  84 20 6c 69 6e 65 25 81  |line%<2 . line%.|
00002070  32 3e 6c 65 6e 25 3f 28  6e 75 6d 62 65 72 25 2d  |2>len%?(number%-|
00002080  31 29 20 84 20 28 6c 69  6e 65 25 81 32 2a 32 29  |1) . (line%.2*2)|
00002090  3c 3e 6c 69 6e 65 25 20  8c f1 8a 30 2c 32 32 29  |<>line% ...0,22)|
000020a0  22 53 69 6c 6c 79 21 20  20 54 68 65 72 65 20 69  |"Silly!  There i|
000020b0  73 22 27 27 22 20 20 6e  6f 20 73 75 63 68 20 6c  |s"''"  no such l|
000020c0  69 6e 65 21 22 27 27 22  20 20 20 54 72 79 20 61  |ine!"''"   Try a|
000020d0  67 61 69 6e 22 3b 3a e5  8d 54 59 45 0d 05 28 18  |gain";:..TYE..(.|
000020e0  20 20 70 6f 69 6e 74 65  72 25 3d 6c 69 6e 65 25  |  pointer%=line%|
000020f0  20 81 20 32 0d 05 2d 25  20 20 e3 69 25 3d 70 6f  | . 2..-%  .i%=po|
00002100  69 6e 74 65 72 25 b8 6c  65 6e 25 3f 28 6e 75 6d  |inter%.len%?(num|
00002110  62 65 72 25 2d 31 29 2d  31 0d 05 32 37 20 20 f2  |ber%-1)-1..27  .|
00002120  70 75 74 6f 70 65 72 61  6e 64 28 6e 75 6d 62 65  |putoperand(numbe|
00002130  72 25 2c 69 25 2c a4 67  65 74 6f 70 65 72 61 6e  |r%,i%,.getoperan|
00002140  64 28 6e 75 6d 62 65 72  25 2c 69 25 2b 31 29 29  |d(number%,i%+1))|
00002150  0d 05 37 35 20 20 f2 70  75 74 6f 70 63 6f 64 65  |..75  .putopcode|
00002160  28 6e 75 6d 62 65 72 25  2c 69 25 2c a4 67 65 74  |(number%,i%,.get|
00002170  6f 70 63 6f 64 65 28 6e  75 6d 62 65 72 25 2c 69  |opcode(number%,i|
00002180  25 2b 31 29 29 0d 05 3c  0a 20 20 ed 20 69 25 0d  |%+1))..<.  . i%.|
00002190  05 41 29 20 20 6c 65 6e  25 3f 28 6e 75 6d 62 65  |.A)  len%?(numbe|
000021a0  72 25 2d 31 29 3d 6c 65  6e 25 3f 28 6e 75 6d 62  |r%-1)=len%?(numb|
000021b0  65 72 25 2d 31 29 2d 31  0d 05 46 18 20 20 f2 6c  |er%-1)-1..F.  .l|
000021c0  69 73 74 70 72 6f 67 28  6e 75 6d 62 65 72 25 29  |istprog(number%)|
000021d0  0d 05 4b 0c 20 20 e5 20  8d 74 70 44 0d 05 50 09  |..K.  . .tpD..P.|
000021e0  20 20 f4 20 43 0d 05 55  4c 20 20 f1 20 8a 30 2c  |  . C..UL  . .0,|
000021f0  32 32 29 3b 22 54 79 70  65 20 69 6e 20 74 68 65  |22);"Type in the|
00002200  20 6e 75 6d 62 65 72 22  27 22 6f 66 20 74 68 65  | number"'"of the|
00002210  20 6c 69 6e 65 20 74 68  61 74 22 27 27 22 79 6f  | line that"''"yo|
00002220  75 20 77 69 73 68 20 74  6f 20 63 68 61 6e 67 65  |u wish to change|
00002230  22 0d 05 5a 0d 20 20 e8  20 6c 69 6e 65 25 0d 05  |"..Z.  . line%..|
00002240  5f 10 20 20 f2 63 6c 65  61 72 28 32 32 29 0d 05  |_.  .clear(22)..|
00002250  64 84 20 20 e7 20 6c 69  6e 65 25 3c 32 20 84 20  |d.  . line%<2 . |
00002260  6c 69 6e 65 25 81 32 3e  6c 65 6e 25 3f 28 6e 75  |line%.2>len%?(nu|
00002270  6d 62 65 72 25 2d 31 29  20 84 20 28 6c 69 6e 65  |mber%-1) . (line|
00002280  25 81 32 2a 32 29 3c 3e  6c 69 6e 65 25 20 8c f1  |%.2*2)<>line% ..|
00002290  8a 30 2c 32 32 29 22 53  69 6c 6c 79 21 20 20 54  |.0,22)"Silly!  T|
000022a0  68 65 72 65 20 69 73 22  27 27 22 20 20 6e 6f 20  |here is"''"  no |
000022b0  73 75 63 68 20 6c 69 6e  65 21 22 27 27 22 20 20  |such line!"''"  |
000022c0  20 54 72 79 20 61 67 61  69 6e 22 3b 3a e5 8d 44  | Try again";:..D|
000022d0  5a 45 0d 05 69 18 20 20  70 6f 69 6e 74 65 72 25  |ZE..i.  pointer%|
000022e0  3d 6c 69 6e 65 25 20 81  20 32 0d 05 6e 2b 20 20  |=line% . 2..n+  |
000022f0  ef 20 35 20 3a ec 20 35  36 30 2c 31 30 31 33 20  |. 5 :. 560,1013 |
00002300  3a f1 20 62 6c 61 6e 6b  32 24 3b 6c 69 6e 65 25  |:. blank2$;line%|
00002310  20 3a ef 20 34 0d 05 73  13 20 20 f2 6d 65 6e 75  | :. 4..s.  .menu|
00002320  28 65 6e 74 72 79 25 29  0d 05 78 22 20 20 f2 69  |(entry%)..x"  .i|
00002330  6e 70 75 74 6c 69 6e 65  28 6e 75 6d 62 65 72 25  |nputline(number%|
00002340  2c 70 6f 69 6e 74 65 72  25 29 0d 05 7d 0c 20 20  |,pointer%)..}.  |
00002350  e5 20 8d 74 5c 44 0d 05  82 09 20 20 f4 20 46 0d  |. .t\D....  . F.|
00002360  05 87 11 20 20 65 64 69  74 66 6c 61 67 25 3d a3  |...  editflag%=.|
00002370  0d 05 8c 05 e1 0d 05 91  13 dd 20 f2 72 75 6e 28  |.......... .run(|
00002380  6e 75 6d 62 65 72 25 29  0d 05 96 5d 20 20 ea 20  |number%)...]  . |
00002390  61 6e 67 6c 65 25 2c 72  65 70 70 74 72 25 2c 70  |angle%,repptr%,p|
000023a0  72 6f 67 70 74 72 25 2c  63 75 72 70 72 6f 67 25  |rogptr%,curprog%|
000023b0  2c 63 75 72 6c 69 6e 65  25 2c 6f 70 63 6f 64 65  |,curline%,opcode|
000023c0  25 2c 6f 70 65 72 61 6e  64 25 2c 73 69 7a 65 25  |%,operand%,size%|
000023d0  2c 69 6e 6b 25 2c 69 25  2c 6e 25 2c 78 25 2c 79  |,ink%,i%,n%,x%,y|
000023e0  25 2c 78 2c 79 0d 05 9b  0a 20 20 f2 6f 66 66 0d  |%,x,y....  .off.|
000023f0  05 a0 22 20 20 ef 20 32  36 20 3a da 20 3a 78 3d  |.."  . 26 :. :x=|
00002400  36 34 30 20 3a 79 3d 35  31 32 20 3a ec 20 78 2c  |640 :y=512 :. x,|
00002410  79 0d 05 a5 4e 20 20 72  65 70 70 74 72 25 3d 30  |y...N  repptr%=0|
00002420  3a 70 72 6f 67 70 74 72  25 3d 30 3a 63 75 72 6c  |:progptr%=0:curl|
00002430  69 6e 65 25 3d 31 3a 63  75 72 70 72 6f 67 25 3d  |ine%=1:curprog%=|
00002440  6e 75 6d 62 65 72 25 3a  69 6e 6b 25 3d 35 3a 61  |number%:ink%=5:a|
00002450  6e 67 6c 65 25 3d 30 3a  73 69 7a 65 25 3d 30 0d  |ngle%=0:size%=0.|
00002460  05 aa 54 20 20 6f 70 63  6f 64 65 25 3d a4 67 65  |..T  opcode%=.ge|
00002470  74 6f 70 63 6f 64 65 28  63 75 72 70 72 6f 67 25  |topcode(curprog%|
00002480  2c 63 75 72 6c 69 6e 65  25 29 20 3a 6f 70 65 72  |,curline%) :oper|
00002490  61 6e 64 25 3d a4 67 65  74 6f 70 65 72 61 6e 64  |and%=.getoperand|
000024a0  28 63 75 72 70 72 6f 67  25 2c 63 75 72 6c 69 6e  |(curprog%,curlin|
000024b0  65 25 29 0d 05 af 23 20  20 e7 20 6f 70 65 72 61  |e%)...#  . opera|
000024c0  6e 64 25 3d 30 20 8c 20  6f 70 65 72 61 6e 64 25  |nd%=0 . operand%|
000024d0  3d 73 69 7a 65 25 0d 05  b4 26 20 20 e7 20 6f 70  |=size%...&  . op|
000024e0  63 6f 64 65 25 3e 31 30  20 8c 20 6e 25 3d 38 20  |code%>10 . n%=8 |
000024f0  8b 20 6e 25 3d 6f 70 63  6f 64 65 25 0d 05 b9 36  |. n%=opcode%...6|
00002500  20 20 ee 6e 25 e5 8d 74  7e 45 2c 8d 64 7f 45 2c  |  .n%..t~E,.d.E,|
00002510  8d 54 5d 46 2c 8d 44 40  46 2c 8d 44 59 46 2c 8d  |.T]F,.D@F,.DYF,.|
00002520  44 6d 46 2c 8d 74 41 46  2c 8d 74 5f 46 2c 8d 44  |DmF,.tAF,.t_F,.D|
00002530  7d 46 0d 05 be 09 20 20  f4 20 4d 0d 05 c3 0f 20  |}F....  . M.... |
00002540  20 6d 6f 76 65 3d 35 32  30 30 0d 05 c8 27 20 20  | move=5200...'  |
00002550  e7 20 61 6e 67 6c 65 25  3d 30 20 8c 20 78 3d 78  |. angle%=0 . x=x|
00002560  2b 6f 70 65 72 61 6e 64  25 20 3a e5 20 8d 64 70  |+operand% :. .dp|
00002570  45 0d 05 cd 50 20 20 e7  20 61 6e 67 6c 65 25 3c  |E...P  . angle%<|
00002580  39 30 20 8c 20 78 3d 78  2b 6f 70 65 72 61 6e 64  |90 . x=x+operand|
00002590  25 2a 9b 28 b2 28 61 6e  67 6c 65 25 29 29 20 3a  |%*.(.(angle%)) :|
000025a0  79 3d 79 2b 6f 70 65 72  61 6e 64 25 2a b5 28 b2  |y=y+operand%*.(.|
000025b0  28 61 6e 67 6c 65 25 29  29 20 3a e5 20 8d 64 70  |(angle%)) :. .dp|
000025c0  45 0d 05 d2 28 20 20 e7  20 61 6e 67 6c 65 25 3d  |E...(  . angle%=|
000025d0  39 30 20 8c 20 79 3d 79  2b 6f 70 65 72 61 6e 64  |90 . y=y+operand|
000025e0  25 20 3a e5 20 8d 64 70  45 0d 05 d7 59 20 20 e7  |% :. .dpE...Y  .|
000025f0  20 61 6e 67 6c 65 25 3c  31 38 30 20 8c 20 78 3d  | angle%<180 . x=|
00002600  78 2d 6f 70 65 72 61 6e  64 25 2a 9b 28 b2 28 31  |x-operand%*.(.(1|
00002610  38 30 2d 61 6e 67 6c 65  25 29 29 20 3a 79 3d 79  |80-angle%)) :y=y|
00002620  2b 6f 70 65 72 61 6e 64  25 2a b5 28 b2 28 31 38  |+operand%*.(.(18|
00002630  30 2d 61 6e 67 6c 65 25  29 29 20 3a e5 20 8d 64  |0-angle%)) :. .d|
00002640  70 45 0d 05 dc 29 20 20  e7 20 61 6e 67 6c 65 25  |pE...)  . angle%|
00002650  3d 31 38 30 20 8c 20 78  3d 78 2d 6f 70 65 72 61  |=180 . x=x-opera|
00002660  6e 64 25 20 3a e5 20 8d  64 70 45 0d 05 e1 59 20  |nd% :. .dpE...Y |
00002670  20 e7 20 61 6e 67 6c 65  25 3c 32 37 30 20 8c 20  | . angle%<270 . |
00002680  78 3d 78 2d 6f 70 65 72  61 6e 64 25 2a 9b 28 b2  |x=x-operand%*.(.|
00002690  28 61 6e 67 6c 65 25 2d  31 38 30 29 29 20 3a 79  |(angle%-180)) :y|
000026a0  3d 79 2d 6f 70 65 72 61  6e 64 25 2a b5 28 b2 28  |=y-operand%*.(.(|
000026b0  61 6e 67 6c 65 25 2d 31  38 30 29 29 20 3a e5 20  |angle%-180)) :. |
000026c0  8d 64 70 45 0d 05 e6 29  20 20 e7 20 61 6e 67 6c  |.dpE...)  . angl|
000026d0  65 25 3d 32 37 30 20 8c  20 79 3d 79 2d 6f 70 65  |e%=270 . y=y-ope|
000026e0  72 61 6e 64 25 20 3a e5  20 8d 64 70 45 0d 05 eb  |rand% :. .dpE...|
000026f0  51 20 20 e7 20 61 6e 67  6c 65 25 3c 33 36 30 20  |Q  . angle%<360 |
00002700  8c 20 78 3d 78 2b 6f 70  65 72 61 6e 64 25 2a 9b  |. x=x+operand%*.|
00002710  28 b2 28 33 36 30 2d 61  6e 67 6c 65 25 29 29 20  |(.(360-angle%)) |
00002720  3a 79 3d 79 2d 6f 70 65  72 61 6e 64 25 2a b5 28  |:y=y-operand%*.(|
00002730  b2 28 33 36 30 2d 61 6e  67 6c 65 25 29 29 0d 05  |.(360-angle%))..|
00002740  f0 24 20 20 78 25 3d 78  2b 2e 35 20 3a 79 25 3d  |.$  x%=x+.5 :y%=|
00002750  79 2b 2e 35 20 3a f0 20  69 6e 6b 25 2c 78 25 2c  |y+.5 :. ink%,x%,|
00002760  79 25 0d 05 f5 19 20 20  63 75 72 6c 69 6e 65 25  |y%....  curline%|
00002770  3d 63 75 72 6c 69 6e 65  25 2b 31 0d 05 fa 0c 20  |=curline%+1.... |
00002780  20 e5 20 8d 74 6a 45 0d  05 ff 09 20 20 f4 20 54  | . .tjE....  . T|
00002790  0d 06 04 1c 20 20 61 6e  67 6c 65 25 3d 61 6e 67  |....  angle%=ang|
000027a0  6c 65 25 2b 6f 70 65 72  61 6e 64 25 0d 06 09 19  |le%+operand%....|
000027b0  20 20 61 6e 67 6c 65 25  3d 61 6e 67 6c 65 25 20  |  angle%=angle% |
000027c0  83 20 33 36 30 0d 06 0e  24 20 20 e7 20 61 6e 67  |. 360...$  . ang|
000027d0  6c 65 25 3c 30 20 8c 20  61 6e 67 6c 65 25 3d 61  |le%<0 . angle%=a|
000027e0  6e 67 6c 65 25 2b 33 36  30 0d 06 13 19 20 20 63  |ngle%+360....  c|
000027f0  75 72 6c 69 6e 65 25 3d  63 75 72 6c 69 6e 65 25  |urline%=curline%|
00002800  2b 31 0d 06 18 0c 20 20  e5 20 8d 74 6a 45 0d 06  |+1....  . .tjE..|
00002810  1d 09 20 20 f4 20 52 0d  06 22 6e 20 20 e7 72 65  |..  . R.."n  .re|
00002820  70 70 74 72 25 3d 31 32  8c f2 62 65 65 70 3a f1  |pptr%=12..beep:.|
00002830  8a 30 2c 32 34 29 3b 22  45 52 52 4f 52 21 21 21  |.0,24);"ERROR!!!|
00002840  22 27 27 22 69 6e 20 50  72 6f 67 72 61 6d 20 22  |"''"in Program "|
00002850  3b 24 28 6e 61 6d 65 25  2b 31 36 2a 28 63 75 72  |;$(name%+16*(cur|
00002860  70 72 6f 67 25 2d 31 29  29 3b 27 27 22 54 6f 6f  |prog%-1));''"Too|
00002870  20 6d 61 6e 79 20 52 45  50 45 41 54 27 73 22 3a  | many REPEAT's":|
00002880  e5 8d 64 51 46 0d 06 27  17 20 20 72 65 70 70 74  |..dQF..'.  reppt|
00002890  72 25 3d 72 65 70 70 74  72 25 2b 31 0d 06 2c 23  |r%=repptr%+1..,#|
000028a0  20 20 72 65 70 73 74 61  63 6b 25 28 72 65 70 70  |  repstack%(repp|
000028b0  74 72 25 2c 32 29 3d 6f  70 65 72 61 6e 64 25 0d  |tr%,2)=operand%.|
000028c0  06 31 19 20 20 63 75 72  6c 69 6e 65 25 3d 63 75  |.1.  curline%=cu|
000028d0  72 6c 69 6e 65 25 2b 31  0d 06 36 23 20 20 72 65  |rline%+1..6#  re|
000028e0  70 73 74 61 63 6b 25 28  72 65 70 70 74 72 25 2c  |pstack%(repptr%,|
000028f0  31 29 3d 63 75 72 6c 69  6e 65 25 0d 06 3b 0c 20  |1)=curline%..;. |
00002900  20 e5 20 8d 74 6a 45 0d  06 40 09 20 20 f4 20 45  | . .tjE..@.  . E|
00002910  0d 06 45 64 20 20 e7 72  65 70 73 74 61 63 6b 25  |..Ed  .repstack%|
00002920  28 72 65 70 70 74 72 25  2c 31 29 3d 30 8c f2 62  |(repptr%,1)=0..b|
00002930  65 65 70 3a f1 8a 30 2c  32 34 29 3b 22 45 52 52  |eep:..0,24);"ERR|
00002940  4f 52 21 21 21 22 27 27  22 69 6e 20 50 72 6f 67  |OR!!!"''"in Prog|
00002950  72 61 6d 20 22 3b 24 28  6e 61 6d 65 25 2b 31 36  |ram ";$(name%+16|
00002960  2a 28 63 75 72 70 72 6f  67 25 2d 31 29 29 3a e5  |*(curprog%-1)):.|
00002970  8d 64 51 46 0d 06 4a 31  20 20 72 65 70 73 74 61  |.dQF..J1  repsta|
00002980  63 6b 25 28 72 65 70 70  74 72 25 2c 32 29 3d 72  |ck%(repptr%,2)=r|
00002990  65 70 73 74 61 63 6b 25  28 72 65 70 70 74 72 25  |epstack%(repptr%|
000029a0  2c 32 29 2d 31 0d 06 4f  67 20 20 e7 20 72 65 70  |,2)-1..Og  . rep|
000029b0  73 74 61 63 6b 25 28 72  65 70 70 74 72 25 2c 32  |stack%(repptr%,2|
000029c0  29 3c 31 20 8c 20 63 75  72 6c 69 6e 65 25 3d 63  |)<1 . curline%=c|
000029d0  75 72 6c 69 6e 65 25 2b  31 20 3a 72 65 70 70 74  |urline%+1 :reppt|
000029e0  72 25 3d 72 65 70 70 74  72 25 2d 31 20 8b 20 63  |r%=repptr%-1 . c|
000029f0  75 72 6c 69 6e 65 25 3d  72 65 70 73 74 61 63 6b  |urline%=repstack|
00002a00  25 28 72 65 70 70 74 72  25 2c 31 29 0d 06 54 0c  |%(repptr%,1)..T.|
00002a10  20 20 e5 20 8d 74 6a 45  0d 06 59 09 20 20 f4 20  |  . .tjE..Y.  . |
00002a20  55 0d 06 5e 0c 20 20 69  6e 6b 25 3d 34 0d 06 63  |U..^.  ink%=4..c|
00002a30  19 20 20 63 75 72 6c 69  6e 65 25 3d 63 75 72 6c  |.  curline%=curl|
00002a40  69 6e 65 25 2b 31 0d 06  68 0c 20 20 e5 20 8d 74  |ine%+1..h.  . .t|
00002a50  6a 45 0d 06 6d 09 20 20  f4 20 44 0d 06 72 0c 20  |jE..m.  . D..r. |
00002a60  20 69 6e 6b 25 3d 35 0d  06 77 19 20 20 63 75 72  | ink%=5..w.  cur|
00002a70  6c 69 6e 65 25 3d 63 75  72 6c 69 6e 65 25 2b 31  |line%=curline%+1|
00002a80  0d 06 7c 0c 20 20 e5 20  8d 74 6a 45 0d 06 7d 09  |..|.  . .tjE..}.|
00002a90  20 20 f4 20 48 0d 06 7e  1f 20 20 78 3d 36 34 30  |  . H..~.  x=640|
00002aa0  3a 79 3d 35 31 32 3a ec  78 2c 79 3a 61 6e 67 6c  |:y=512:.x,y:angl|
00002ab0  65 25 3d 30 0d 06 7f 1f  20 20 63 75 72 6c 69 6e  |e%=0....  curlin|
00002ac0  65 25 3d 63 75 72 6c 69  6e 65 25 2b 31 3a e5 8d  |e%=curline%+1:..|
00002ad0  74 6a 45 0d 06 81 09 20  20 f4 20 46 0d 06 86 29  |tjE....  . F...)|
00002ae0  20 20 e7 20 70 72 6f 67  73 74 61 63 6b 25 28 70  |  . progstack%(p|
00002af0  72 6f 67 70 74 72 25 2c  31 29 3d 30 20 8c 20 e5  |rogptr%,1)=0 . .|
00002b00  20 8d 64 51 46 0d 06 8b  25 20 20 63 75 72 70 72  | .dQF...%  curpr|
00002b10  6f 67 25 3d 70 72 6f 67  73 74 61 63 6b 25 28 70  |og%=progstack%(p|
00002b20  72 6f 67 70 74 72 25 2c  31 29 0d 06 90 25 20 20  |rogptr%,1)...%  |
00002b30  63 75 72 6c 69 6e 65 25  3d 70 72 6f 67 73 74 61  |curline%=progsta|
00002b40  63 6b 25 28 70 72 6f 67  70 74 72 25 2c 32 29 0d  |ck%(progptr%,2).|
00002b50  06 95 19 20 20 70 72 6f  67 70 74 72 25 3d 70 72  |...  progptr%=pr|
00002b60  6f 67 70 74 72 25 2d 31  0d 06 9a 0c 20 20 e5 20  |ogptr%-1....  . |
00002b70  8d 74 6a 45 0d 06 9f 09  20 20 f4 20 50 0d 06 a4  |.tjE....  . P...|
00002b80  18 20 20 6f 70 63 6f 64  65 25 3d 6f 70 63 6f 64  |.  opcode%=opcod|
00002b90  65 25 2d 31 30 0d 06 a9  70 20 20 e7 70 72 6f 67  |e%-10...p  .prog|
00002ba0  70 74 72 25 3d 37 8c f2  62 65 65 70 3a f1 8a 30  |ptr%=7..beep:..0|
00002bb0  2c 32 34 29 3b 22 45 52  52 4f 52 21 21 21 22 27  |,24);"ERROR!!!"'|
00002bc0  27 22 69 6e 20 50 72 6f  67 72 61 6d 20 22 3b 24  |'"in Program ";$|
00002bd0  28 6e 61 6d 65 25 2b 31  36 2a 28 63 75 72 70 72  |(name%+16*(curpr|
00002be0  6f 67 25 2d 31 29 29 3b  27 27 22 54 6f 6f 20 6d  |og%-1));''"Too m|
00002bf0  61 6e 79 20 50 52 4f 47  20 63 61 6c 6c 73 22 3a  |any PROG calls":|
00002c00  e5 8d 64 51 46 0d 06 ae  19 20 20 70 72 6f 67 70  |..dQF....  progp|
00002c10  74 72 25 3d 70 72 6f 67  70 74 72 25 2b 31 0d 06  |tr%=progptr%+1..|
00002c20  b3 25 20 20 70 72 6f 67  73 74 61 63 6b 25 28 70  |.%  progstack%(p|
00002c30  72 6f 67 70 74 72 25 2c  31 29 3d 63 75 72 70 72  |rogptr%,1)=curpr|
00002c40  6f 67 25 0d 06 b8 19 20  20 63 75 72 6c 69 6e 65  |og%....  curline|
00002c50  25 3d 63 75 72 6c 69 6e  65 25 2b 31 0d 06 bd 25  |%=curline%+1...%|
00002c60  20 20 70 72 6f 67 73 74  61 63 6b 25 28 70 72 6f  |  progstack%(pro|
00002c70  67 70 74 72 25 2c 32 29  3d 63 75 72 6c 69 6e 65  |gptr%,2)=curline|
00002c80  25 0d 06 c2 22 20 20 63  75 72 70 72 6f 67 25 3d  |%..."  curprog%=|
00002c90  6f 70 63 6f 64 65 25 20  3a 63 75 72 6c 69 6e 65  |opcode% :curline|
00002ca0  25 3d 31 0d 06 c7 2f 20  20 e7 20 73 69 7a 65 66  |%=1.../  . sizef|
00002cb0  67 25 21 28 34 2a 28 63  75 72 70 72 6f 67 25 2d  |g%!(4*(curprog%-|
00002cc0  31 29 29 8c 73 69 7a 65  25 3d 6f 70 65 72 61 6e  |1)).size%=operan|
00002cd0  64 25 0d 06 cc 0c 20 20  e5 20 8d 74 6a 45 0d 06  |d%....  . .tjE..|
00002ce0  d1 5b 20 20 e3 20 69 25  3d 31 20 b8 20 31 30 30  |.[  . i%=1 . 100|
00002cf0  30 20 3a ed 20 69 25 20  3a ef 20 33 30 20 3a f1  |0 :. i% :. 30 :.|
00002d00  20 22 50 72 65 73 73 20  53 50 41 43 45 20 62 61  | "Press SPACE ba|
00002d10  72 22 3b 3a e7 20 70 72  69 6e 74 66 6c 61 67 25  |r";:. printflag%|
00002d20  20 8c 20 ef 20 31 32 37  2c 31 32 37 2c 31 32 37  | . . 127,127,127|
00002d30  20 3a f1 22 6f 72 20 50  22 0d 06 d6 26 20 20 61  | :."or P"...&  a|
00002d40  24 3d be 20 3a e7 20 61  24 3c 3e 22 20 22 20 80  |$=. :. a$<>" " .|
00002d50  20 61 24 3c 3e 22 50 22  20 8c 20 8d 64 56 46 0d  | a$<>"P" . .dVF.|
00002d60  06 db 27 20 e7 20 70 72  69 6e 74 66 6c 61 67 25  |..' . printflag%|
00002d70  20 80 20 61 24 3d 22 50  22 20 8c f2 64 75 6d 70  | . a$="P" ..dump|
00002d80  3a e5 8d 64 51 46 0d 06  e0 16 20 20 da 3a f2 6f  |:..dQF....  .:.o|
00002d90  6e 3a f2 73 65 74 73 63  72 65 65 6e 0d 06 e5 05  |n:.setscreen....|
00002da0  e1 0d 06 ea 10 dd 20 f2  63 6c 65 61 72 28 79 25  |...... .clear(y%|
00002db0  29 0d 06 ef 0a 20 20 ea  20 69 25 0d 06 f4 12 20  |)....  . i%.... |
00002dc0  20 e3 20 69 25 3d 79 25  20 b8 20 32 38 0d 06 f9  | . i%=y% . 28...|
00002dd0  15 20 20 f1 20 8a 30 2c  69 25 29 3b 89 28 31 38  |.  . .0,i%);.(18|
00002de0  29 3b 0d 06 fe 0a 20 20  ed 20 69 25 0d 07 03 05  |);....  . i%....|
00002df0  e1 0d 07 08 0a dd 20 f2  6f 66 66 0d 07 0d 15 20  |...... .off.... |
00002e00  20 ef 20 32 33 3b 31 31  2c 30 3b 30 3b 30 3b 30  | . 23;11,0;0;0;0|
00002e10  0d 07 12 05 e1 0d 07 17  09 dd 20 f2 6f 6e 0d 07  |.......... .on..|
00002e20  1c 17 20 20 ef 20 32 33  3b 31 31 2c 32 35 35 3b  |..  . 23;11,255;|
00002e30  30 3b 30 3b 30 0d 07 21  05 e1 0d 07 26 0d dd 20  |0;0;0..!....&.. |
00002e40  a4 69 6e 70 73 74 72 0d  07 2b 1f 20 20 ea 20 69  |.inpstr..+.  . i|
00002e50  25 2c 73 74 72 24 2c 69  6e 70 75 74 24 2c 63 68  |%,str$,input$,ch|
00002e60  24 2c 6d 61 78 25 0d 07  30 0e 20 20 e8 20 69 6e  |$,max%..0.  . in|
00002e70  70 75 74 24 0d 07 35 0d  20 20 6d 61 78 25 3d 31  |put$..5.  max%=1|
00002e80  30 0d 07 3a 0d 20 20 73  74 72 24 3d 22 22 0d 07  |0..:.  str$=""..|
00002e90  3f 18 20 20 e3 20 69 25  3d 31 20 b8 20 a9 28 69  |?.  . i%=1 . .(i|
00002ea0  6e 70 75 74 24 29 0d 07  44 17 20 20 63 68 24 3d  |nput$)..D.  ch$=|
00002eb0  c1 69 6e 70 75 74 24 2c  69 25 2c 31 29 0d 07 49  |.input$,i%,1)..I|
00002ec0  31 20 20 e7 20 63 68 24  3e 3d 22 61 22 20 80 20  |1  . ch$>="a" . |
00002ed0  63 68 24 3c 3d 22 7a 22  20 8c 20 63 68 24 3d bd  |ch$<="z" . ch$=.|
00002ee0  28 97 28 63 68 24 29 20  80 20 32 32 33 29 0d 07  |(.(ch$) . 223)..|
00002ef0  4e 15 20 20 73 74 72 24  3d 73 74 72 24 20 2b 20  |N.  str$=str$ + |
00002f00  63 68 24 0d 07 53 0a 20  20 ed 20 69 25 0d 07 58  |ch$..S.  . i%..X|
00002f10  21 20 20 e7 20 c2 73 74  72 24 2c 34 29 3d 22 53  |!  . .str$,4)="S|
00002f20  49 5a 45 22 20 8c 20 6d  61 78 25 3d 31 34 0d 07  |IZE" . max%=14..|
00002f30  5d 6a 20 20 e7 20 a9 28  73 74 72 24 29 3e 6d 61  |]j  . .(str$)>ma|
00002f40  78 25 20 8c 20 f2 63 6c  65 61 72 28 32 32 29 20  |x% . .clear(22) |
00002f50  3a f1 20 8a 30 2c 32 32  29 22 4e 61 6d 65 20 74  |:. .0,22)"Name t|
00002f60  6f 6f 20 6c 6f 6e 67 2e  22 27 27 22 31 30 20 63  |oo long."''"10 c|
00002f70  68 61 72 61 63 68 74 65  72 73 2c 22 27 27 22 6f  |harachters,"''"o|
00002f80  72 20 6c 65 73 73 2c 20  70 6c 65 61 73 65 22 27  |r less, please"'|
00002f90  20 3a e5 20 8d 54 70 47  0d 07 62 70 20 20 e7 20  | :. .TpG..bp  . |
00002fa0  c0 73 74 72 24 2c 31 29  3c 22 41 22 20 84 20 c0  |.str$,1)<"A" . .|
00002fb0  73 74 72 24 2c 31 29 3e  22 5a 22 20 8c 20 f2 63  |str$,1)>"Z" . .c|
00002fc0  6c 65 61 72 28 32 32 29  20 3a f1 20 8a 30 2c 32  |lear(22) :. .0,2|
00002fd0  32 29 22 4e 61 6d 65 73  20 6d 75 73 74 20 73 74  |2)"Names must st|
00002fe0  61 72 74 22 27 27 22 77  69 74 68 20 61 20 6c 65  |art"''"with a le|
00002ff0  74 74 65 72 22 27 27 22  70 6c 65 61 73 65 22 27  |tter"''"please"'|
00003000  20 3a e5 20 8d 54 70 47  0d 07 67 0b 20 20 3d 73  | :. .TpG..g.  =s|
00003010  74 72 24 0d 07 6c 23 dd  20 f2 70 75 74 6f 70 63  |tr$..l#. .putopc|
00003020  6f 64 65 28 70 72 6f 67  25 2c 6c 69 6e 65 25 2c  |ode(prog%,line%,|
00003030  64 61 74 61 25 29 0d 07  71 2f 20 20 70 72 6f 67  |data%)..q/  prog|
00003040  72 61 6d 25 3f 28 28 70  72 6f 67 25 2d 31 29 2a  |ram%?((prog%-1)*|
00003050  39 30 2b 28 6c 69 6e 65  25 2d 31 29 2a 33 29 3d  |90+(line%-1)*3)=|
00003060  64 61 74 61 25 0d 07 76  05 e1 0d 07 7b 24 dd 20  |data%..v....{$. |
00003070  f2 70 75 74 6f 70 65 72  61 6e 64 28 70 72 6f 67  |.putoperand(prog|
00003080  25 2c 6c 69 6e 65 25 2c  64 61 74 61 25 29 0d 07  |%,line%,data%)..|
00003090  80 13 20 20 ea 20 73 69  67 6e 25 2c 62 61 73 65  |..  . sign%,base|
000030a0  25 0d 07 85 12 20 20 73  69 67 6e 25 3d b4 64 61  |%....  sign%=.da|
000030b0  74 61 25 0d 07 8a 12 20  20 64 61 74 61 25 3d 94  |ta%....  data%=.|
000030c0  64 61 74 61 25 0d 07 8f  24 20 20 62 61 73 65 25  |data%...$  base%|
000030d0  3d 28 70 72 6f 67 25 2d  31 29 2a 39 30 2b 28 6c  |=(prog%-1)*90+(l|
000030e0  69 6e 65 25 2d 31 29 2a  33 0d 07 94 24 20 20 70  |ine%-1)*3...$  p|
000030f0  72 6f 67 72 61 6d 25 3f  28 62 61 73 65 25 2b 32  |rogram%?(base%+2|
00003100  29 3d 64 61 74 61 25 20  83 20 32 35 36 0d 07 99  |)=data% . 256...|
00003110  17 20 20 64 61 74 61 25  3d 64 61 74 61 25 20 81  |.  data%=data% .|
00003120  20 32 35 36 0d 07 9e 22  20 20 e7 20 73 69 67 6e  | 256..."  . sign|
00003130  25 3d 2d 31 20 8c 20 64  61 74 61 25 3d 64 61 74  |%=-1 . data%=dat|
00003140  61 25 2b 26 38 30 0d 07  a3 1e 20 20 70 72 6f 67  |a%+&80....  prog|
00003150  72 61 6d 25 3f 28 62 61  73 65 25 2b 31 29 3d 64  |ram%?(base%+1)=d|
00003160  61 74 61 25 0d 07 a8 05  e1 0d 07 ad 1d dd 20 a4  |ata%.......... .|
00003170  67 65 74 6f 70 63 6f 64  65 28 70 72 6f 67 25 2c  |getopcode(prog%,|
00003180  6c 69 6e 65 25 29 0d 07  b2 2a 20 20 3d 70 72 6f  |line%)...*  =pro|
00003190  67 72 61 6d 25 3f 28 28  70 72 6f 67 25 2d 31 29  |gram%?((prog%-1)|
000031a0  2a 39 30 2b 28 6c 69 6e  65 25 2d 31 29 2a 33 29  |*90+(line%-1)*3)|
000031b0  0d 07 b7 1e dd 20 a4 67  65 74 6f 70 65 72 61 6e  |..... .getoperan|
000031c0  64 28 70 72 6f 67 25 2c  6c 69 6e 65 25 29 0d 07  |d(prog%,line%)..|
000031d0  bc 22 20 20 ea 20 68 69  62 79 74 65 25 2c 76 61  |."  . hibyte%,va|
000031e0  6c 75 65 25 2c 62 61 73  65 25 2c 73 69 67 6e 25  |lue%,base%,sign%|
000031f0  0d 07 c1 24 20 20 62 61  73 65 25 3d 28 70 72 6f  |...$  base%=(pro|
00003200  67 25 2d 31 29 2a 39 30  2b 28 6c 69 6e 65 25 2d  |g%-1)*90+(line%-|
00003210  31 29 2a 33 0d 07 c6 24  20 20 73 69 67 6e 25 3d  |1)*3...$  sign%=|
00003220  28 70 72 6f 67 72 61 6d  25 3f 28 62 61 73 65 25  |(program%?(base%|
00003230  2b 31 29 29 3c 31 32 38  0d 07 cb 28 20 20 68 69  |+1))<128...(  hi|
00003240  62 79 74 65 25 3d 28 70  72 6f 67 72 61 6d 25 3f  |byte%=(program%?|
00003250  28 62 61 73 65 25 2b 31  29 20 80 20 26 37 46 29  |(base%+1) . &7F)|
00003260  0d 07 d0 2b 20 20 76 61  6c 75 65 25 3d 70 72 6f  |...+  value%=pro|
00003270  67 72 61 6d 25 3f 28 62  61 73 65 25 2b 32 29 2b  |gram%?(base%+2)+|
00003280  32 35 36 2a 68 69 62 79  74 65 25 0d 07 d5 24 20  |256*hibyte%...$ |
00003290  20 e7 20 73 69 67 6e 25  20 8c 20 3d 76 61 6c 75  | . sign% . =valu|
000032a0  65 25 20 8b 20 3d 76 61  6c 75 65 25 2a 2d 31 0d  |e% . =value%*-1.|
000032b0  07 da 15 dd 20 f2 63 6c  65 61 72 74 6f 28 6c 69  |.... .clearto(li|
000032c0  6e 65 25 29 0d 07 df 0a  20 20 ea 20 69 25 0d 07  |ne%)....  . i%..|
000032d0  e4 14 20 20 e3 20 69 25  3d 31 20 b8 20 6c 69 6e  |..  . i%=1 . lin|
000032e0  65 25 0d 07 e9 14 20 20  f1 20 8a 30 2c 69 25 29  |e%....  . .0,i%)|
000032f0  3b 89 28 31 38 29 0d 07  ee 0a 20 20 ed 20 69 25  |;.(18)....  . i%|
00003300  0d 07 f3 05 e1 0d 07 f8  0b dd 20 f2 64 75 6d 70  |.......... .dump|
00003310  0d 07 fd 1b 20 20 ef 32  2c 31 2c 31 33 2c 31 2c  |....  .2,1,13,1,|
00003320  32 37 2c 31 2c 36 35 2c  31 2c 38 0d 08 02 1a 20  |27,1,65,1,8.... |
00003330  20 e3 20 41 25 3d 93 20  b8 20 93 2b 39 39 32 30  | . A%=. . .+9920|
00003340  20 88 33 32 30 0d 08 07  1a 20 20 ef 20 31 2c 32  | .320....  . 1,2|
00003350  37 2c 31 2c 37 35 2c 31  2c 36 34 2c 31 2c 31 0d  |7,1,75,1,64,1,1.|
00003360  08 0c 1a 20 20 e3 20 43  25 3d 41 25 20 b8 20 41  |...  . C%=A% . A|
00003370  25 2b 33 31 32 20 88 20  38 0d 08 11 10 20 20 e3  |%+312 . 8....  .|
00003380  20 42 25 3d 30 20 b8 20  37 0d 08 16 16 20 20 47  | B%=0 . 7....  G|
00003390  25 3f 42 25 3d 28 3f 28  42 25 2b 43 25 29 29 0d  |%?B%=(?(B%+C%)).|
000033a0  08 1b 07 20 20 ed 0d 08  20 0c 20 20 d6 20 26 44  |...  ... .  . &D|
000033b0  34 30 0d 08 25 14 20 20  e3 20 42 25 3d 44 25 20  |40..%.  . B%=D% |
000033c0  b8 20 44 25 2b 37 0d 08  2a 0b 20 20 41 3d 3f 42  |. D%+7..*.  A=?B|
000033d0  25 0d 08 2f 0b 20 20 ef  20 31 2c 41 0d 08 34 07  |%../.  . 1,A..4.|
000033e0  20 20 ed 0d 08 39 07 20  20 ed 0d 08 3e 11 20 20  |  ...9.  ...>.  |
000033f0  ef 20 31 2c 31 33 2c 31  2c 31 30 0d 08 43 07 20  |. 1,13,1,10..C. |
00003400  20 ed 0d 08 48 1d 20 20  ef 20 31 2c 32 37 2c 31  | ...H.  . 1,27,1|
00003410  2c 36 35 2c 31 2c 31 33  2c 31 2c 31 30 2c 33 0d  |,65,1,13,1,10,3.|
00003420  08 4d 05 e1 0d 08 52 10  dd 20 a4 67 65 74 6e 6f  |.M....R.. .getno|
00003430  28 66 24 29 0d 08 57 48  20 20 f1 20 8a 30 2c 32  |(f$)..WH  . .0,2|
00003440  34 29 3b 22 57 68 69 63  68 20 70 72 6f 67 72 61  |4);"Which progra|
00003450  6d 20 64 6f 22 27 27 22  79 6f 75 20 77 69 73 68  |m do"''"you wish|
00003460  20 74 6f 20 22 3b 66 24  20 3a e7 20 66 24 3c 3e  | to ";f$ :. f$<>|
00003470  22 64 65 6c 65 74 65 22  20 8c 20 f1 0d 08 5c 14  |"delete" . ...\.|
00003480  20 20 f2 6c 69 73 74 70  72 6f 67 6e 61 6d 65 73  |  .listprognames|
00003490  0d 08 61 0b 20 20 e8 20  6e 6f 25 0d 08 66 60 20  |..a.  . no%..f` |
000034a0  20 e7 20 6e 6f 25 3c 31  20 84 20 6e 6f 25 3e 3f  | . no%<1 . no%>?|
000034b0  6d 61 78 70 72 6f 67 25  20 84 20 24 28 6e 61 6d  |maxprog% . $(nam|
000034c0  65 25 2b 31 36 2a 28 6e  6f 25 2d 31 29 29 3d 22  |e%+16*(no%-1))="|
000034d0  6d 74 22 8c f2 63 6c 65  61 72 28 32 31 29 3a f1  |mt"..clear(21):.|
000034e0  8a 30 2c 32 32 29 3b 22  53 6f 72 72 79 21 20 63  |.0,22);"Sorry! c|
000034f0  61 6e 27 74 22 3a e5 8d  44 57 48 0d 08 6b 08 3d  |an't":..DWH..k.=|
00003500  6e 6f 25 0d 08 70 11 dd  20 f2 70 72 69 6e 74 28  |no%..p.. .print(|
00003510  6e 6f 25 29 0d 08 7a 09  20 20 ef 20 32 0d 08 7f  |no%)..z.  . 2...|
00003520  43 20 20 f1 8a 30 2c 32  32 29 3b 24 28 6e 61 6d  |C  ..0,22);$(nam|
00003530  65 25 2b 31 36 2a 28 6e  6f 25 2d 31 29 29 3b 3a  |e%+16*(no%-1));:|
00003540  ef 33 3a 70 72 6f 67 66  6c 61 67 25 3d b9 3a f2  |.3:progflag%=.:.|
00003550  6c 69 73 74 70 72 6f 67  28 6e 6f 25 29 3a ef 32  |listprog(no%):.2|
00003560  0d 08 84 2a 20 20 e7 20  73 69 7a 65 66 67 25 21  |...*  . sizefg%!|
00003570  28 34 2a 28 6e 6f 25 2d  31 29 29 20 8c f1 22 20  |(4*(no%-1)) .." |
00003580  20 53 49 5a 45 22 3a f1  8b f1 0d 08 89 27 20 20  | SIZE":......'  |
00003590  70 72 6f 67 66 6c 61 67  25 3d a3 20 3a f2 6c 69  |progflag%=. :.li|
000035a0  73 74 70 72 6f 67 28 6e  6f 25 29 3a f1 3a f1 3a  |stprog(no%):.:.:|
000035b0  f1 0d 08 8e 09 20 20 ef  20 33 0d 08 93 10 20 20  |.....  . 3....  |
000035c0  f2 63 6c 65 61 72 28 32  32 29 0d 08 98 05 e1 0d  |.clear(22)......|
000035d0  08 9d 08 dc 20 31 30 0d  08 a2 19 dc 20 22 4e 20  |.... 10..... "N |
000035e0  2d 20 6e 65 77 20 70 72  6f 67 72 61 6d 22 20 20  |- new program"  |
000035f0  0d 08 a7 1b dc 20 22 52  20 2d 20 72 75 6e 20 70  |..... "R - run p|
00003600  72 6f 67 72 61 6d 22 20  20 20 20 0d 08 ac 1e dc  |rogram"    .....|
00003610  20 22 45 20 2d 20 65 64  69 74 20 70 72 6f 67 72  | "E - edit progr|
00003620  61 6d 22 20 20 20 20 20  20 0d 08 b1 1a dc 20 22  |am"      ..... "|
00003630  44 20 2d 20 64 65 6c 65  74 65 20 70 72 6f 67 72  |D - delete progr|
00003640  61 6d 22 0d 08 b6 20 dc  20 22 4c 20 2d 20 6c 69  |am"... . "L - li|
00003650  73 74 20 70 72 6f 67 72  61 6d 22 20 20 20 20 20  |st program"     |
00003660  20 20 20 0d 08 bb 19 dc  20 22 50 20 2d 20 70 72  |   ..... "P - pr|
00003670  69 6e 74 20 70 72 6f 67  72 61 6d 22 0d 08 c0 19  |int program"....|
00003680  dc 20 22 53 20 2d 20 73  61 76 65 20 70 72 6f 67  |. "S - save prog|
00003690  72 61 6d 73 22 0d 08 c5  1a dc 20 22 49 20 2d 20  |rams"..... "I - |
000036a0  69 6e 70 75 74 20 70 72  6f 67 72 61 6d 73 22 0d  |input programs".|
000036b0  08 ca 18 dc 20 22 43 20  2d 20 63 6c 65 61 72 20  |.... "C - clear |
000036c0  6d 65 6d 6f 72 79 22 0d  08 cf 12 dc 20 22 46 20  |memory"..... "F |
000036d0  2d 20 66 69 6e 69 73 68  22 0d 08 d4 07 dc 20 39  |- finish"..... 9|
000036e0  0d 08 d9 10 dc 20 22 4d  20 2d 20 6d 6f 76 65 22  |..... "M - move"|
000036f0  0d 08 de 10 dc 20 22 54  20 2d 20 74 75 72 6e 22  |..... "T - turn"|
00003700  0d 08 df 10 dc 20 22 48  20 2d 20 68 6f 6d 65 22  |..... "H - home"|
00003710  0d 08 e3 12 dc 20 22 52  20 2d 20 72 65 70 65 61  |..... "R - repea|
00003720  74 22 0d 08 e8 16 dc 20  22 45 20 2d 20 65 6e 64  |t"..... "E - end|
00003730  20 72 65 70 65 61 74 22  0d 08 ed 13 dc 20 22 50  | repeat"..... "P|
00003740  20 2d 20 70 72 6f 67 72  61 6d 22 0d 08 f2 14 dc  | - program".....|
00003750  20 22 55 20 2d 20 70 65  6e 20 75 70 22 20 20 0d  | "U - pen up"  .|
00003760  08 f7 15 dc 20 22 44 20  2d 20 70 65 6e 20 64 6f  |.... "D - pen do|
00003770  77 6e 22 20 0d 08 fc 19  dc 20 22 46 20 2d 20 66  |wn" ..... "F - f|
00003780  69 6e 69 73 68 22 20 20  20 20 20 20 20 0d 09 01  |inish"       ...|
00003790  07 dc 20 34 0d 09 06 19  dc 20 22 49 20 2d 20 69  |.. 4..... "I - i|
000037a0  6e 73 65 72 74 20 61 20  6c 69 6e 65 22 0d 09 0b  |nsert a line"...|
000037b0  19 dc 20 22 44 20 2d 20  64 65 6c 65 74 65 20 61  |.. "D - delete a|
000037c0  20 6c 69 6e 65 22 0d 09  10 19 dc 20 22 43 20 2d  | line"..... "C -|
000037d0  20 63 68 61 6e 67 65 20  61 20 6c 69 6e 65 22 0d  | change a line".|
000037e0  09 15 1a dc 20 22 46 20  2d 20 66 69 6e 69 73 68  |.... "F - finish|
000037f0  20 65 64 69 74 69 6e 67  22 0d ff                 | editing"..|
000037fb
Draw/DRAW1.m0
Draw/DRAW1.m1
Draw/DRAW1.m2
Draw/DRAW1.m4
Draw/DRAW1.m5