Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92 » !AWJan92/Goodies/ArcAut/!ArcAut/!RunImage

!AWJan92/Goodies/ArcAut/!ArcAut/!RunImage

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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92
Filename: !AWJan92/Goodies/ArcAut/!ArcAut/!RunImage
Read OK:
File size: 7499 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20REM
   30REM        A R C   A U T
   40REM A Cellular Automaton Laboratory
   50REM   for the Acorn Archimedes
   60REM
   70REM  Written by Michael Rozdoba
   80REM
   90:
  100SYS "Hourglass_On"
  110PROCinitass
  120PROCwimpinit
  130PROCinitvbles
  140SYS "Wimp_Initialise",200,&4B534154,"ArcAut" TO ,arcautth%
  150PROCinstallicon
  160SYS "Hourglass_Off"
  170quit=FALSE
  180ON ERROR IF FNwimperror THEN END
  190REPEAT
  200PROCpoll
  210UNTIL quit
  220SYS "Wimp_CloseDown",arcautth%,&4B534154
  230END
  240:
  250DEF PROCwimpinit
  260mode%=MODE
  270messref%=0
  280DIM iblock% 1024, ublock% 1024, mblock% 1024
  290ENDPROC
  300:
  310DEF PROCinstallicon
  320!iblock%=-1
  330iblock%!4=0:iblock%!8=0:iblock%!12=64:iblock%!16=64
  340iblock%!20=&1700300A
  350$(iblock%+24)="!arcaut"
  360SYS "Wimp_CreateIcon",,iblock% TO arcauth
  370ENDPROC
  380:
  390DEF PROCpoll
  400SYS "Wimp_Poll",1,ublock% TO reason
  410mode%=MODE
  420CASE reason OF
  430WHEN 6:PROCclick(ublock%)
  440WHEN 9:quit=TRUE
  450WHEN 17,18:PROCmessage(ublock%)
  460ENDCASE
  470ENDPROC
  480:
  490DEF PROCclick(ublock%)
  500CASE ublock%!8 OF
  510WHEN 2:PROCmenu(ublock%)
  520ENDCASE
  530ENDPROC
  540:
  550DEF PROCmenu(ublock%)
  560$mblock%="ArcAut"
  570mblock%!12=&00070207:mblock%!16=100:mblock%!20=40:mblock%!24=0
  580mblock%!28=128:mblock%!32=-1:mblock%!36=&07019031
  590$(mblock%+40)="Quit"
  600SYS "Wimp_CreateMenu",,mblock%,!ublock%-60,136
  610ENDPROC
  620:
  630DEF PROCmessage(ublock%)
  640CASE (ublock%!16) OF
  650WHEN 0:quit=TRUE
  660WHEN 1:PROCsaveack
  670WHEN 3:PROCloadtext:PROCloadack
  680ENDCASE
  690ENDPROC
  700:
  710DEF PROCsaveack
  720IF ublock%!40<>&FFF ENDPROC
  730IF ublock%!36>mtext% ERROR 255,"Insufficient space"
  740OSCLI("Transient "+STR$(4096+ublock%!36))
  750ublock%!12=ublock%!8:ublock%!16=2
  760ublock%!36=-1
  770n$="Ram::0.$.ArcAutScrp"+CHR$0
  780$(ublock%+44)=n$:!ublock%=44+LENn$
  790messref%=ublock%!8
  800SYS "Wimp_SendMessage",17,ublock%,ublock%!4
  810ENDPROC
  820:
  830DEF PROCloadack
  840ublock%!12=ublock%!8:ublock%!16=4
  850SYS "Wimp_SendMessage",17,ublock%,ublock%!4
  860ENDPROC
  870:
  880DEF PROCloadtext
  890IF ublock%!40<>&FFF ENDPROC
  900SYS "OS_File",&11,ublock%+44 TO ,,,,filelength
  910IF filelength>mtext% ERROR 255,"Insufficient space"
  920SYS "OS_File",&10,ublock%+44,text,0
  930IF ublock%!8=messref%+2 THEN
  940IF LEFT$(FNstr(ublock%+44),4)<>"Ram:" ERROR 255,"Program error"
  950SYS "OS_File",&06,ublock%+44
  960*Transient
  970ENDIF
  980A%=text:B%=text+mtext%-1:a$="AUTOMATON*":CALL locate,a$
  990IF !location=0 ENDPROC
 1000*ScreenSize 160 *ERROR 255 Require >= 160K screen memory
 1010MOUSE OFF:MODE13
 1020!mblock%=148:mblock%!4=-1
 1030SYS "OS_ReadVduVariables",mblock%,mblock%
 1040scrst=!mblock%
 1050PROCmain
 1060ENDPROC
 1070:
 1080DEF FNstr(ptr%)
 1090LOCAL S$
 1100WHILE ?ptr%:S$+=CHR$(?ptr%):ptr%+=1:ENDWHILE:=S$
 1110:
 1120DEF PROCinitass
 1130mem1%=1024
 1140DIM code1% mem1%, strbuf 255:L%=code1%+mem1%
 1150mtext%=4096:DIM text mtext%
 1160FOR pass%=8 TO 10 STEP 2
 1170P%=code1%
 1180[OPT pass%
 1190.location EQUD 0
 1200.locprevious EQUD 0
 1210.locate
 1220MOV R2,#0:STR R2,location:STR R2,locprevious
 1230CMP R10,#1:MOVNE PC,R14
 1240LDR R2,[R9,#4]:CMP R2,#128:MOVNE PC,R14
 1250LDR R2,[R9]
 1260LDRB R5,[R2,#4]:CMP R5,#0:MOVEQ PC,R14
 1270LDRB R3,[R2]:LDRB R4,[R2,#1]:ADD R3,R3,R4,ASL #8
 1280LDRB R4,[R2,#2]:ADD R3,R3,R4,ASL #16
 1290LDRB R4,[R2,#3]:ADD R3,R3,R4,ASL #24
 1300ADD R1,R1,#1:SUB R1,R1,R5
 1310CMP R0,R1:MOVGT PC,R14
 1320MOV R9,#0
 1330.locate1
 1340CMP R9,#1:MOVEQ R8,R0
 1350LDRB R7,[R0]:CMP R7,#0:CMPNE R7,#10:CMPNE R7,#13:CMPNE R7,#32
 1360MOVNE R9,#1:MOVEQ R9,#0
 1370SUB R2,R5,#1
 1380.locate2
 1390LDRB R6,[R3,R2]:LDRB R7,[R0,R2]:CMP R6,R7:BNE locate3
 1400SUBS R2,R2,#1:BPL locate2
 1410STR R0,location:STR R8,locprevious:MOV PC,R14
 1420.locate3
 1430ADD R0,R0,#1:CMP R0,R1:BLE locate1
 1440MOV PC,R14
 1450.find      ;pass in A%,B% region to search & in C%,D% codes to look for
 1460MOV R4,#1:SUB R0,R0,#1
 1470.findloop
 1480LDRB R5,[R0,#1]!
 1490CMP R5,R2:ADDEQ R4,R4,#1
 1500CMP R5,R3:SUBEQ R4,R4,#1
 1510CMP R4,#0:MOVEQ PC,R14
 1520CMP R0,R1:BLT findloop
 1530MOV R0,#0:MOV PC,R14   ;returns address of code D% if found, else 0
 1540.scanf EQUD 0
 1550.scana1 EQUD 0
 1560.scana2 EQUD 0
 1570.scanen EQUS "END":ALIGN
 1580.scan
 1590CMP R10,#1:MOVNE PC,R14
 1600LDR R2,[R9,#4]:CMP R2,#128:MOVNE PC,R14
 1610STMFD R13!,{R14}
 1620MOV R3,#0:SUB R0,R0,#1
 1630.scanloop1
 1640CMP R0,R1:BGE scanend
 1650LDRB R5,[R0,#1]!
 1660CMP R5,#0:CMPNE R5,#10:CMPNE R5,#13:CMPNE R5,#32
 1670BEQ scanloop1
 1680CMP R5,#ASC"(":CMPNE R5,#ASC"["
 1690MOVNE R5,#32:SUBNE R0,R0,#1:STR R0,scana1
 1700ADDEQ R0,R0,#1:STR R5,scanf:BNE scanspace
 1710MOV R2,R5:CMP R2,#ASC"(":MOVEQ R3,#ASC")":MOVNE R3,#ASC"]"
 1720BL find
 1730CMP R0,#0:ADDEQ R0,R1,#1
 1740B scangotright
 1750.scanspace
 1760CMP R0,R1:ADDGE R0,R0,#1:BGE scangotright
 1770LDRB R5,[R0,#1]!
 1780CMP R5,#0:CMPNE R5,#10:CMPNE R5,#13:CMPNE R5,#32
 1790BNE scanspace
 1800.scangotright  ; addr right char in R0
 1810STR R0,scana2
 1820LDR R5,scanf:CMP R5,#32:CMPNE R5,#ASC"["
 1830LDMNEFD R13!,{PC}
 1840LDR R3,scana1:ADD R3,R3,#1:MOV R2,R0:LDR R4,[R9]
 1850SUB R10,R2,R3:CMP R10,#255:BGT scanerror
 1860LDR R0,astrbuf
 1870.scanloop2
 1880LDRB R5,[R3],#1:STRB R5,[R0],#1
 1890CMP R3,R2:BLT scanloop2
 1900MOV R2,R0:LDR R3,astrbuf
 1910LDMFD R13!,{R10}:ADR R14,scanret1:ADD PC,R10,#&38
 1920.scanend
 1930STR R1,scana2
 1940MOV R4,#0:STR R4,scanf
 1950ADR R3,scanen:ADD R2,R3,#3:LDR R4,[R9]
 1960LDMFD R13!,{R10}:ADR R14,scanret1:ADD PC,R10,#&38
 1970.scanret1 MOV PC,R10
 1980.astrbuf EQUD strbuf
 1990.scanerror
 2000ADR R0,scaneblock%
 2010SWI "OS_GenerateError"
 2020.scaneblock%
 2030EQUD 19
 2040EQUS "String too long"
 2050EQUB 0
 2060ALIGN
 2070]
 2080NEXT
 2090ENDPROC
 2100:
 2110DEF PROCinitvbles
 2120SYS "OS_File",&05,"<ArcAut$Dir>.InitSub" TO ,,,,leninitsub%
 2130DIM initsub% leninitsub%
 2140SYS "OS_File",&FF,"<ArcAut$Dir>.InitSub",initsub%
 2150SYS "OS_File",&05,"<ArcAut$Dir>.Library" TO ,,,,lenTlibrary%
 2160DIM Tlibrary% lenTlibrary%
 2170SYS "OS_File",&FF,"<ArcAut$Dir>.Library",Tlibrary%
 2180SYS "OS_File",&05,"<ArcAut$Dir>.Code" TO ,,,,lenTcode%
 2190DIM Tcode% lenTcode%
 2200SYS "OS_File",&FF,"<ArcAut$Dir>.Code",Tcode%
 2210mem%=10240
 2220DIM code% mem%
 2230DIM rndbuf% 32768
 2240DIM st%(2)
 2250DIM opck$(6),smn%(6),smx%(6)
 2260regck$="TL  TM  TR  ML  CELLMR  BL  BM  BR  "
 2270regck$+="UL  UR  LL  LR  OPP CW  CCW FLAG"
 2280opck$(0)="== IF NOT TRASH SCOUNT_NEIG SCOUNT_ALL "
 2290opck$(1)="DUP "
 2300opck$(2)="+ - * DIV EOR AND OR < > = <= >= <> << >> >>> MCOUNT_NEIG MCOUNT_ALL "
 2310opck$(3)="SUM_NEIG SUM_ALL 2RND 4RND 8RND 256RND 2RNDB 4RNDB 8RNDB 256RNDB "
 2320opck$(4)="READ_NEIG ELSE END "
 2330opck$(5)="ROT "
 2340opck$(6)="SWAP "
 2350smn%()=1,1,2,0,0,3,2:smx%()=3,2,3,2,3,3,3
 2360maxnumstats%=255
 2370DIM br%(maxnumstats%),condconv%(7)
 2380condconv%()=14,0,11,12,13,10,1,15
 2390on=TRUE:off=FALSE
 2400OSCLI("SetEval on "+STR$on)
 2410OSCLI("SetEval off "+STR$off)
 2420*SetEval dead 0
 2430*SetEval alive 255
 2440*SetEval moore 0
 2450*SetEval margolus -1
 2460*SetEval border 0
 2470w$="128":h$="128"
 2480ENDPROC
 2490:
 2500DEF PROCmain
 2510PROCassemble
 2520PROCinitscreen
 2530PROCaut
 2540ENDPROC
 2550:
 2560DEF PROCinitscreen
 2570*FX 112 2
 2580PROCscr
 2590*FX 112 1
 2600PROCscr
 2610PROCsubtask("SCREEN*","CODE*","screen")
 2620ENDPROC
 2630:
 2640DEF PROCsubtask(s1$,s2$,e$)
 2650LOCAL a$
 2660A%=text:B%=A%+mtext%-1
 2670CALL locate,s1$
 2680A%=!location+LENs1$
 2690IF !location=0 ERROR 255,"Incorrect automaton syntax"
 2700CALL locate,s2$
 2710B%=!locprevious+1
 2720IF !location=0 OR B%=1 ERROR 255,"Incorrect automaton syntax"
 2730CALL scan,a$
 2740A%=!scana1+1
 2750a$="WimpTask Basic -quit RAM::0.$.ArcAutScrp"
 2760OSCLI("Transient "+STR$(4096+B%-A%+leninitsub%+lenTlibrary%+lenTcode%))
 2770SYS "OS_File",&0A,"RAM::0.$.Library",&FFB,,Tlibrary%,Tlibrary%+lenTlibrary%
 2780SYS "OS_File",&0A,"RAM::0.$.Code",&FFD,,Tcode%,Tcode%+lenTcode%
 2790SYS "OS_File",&0A,"RAM::0.$.ArcAutScrp",&FFF,,initsub%,initsub%+leninitsub%
 2800SYS "OS_Find",&CF,"RAM::0.$.ArcAutScrp" TO fileh%
 2810SYS "OS_GBPB",1,fileh%,A%,B%-A%,leninitsub%
 2820SYS "OS_Find",&00,fileh%
 2830*SetEval ArcAut$Suc 0
 2840VDU21
 2850OSCLI a$
 2860MOUSE OFF
 2870VDU6
 2880*SCREENSIZE 160 *ERROR 255 Need >= 160K screen memory
 2890*DELETE RAM::0.$.ArcAutScrp
 2900*DELETE RAM::0.$.Code
 2910*DELETE RAM::0.$.Library
 2920*Transient
 2930SYS "OS_ReadVarVal","ArcAut$Suc",mblock%,1024
 2940IF !mblock%=0 ERROR 255,"Error in automaton "+e$+" code or insufficient free space"
 2950ENDPROC
 2960:
 2970DEF FNround(n%)
 2980LOCAL m%,f%
 2990IF n%<0 f%=TRUE:n%=-n%
 3000WHILE n%>255 n%=n%DIV4:m%+=1:ENDWHILE
 3010n%=n%<<(m%*2):IF f%=TRUE =-n% ELSE =n%
 3020:
 3030DEF FNacol(c%) = ((c%AND3)<<6)+((c%AND132)>>2)+((c%AND8)<<1)+((c%AND112)>>3)
 3040DEF FNlcol(c%) = ((c%AND33)<<2)+((c%AND14)<<3)+((c%AND16)>>1)+((c%AND192)>>6)
 3050:
 3060DEF PROCscr
 3070LOCAL q$,q%,f%
 3080VDU26,24,4;0;1027;1023;
 3090CLS:GCOL 63 TINT 255
 3100RECTANGLE 514-2*sux%,510-2*suy%,4*sux%+4,4*suy%+4
 3110VDU 24,518-2*sux%;514-2*suy%;514+2*sux%;510+2*suy%;
 3120ORIGIN 516,512
 3130VDU 28,33,31,39,0
 3140PROCtext
 3150ENDPROC
 3160:
 3170DEF PROCtext
 3180CLS:OFF
 3190PRINT'''
 3200q$=aut$+"_":f%=1:FOR q%=1 TO LEN q$
 3210IF MID$(q$,q%,1)="_" THEN
 3220PRINTMID$(q$,f%,q%-f%);
 3230IF q%-f%<>7 PRINT
 3240f%=q%+1
 3250ENDIF
 3260NEXT
 3270PRINTTAB(0,12);"Gen.#:";TAB(0,23);"Menu"'" to"'"exit"
 3280ENDPROC
 3290:
 3300DEF PROCload
 3310REPEAT UNTIL NOT INKEY-87:*FX 15 1
 3320INPUT "Name:";'f$:PROCtext
 3330OSCLI("ScreenLoad <ArcAut$Dir>.^.Screens."+f$)
 3340REPEAT UNTIL NOT INKEY-74
 3350ENDPROC
 3360:
 3370DEF PROCaut
 3380*SCREENSIZE 160 *ERROR 255 Need >= 160K screen memory
 3390REPEAT CALL autcode:UNTIL INKEY-11
 3400ERROR 17,"Escape"
 3410ENDPROC
 3420:
 3430DEF PROCassemble
 3440A%=text:B%=A%+mtext%-1
 3450a$="AUTOMATON*":CALL locate,a$
 3460A%=!location+10
 3470IF A%=10 ERROR 255,"Incorrect automaton syntax"
 3480a$="INITIALISATION*":CALL locate,a$
 3490B%=!location-1
 3500IF B%=-1 ERROR 255,"Incorrect automaton syntax"
 3510CALL scan,aut$
 3520OSCLI("Set aut "+aut$)
 3530PROCinputsize
 3540*SetEval wrap on
 3550*SetEval neig moore
 3560*SetEval flag 0
 3570*SetEval rndb 0
 3580PROCsubtask("INITIALISATION*","SCREEN*","initialisation")
 3590SYS "OS_ReadVarVal","wrap",mblock%,1024:wrap=!mblock%
 3600SYS "OS_ReadVarVal","border",mblock%,1024:border=!mblock%
 3610SYS "OS_ReadVarVal","dead",mblock%,1024:dead=!mblock%
 3620SYS "OS_ReadVarVal","alive",mblock%,1024:alive=!mblock%
 3630SYS "OS_ReadVarVal","neig",mblock%,1024:neig%=!mblock%
 3640SYS "OS_ReadVarVal","flag",mblock%,1024:flag%=!mblock%
 3650SYS "OS_ReadVarVal","rndb",mblock%,1024:rndb%=!mblock%
 3660IF neig% THEN
 3670IF (sux%AND1)=1 sux%+=1
 3680IF (suy%AND1)=1 suy%+=1
 3690sc1=scrst+320*(128+suy%DIV2)+(sux%+1)DIV2-192
 3700sc2=sc1+&14000
 3710OSCLI("SetEval sux "+STR$sux%)
 3720OSCLI("SetEval suy "+STR$suy%)
 3730ENDIF
 3740A%=text:B%=A%+mtext%-1
 3750a$="CODE*":CALL locate,a$
 3760A%=!location+5
 3770IF A%=5 ERROR 255,"Incorrect automaton syntax"
 3780a$="END*":CALL locate,a$
 3790B%=!location-1
 3800IF B%=-1 ERROR 255,"Incorrect automaton syntax"
 3810CALL scan,a$
 3820coma1%=!scana1+1:coma2%=!scana2-1
 3830br%()=0
 3840TL=0:addro=0:TM=1:addrsc1=1:TR=2:row=2:ML=3:CELL=4:MR=5:addrsc2=5:BL=6:BM=7:BR=8:col=8
 3850UL=0:UR=1:LL=2:LR=3:OPP=5:CW=6:CCW=7:FLAG=8
 3860st%()=9,10,11
 3870temp1=12:sp=13:temp2=14:link=14:pc=15
 3880L%=code%+mem%
 3890FOR pass%=8 TO 10 STEP 2
 3900P%=code%:j%=0
 3910[OPT pass%
 3920.abank:EQUD 2
 3930.asc1:EQUD sc2
 3940.asc2:EQUD sc1
 3950.areadstring
 3960EQUD &0D021F1B
 3970.awritestring
 3980EQUD 0
 3990EQUD 0
 4000.ag:EQUD 0
 4010.arndbuf%:EQUD rndbuf%
 4020.arnd:EQUD 0
 4030.aseed:EQUD &FFFFFFFF
 4040.axor:EQUD &ED6AA7
 4050.autcode
 4060STMFD (sp)!,{link}
 4070LDR R3,abank
 4080RSB R3,R3,#3
 4090STR R3,abank
 4100MOV R1,R3
 4110MOV R0,#113
 4120SWI "OS_Byte"
 4130MOV R1,R3
 4140MOV R0,#112
 4150SWI "OS_Byte"
 4160LDR R0,ag
 4170ADD R0,R0,#1
 4180STR R0,ag
 4190ADR R1,awritestring
 4200MOV R2,#8
 4210SWI "OS_ConvertCardinal2"
 4220ADR R0,areadstring
 4230SUB R1,R1,R0
 4240SWI "OS_WriteN"
 4250]
 4260IF rndb% THEN
 4270[OPT pass%
 4280LDR R0,arndbuf%:MOV R1,#128
 4290MVN R2,#0:MOV R3,R2:MOV R4,R2:MOV R5,R2
 4300MOV R6,R2:MOV R7,R2:MOV R8,R2:MOV R9,R2
 4310.resrndbuf
 4320STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
 4330STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
 4340STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
 4350STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
 4360SUBS R1,R1,#1:BNE resrndbuf
 4370]
 4380ENDIF
 4390[OPT pass%
 4400LDR addrsc1,asc2
 4410LDR addrsc2,asc1
 4420STR addrsc1,asc1
 4430STR addrsc2,asc2
 4440MOV addro,#0
 4450MOV row,#suy%-1
 4460.nrow
 4470MOV col,#sux%-1
 4480.ncol
 4490LDRB CELL,[addrsc1,addro]
 4500STMFD (sp)!,{addro,addrsc1,addrsc2,col,row}
 4510]
 4520IF rndb% THEN
 4530[OPT pass%
 4540LDR temp1,ag:TST temp1,#1
 4550SUBNE temp1,row,#1:MOVEQ temp1,row
 4560SUBNE temp2,col,#1:MOVEQ temp2,col
 4570CMP temp1,#0:ADDLT temp1,temp1,#suy%
 4580CMP temp2,#0:ADDLT temp2,temp2,#sux%
 4590AND temp1,temp1,#254
 4600AND temp2,temp2,#254
 4610ADD temp1,temp2,temp1,ASL #7
 4620LDR temp2,arndbuf%:ADD temp1,temp2,temp1
 4630STR temp1,arnd
 4640]
 4650ENDIF
 4660PROCcompile(coma1%,coma2%,"",0,st%())
 4670IF ((P%!-4)AND&FFFFFFF)=&AFFFFFF P%!-4=P%!-4 OR &F0000000
 4680[OPT pass%
 4690.compilationdone
 4700LDMFD (sp)!,{addro,addrsc1,addrsc2,col,row}
 4710STRB temp1,[addrsc2,addro]
 4720SUB addro,addro,#1
 4730SUBS col,col,#1
 4740BPL ncol
 4750SUB addro,addro,#320
 4760ADD addro,addro,#sux%
 4770SUBS row,row,#1
 4780BPL nrow
 4790LDMFD (sp)!,{pc}
 4800]
 4810NEXT
 4820ENDPROC
 4830:
 4840DEF PROCinputsize
 4850LOCAL m$
 4860PRINT"width  (1-256) {";w$;"} ";:INPUTm$
 4870IF VALm$>=1 AND VALm$<=256 w$=m$
 4880sux%=VALw$:w$=STR$sux%
 4890PRINT"height (1-256) {";h$;"} ";:INPUTm$
 4900IF VALm$>=1 AND VALm$<=256 h$=m$
 4910suy%=VALh$:h$=STR$suy%
 4920sc1=scrst+320*(128+suy%DIV2)+(sux%+1)DIV2-192
 4930sc2=sc1+&14000
 4940OSCLI("SetEval sux "+STR$sux%)
 4950OSCLI("SetEval suy "+STR$suy%)
 4960ENDPROC
 4970:
 4980DEF PROCcompile(co1%,co2%,ckcondas$,nsi%,st%())
 4990LOCAL brindex%,f$,a$(),last$,s%(),optype%(),opnum%()
 5000DIM a$(3),optype%(3),opnum%(3),s%(2)
 5010s%()=st%()
 5020PROCgetnext
 5030PROCgetnext
 5040PROCgetnext
 5050IF ckcondas$<>"" THEN
 5060IF optype%(0)<-1 AND a$(1)="==" AND ckcondas$<>"#" THEN
 5070[OPT pass%:FNmov(temp1,opnum%(0),optype%(0),ckcondas$)
 5080FNb(compilationdone,ckcondas$):]
 5090br%(j%)=-1:j%+=1
 5100ENDPROC
 5110ELSE
 5120dummy%=FNb(br%(j%),FNnotcond(ckcondas$)):j%+=1
 5130ENDIF
 5140ENDIF
 5150WHILE a$(0)<>"END"
 5160CASE TRUE OF
 5170WHEN optype%(0)<-1 AND optype%(1)<-1 AND optype%(2)<-1
 5180PROCpush(opnum%(0),optype%(0))
 5190PROCgetnext
 5200WHEN optype%(0)>=0
 5210IF nsi%>smx%(optype%(0)) ERROR 255,"CA Stack OverFlow"
 5220IF nsi%<smn%(optype%(0)) ERROR 255,"Insufficient data on CA Stack"
 5230CASE optype%(0) OF
 5240WHEN 0:f$="("+STR$s%(0)+",-2,a$(0),last$,0)":PROCpull
 5250WHEN 1:PROCpush(s%(0),-2)
 5260WHEN 2:f$="("+STR$s%(1)+",-2,"+STR$s%(0)+",-2,a$(0),a$(1))"
 5270PROCpull:PROCpull
 5280WHEN 3,4:f$="(a$(0))"
 5290WHEN 5:PROCrot
 5300WHEN 6:PROCswap
 5310ENDCASE
 5320IF INSTR("0234",STR$optype%(0)) dummy%=EVAL("FNop"+STR$optype%(0)+f$)
 5330PROCgetnext
 5340WHEN optype%(1)>=0
 5350IF nsi%+1>smx%(optype%(1)) ERROR 255,"CA Stack OverFlow"
 5360IF nsi%+1<smn%(optype%(1)) ERROR 255,"Insufficient data on CA Stack"
 5370CASE optype%(1) OF
 5380WHEN 0
 5390IF INSTR(a$(1),"SC") OR a$(1)="NOT" THEN
 5400f$="(opnum%(0),optype%(0),a$(1),a$(0),1)"
 5410ELSE f$="("+FNensurereg(0)+",a$(1),a$(0),1)"
 5420ENDIF
 5430dummy%=EVAL("FNop0"+f$)
 5440WHEN 1:PROCpush(opnum%(0),optype%(0)):PROCpush(opnum%(0),optype%(0))
 5450WHEN 2
 5460IF a$(1)="*" f$=FNensurereg(0) ELSE f$="opnum%(0),optype%(0)"
 5470f$=STR$s%(0)+",-2,"+f$:PROCpull
 5480dummy%=EVAL("FNop2("+f$+",a$(1),a$(2))")
 5490WHEN 3,4:PROCpush(opnum%(0),optype%(0))
 5500dummy%=EVAL("FNop"+STR$optype%(1)+"(a$(1))")
 5510WHEN 5:PROCpush(opnum%(0),optype%(0)):PROCrot
 5520WHEN 6:PROCpush(opnum%(0),optype%(0)):PROCswap
 5530ENDCASE
 5540PROCgetnext:PROCgetnext
 5550OTHERWISE
 5560IF nsi%+2>smx%(optype%(2)) ERROR 255,"CA Stack OverFlow"
 5570IF nsi%+2<smn%(optype%(2)) ERROR 255,"Insufficient data on CA Stack"
 5580CASE optype%(2) OF
 5590WHEN 2:PROCgetndecode(3,FALSE)
 5600CASE TRUE OF
 5610WHEN optype%(1)=-3
 5620IF optype%(0)=-3 OR a$(2)="DIV" THEN
 5630PROCpush(opnum%(0),-3):f$=STR$s%(0)+",-2,"
 5640ELSE
 5650f$="opnum%(0),-2,"
 5660ENDIF
 5670IF a$(2)="*" f$+=FNensurereg(1) ELSE f$+="opnum%(1),optype%(1)"
 5680IF optype%(0)=-3 OR a$(2)="DIV" PROCpull
 5690dummy%=EVAL("FNop2("+f$+",a$(2),a$(3))")
 5700WHEN optype%(0)=-2
 5710dummy%=FNop2(opnum%(0),-2,opnum%(1),-2,a$(2),a$(3))
 5720WHEN optype%(0)=-3
 5730CASE a$(2) OF
 5740WHEN "*","DIV","MOD","<<",">>",">>>"
 5750dummy%=EVAL("FNop2("+FNensurereg(0)+",opnum%(1),-2,a$(2),a$(3))")
 5760OTHERWISE
 5770CASE a$(2) OF
 5780WHEN "-":a$(2)="R"
 5790WHEN "<":a$(2)=">"
 5800WHEN ">":a$(2)="<"
 5810WHEN ">=":a$(2)="<="
 5820WHEN "<=":a$(2)=">="
 5830ENDCASE
 5840dummy%=FNop2(opnum%(1),-2,opnum%(0),-3,a$(2),a$(3))
 5850ENDCASE
 5860ENDCASE
 5870PROCgetnext:PROCgetnext:PROCgetnext
 5880OTHERWISE
 5890PROCpush(opnum%(0),optype%(0)):PROCgetnext
 5900ENDCASE
 5910ENDCASE
 5920ENDWHILE
 5930ENDPROC
 5940:
 5950DEF PROCgetnext last$=a$(0)
 5960FOR i%=1 TO 2
 5970a$(i%-1)=a$(i%)
 5980optype%(i%-1)=optype%(i%)
 5990opnum%(i%-1)=opnum%(i%)
 6000NEXT
 6010PROCgetndecode(2,TRUE)
 6020ENDPROC
 6030:
 6040DEF PROCgetndecode(i%,pcflag%)
 6050LOCAL a$,optype%,opnum%
 6060A%=co1%:B%=co2%:CALL scan,a$
 6070IF !scanf=40 com1%=!scana1+1:com2%=!scana2-1:a$=RIGHT$("00000000"+STR$com1%,8)+RIGHT$("00000000"+STR$com2%,8)
 6080IF pcflag% co1%=!scana2+1
 6090opnum%=0:optype%=-3
 6100IF INSTR(regck$,a$) THEN
 6110optype%=-2
 6120ELSE
 6130FOR q%=0 TO 6
 6140IF INSTR(opck$(q%),a$+" ") THEN optype%=q%
 6150NEXT
 6160ENDIF
 6170IF !scanf=40 optype%=9
 6180IF optype%<-1 THEN
 6190SYS "OS_GSTrans",a$,mblock%,1024 TO ,,len%
 6200opnum%=EVAL FNstrn(mblock%,len%)
 6210ENDIF
 6220optype%(i%)=optype%:opnum%(i%)=opnum%:a$(i%)=a$
 6230ENDPROC
 6240:
 6250DEF FNstrn(ad%,l%)
 6260LOCAL Q%,S$
 6270FOR Q%=0 TO l%-1:S$+=CHR$(ad%?Q%):NEXT
 6280=S$
 6290:
 6300DEF FNop0(v1%,t1%,a$,o$,in%)
 6310LOCAL r%,cond$,s$,co$
 6320CASE a$ OF
 6330WHEN "NOT"
 6340CASE TRUE OF
 6350WHEN t1%=-2:[OPT pass%:MVNS s%(2),v1%:]
 6360WHEN v1%>=0:[OPT pass%:MVNS s%(2),#v1%:]
 6370OTHERWISE:[OPT pass%:MOVS s%(2),#-(v1%+1):]
 6380ENDCASE
 6390PROCirot:nsi%+=1
 6400WHEN "SCOUNT_NEIG","SCOUNT_ALL"
 6410[OPT pass%:MOV temp1,#0:]
 6420IF neig% k1%=5:k2%=7 ELSE k1%=0:k2%=8
 6430FOR r%=k1% TO k2%:r%-=(r%=4)
 6440[OPT pass%:FNcmp(r%,v1%,t1%,"")
 6450ADDEQ temp1,temp1,#1:]
 6460NEXT
 6470IF a$="SCOUNT_ALL" THEN
 6480[OPT pass%:FNcmp(CELL,v1%,t1%,"")
 6490ADDEQ temp1,temp1,#1:]
 6500ENDIF
 6510[OPT pass%:MOVS s%(2),temp1:]
 6520PROCirot:nsi%+=1
 6530WHEN "==":PROCgetndecode(3,FALSE)
 6540[OPT pass%:FNmov(temp1,v1%,t1%,"")
 6550B compilationdone:]
 6560WHEN "IF"
 6570CASE TRUE OF
 6580WHEN INSTR("TRASHSWAPROTREAD_NEIG"+regck$,o$)<>0
 6590[OPT pass%:CMP v1%,#0:]
 6600cond$="<>"
 6610WHEN INSTR("<>=<=",o$)<>0
 6620cond$=o$:PROCirot
 6630OTHERWISE:cond$="<>"
 6640ENDCASE
 6650PROCgetnext:s$=a$(in%)
 6660brindex%=j%:PROCcompile(EVAL LEFT$(s$,8),EVAL RIGHT$(s$,8),cond$,nsi%,s%())
 6670PROCgetndecode(3,FALSE)
 6680IF a$(in%+1)<>"ELSE" THEN
 6690br%(brindex%)=P%
 6700ELSE
 6710PROCgetnext:PROCgetnext
 6720s$=a$(in%)
 6730IF br%(brindex%)<>-1 THEN
 6740br%(brindex%)=P%+4:co$="#"
 6750ELSE co$=FNnotcond(cond$)
 6760ENDIF
 6770brindex%=j%:PROCcompile(EVAL LEFT$(s$,8),EVAL RIGHT$(s$,8),co$,nsi%,s%())
 6780br%(brindex%)=P%
 6790ENDIF
 6800ENDCASE
 6810=0
 6820:
 6830DEF FNop2(v1%,t1%,v2%,t2%,a$,n$)
 6840LOCAL r%
 6850CASE a$ OF
 6860WHEN "*"
 6870IF s%(2)=v1% SWAP v1%,v2%
 6880[OPT pass%:MULS s%(2),v1%,v2%:]
 6890PROCirot:nsi%+=1
 6900WHEN "DIV"
 6910[OPT pass%
 6920MOV temp1,#0
 6930MOV temp2,#32
 6940.divloop%
 6950MOVS s%(2),s%(2),ASL #1
 6960ADC temp1,temp1,temp1:]
 6970IF t2%=-2 THEN
 6980[OPT pass%:CMP temp1,v2%
 6990SUBGE temp1,temp1,v2%:]
 7000ELSE
 7010[OPT pass%:CMP temp1,#ABS v2%
 7020SUBGE temp1,temp1,#ABS v2%:]
 7030ENDIF
 7040[OPT pass%
 7050ORRGE s%(2),s%(2),#1
 7060SUBS temp2,temp2,#1
 7070BNE divloop%
 7080MOVS s%(1),temp1:]
 7090PROCrot:nsi%+=2
 7100WHEN "<<",">>",">>>"
 7110IF t2%=-3 AND v2%<0 THEN
 7120CASE a$ OF
 7130WHEN "<<":a$=">>"
 7140WHEN ">>",">>>":a$="<<"
 7150ENDCASE
 7160v2%=-v2%
 7170ENDIF
 7180CASE a$ OF
 7190WHEN "<<"
 7200IF t2%=-2 THEN
 7210[OPT pass%:MOVS s%(2),v1%,LSL v2%:]
 7220ELSE [OPT pass%:MOVS s%(2),v1%,LSL #v2%:]
 7230ENDIF
 7240WHEN ">>"
 7250IF t2%=-2 THEN
 7260[OPT pass%:MOVS s%(2),v1%,LSR v2%:]
 7270ELSE [OPT pass%:MOVS s%(2),v1%,LSR #v2%:]
 7280ENDIF
 7290WHEN ">>>"
 7300IF t2%=-2 THEN
 7310[OPT pass%:MOVS s%(2),v1%,ASR v2%:]
 7320ELSE [OPT pass%:MOVS s%(2),v1%,ASR #v2%:]
 7330ENDIF
 7340ENDCASE
 7350PROCirot:nsi%+=1
 7360WHEN "+","-"
 7370IF t2%=-3 AND v2%<0 a$=MID$("+-",(a$="-")+2,1):v2%=-v2%
 7380IF a$="+" THEN
 7390IF t2%=-2 THEN
 7400[OPT pass%:ADDS s%(2),v1%,v2%:]
 7410ELSE [OPT pass%:ADDS s%(2),v1%,#v2%:]
 7420ENDIF
 7430ELSE
 7440IF t2%=-2 THEN
 7450[OPT pass%:SUBS s%(2),v1%,v2%:]
 7460ELSE [OPT pass%:SUBS s%(2),v1%,#v2%:]
 7470ENDIF
 7480ENDIF
 7490PROCirot:nsi%+=1
 7500WHEN "R"
 7510IF v2%>=0 THEN
 7520[OPT pass%:RSBS s%(2),v1%,#v2%:]
 7530ELSE
 7540[OPT pass%:ADD s%(2),v1%,#-v2%:RSB s%(2),s%(2),#0:]
 7550ENDIF
 7560PROCirot:nsi%+=1
 7570WHEN "EOR"
 7580IF t2%=-2 THEN
 7590[OPT pass%:EORS s%(2),v1%,v2%:]
 7600ELSE [OPT pass%:EORS  s%(2),v1%,#v2%:]
 7610ENDIF
 7620PROCirot:nsi%+=1
 7630WHEN "OR"
 7640IF t2%=-2 THEN
 7650[OPT pass%:ORRS s%(2),v1%,v2%:]
 7660ELSE [OPT pass%:ORRS  s%(2),v1%,#v2%:]
 7670ENDIF
 7680PROCirot:nsi%+=1
 7690WHEN "AND"
 7700IF t2%=-2 THEN
 7710[OPT pass%:ANDS s%(2),v1%,v2%:]
 7720ELSE [OPT pass%:ANDS  s%(2),v1%,#v2%:]
 7730ENDIF
 7740PROCirot:nsi%+=1
 7750WHEN "MCOUNT_NEIG","MCOUNT_ALL"
 7760[OPT pass%:MOV temp1,#0:]
 7770IF neig% k1%=5:k2%=7 ELSE k1%=0:k2%=8
 7780FOR r%=k1% TO k2%:r%-=(r%=4)
 7790[OPT pass%:FNcmp(r%,v1%,t1%,"")
 7800SUBLT temp1,temp1,#1:FNcmp(r%,v2%,t2%,">=")
 7810ADDLE temp1,temp1,#1:]
 7820NEXT
 7830IF a$="MCOUNT_ALL" THEN
 7840[OPT pass%:FNcmp(CELL,v1%,t1%,"")
 7850SUBLT temp1,temp1,#1:FNcmp(CELL,v2%,t2%,">=")
 7860ADDLE temp1,temp1,#1:]
 7870ENDIF
 7880[OPT pass%:MOVS s%(2),temp1:]
 7890PROCirot:nsi%+=1
 7900WHEN "=","<>","<=",">=","<",">"
 7910[OPT pass%:FNcmp(v1%,v2%,t2%,""):]
 7920IF n$<>"IF" THEN
 7930[OPT pass%:FNmov(s%(2),0,-3,FNnotcond(a$))
 7940FNmov(s%(2),-1,-3,a$):]
 7950PROCirot:nsi%+=1
 7960ELSE nsi%+=1
 7970ENDIF
 7980ENDCASE
 7990=0
 8000:
 8010DEF FNop3(a$)
 8020CASE a$ OF
 8030WHEN "2RND","4RND","8RND","256RND"
 8040k%=LN(VAL a$)/LN2
 8050[OPT pass%:LDR temp1,axor:LDR temp2,aseed:]
 8060FOR Q%=1 TO k%
 8070[OPT pass%:MOVS temp2,temp2,LSL #1:EORCC temp2,temp2,temp1:]
 8080NEXT
 8090[OPT pass%
 8100STR temp2,aseed
 8110ANDS s%(2),temp2,#(VALa$)-1
 8120]
 8130PROCirot:nsi%+=1
 8140WHEN "2RNDB","4RNDB","8RNDB","256RNDB"
 8150k%=LN(VAL a$)/LN2
 8160[OPT pass%
 8170LDR temp1,arnd
 8180LDRB temp2,[temp1]:CMP temp2,#&FF
 8190LDRNEB temp2,[temp1,#1]:BNE P%+4*(7+2*k%)
 8200MOV temp2,#0:STRB temp2,[temp1]
 8210LDR s%(2),axor:LDR temp2,aseed:]
 8220FOR Q%=1 TO k%
 8230[OPT pass%:MOVS temp2,temp2,LSL #1:EORCC temp2,temp2,s%(2):]
 8240NEXT
 8250[OPT pass%
 8260STR temp2,aseed
 8270STRB temp2,[temp1,#1]
 8280ANDS s%(2),temp2,#(VALa$)-1
 8290]
 8300PROCirot:nsi%+=1
 8310WHEN "SUM_NEIG","SUM_ALL"
 8320IF neig% THEN
 8330[OPT pass%
 8340ADD s%(2),OPP,CW:ADDS s%(2),s%(2),CCW
 8350]
 8360ELSE
 8370[OPT pass%
 8380ADD s%(2),TL,TM:ADD s%(2),s%(2),TR
 8390ADD s%(2),s%(2),ML:ADD s%(2),s%(2),MR
 8400ADD s%(2),s%(2),BL:ADD s%(2),s%(2),BM
 8410ADDS s%(2),s%(2),BR
 8420]
 8430ENDIF
 8440IF a$="SUM_ALL" [OPT pass%:ADDS s%(2),s%(2),CELL:]
 8450PROCirot:nsi%+=1
 8460ENDCASE
 8470=0
 8480:
 8490DEF FNop4(a$)
 8500CASE a$ OF
 8510WHEN "READ_NEIG"
 8520IF  neig% THEN
 8530IF wrap=on THEN
 8540[OPT pass%
 8550ADD temp1,addrsc1,addro
 8560LDR temp2,ag:TST temp2,#1:BNE marg1
 8570TST row,#1:BNE marg3
 8580TST col,#1:BNE marg4
 8590MOV UL,CELL
 8600LDRB UR,[temp1,#1]
 8610LDRB LL,[temp1,#320]:LDRB LR,[temp1,#321]
 8620MOV OPP,LR:MOV CW,UR:MOV CCW,LL:MOV FLAG,#0
 8630B marg2
 8640.marg4
 8650MOV UR,CELL
 8660LDRB UL,[temp1,#-1]
 8670LDRB LL,[temp1,#319]:LDRB LR,[temp1,#320]
 8680MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
 8690IF flag%AND3 THEN [OPT pass%:MOV FLAG,#1:] ELSE [OPT pass%:MOV FLAG,#0:]
 8700[OPT pass%
 8710B marg2
 8720.marg3
 8730TST col,#1:BNE marg5
 8740MOV LL,CELL
 8750LDRB LR,[temp1,#1]
 8760LDRB UL,[temp1,#-320]:LDRB UR,[temp1,#-319]
 8770MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
 8780IF flag%AND3 THEN [OPT pass%:MOV FLAG,#2:] ELSE [OPT pass%:MOV FLAG,#0:]
 8790[OPT pass%
 8800B marg2
 8810.marg5
 8820MOV LR,CELL
 8830LDRB LL,[temp1,#-1]
 8840LDRB UL,[temp1,#-321]:LDRB UR,[temp1,#-320]
 8850MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
 8860IF flag%AND3 THEN [OPT pass%:MOV FLAG,#3:] ELSE [OPT pass%:MOV FLAG,#0:]
 8870[OPT pass%
 8880B marg2
 8890.marg1
 8900TST row,#1:BEQ marg6
 8910TST col,#1:BEQ marg7
 8920CMP row,#suy%-1:ADDNE temp2,temp1,#320
 8930SUBEQ temp2,temp1,#256*(suy%-1):SUBEQ temp2,temp2,#64*(suy%-1)
 8940MOV UL,CELL
 8950CMP col,#sux%-1:LDRNEB UR,[temp1,#1]:LDREQB UR,[temp1,#1-sux%]
 8960LDRB LL,[temp2]:LDRNEB LR,[temp2,#1]:LDREQB LR,[temp2,#1-sux%]
 8970MOV OPP,LR:MOV CW,UR:MOV CCW,LL:]
 8980IF flag%AND4 THEN [OPT pass%:MOV FLAG,#4:] ELSE [OPT pass%:MOV FLAG,#0:]
 8990[OPT pass%
 9000B marg2
 9010.marg7
 9020CMP row,#suy%-1:ADDNE temp2,temp1,#320
 9030SUBEQ temp2,temp1,#256*(suy%-1):SUBEQ temp2,temp2,#64*(suy%-1)
 9040MOV UR,CELL
 9050CMP col,#0:LDRNEB UL,[temp1,#-1]:LDREQB UL,[temp1,#sux%-1]
 9060LDRB LR,[temp2]:LDRNEB LL,[temp2,#-1]:LDREQB LL,[temp2,#sux%-1]
 9070MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
 9080CASE TRUE OF
 9090WHEN (flag%AND4)<>0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#5:]
 9100WHEN (flag%AND4)<>0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#4:]
 9110WHEN (flag%AND4)=0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#1:]
 9120WHEN (flag%AND4)=0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#0:]
 9130ENDCASE
 9140[OPT pass%
 9150B marg2
 9160.marg6
 9170TST col,#1:BEQ marg8
 9180CMP row,#0:SUBNE temp2,temp1,#320
 9190ADDEQ temp2,temp1,#256*(suy%-1):ADDEQ temp2,temp2,#64*(suy%-1)
 9200MOV LL,CELL
 9210CMP col,#sux%-1:LDRNEB LR,[temp1,#1]:LDREQB LR,[temp1,#1-sux%]
 9220LDRB UL,[temp2]:LDRNEB UR,[temp2,#1]:LDREQB UR,[temp2,#1-sux%]
 9230MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
 9240CASE TRUE OF
 9250WHEN (flag%AND4)<>0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#6:]
 9260WHEN (flag%AND4)<>0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#4:]
 9270WHEN (flag%AND4)=0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#2:]
 9280WHEN (flag%AND4)=0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#0:]
 9290ENDCASE
 9300[OPT pass%
 9310B marg2
 9320.marg8
 9330CMP row,#0:SUBNE temp2,temp1,#320
 9340ADDEQ temp2,temp1,#256*(suy%-1):ADDEQ temp2,temp2,#64*(suy%-1)
 9350MOV LR,CELL
 9360CMP col,#0:LDRNEB LL,[temp1,#-1]:LDREQB LL,[temp1,#sux%-1]
 9370LDRB UR,[temp2]:LDRNEB UL,[temp2,#-1]:LDREQB UL,[temp2,#sux%-1]
 9380MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
 9390CASE TRUE OF
 9400WHEN (flag%AND4)<>0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#7:]
 9410WHEN (flag%AND4)<>0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#4:]
 9420WHEN (flag%AND4)=0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#3:]
 9430WHEN (flag%AND4)=0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#0:]
 9440ENDCASE
 9450[OPT pass%
 9460.marg2
 9470]
 9480ELSE
 9490[OPT pass%
 9500ADD temp1,addrsc1,addro
 9510LDR temp2,ag:TST temp2,#1:BNE marg1
 9520TST row,#1:BNE marg3
 9530TST col,#1:BNE marg4
 9540MOV UL,CELL
 9550LDRB UR,[temp1,#1]
 9560LDRB LL,[temp1,#320]:LDRB LR,[temp1,#321]
 9570MOV OPP,LR:MOV CW,UR:MOV CCW,LL:MOV FLAG,#0
 9580B marg2
 9590.marg4
 9600MOV UR,CELL
 9610LDRB UL,[temp1,#-1]
 9620LDRB LL,[temp1,#319]:LDRB LR,[temp1,#320]
 9630MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
 9640IF flag%AND3 THEN [OPT pass%:MOV FLAG,#1:] ELSE [OPT pass%:MOV FLAG,#0:]
 9650[OPT pass%
 9660B marg2
 9670.marg3
 9680TST col,#1:BNE marg5
 9690MOV LL,CELL
 9700LDRB LR,[temp1,#1]
 9710LDRB UL,[temp1,#-320]:LDRB UR,[temp1,#-319]
 9720MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
 9730IF flag%AND3 THEN [OPT pass%:MOV FLAG,#2:] ELSE [OPT pass%:MOV FLAG,#0:]
 9740[OPT pass%
 9750B marg2
 9760.marg5
 9770MOV LR,CELL
 9780LDRB LL,[temp1,#-1]
 9790LDRB UL,[temp1,#-321]:LDRB UR,[temp1,#-320]
 9800MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
 9810IF flag%AND3 THEN [OPT pass%:MOV FLAG,#3:] ELSE [OPT pass%:MOV FLAG,#0:]
 9820[OPT pass%
 9830B marg2
 9840.marg1
 9850TST row,#1:BEQ marg6
 9860TST col,#1:BEQ marg7
 9870CMP row,#suy%-1
 9880MOV UL,CELL:MOV UR,#border:MOV LL,#border:MOV LR,#border
 9890LDRNEB LL,[temp1,#320]:LDRNEB LR,[temp1,#321]
 9900CMP col,#sux%-1
 9910LDRNEB UR,[temp1,#1]:MOVEQ LR,#border
 9920MOV OPP,LR:MOV CW,UR:MOV CCW,LL:]
 9930IF flag%AND4 THEN [OPT pass%:MOV FLAG,#4:] ELSE [OPT pass%:MOV FLAG,#0:]
 9940[OPT pass%
 9950B marg2
 9960.marg7
 9970CMP row,#suy%-1
 9980MOV UR,CELL:MOV UL,#border:MOV LL,#border:MOV LR,#border
 9990LDRNEB LL,[temp1,#319]:LDRNEB LR,[temp1,#320]
10000CMP col,#0
10010LDRNEB UL,[temp1,#-1]:MOVEQ LL,#border
10020MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
10030CASE TRUE OF
10040WHEN (flag%AND4)<>0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#5:]
10050WHEN (flag%AND4)<>0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#4:]
10060WHEN (flag%AND4)=0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#1:]
10070WHEN (flag%AND4)=0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#0:]
10080ENDCASE
10090[OPT pass%
10100B marg2
10110.marg6
10120TST col,#1:BEQ marg8
10130CMP row,#0
10140MOV LL,CELL:MOV UL,#border:MOV UR,#border:MOV LR,#border
10150LDRNEB UL,[temp1,#-320]:LDRNEB UR,[temp1,#-319]
10160CMP col,#sux%-1
10170LDRNEB LR,[temp1,#1]:MOVEQ UR,#border
10180MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
10190CASE TRUE OF
10200WHEN (flag%AND4)<>0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#6:]
10210WHEN (flag%AND4)<>0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#4:]
10220WHEN (flag%AND4)=0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#2:]
10230WHEN (flag%AND4)=0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#0:]
10240ENDCASE
10250[OPT pass%
10260B marg2
10270.marg8
10280CMP row,#0
10290MOV LR,CELL:MOV UL,#border:MOV UR,#border:MOV LL,#border
10300LDRNEB UL,[temp1,#-321]:LDRNEB UR,[temp1,#-320]
10310CMP col,#0
10320LDRNEB LL,[temp1,#-1]:MOVEQ UL,#border
10330MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
10340CASE TRUE OF
10350WHEN (flag%AND4)<>0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#7:]
10360WHEN (flag%AND4)<>0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#4:]
10370WHEN (flag%AND4)=0 AND (flag%AND3)<>0:[OPT pass%:MOV FLAG,#3:]
10380WHEN (flag%AND4)=0 AND (flag%AND3)=0:[OPT pass%:MOV FLAG,#0:]
10390ENDCASE
10400[OPT pass%
10410.marg2
10420]
10430ENDIF
10440ELSE
10450IF wrap=on THEN
10460[OPT pass%
10470ADD MR,addro,addrsc1
10480CMP row,#0
10490MOV temp1,#256*(suy%-1)
10500ADD temp1,temp1,temp1,ASR #2
10510MOVNE temp2,#320
10520RSBNE temp2,temp2,#0
10530MOVEQ temp2,temp1
10540CMP row,#suy%-1
10550MOVNE temp1,#320
10560RSBEQ temp1,temp1,#0
10570LDRB TM,[MR,temp2]
10580LDRB BM,[MR,temp1]
10590CMP col,#0
10600SUBNE TR,MR,#1
10610ADDEQ TR,MR,#sux%-1
10620LDRB TL,[TR,temp2]
10630LDRB BL,[TR,temp1]
10640LDRB ML,[TR]
10650CMP col,#sux%-1
10660ADDNE MR,MR,#1
10670SUBEQ MR,MR,#sux%-1
10680LDRB TR,[MR,temp2]
10690LDRB BR,[MR,temp1]
10700LDRB MR,[MR]
10710]
10720ELSE
10730[OPT pass%
10740ADD MR,addro,addrsc1
10750MOV temp1,col
10760MOVS temp2,row
10770LDRNEB TR,[MR,#-319]
10780LDRNEB TM,[MR,#-320]
10790LDRNEB TL,[MR,#-321]
10800MOVEQ TR,#border
10810MOVEQ TM,#border
10820MOVEQ TL,#border
10830CMP temp2,#suy%-1
10840LDRNEB BL,[MR,#319]
10850LDRNEB BM,[MR,#320]
10860LDRNEB BR,[MR,#321]
10870MOVEQ BR,#border
10880MOVEQ BM,#border
10890MOVEQ BL,#border
10900LDRB ML,[MR,#-1]
10910LDRB MR,[MR,#1]
10920CMP temp1,#0
10930MOVEQ TL,#border
10940MOVEQ ML,#border
10950MOVEQ BL,#border
10960CMP temp1,#sux%-1
10970MOVEQ TR,#border
10980MOVEQ MR,#border
10990MOVEQ BR,#border
11000]
11010ENDIF
11020ENDIF
11030OTHERWISE
11040ERROR 255,"Program Error: attempt to compile ELSE or END; should be handled elsewhere"
11050ENDCASE
11060=0
11070:
11080DEF PROCpush(v%,t%)
11090LOCAL q%
11100IF nsi%=3 ERROR 255,"CA Stack OverFlow"
11110SWAP s%(1),s%(2):SWAP s%(0),s%(1):nsi%+=1
11120dummy%=FNmov(s%(0),v%,t%,""):P%!-4=(P%!-4)OR(1<<20)
11130ENDPROC
11140:
11150DEF PROCpull
11160IF nsi%=0 ERROR 255,"Insufficient data on CA Stack"
11170SWAP s%(0),s%(1):SWAP s%(1),s%(2):nsi%-=1
11180ENDPROC
11190:
11200DEF FNensurereg(i%)
11210LOCAL f$
11220IF optype%(i%)=-3 THEN
11230PROCpush(opnum%(i%),-3):f$=STR$s%(0)+",-2":PROCpull
11240ELSE f$=STR$opnum%(i%)+",-2"
11250ENDIF
11260=f$
11270:
11280DEF PROCrot SWAP s%(0),s%(1):SWAP s%(1),s%(2):ENDPROC
11290DEF PROCswap SWAP s%(0),s%(1):ENDPROC
11300DEF PROCirot SWAP s%(1),s%(2):SWAP s%(0),s%(1):ENDPROC
11310:
11320DEF FNnotcond(c$)
11330CASE c$ OF
11340WHEN "":="#"
11350WHEN "#":=""
11360WHEN "=":="<>"
11370WHEN "<>":="="
11380WHEN ">":="<="
11390WHEN "<=":=">"
11400WHEN "<":=">="
11410WHEN ">=":="<"
11420ENDCASE
11430ERROR 255,"Error in FNnotcond"
11440:
11450DEF FNmov(reg%,v%,t%,cond$)
11460CASE TRUE OF
11470WHEN t%=-2:[OPT pass%:MOVEQ reg%,v%:]
11480WHEN v%>=0:[OPT pass%:MOVEQ reg%,#v%:]
11490OTHERWISE:[OPT pass%:MVNEQ reg%,#NOT v%:]
11500ENDCASE
11510P%!-4=(P%!-4)OR(FNcondcode(cond$)<<28)
11520=0
11530:
11540DEF FNcmp(reg%,v%,t%,cond$)
11550CASE TRUE OF
11560WHEN t%=-2:[OPT pass%:CMPEQ reg%,v%:]
11570WHEN v%>=0:[OPT pass%:CMPEQ reg%,#v%:]
11580OTHERWISE:[OPT pass%:CMNEQ reg%,#-v%:]
11590ENDCASE
11600P%!-4=(P%!-4)OR(FNcondcode(cond$)<<28)
11610=0
11620:
11630DEF FNb(addr%,cond$)
11640[OPT pass%:BEQ addr%:]
11650P%!-4=(P%!-4)OR(FNcondcode(cond$)<<28)
11660=0
11670:
11680DEF FNcondcode(c$) = condconv%((INSTR("@ = < > <=>=<>#",c$)-1)DIV2)
11690:
11700DEF PROCquit
11710SYS "Wimp_SetMode",mode%
11720MOUSE ON
11730ENDPROC
11740:
11750DEF FNwimperror
11760VDU6
11770LOCAL f$,ck$,k
11780IF ERR<>17 THEN
11790*FX 113 1
11800*FX 112 1
11810VDU26:ON
11820PROCquit
11830SYS "Wimp_Poll",0,ublock% TO reason
11840!mblock%=ERR:$(mblock%+4)=REPORT$+" (internal error code "+STR$ERL+")"+CHR$0
11850SYS "Wimp_ReportError",mblock%,1,"ArcAut" TO ,resp%
11860IF resp%=2 =TRUE ELSE =FALSE
11870ENDIF
11880*FX15 1
11890REPEAT CLS
11900t$="Again  Save   Load   Next   Cont.  Phase  Quit   "
11910MOUSE RECTANGLE 1280-224,1024-224,223,223
11920MOUSE ON
11930PRINTt$
11940REPEAT MOUSE x%,y%,z%:UNTIL z%=0
11950REPEAT
11960MOUSE x%,y%,b%
11970k1%=(1023-y%)DIV32
11980COLOUR 0 TINT 0:COLOUR 128+63 TINT 255
11990PRINTTAB(0,k1%);MID$(t$,7*k1%+1,5)
12000REPEAT MOUSE x%,y%,z%
12010k2%=(1023-y%)DIV32
12020UNTIL k2%<>k1% OR z%>=4
12030COLOUR 63 TINT 255:COLOUR 128 TINT 0
12040PRINTTAB(0,k1%);MID$(t$,7*k1%+1,5)
12050UNTIL z%>=4
12060MOUSE OFF
12070MOUSE RECTANGLE 0,0,1279,1023
12080CASE k1% OF
12090WHEN 0
12100*FX 113 1
12110*FX 112 1
12120VDU26:ON:CLS
12130PROCmain
12140WHEN 1
12150PRINTTAB(0,7);
12160INPUT "Name";'f$
12170OSCLI("ScreenSave <ArcAut$Dir>.^.Screens."+f$)
12180WHEN 2
12190PRINTTAB(0,7);
12200PROCload
12210SWAP !asc1,!asc2:!abank=3-!abank
12220WHEN 3:PROCtext:WAIT:CALL autcode
12230WHEN 4:PROCtext:PROCaut
12240WHEN 5:!ag=!ag EOR 1
12250WHEN 6:PROCquit:=FALSE
12260ENDCASE
12270UNTIL FALSE

� >!RunImage
�
�        A R C   A U T
(%� A Cellular Automaton Laboratory
2 �   for the Acorn Archimedes
<�
F!�  Written by Michael Rozdoba
P�
Z:
dș "Hourglass_On"
n�initass
x
�wimpinit
��initvbles
�<ș "Wimp_Initialise",200,&4B534154,"ArcAut" � ,arcautth%
��installicon
�ș "Hourglass_Off"
�
quit=�
�� � � �wimperror � �
��
�	�poll
�
� quit
�+ș "Wimp_CloseDown",arcautth%,&4B534154
��
�:
�� �wimpinit
mode%=�
messref%=0
.� iblock% 1024, ublock% 1024, mblock% 1024
"�
,:
6� �installicon
@!iblock%=-1
J7iblock%!4=0:iblock%!8=0:iblock%!12=64:iblock%!16=64
Tiblock%!20=&1700300A
^$(iblock%+24)="!arcaut"
h+ș "Wimp_CreateIcon",,iblock% � arcauth
r�
|:
�� �poll
�%ș "Wimp_Poll",1,ublock% � reason
�mode%=�
�Ȏ reason �
�� 6:�click(ublock%)
�� 9:quit=�
�� 17,18:�message(ublock%)
��
��
�:
�� �click(ublock%)
�Ȏ ublock%!8 �
�� 2:�menu(ublock%)
�
�
:
&� �menu(ublock%)
0$mblock%="ArcAut"
:Bmblock%!12=&00070207:mblock%!16=100:mblock%!20=40:mblock%!24=0
D5mblock%!28=128:mblock%!32=-1:mblock%!36=&07019031
N$(mblock%+40)="Quit"
X1ș "Wimp_CreateMenu",,mblock%,!ublock%-60,136
b�
l:
v� �message(ublock%)
�Ȏ (ublock%!16) �
�� 0:quit=�
�� 1:�saveack
�� 3:�loadtext:�loadack
��
��
�:
�� �saveack
�� ublock%!40<>&FFF �
�2� ublock%!36>mtext% � 255,"Insufficient space"
�&�("Transient "+�(4096+ublock%!36))
�%ublock%!12=ublock%!8:ublock%!16=2
�ublock%!36=-1
n$="Ram::0.$.ArcAutScrp"+�0
$$(ublock%+44)=n$:!ublock%=44+�n$
messref%=ublock%!8
 .ș "Wimp_SendMessage",17,ublock%,ublock%!4
*�
4:
>� �loadack
H%ublock%!12=ublock%!8:ublock%!16=4
R.ș "Wimp_SendMessage",17,ublock%,ublock%!4
\�
f:
p� �loadtext
z� ublock%!40<>&FFF �
�0ș "OS_File",&11,ublock%+44 � ,,,,filelength
�2� filelength>mtext% � 255,"Insufficient space"
�&ș "OS_File",&10,ublock%+44,text,0
�� ublock%!8=messref%+2 �
�8� ��str(ublock%+44),4)<>"Ram:" � 255,"Program error"
�ș "OS_File",&06,ublock%+44
�*Transient
��
�8A%=text:B%=text+mtext%-1:a$="AUTOMATON*":� locate,a$
�� !location=0 �
�<*ScreenSize 160 *ERROR 255 Require >= 160K screen memory
�ȗ �:�13
�!mblock%=148:mblock%!4=-1
,ș "OS_ReadVduVariables",mblock%,mblock%
scrst=!mblock%
	�main
$�
.:
8� �str(ptr%)
B� S$
L'ȕ ?ptr%:S$+=�(?ptr%):ptr%+=1:�:=S$
V:
`� �initass
jmem1%=1024
t.� code1% mem1%, strbuf 255:L%=code1%+mem1%
~mtext%=4096:� text mtext%
�� pass%=8 � 10 � 2
�
P%=code1%
�[OPT pass%
�.location EQUD 0
�.locprevious EQUD 0
�.locate
�0MOV R2,#0:STR R2,location:STR R2,locprevious
�CMP R10,#1:MOVNE PC,R14
�+LDR R2,[R9,#4]:CMP R2,#128:MOVNE PC,R14
�LDR R2,[R9]
�'LDRB R5,[R2,#4]:CMP R5,#0:�Q PC,R14
�4LDRB R3,[R2]:LDRB R4,[R2,#1]:ADD R3,R3,R4,ASL #8
(LDRB R4,[R2,#2]:ADD R3,R3,R4,ASL #16

(LDRB R4,[R2,#3]:ADD R3,R3,R4,ASL #24
ADD R1,R1,#1:SUB R1,R1,R5
CMP R0,R1:MOVGT PC,R14
(
MOV R9,#0
2.locate1
<CMP R9,#1:�Q R8,R0
FALDRB R7,[R0]:CMP R7,#0:CMPNE R7,#10:CMPNE R7,#13:CMPNE R7,#32
PMOVNE R9,#1:�Q R9,#0
ZSUB R2,R5,#1
d.locate2
n9LDRB R6,[R3,R2]:LDRB R7,[R0,R2]:CMP R6,R7:BNE locate3
xSUBS R2,R2,#1:BPL locate2
�1STR R0,location:STR R8,locprevious:MOV PC,R14
�.locate3
�&ADD R0,R0,#1:CMP R0,R1:BLE locate1
�MOV PC,R14
�K.find      ;pass in A%,B% region to search & in C%,D% codes to look for
�MOV R4,#1:SUB R0,R0,#1
�
.findloop
�LDRB R5,[R0,#1]!
�CMP R5,R2:ADDEQ R4,R4,#1
�CMP R5,R3:SUBEQ R4,R4,#1
�CMP R4,#0:�Q PC,R14
�CMP R0,R1:BLT findloop
�GMOV R0,#0:MOV PC,R14   ;returns address of code D% if found, else 0
.scanf EQUD 0
.scana1 EQUD 0
.scana2 EQUD 0
".scanen EQUS "END":ALIGN
,	.scan
6CMP R10,#1:MOVNE PC,R14
@+LDR R2,[R9,#4]:CMP R2,#128:MOVNE PC,R14
JSTMFD R13!,{R14}
TMOV R3,#0:SUB R0,R0,#1
^.scanloop1
hCMP R0,R1:BGE scanend
rLDRB R5,[R0,#1]!
|4CMP R5,#0:CMPNE R5,#10:CMPNE R5,#13:CMPNE R5,#32
�BEQ scanloop1
�CMP R5,#�"(":CMPNE R5,#�"["
�-MOVNE R5,#32:SUBNE R0,R0,#1:STR R0,scana1
�-ADDEQ R0,R0,#1:STR R5,scanf:BNE scanspace
�5MOV R2,R5:CMP R2,#�"(":�Q R3,#�")":MOVNE R3,#�"]"
�BL find
�CMP R0,#0:ADDEQ R0,R1,#1
�B scangotright
�.scanspace
�-CMP R0,R1:ADDGE R0,R0,#1:BGE scangotright
�LDRB R5,[R0,#1]!
�4CMP R5,#0:CMPNE R5,#10:CMPNE R5,#13:CMPNE R5,#32
�BNE scanspace
*.scangotright  ; addr right char in R0
STR R0,scana2
*LDR R5,scanf:CMP R5,#32:CMPNE R5,#�"["
&LDMNEFD R13!,{PC}
04LDR R3,scana1:ADD R3,R3,#1:MOV R2,R0:LDR R4,[R9]
:,SUB R10,R2,R3:CMP R10,#255:BGT scanerror
DLDR R0,astrbuf
N.scanloop2
X#LDRB R5,[R3],#1:STRB R5,[R0],#1
bCMP R3,R2:BLT scanloop2
lMOV R2,R0:LDR R3,astrbuf
v5LDMFD R13!,{R10}:ADR R14,scanret1:ADD PC,R10,#&38
�.scanend
�STR R1,scana2
�MOV R4,#0:STR R4,scanf
�*ADR R3,scanen:ADD R2,R3,#3:LDR R4,[R9]
�5LDMFD R13!,{R10}:ADR R14,scanret1:ADD PC,R10,#&38
�.scanret1 MOV PC,R10
�.astrbuf EQUD strbuf
�.scanerror
�ADR R0,scaneblock%
�SWI "OS_GenerateError"
�.scaneblock%
�EQUD 19
�EQUS "String too long"

EQUB 0
	ALIGN
]
 �
*�
4:
>� �initvbles
H=ș "OS_File",&05,"<ArcAut$Dir>.InitSub" � ,,,,leninitsub%
R� initsub% leninitsub%
\4ș "OS_File",&FF,"<ArcAut$Dir>.InitSub",initsub%
f>ș "OS_File",&05,"<ArcAut$Dir>.Library" � ,,,,lenTlibrary%
p� Tlibrary% lenTlibrary%
z5ș "OS_File",&FF,"<ArcAut$Dir>.Library",Tlibrary%
�8ș "OS_File",&05,"<ArcAut$Dir>.Code" � ,,,,lenTcode%
�� Tcode% lenTcode%
�/ș "OS_File",&FF,"<ArcAut$Dir>.Code",Tcode%
�mem%=10240
�� code% mem%
�� rndbuf% 32768
�� st%(2)
�� opck$(6),smn%(6),smx%(6)
�1regck$="TL  TM  TR  ML  CELLMR  BL  BM  BR  "
�.regck$+="UL  UR  LL  LR  OPP CW  CCW FLAG"
�6opck$(0)="== IF NOT TRASH SCOUNT_NEIG SCOUNT_ALL "
�opck$(1)="DUP "
�Topck$(2)="+ - * DIV EOR AND OR < > = <= >= <> << >> >>> MCOUNT_NEIG MCOUNT_ALL "
	Popck$(3)="SUM_NEIG SUM_ALL 2RND 4RND 8RND 256RND 2RNDB 4RNDB 8RNDB 256RNDB "
	"opck$(4)="READ_NEIG ELSE END "
	opck$(5)="ROT "
	$opck$(6)="SWAP "
	.-smn%()=1,1,2,0,0,3,2:smx%()=3,2,3,2,3,3,3
	8maxnumstats%=255
	B$� br%(maxnumstats%),condconv%(7)
	L%condconv%()=14,0,11,12,13,10,1,15
	Von=�:off=�
	`�("SetEval on "+�on)
	j�("SetEval off "+�off)
	t*SetEval dead 0
	~*SetEval alive 255
	�*SetEval moore 0
	�*SetEval margolus -1
	�*SetEval border 0
	�w$="128":h$="128"
	��
	�:
	�� �main
	�
�assemble
	��initscreen
	��aut
	��
	�:
� �initscreen


*FX 112 2
�scr

*FX 112 1
(�scr
2(�subtask("SCREEN*","CODE*","screen")
<�
F:
P� �subtask(s1$,s2$,e$)
Z� a$
dA%=text:B%=A%+mtext%-1
n� locate,s1$
xA%=!location+�s1$
�4� !location=0 � 255,"Incorrect automaton syntax"
�� locate,s2$
�B%=!locprevious+1
�;� !location=0 � B%=1 � 255,"Incorrect automaton syntax"
�
� scan,a$
�A%=!scana1+1
�1a$="WimpTask Basic -quit RAM::0.$.ArcAutScrp"
�D�("Transient "+�(4096+B%-A%+leninitsub%+lenTlibrary%+lenTcode%))
�Nș "OS_File",&0A,"RAM::0.$.Library",&FFB,,Tlibrary%,Tlibrary%+lenTlibrary%
�Bș "OS_File",&0A,"RAM::0.$.Code",&FFD,,Tcode%,Tcode%+lenTcode%
�Nș "OS_File",&0A,"RAM::0.$.ArcAutScrp",&FFF,,initsub%,initsub%+leninitsub%
�3ș "OS_Find",&CF,"RAM::0.$.ArcAutScrp" � fileh%
�.ș "OS_GBPB",1,fileh%,A%,B%-A%,leninitsub%
ș "OS_Find",&00,fileh%
*SetEval ArcAut$Suc 0
�21
"� a$
,ȗ �
6�6
@9*SCREENSIZE 160 *ERROR 255 Need >= 160K screen memory
J*DELETE RAM::0.$.ArcAutScrp
T*DELETE RAM::0.$.Code
^*DELETE RAM::0.$.Library
h*Transient
r0ș "OS_ReadVarVal","ArcAut$Suc",mblock%,1024
|R� !mblock%=0 � 255,"Error in automaton "+e$+" code or insufficient free space"
��
�:
�� �round(n%)
�� m%,f%
�� n%<0 f%=�:n%=-n%
�ȕ n%>255 n%=n%�4:m%+=1:�
�#n%=n%<<(m%*2):� f%=� =-n% � =n%
�:
�E� �acol(c%) = ((c%�3)<<6)+((c%�132)>>2)+((c%�8)<<1)+((c%�112)>>3)
�F� �lcol(c%) = ((c%�33)<<2)+((c%�14)<<3)+((c%�16)>>1)+((c%�192)>>6)
�:
�
� �scr
�� q$,q%,f%
�26,24,4;0;1027;1023;
�:� 63 Ȝ 255
.ȓ 514-2*sux%,510-2*suy%,4*sux%+4,4*suy%+4
&5� 24,518-2*sux%;514-2*suy%;514+2*sux%;510+2*suy%;
0ȑ 516,512
:� 28,33,31,39,0
D	�text
N�
X:
b� �text
l�:�
v�'''
�"q$=aut$+"_":f%=1:� q%=1 � � q$
�� �q$,q%,1)="_" �
��q$,f%,q%-f%);
�� q%-f%<>7 �
�f%=q%+1
��
��
�/�0,12);"Gen.#:";�0,23);"Menu"'" to"'"exit"
��
�:
�� �load
�� � � �-87:*FX 15 1
�� "Name:";'f$:�text

.�("ScreenLoad <ArcAut$Dir>.^.Screens."+f$)

� � � �-74

�

 :

*
� �aut

49*SCREENSIZE 160 *ERROR 255 Need >= 160K screen memory

>� � autcode:� �-11

H� 17,"Escape"

R�

\:

f� �assemble

pA%=text:B%=A%+mtext%-1

za$="AUTOMATON*":� locate,a$

�A%=!location+10

�.� A%=10 � 255,"Incorrect automaton syntax"

�$a$="INITIALISATION*":� locate,a$

�B%=!location-1

�.� B%=-1 � 255,"Incorrect automaton syntax"

�� scan,aut$

��("Set aut "+aut$)

��inputsize

�*SetEval wrap on

�*SetEval neig moore

�*SetEval flag 0

�*SetEval rndb 0

�:�subtask("INITIALISATION*","SCREEN*","initialisation")
8ș "OS_ReadVarVal","wrap",mblock%,1024:wrap=!mblock%
<ș "OS_ReadVarVal","border",mblock%,1024:border=!mblock%
8ș "OS_ReadVarVal","dead",mblock%,1024:dead=!mblock%
$:ș "OS_ReadVarVal","alive",mblock%,1024:alive=!mblock%
.9ș "OS_ReadVarVal","neig",mblock%,1024:neig%=!mblock%
89ș "OS_ReadVarVal","flag",mblock%,1024:flag%=!mblock%
B9ș "OS_ReadVarVal","rndb",mblock%,1024:rndb%=!mblock%
L
� neig% �
V� (sux%�1)=1 sux%+=1
`� (suy%�1)=1 suy%+=1
j-sc1=scrst+320*(128+suy%�2)+(sux%+1)�2-192
tsc2=sc1+&14000
~�("SetEval sux "+�sux%)
��("SetEval suy "+�suy%)
��
�A%=text:B%=A%+mtext%-1
�a$="CODE*":� locate,a$
�A%=!location+5
�-� A%=5 � 255,"Incorrect automaton syntax"
�a$="END*":� locate,a$
�B%=!location-1
�.� B%=-1 � 255,"Incorrect automaton syntax"
�
� scan,a$
�%coma1%=!scana1+1:coma2%=!scana2-1
�br%()=0
ZTL=0:addro=0:TM=1:addrsc1=1:TR=2:row=2:ML=3:CELL=4:MR=5:addrsc2=5:BL=6:BM=7:BR=8:col=8

/UL=0:UR=1:LL=2:LR=3:OPP=5:CW=6:CCW=7:FLAG=8
st%()=9,10,11
)temp1=12:sp=13:temp2=14:link=14:pc=15
(L%=code%+mem%
2� pass%=8 � 10 � 2
<P%=code%:j%=0
F[OPT pass%
P.abank:EQUD 2
Z.asc1:EQUD sc2
d.asc2:EQUD sc1
n.areadstring
xEQUD &0D021F1B
�.awritestring
�
EQUD 0
�
EQUD 0
�.ag:EQUD 0
�.arndbuf%:EQUD rndbuf%
�.arnd:EQUD 0
�.aseed:EQUD &FFFFFFFF
�.axor:EQUD &ED6AA7
�.autcode
�STMFD (sp)!,{link}
�LDR R3,abank
�RSB R3,R3,#3
�STR R3,abank

MOV R1,R3
MOV R0,#113
SWI "OS_Byte"
"
MOV R1,R3
,MOV R0,#112
6SWI "OS_Byte"
@
LDR R0,ag
JADD R0,R0,#1
T
STR R0,ag
^ADR R1,awritestring
h
MOV R2,#8
rSWI "OS_ConvertCardinal2"
|ADR R0,areadstring
�SUB R1,R1,R0
�SWI "OS_WriteN"
�]
�
� rndb% �
�[OPT pass%
�LDR R0,arndbuf%:MOV R1,#128
�+MVN R2,#0:MOV R3,R2:MOV R4,R2:MOV R5,R2
�+MOV R6,R2:MOV R7,R2:MOV R8,R2:MOV R9,R2
�.resrndbuf
�'STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
�'STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
�'STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
�'STMIA R0!,{R2-R9}:STMIA R0!,{R2-R9}
SUBS R1,R1,#1:BNE resrndbuf
]
�
&[OPT pass%
0LDR addrsc1,asc2
:LDR addrsc2,asc1
DSTR addrsc1,asc1
NSTR addrsc2,asc2
XMOV addro,#0
bMOV row,#suy%-1
l	.nrow
vMOV col,#sux%-1
�	.ncol
�LDRB CELL,[addrsc1,addro]
�/STMFD (sp)!,{addro,addrsc1,addrsc2,col,row}
�]
�
� rndb% �
�[OPT pass%
�LDR temp1,ag:TST temp1,#1
�#SUBNE temp1,row,#1:�Q temp1,row
�#SUBNE temp2,col,#1:�Q temp2,col
�(CMP temp1,#0:ADDLT temp1,temp1,#suy%
�(CMP temp2,#0:ADDLT temp2,temp2,#sux%
�� temp1,temp1,#254
�� temp2,temp2,#254
 ADD temp1,temp2,temp1,ASL #7
,LDR temp2,arndbuf%:ADD temp1,temp2,temp1
STR temp1,arnd
 ]
*�
4&�compile(coma1%,coma2%,"",0,st%())
>9� ((P%!-4)�&FFFFFFF)=&AFFFFFF P%!-4=P%!-4 � &F0000000
H[OPT pass%
R.compilationdone
\/LDMFD (sp)!,{addro,addrsc1,addrsc2,col,row}
fSTRB temp1,[addrsc2,addro]
pSUB addro,addro,#1
zSUBS col,col,#1
�BPL ncol
�SUB addro,addro,#320
�ADD addro,addro,#sux%
�SUBS row,row,#1
�BPL nrow
�LDMFD (sp)!,{pc}
�]
��
��
�:
�� �inputsize
�� m$
�$�"width  (1-256) {";w$;"} ";:�m$
� �m$>=1 � �m$<=256 w$=m$
sux%=�w$:w$=�sux%
$�"height (1-256) {";h$;"} ";:�m$
$� �m$>=1 � �m$<=256 h$=m$
.suy%=�h$:h$=�suy%
8-sc1=scrst+320*(128+suy%�2)+(sux%+1)�2-192
Bsc2=sc1+&14000
L�("SetEval sux "+�sux%)
V�("SetEval suy "+�suy%)
`�
j:
t.� �compile(co1%,co2%,ckcondas$,nsi%,st%())
~4� brindex%,f$,a$(),last$,s%(),optype%(),opnum%()
�&� a$(3),optype%(3),opnum%(3),s%(2)
�s%()=st%()
��getnext
��getnext
��getnext
�� ckcondas$<>"" �
�3� optype%(0)<-1 � a$(1)="==" � ckcondas$<>"#" �
�9[OPT pass%:�mov(temp1,opnum%(0),optype%(0),ckcondas$)
�#�b(compilationdone,ckcondas$):]
�br%(j%)=-1:j%+=1
��
��
0dummy%=�b(br%(j%),�notcond(ckcondas$)):j%+=1

�
�
ȕ a$(0)<>"END"
(
Ȏ � �
23� optype%(0)<-1 � optype%(1)<-1 � optype%(2)<-1
<�push(opnum%(0),optype%(0))
F�getnext
P� optype%(0)>=0
Z5� nsi%>smx%(optype%(0)) � 255,"CA Stack OverFlow"
dA� nsi%<smn%(optype%(0)) � 255,"Insufficient data on CA Stack"
nȎ optype%(0) �
x0� 0:f$="("+�s%(0)+",-2,a$(0),last$,0)":�pull
�� 1:�push(s%(0),-2)
�6� 2:f$="("+�s%(1)+",-2,"+�s%(0)+",-2,a$(0),a$(1))"
��pull:�pull
�� 3,4:f$="(a$(0))"
�� 5:�rot
�
� 6:�swap
��
�:� �"0234",�optype%(0)) dummy%=�("FNop"+�optype%(0)+f$)
��getnext
�� optype%(1)>=0
�7� nsi%+1>smx%(optype%(1)) � 255,"CA Stack OverFlow"
�C� nsi%+1<smn%(optype%(1)) � 255,"Insufficient data on CA Stack"
�Ȏ optype%(1) �
� 0
"� �a$(1),"SC") � a$(1)="NOT" �
-f$="(opnum%(0),optype%(0),a$(1),a$(0),1)"
",� f$="("+�ensurereg(0)+",a$(1),a$(0),1)"
,�
6dummy%=�("FNop0"+f$)
@?� 1:�push(opnum%(0),optype%(0)):�push(opnum%(0),optype%(0))
J� 2
T<� a$(1)="*" f$=�ensurereg(0) � f$="opnum%(0),optype%(0)"
^f$=�s%(0)+",-2,"+f$:�pull
h)dummy%=�("FNop2("+f$+",a$(1),a$(2))")
r%� 3,4:�push(opnum%(0),optype%(0))
|*dummy%=�("FNop"+�optype%(1)+"(a$(1))")
�(� 5:�push(opnum%(0),optype%(0)):�rot
�)� 6:�push(opnum%(0),optype%(0)):�swap
��
��getnext:�getnext
�
�7� nsi%+2>smx%(optype%(2)) � 255,"CA Stack OverFlow"
�C� nsi%+2<smn%(optype%(2)) � 255,"Insufficient data on CA Stack"
�Ȏ optype%(2) �
�� 2:�getndecode(3,�)
�
Ȏ � �
�� optype%(1)=-3
�#� optype%(0)=-3 � a$(2)="DIV" �
�(�push(opnum%(0),-3):f$=�s%(0)+",-2,"
�
f$="opnum%(0),-2,"
�
&>� a$(2)="*" f$+=�ensurereg(1) � f$+="opnum%(1),optype%(1)"
0'� optype%(0)=-3 � a$(2)="DIV" �pull
:)dummy%=�("FNop2("+f$+",a$(2),a$(3))")
D� optype%(0)=-2
N6dummy%=�op2(opnum%(0),-2,opnum%(1),-2,a$(2),a$(3))
X� optype%(0)=-3
bȎ a$(2) �
l%� "*","DIV","MOD","<<",">>",">>>"
vAdummy%=�("FNop2("+�ensurereg(0)+",opnum%(1),-2,a$(2),a$(3))")
�
�Ȏ a$(2) �
�� "-":a$(2)="R"
�� "<":a$(2)=">"
�� ">":a$(2)="<"
�� ">=":a$(2)="<="
�� "<=":a$(2)=">="
��
�6dummy%=�op2(opnum%(1),-2,opnum%(0),-3,a$(2),a$(3))
��
��
��getnext:�getnext:�getnext
�
(�push(opnum%(0),optype%(0)):�getnext
�
�
 �
*�
4:
>� �getnext last$=a$(0)
H� i%=1 � 2
Ra$(i%-1)=a$(i%)
\optype%(i%-1)=optype%(i%)
fopnum%(i%-1)=opnum%(i%)
p�
z�getndecode(2,�)
��
�:
�� �getndecode(i%,pcflag%)
�� a$,optype%,opnum%
�A%=co1%:B%=co2%:� scan,a$
�^� !scanf=40 com1%=!scana1+1:com2%=!scana2-1:a$=�"00000000"+�com1%,8)+�"00000000"+�com2%,8)
�� pcflag% co1%=!scana2+1
�opnum%=0:optype%=-3
�� �regck$,a$) �
�optype%=-2
��
�� q%=0 � 6
�%� �opck$(q%),a$+" ") � optype%=q%
�
�
� !scanf=40 optype%=9
$� optype%<-1 �
.,ș "OS_GSTrans",a$,mblock%,1024 � ,,len%
8 opnum%=� �strn(mblock%,len%)
B�
L3optype%(i%)=optype%:opnum%(i%)=opnum%:a$(i%)=a$
V�
`:
j� �strn(ad%,l%)
t� Q%,S$
~!� Q%=0 � l%-1:S$+=�(ad%?Q%):�
�=S$
�:
�� �op0(v1%,t1%,a$,o$,in%)
�� r%,cond$,s$,co$
�Ȏ a$ �
�� "NOT"
�
Ȏ � �
�(� t1%=-2:[OPT pass%:MVNS s%(2),v1%:]
�)� v1%>=0:[OPT pass%:MVNS s%(2),#v1%:]
�':[OPT pass%:MOVS s%(2),#-(v1%+1):]
��
��irot:nsi%+=1
 � "SCOUNT_NEIG","SCOUNT_ALL"

[OPT pass%:MOV temp1,#0:]
%� neig% k1%=5:k2%=7 � k1%=0:k2%=8
� r%=k1% � k2%:r%-=(r%=4)
("[OPT pass%:�cmp(r%,v1%,t1%,"")
2ADDEQ temp1,temp1,#1:]
<�
F� a$="SCOUNT_ALL" �
P$[OPT pass%:�cmp(CELL,v1%,t1%,"")
ZADDEQ temp1,temp1,#1:]
d�
n![OPT pass%:MOVS s%(2),temp1:]
x�irot:nsi%+=1
�� "==":�getndecode(3,�)
�%[OPT pass%:�mov(temp1,v1%,t1%,"")
�B compilationdone:]
�
� "IF"
�
Ȏ � �
�,� �"TRASHSWAPROTREAD_NEIG"+regck$,o$)<>0
�PT pass%:CMP v1%,#0:]
�cond$="<>"
�� �"<>=<=",o$)<>0
�cond$=o$:�irot
�:cond$="<>"
��
��getnext:s$=a$(in%)
;brindex%=j%:�compile(� �s$,8),� �s$,8),cond$,nsi%,s%())
�getndecode(3,�)
� a$(in%+1)<>"ELSE" �
"br%(brindex%)=P%
,�
6�getnext:�getnext
@s$=a$(in%)
J� br%(brindex%)<>-1 �
Tbr%(brindex%)=P%+4:co$="#"
^� co$=�notcond(cond$)
h�
r9brindex%=j%:�compile(� �s$,8),� �s$,8),co$,nsi%,s%())
|br%(brindex%)=P%
��
��
�=0
�:
�!� �op2(v1%,t1%,v2%,t2%,a$,n$)
�� r%
�Ȏ a$ �
�	� "*"
�� s%(2)=v1% Ȕ v1%,v2%
�#[OPT pass%:MULS s%(2),v1%,v2%:]
��irot:nsi%+=1
�� "DIV"
�[OPT pass%
MOV temp1,#0
MOV temp2,#32

.divloop%
&MOVS s%(2),s%(2),ASL #1
0ADC temp1,temp1,temp1:]
:� t2%=-2 �
D[OPT pass%:CMP temp1,v2%
NSUBGE temp1,temp1,v2%:]
X�
b[OPT pass%:CMP temp1,#� v2%
lSUBGE temp1,temp1,#� v2%:]
v�
�[OPT pass%
��RGE s%(2),s%(2),#1
�SUBS temp2,temp2,#1
�BNE divloop%
�MOVS s%(1),temp1:]
��rot:nsi%+=2
�� "<<",">>",">>>"
�� t2%=-3 � v2%<0 �
�Ȏ a$ �
�� "<<":a$=">>"
�� ">>",">>>":a$="<<"
��
�v2%=-v2%
�
Ȏ a$ �

� "<<"
 � t2%=-2 �
*'[OPT pass%:MOVS s%(2),v1%,LSL v2%:]
4*� [OPT pass%:MOVS s%(2),v1%,LSL #v2%:]
>�
H
� ">>"
R� t2%=-2 �
\'[OPT pass%:MOVS s%(2),v1%,LSR v2%:]
f*� [OPT pass%:MOVS s%(2),v1%,LSR #v2%:]
p�
z� ">>>"
�� t2%=-2 �
�'[OPT pass%:MOVS s%(2),v1%,ASR v2%:]
�*� [OPT pass%:MOVS s%(2),v1%,ASR #v2%:]
��
��
��irot:nsi%+=1
�
� "+","-"
�4� t2%=-3 � v2%<0 a$=�"+-",(a$="-")+2,1):v2%=-v2%
�� a$="+" �
�� t2%=-2 �
�#[OPT pass%:ADDS s%(2),v1%,v2%:]
�&� [OPT pass%:ADDS s%(2),v1%,#v2%:]
��
�
� t2%=-2 �
#[OPT pass%:SUBS s%(2),v1%,v2%:]
$&� [OPT pass%:SUBS s%(2),v1%,#v2%:]
.�
8�
B�irot:nsi%+=1
L	� "R"
V� v2%>=0 �
`$[OPT pass%:RSBS s%(2),v1%,#v2%:]
j�
t7[OPT pass%:ADD s%(2),v1%,#-v2%:RSB s%(2),s%(2),#0:]
~�
��irot:nsi%+=1
�� "EOR"
�� t2%=-2 �
�![OPT pass%:�S s%(2),v1%,v2%:]
�%� [OPT pass%:�S  s%(2),v1%,#v2%:]
��
��irot:nsi%+=1
�
� "OR"
�� t2%=-2 �
�"[OPT pass%:�RS s%(2),v1%,v2%:]
�&� [OPT pass%:�RS  s%(2),v1%,#v2%:]
��
�irot:nsi%+=1

� "AND"
� t2%=-2 �
![OPT pass%:�S s%(2),v1%,v2%:]
(%� [OPT pass%:�S  s%(2),v1%,#v2%:]
2�
<�irot:nsi%+=1
F � "MCOUNT_NEIG","MCOUNT_ALL"
P[OPT pass%:MOV temp1,#0:]
Z%� neig% k1%=5:k2%=7 � k1%=0:k2%=8
d� r%=k1% � k2%:r%-=(r%=4)
n"[OPT pass%:�cmp(r%,v1%,t1%,"")
x.SUBLT temp1,temp1,#1:�cmp(r%,v2%,t2%,">=")
�ADDLE temp1,temp1,#1:]
��
�� a$="MCOUNT_ALL" �
�$[OPT pass%:�cmp(CELL,v1%,t1%,"")
�0SUBLT temp1,temp1,#1:�cmp(CELL,v2%,t2%,">=")
�ADDLE temp1,temp1,#1:]
��
�![OPT pass%:MOVS s%(2),temp1:]
��irot:nsi%+=1
� � "=","<>","<=",">=","<",">"
�%[OPT pass%:�cmp(v1%,v2%,t2%,""):]
�� n$<>"IF" �
�,[OPT pass%:�mov(s%(2),0,-3,�notcond(a$))
�mov(s%(2),-1,-3,a$):]
�irot:nsi%+=1

� nsi%+=1
"�
,�
6=0
@:
J� �op3(a$)
TȎ a$ �
^#� "2RND","4RND","8RND","256RND"
hk%=�(� a$)/�2
r/[OPT pass%:LDR temp1,axor:LDR temp2,aseed:]
|� Q%=1 � k%
�>[OPT pass%:MOVS temp2,temp2,LSL #1:�CC temp2,temp2,temp1:]
��
�[OPT pass%
�STR temp2,aseed
��S s%(2),temp2,#(�a$)-1
�]
��irot:nsi%+=1
�'� "2RNDB","4RNDB","8RNDB","256RNDB"
�k%=�(� a$)/�2
�[OPT pass%
�LDR temp1,arnd
�%LDRB temp2,[temp1]:CMP temp2,#&FF
�-LDRNEB temp2,[temp1,#1]:BNE P%+4*(7+2*k%)
 #MOV temp2,#0:STRB temp2,[temp1]
 $LDR s%(2),axor:LDR temp2,aseed:]
 � Q%=1 � k%
 &>[OPT pass%:MOVS temp2,temp2,LSL #1:�CC temp2,temp2,s%(2):]
 0�
 :[OPT pass%
 DSTR temp2,aseed
 NSTRB temp2,[temp1,#1]
 X�S s%(2),temp2,#(�a$)-1
 b]
 l�irot:nsi%+=1
 v� "SUM_NEIG","SUM_ALL"
 �
� neig% �
 �[OPT pass%
 �)ADD s%(2),OPP,CW:ADDS s%(2),s%(2),CCW
 �]
 ��
 �[OPT pass%
 �&ADD s%(2),TL,TM:ADD s%(2),s%(2),TR
 �)ADD s%(2),s%(2),ML:ADD s%(2),s%(2),MR
 �)ADD s%(2),s%(2),BL:ADD s%(2),s%(2),BM
 �ADDS s%(2),s%(2),BR
 �]
 ��
 �5� a$="SUM_ALL" [OPT pass%:ADDS s%(2),s%(2),CELL:]
!�irot:nsi%+=1
!�
!=0
! :
!*� �op4(a$)
!4Ȏ a$ �
!>� "READ_NEIG"
!H�  neig% �
!R� wrap=on �
!\[OPT pass%
!fADD temp1,addrsc1,addro
!p'LDR temp2,ag:TST temp2,#1:BNE marg1
!zTST row,#1:BNE marg3
!�TST col,#1:BNE marg4
!�MOV UL,CELL
!�LDRB UR,[temp1,#1]
!�-LDRB LL,[temp1,#320]:LDRB LR,[temp1,#321]
!�/MOV OPP,LR:MOV CW,UR:MOV CCW,LL:MOV FLAG,#0
!�B marg2
!�
.marg4
!�MOV UR,CELL
!�LDRB UL,[temp1,#-1]
!�-LDRB LL,[temp1,#319]:LDRB LR,[temp1,#320]
!�%MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
!�C� flag%�3 � [OPT pass%:MOV FLAG,#1:] � [OPT pass%:MOV FLAG,#0:]
!�[OPT pass%
"B marg2
"
.marg3
"TST col,#1:BNE marg5
"$MOV LL,CELL
".LDRB LR,[temp1,#1]
"8/LDRB UL,[temp1,#-320]:LDRB UR,[temp1,#-319]
"B%MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
"LC� flag%�3 � [OPT pass%:MOV FLAG,#2:] � [OPT pass%:MOV FLAG,#0:]
"V[OPT pass%
"`B marg2
"j
.marg5
"tMOV LR,CELL
"~LDRB LL,[temp1,#-1]
"�/LDRB UL,[temp1,#-321]:LDRB UR,[temp1,#-320]
"�%MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
"�C� flag%�3 � [OPT pass%:MOV FLAG,#3:] � [OPT pass%:MOV FLAG,#0:]
"�[OPT pass%
"�B marg2
"�
.marg1
"�TST row,#1:BEQ marg6
"�TST col,#1:BEQ marg7
"�*CMP row,#suy%-1:ADDNE temp2,temp1,#320
"�BSUBEQ temp2,temp1,#256*(suy%-1):SUBEQ temp2,temp2,#64*(suy%-1)
"�MOV UL,CELL
"�BCMP col,#sux%-1:LDRNEB UR,[temp1,#1]:LDREQB UR,[temp1,#1-sux%]
#BLDRB LL,[temp2]:LDRNEB LR,[temp2,#1]:LDREQB LR,[temp2,#1-sux%]
#
%MOV OPP,LR:MOV CW,UR:MOV CCW,LL:]
#C� flag%�4 � [OPT pass%:MOV FLAG,#4:] � [OPT pass%:MOV FLAG,#0:]
#[OPT pass%
#(B marg2
#2
.marg7
#<*CMP row,#suy%-1:ADDNE temp2,temp1,#320
#FBSUBEQ temp2,temp1,#256*(suy%-1):SUBEQ temp2,temp2,#64*(suy%-1)
#PMOV UR,CELL
#Z>CMP col,#0:LDRNEB UL,[temp1,#-1]:LDREQB UL,[temp1,#sux%-1]
#dCLDRB LR,[temp2]:LDRNEB LL,[temp2,#-1]:LDREQB LL,[temp2,#sux%-1]
#n%MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
#x
Ȏ � �
#�:� (flag%�4)<>0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#5:]
#�9� (flag%�4)<>0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#4:]
#�9� (flag%�4)=0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#1:]
#�8� (flag%�4)=0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#0:]
#��
#�[OPT pass%
#�B marg2
#�
.marg6
#�TST col,#1:BEQ marg8
#�%CMP row,#0:SUBNE temp2,temp1,#320
#�BADDEQ temp2,temp1,#256*(suy%-1):ADDEQ temp2,temp2,#64*(suy%-1)
#�MOV LL,CELL
#�BCMP col,#sux%-1:LDRNEB LR,[temp1,#1]:LDREQB LR,[temp1,#1-sux%]
$BLDRB UL,[temp2]:LDRNEB UR,[temp2,#1]:LDREQB UR,[temp2,#1-sux%]
$%MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
$
Ȏ � �
$":� (flag%�4)<>0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#6:]
$,9� (flag%�4)<>0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#4:]
$69� (flag%�4)=0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#2:]
$@8� (flag%�4)=0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#0:]
$J�
$T[OPT pass%
$^B marg2
$h
.marg8
$r%CMP row,#0:SUBNE temp2,temp1,#320
$|BADDEQ temp2,temp1,#256*(suy%-1):ADDEQ temp2,temp2,#64*(suy%-1)
$�MOV LR,CELL
$�>CMP col,#0:LDRNEB LL,[temp1,#-1]:LDREQB LL,[temp1,#sux%-1]
$�CLDRB UR,[temp2]:LDRNEB UL,[temp2,#-1]:LDREQB UL,[temp2,#sux%-1]
$�%MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
$�
Ȏ � �
$�:� (flag%�4)<>0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#7:]
$�9� (flag%�4)<>0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#4:]
$�9� (flag%�4)=0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#3:]
$�8� (flag%�4)=0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#0:]
$��
$�[OPT pass%
$�
.marg2
$�]
%�
%[OPT pass%
%ADD temp1,addrsc1,addro
%&'LDR temp2,ag:TST temp2,#1:BNE marg1
%0TST row,#1:BNE marg3
%:TST col,#1:BNE marg4
%DMOV UL,CELL
%NLDRB UR,[temp1,#1]
%X-LDRB LL,[temp1,#320]:LDRB LR,[temp1,#321]
%b/MOV OPP,LR:MOV CW,UR:MOV CCW,LL:MOV FLAG,#0
%lB marg2
%v
.marg4
%�MOV UR,CELL
%�LDRB UL,[temp1,#-1]
%�-LDRB LL,[temp1,#319]:LDRB LR,[temp1,#320]
%�%MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
%�C� flag%�3 � [OPT pass%:MOV FLAG,#1:] � [OPT pass%:MOV FLAG,#0:]
%�[OPT pass%
%�B marg2
%�
.marg3
%�TST col,#1:BNE marg5
%�MOV LL,CELL
%�LDRB LR,[temp1,#1]
%�/LDRB UL,[temp1,#-320]:LDRB UR,[temp1,#-319]
%�%MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
&C� flag%�3 � [OPT pass%:MOV FLAG,#2:] � [OPT pass%:MOV FLAG,#0:]
&[OPT pass%
&B marg2
& 
.marg5
&*MOV LR,CELL
&4LDRB LL,[temp1,#-1]
&>/LDRB UL,[temp1,#-321]:LDRB UR,[temp1,#-320]
&H%MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
&RC� flag%�3 � [OPT pass%:MOV FLAG,#3:] � [OPT pass%:MOV FLAG,#0:]
&\[OPT pass%
&fB marg2
&p
.marg1
&zTST row,#1:BEQ marg6
&�TST col,#1:BEQ marg7
&�CMP row,#suy%-1
&�<MOV UL,CELL:MOV UR,#border:MOV LL,#border:MOV LR,#border
&�1LDRNEB LL,[temp1,#320]:LDRNEB LR,[temp1,#321]
&�CMP col,#sux%-1
&�&LDRNEB UR,[temp1,#1]:�Q LR,#border
&�%MOV OPP,LR:MOV CW,UR:MOV CCW,LL:]
&�C� flag%�4 � [OPT pass%:MOV FLAG,#4:] � [OPT pass%:MOV FLAG,#0:]
&�[OPT pass%
&�B marg2
&�
.marg7
&�CMP row,#suy%-1
&�<MOV UR,CELL:MOV UL,#border:MOV LL,#border:MOV LR,#border
'1LDRNEB LL,[temp1,#319]:LDRNEB LR,[temp1,#320]
'CMP col,#0
''LDRNEB UL,[temp1,#-1]:�Q LL,#border
'$%MOV OPP,LL:MOV CW,LR:MOV CCW,UL:]
'.
Ȏ � �
'8:� (flag%�4)<>0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#5:]
'B9� (flag%�4)<>0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#4:]
'L9� (flag%�4)=0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#1:]
'V8� (flag%�4)=0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#0:]
'`�
'j[OPT pass%
'tB marg2
'~
.marg6
'�TST col,#1:BEQ marg8
'�CMP row,#0
'�<MOV LL,CELL:MOV UL,#border:MOV UR,#border:MOV LR,#border
'�3LDRNEB UL,[temp1,#-320]:LDRNEB UR,[temp1,#-319]
'�CMP col,#sux%-1
'�&LDRNEB LR,[temp1,#1]:�Q UR,#border
'�%MOV OPP,UR:MOV CW,UL:MOV CCW,LR:]
'�
Ȏ � �
'�:� (flag%�4)<>0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#6:]
'�9� (flag%�4)<>0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#4:]
'�9� (flag%�4)=0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#2:]
'�8� (flag%�4)=0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#0:]
(�
(
[OPT pass%
(B marg2
(
.marg8
((CMP row,#0
(2<MOV LR,CELL:MOV UL,#border:MOV UR,#border:MOV LL,#border
(<3LDRNEB UL,[temp1,#-321]:LDRNEB UR,[temp1,#-320]
(FCMP col,#0
(P'LDRNEB LL,[temp1,#-1]:�Q UL,#border
(Z%MOV OPP,UL:MOV CW,LL:MOV CCW,UR:]
(d
Ȏ � �
(n:� (flag%�4)<>0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#7:]
(x9� (flag%�4)<>0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#4:]
(�9� (flag%�4)=0 � (flag%�3)<>0:[OPT pass%:MOV FLAG,#3:]
(�8� (flag%�4)=0 � (flag%�3)=0:[OPT pass%:MOV FLAG,#0:]
(��
(�[OPT pass%
(�
.marg2
(�]
(��
(��
(�� wrap=on �
(�[OPT pass%
(�ADD MR,addro,addrsc1
(�CMP row,#0
(�MOV temp1,#256*(suy%-1)
) ADD temp1,temp1,temp1,ASR #2
)MOVNE temp2,#320
)RSBNE temp2,temp2,#0
)"�Q temp2,temp1
),CMP row,#suy%-1
)6MOVNE temp1,#320
)@RSBEQ temp1,temp1,#0
)JLDRB TM,[MR,temp2]
)TLDRB BM,[MR,temp1]
)^CMP col,#0
)hSUBNE TR,MR,#1
)rADDEQ TR,MR,#sux%-1
)|LDRB TL,[TR,temp2]
)�LDRB BL,[TR,temp1]
)�LDRB ML,[TR]
)�CMP col,#sux%-1
)�ADDNE MR,MR,#1
)�SUBEQ MR,MR,#sux%-1
)�LDRB TR,[MR,temp2]
)�LDRB BR,[MR,temp1]
)�LDRB MR,[MR]
)�]
)��
)�[OPT pass%
)�ADD MR,addro,addrsc1
)�MOV temp1,col
*MOVS temp2,row
*LDRNEB TR,[MR,#-319]
*LDRNEB TM,[MR,#-320]
*&LDRNEB TL,[MR,#-321]
*0�Q TR,#border
*:�Q TM,#border
*D�Q TL,#border
*NCMP temp2,#suy%-1
*XLDRNEB BL,[MR,#319]
*bLDRNEB BM,[MR,#320]
*lLDRNEB BR,[MR,#321]
*v�Q BR,#border
*��Q BM,#border
*��Q BL,#border
*�LDRB ML,[MR,#-1]
*�LDRB MR,[MR,#1]
*�CMP temp1,#0
*��Q TL,#border
*��Q ML,#border
*��Q BL,#border
*�CMP temp1,#sux%-1
*��Q TR,#border
*��Q MR,#border
*��Q BR,#border
*�]
+�
+�
+
+ V� 255,"Program Error: attempt to compile ELSE or END; should be handled elsewhere"
+*�
+4=0
+>:
+H� �push(v%,t%)
+R� q%
+\&� nsi%=3 � 255,"CA Stack OverFlow"
+f)Ȕ s%(1),s%(2):Ȕ s%(0),s%(1):nsi%+=1
+p5dummy%=�mov(s%(0),v%,t%,""):P%!-4=(P%!-4)�(1<<20)
+z�
+�:
+�� �pull
+�2� nsi%=0 � 255,"Insufficient data on CA Stack"
+�)Ȕ s%(0),s%(1):Ȕ s%(1),s%(2):nsi%-=1
+��
+�:
+�� �ensurereg(i%)
+�� f$
+�� optype%(i%)=-3 �
+�.�push(opnum%(i%),-3):f$=�s%(0)+",-2":�pull
+�� f$=�opnum%(i%)+",-2"
+��
+�=f$
,:
,*� �rot Ȕ s%(0),s%(1):Ȕ s%(1),s%(2):�
,� �swap Ȕ s%(0),s%(1):�
,$+� �irot Ȕ s%(1),s%(2):Ȕ s%(0),s%(1):�
,.:
,8� �notcond(c$)
,BȎ c$ �
,L
� "":="#"
,V
� "#":=""
,`� "=":="<>"
,j� "<>":="="
,t� ">":="<="
,~� "<=":=">"
,�� "<":=">="
,�� ">=":="<"
,��
,�� 255,"Error in FNnotcond"
,�:
,�� �mov(reg%,v%,t%,cond$)
,�
Ȏ � �
,�#� t%=-2:[OPT pass%:�Q reg%,v%:]
,�$� v%>=0:[OPT pass%:�Q reg%,#v%:]
,�#:[OPT pass%:MVNEQ reg%,#� v%:]
,��
,�(P%!-4=(P%!-4)�(�condcode(cond$)<<28)
-=0
-
:
-� �cmp(reg%,v%,t%,cond$)
-
Ȏ � �
-(&� t%=-2:[OPT pass%:CMPEQ reg%,v%:]
-2'� v%>=0:[OPT pass%:CMPEQ reg%,#v%:]
-<":[OPT pass%:CMNEQ reg%,#-v%:]
-F�
-P(P%!-4=(P%!-4)�(�condcode(cond$)<<28)
-Z=0
-d:
-n� �b(addr%,cond$)
-x[OPT pass%:BEQ addr%:]
-�(P%!-4=(P%!-4)�(�condcode(cond$)<<28)
-�=0
-�:
-�=� �condcode(c$) = condconv%((�"@ = < > <=>=<>#",c$)-1)�2)
-�:
-�� �quit
-�ș "Wimp_SetMode",mode%
-�ȗ �
-��
-�:
-�� �wimperror
-��6
-�� f$,ck$,k
.
� �<>17 �
.
*FX 113 1
.
*FX 112 1
."	�26:�
.,	�quit
.6%ș "Wimp_Poll",0,ublock% � reason
.@A!mblock%=�:$(mblock%+4)=�$+" (internal error code "+Þ+")"+�0
.J5ș "Wimp_ReportError",mblock%,1,"ArcAut" � ,resp%
.T� resp%=2 =� � =�
.^�
.h*FX15 1
.r� �
.|:t$="Again  Save   Load   Next   Cont.  Phase  Quit   "
.�#ȗ ȓ 1280-224,1024-224,223,223
.�ȗ �
.��t$
.�� ȗ x%,y%,z%:� z%=0
.��
.�ȗ x%,y%,b%
.�k1%=(1023-y%)�32
.�� 0 Ȝ 0:� 128+63 Ȝ 255
.��0,k1%);�t$,7*k1%+1,5)
.�� ȗ x%,y%,z%
.�k2%=(1023-y%)�32
.�� k2%<>k1% � z%>=4
.�� 63 Ȝ 255:� 128 Ȝ 0
/�0,k1%);�t$,7*k1%+1,5)
/� z%>=4
/ȗ �
/&ȗ ȓ 0,0,1279,1023
/0Ȏ k1% �
/:� 0
/D
*FX 113 1
/N
*FX 112 1
/X�26:�:�
/b	�main
/l� 1
/v�0,7);
/�� "Name";'f$
/�.�("ScreenSave <ArcAut$Dir>.^.Screens."+f$)
/�� 2
/��0,7);
/�	�load
/�"Ȕ !asc1,!asc2:!abank=3-!abank
/�� 3:�text:Ȗ:� autcode
/�� 4:�text:�aut
/�� 5:!ag=!ag � 1
/�� 6:�quit:=�
/��
/�� �
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 05 f4 0d 00 1e  1a f4 20 20 20 20 20 20  |..........      |
00000020  20 20 41 20 52 20 43 20  20 20 41 20 55 20 54 0d  |  A R C   A U T.|
00000030  00 28 25 f4 20 41 20 43  65 6c 6c 75 6c 61 72 20  |.(%. A Cellular |
00000040  41 75 74 6f 6d 61 74 6f  6e 20 4c 61 62 6f 72 61  |Automaton Labora|
00000050  74 6f 72 79 0d 00 32 20  f4 20 20 20 66 6f 72 20  |tory..2 .   for |
00000060  74 68 65 20 41 63 6f 72  6e 20 41 72 63 68 69 6d  |the Acorn Archim|
00000070  65 64 65 73 0d 00 3c 05  f4 0d 00 46 21 f4 20 20  |edes..<....F!.  |
00000080  57 72 69 74 74 65 6e 20  62 79 20 4d 69 63 68 61  |Written by Micha|
00000090  65 6c 20 52 6f 7a 64 6f  62 61 0d 00 50 05 f4 0d  |el Rozdoba..P...|
000000a0  00 5a 05 3a 0d 00 64 15  c8 99 20 22 48 6f 75 72  |.Z.:..d... "Hour|
000000b0  67 6c 61 73 73 5f 4f 6e  22 0d 00 6e 0c f2 69 6e  |glass_On"..n..in|
000000c0  69 74 61 73 73 0d 00 78  0d f2 77 69 6d 70 69 6e  |itass..x..wimpin|
000000d0  69 74 0d 00 82 0e f2 69  6e 69 74 76 62 6c 65 73  |it.....initvbles|
000000e0  0d 00 8c 3c c8 99 20 22  57 69 6d 70 5f 49 6e 69  |...<.. "Wimp_Ini|
000000f0  74 69 61 6c 69 73 65 22  2c 32 30 30 2c 26 34 42  |tialise",200,&4B|
00000100  35 33 34 31 35 34 2c 22  41 72 63 41 75 74 22 20  |534154,"ArcAut" |
00000110  b8 20 2c 61 72 63 61 75  74 74 68 25 0d 00 96 10  |. ,arcautth%....|
00000120  f2 69 6e 73 74 61 6c 6c  69 63 6f 6e 0d 00 a0 16  |.installicon....|
00000130  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 66  |.. "Hourglass_Of|
00000140  66 22 0d 00 aa 0a 71 75  69 74 3d a3 0d 00 b4 18  |f"....quit=.....|
00000150  ee 20 85 20 e7 20 a4 77  69 6d 70 65 72 72 6f 72  |. . . .wimperror|
00000160  20 8c 20 e0 0d 00 be 05  f5 0d 00 c8 09 f2 70 6f  | . ...........po|
00000170  6c 6c 0d 00 d2 0a fd 20  71 75 69 74 0d 00 dc 2b  |ll..... quit...+|
00000180  c8 99 20 22 57 69 6d 70  5f 43 6c 6f 73 65 44 6f  |.. "Wimp_CloseDo|
00000190  77 6e 22 2c 61 72 63 61  75 74 74 68 25 2c 26 34  |wn",arcautth%,&4|
000001a0  42 35 33 34 31 35 34 0d  00 e6 05 e0 0d 00 f0 05  |B534154.........|
000001b0  3a 0d 00 fa 0f dd 20 f2  77 69 6d 70 69 6e 69 74  |:..... .wimpinit|
000001c0  0d 01 04 0b 6d 6f 64 65  25 3d eb 0d 01 0e 0e 6d  |....mode%=.....m|
000001d0  65 73 73 72 65 66 25 3d  30 0d 01 18 2e de 20 69  |essref%=0..... i|
000001e0  62 6c 6f 63 6b 25 20 31  30 32 34 2c 20 75 62 6c  |block% 1024, ubl|
000001f0  6f 63 6b 25 20 31 30 32  34 2c 20 6d 62 6c 6f 63  |ock% 1024, mbloc|
00000200  6b 25 20 31 30 32 34 0d  01 22 05 e1 0d 01 2c 05  |k% 1024.."....,.|
00000210  3a 0d 01 36 12 dd 20 f2  69 6e 73 74 61 6c 6c 69  |:..6.. .installi|
00000220  63 6f 6e 0d 01 40 0f 21  69 62 6c 6f 63 6b 25 3d  |con..@.!iblock%=|
00000230  2d 31 0d 01 4a 37 69 62  6c 6f 63 6b 25 21 34 3d  |-1..J7iblock%!4=|
00000240  30 3a 69 62 6c 6f 63 6b  25 21 38 3d 30 3a 69 62  |0:iblock%!8=0:ib|
00000250  6c 6f 63 6b 25 21 31 32  3d 36 34 3a 69 62 6c 6f  |lock%!12=64:iblo|
00000260  63 6b 25 21 31 36 3d 36  34 0d 01 54 18 69 62 6c  |ck%!16=64..T.ibl|
00000270  6f 63 6b 25 21 32 30 3d  26 31 37 30 30 33 30 30  |ock%!20=&1700300|
00000280  41 0d 01 5e 1b 24 28 69  62 6c 6f 63 6b 25 2b 32  |A..^.$(iblock%+2|
00000290  34 29 3d 22 21 61 72 63  61 75 74 22 0d 01 68 2b  |4)="!arcaut"..h+|
000002a0  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 49  |.. "Wimp_CreateI|
000002b0  63 6f 6e 22 2c 2c 69 62  6c 6f 63 6b 25 20 b8 20  |con",,iblock% . |
000002c0  61 72 63 61 75 74 68 0d  01 72 05 e1 0d 01 7c 05  |arcauth..r....|.|
000002d0  3a 0d 01 86 0b dd 20 f2  70 6f 6c 6c 0d 01 90 25  |:..... .poll...%|
000002e0  c8 99 20 22 57 69 6d 70  5f 50 6f 6c 6c 22 2c 31  |.. "Wimp_Poll",1|
000002f0  2c 75 62 6c 6f 63 6b 25  20 b8 20 72 65 61 73 6f  |,ublock% . reaso|
00000300  6e 0d 01 9a 0b 6d 6f 64  65 25 3d eb 0d 01 a4 0f  |n....mode%=.....|
00000310  c8 8e 20 72 65 61 73 6f  6e 20 ca 0d 01 ae 17 c9  |.. reason ......|
00000320  20 36 3a f2 63 6c 69 63  6b 28 75 62 6c 6f 63 6b  | 6:.click(ublock|
00000330  25 29 0d 01 b8 0e c9 20  39 3a 71 75 69 74 3d b9  |%)..... 9:quit=.|
00000340  0d 01 c2 1d c9 20 31 37  2c 31 38 3a f2 6d 65 73  |..... 17,18:.mes|
00000350  73 61 67 65 28 75 62 6c  6f 63 6b 25 29 0d 01 cc  |sage(ublock%)...|
00000360  05 cb 0d 01 d6 05 e1 0d  01 e0 05 3a 0d 01 ea 15  |...........:....|
00000370  dd 20 f2 63 6c 69 63 6b  28 75 62 6c 6f 63 6b 25  |. .click(ublock%|
00000380  29 0d 01 f4 12 c8 8e 20  75 62 6c 6f 63 6b 25 21  |)...... ublock%!|
00000390  38 20 ca 0d 01 fe 16 c9  20 32 3a f2 6d 65 6e 75  |8 ...... 2:.menu|
000003a0  28 75 62 6c 6f 63 6b 25  29 0d 02 08 05 cb 0d 02  |(ublock%).......|
000003b0  12 05 e1 0d 02 1c 05 3a  0d 02 26 14 dd 20 f2 6d  |.......:..&.. .m|
000003c0  65 6e 75 28 75 62 6c 6f  63 6b 25 29 0d 02 30 15  |enu(ublock%)..0.|
000003d0  24 6d 62 6c 6f 63 6b 25  3d 22 41 72 63 41 75 74  |$mblock%="ArcAut|
000003e0  22 0d 02 3a 42 6d 62 6c  6f 63 6b 25 21 31 32 3d  |"..:Bmblock%!12=|
000003f0  26 30 30 30 37 30 32 30  37 3a 6d 62 6c 6f 63 6b  |&00070207:mblock|
00000400  25 21 31 36 3d 31 30 30  3a 6d 62 6c 6f 63 6b 25  |%!16=100:mblock%|
00000410  21 32 30 3d 34 30 3a 6d  62 6c 6f 63 6b 25 21 32  |!20=40:mblock%!2|
00000420  34 3d 30 0d 02 44 35 6d  62 6c 6f 63 6b 25 21 32  |4=0..D5mblock%!2|
00000430  38 3d 31 32 38 3a 6d 62  6c 6f 63 6b 25 21 33 32  |8=128:mblock%!32|
00000440  3d 2d 31 3a 6d 62 6c 6f  63 6b 25 21 33 36 3d 26  |=-1:mblock%!36=&|
00000450  30 37 30 31 39 30 33 31  0d 02 4e 18 24 28 6d 62  |07019031..N.$(mb|
00000460  6c 6f 63 6b 25 2b 34 30  29 3d 22 51 75 69 74 22  |lock%+40)="Quit"|
00000470  0d 02 58 31 c8 99 20 22  57 69 6d 70 5f 43 72 65  |..X1.. "Wimp_Cre|
00000480  61 74 65 4d 65 6e 75 22  2c 2c 6d 62 6c 6f 63 6b  |ateMenu",,mblock|
00000490  25 2c 21 75 62 6c 6f 63  6b 25 2d 36 30 2c 31 33  |%,!ublock%-60,13|
000004a0  36 0d 02 62 05 e1 0d 02  6c 05 3a 0d 02 76 17 dd  |6..b....l.:..v..|
000004b0  20 f2 6d 65 73 73 61 67  65 28 75 62 6c 6f 63 6b  | .message(ublock|
000004c0  25 29 0d 02 80 15 c8 8e  20 28 75 62 6c 6f 63 6b  |%)...... (ublock|
000004d0  25 21 31 36 29 20 ca 0d  02 8a 0e c9 20 30 3a 71  |%!16) ...... 0:q|
000004e0  75 69 74 3d b9 0d 02 94  10 c9 20 31 3a f2 73 61  |uit=...... 1:.sa|
000004f0  76 65 61 63 6b 0d 02 9e  1a c9 20 33 3a f2 6c 6f  |veack..... 3:.lo|
00000500  61 64 74 65 78 74 3a f2  6c 6f 61 64 61 63 6b 0d  |adtext:.loadack.|
00000510  02 a8 05 cb 0d 02 b2 05  e1 0d 02 bc 05 3a 0d 02  |.............:..|
00000520  c6 0e dd 20 f2 73 61 76  65 61 63 6b 0d 02 d0 18  |... .saveack....|
00000530  e7 20 75 62 6c 6f 63 6b  25 21 34 30 3c 3e 26 46  |. ublock%!40<>&F|
00000540  46 46 20 e1 0d 02 da 32  e7 20 75 62 6c 6f 63 6b  |FF ....2. ublock|
00000550  25 21 33 36 3e 6d 74 65  78 74 25 20 85 20 32 35  |%!36>mtext% . 25|
00000560  35 2c 22 49 6e 73 75 66  66 69 63 69 65 6e 74 20  |5,"Insufficient |
00000570  73 70 61 63 65 22 0d 02  e4 26 ff 28 22 54 72 61  |space"...&.("Tra|
00000580  6e 73 69 65 6e 74 20 22  2b c3 28 34 30 39 36 2b  |nsient "+.(4096+|
00000590  75 62 6c 6f 63 6b 25 21  33 36 29 29 0d 02 ee 25  |ublock%!36))...%|
000005a0  75 62 6c 6f 63 6b 25 21  31 32 3d 75 62 6c 6f 63  |ublock%!12=ubloc|
000005b0  6b 25 21 38 3a 75 62 6c  6f 63 6b 25 21 31 36 3d  |k%!8:ublock%!16=|
000005c0  32 0d 02 f8 11 75 62 6c  6f 63 6b 25 21 33 36 3d  |2....ublock%!36=|
000005d0  2d 31 0d 03 02 1f 6e 24  3d 22 52 61 6d 3a 3a 30  |-1....n$="Ram::0|
000005e0  2e 24 2e 41 72 63 41 75  74 53 63 72 70 22 2b bd  |.$.ArcAutScrp"+.|
000005f0  30 0d 03 0c 24 24 28 75  62 6c 6f 63 6b 25 2b 34  |0...$$(ublock%+4|
00000600  34 29 3d 6e 24 3a 21 75  62 6c 6f 63 6b 25 3d 34  |4)=n$:!ublock%=4|
00000610  34 2b a9 6e 24 0d 03 16  16 6d 65 73 73 72 65 66  |4+.n$....messref|
00000620  25 3d 75 62 6c 6f 63 6b  25 21 38 0d 03 20 2e c8  |%=ublock%!8.. ..|
00000630  99 20 22 57 69 6d 70 5f  53 65 6e 64 4d 65 73 73  |. "Wimp_SendMess|
00000640  61 67 65 22 2c 31 37 2c  75 62 6c 6f 63 6b 25 2c  |age",17,ublock%,|
00000650  75 62 6c 6f 63 6b 25 21  34 0d 03 2a 05 e1 0d 03  |ublock%!4..*....|
00000660  34 05 3a 0d 03 3e 0e dd  20 f2 6c 6f 61 64 61 63  |4.:..>.. .loadac|
00000670  6b 0d 03 48 25 75 62 6c  6f 63 6b 25 21 31 32 3d  |k..H%ublock%!12=|
00000680  75 62 6c 6f 63 6b 25 21  38 3a 75 62 6c 6f 63 6b  |ublock%!8:ublock|
00000690  25 21 31 36 3d 34 0d 03  52 2e c8 99 20 22 57 69  |%!16=4..R... "Wi|
000006a0  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
000006b0  31 37 2c 75 62 6c 6f 63  6b 25 2c 75 62 6c 6f 63  |17,ublock%,ubloc|
000006c0  6b 25 21 34 0d 03 5c 05  e1 0d 03 66 05 3a 0d 03  |k%!4..\....f.:..|
000006d0  70 0f dd 20 f2 6c 6f 61  64 74 65 78 74 0d 03 7a  |p.. .loadtext..z|
000006e0  18 e7 20 75 62 6c 6f 63  6b 25 21 34 30 3c 3e 26  |.. ublock%!40<>&|
000006f0  46 46 46 20 e1 0d 03 84  30 c8 99 20 22 4f 53 5f  |FFF ....0.. "OS_|
00000700  46 69 6c 65 22 2c 26 31  31 2c 75 62 6c 6f 63 6b  |File",&11,ublock|
00000710  25 2b 34 34 20 b8 20 2c  2c 2c 2c 66 69 6c 65 6c  |%+44 . ,,,,filel|
00000720  65 6e 67 74 68 0d 03 8e  32 e7 20 66 69 6c 65 6c  |ength...2. filel|
00000730  65 6e 67 74 68 3e 6d 74  65 78 74 25 20 85 20 32  |ength>mtext% . 2|
00000740  35 35 2c 22 49 6e 73 75  66 66 69 63 69 65 6e 74  |55,"Insufficient|
00000750  20 73 70 61 63 65 22 0d  03 98 26 c8 99 20 22 4f  | space"...&.. "O|
00000760  53 5f 46 69 6c 65 22 2c  26 31 30 2c 75 62 6c 6f  |S_File",&10,ublo|
00000770  63 6b 25 2b 34 34 2c 74  65 78 74 2c 30 0d 03 a2  |ck%+44,text,0...|
00000780  1c e7 20 75 62 6c 6f 63  6b 25 21 38 3d 6d 65 73  |.. ublock%!8=mes|
00000790  73 72 65 66 25 2b 32 20  8c 0d 03 ac 38 e7 20 c0  |sref%+2 ....8. .|
000007a0  a4 73 74 72 28 75 62 6c  6f 63 6b 25 2b 34 34 29  |.str(ublock%+44)|
000007b0  2c 34 29 3c 3e 22 52 61  6d 3a 22 20 85 20 32 35  |,4)<>"Ram:" . 25|
000007c0  35 2c 22 50 72 6f 67 72  61 6d 20 65 72 72 6f 72  |5,"Program error|
000007d0  22 0d 03 b6 1f c8 99 20  22 4f 53 5f 46 69 6c 65  |"...... "OS_File|
000007e0  22 2c 26 30 36 2c 75 62  6c 6f 63 6b 25 2b 34 34  |",&06,ublock%+44|
000007f0  0d 03 c0 0e 2a 54 72 61  6e 73 69 65 6e 74 0d 03  |....*Transient..|
00000800  ca 05 cd 0d 03 d4 38 41  25 3d 74 65 78 74 3a 42  |......8A%=text:B|
00000810  25 3d 74 65 78 74 2b 6d  74 65 78 74 25 2d 31 3a  |%=text+mtext%-1:|
00000820  61 24 3d 22 41 55 54 4f  4d 41 54 4f 4e 2a 22 3a  |a$="AUTOMATON*":|
00000830  d6 20 6c 6f 63 61 74 65  2c 61 24 0d 03 de 13 e7  |. locate,a$.....|
00000840  20 21 6c 6f 63 61 74 69  6f 6e 3d 30 20 e1 0d 03  | !location=0 ...|
00000850  e8 3c 2a 53 63 72 65 65  6e 53 69 7a 65 20 31 36  |.<*ScreenSize 16|
00000860  30 20 2a 45 52 52 4f 52  20 32 35 35 20 52 65 71  |0 *ERROR 255 Req|
00000870  75 69 72 65 20 3e 3d 20  31 36 30 4b 20 73 63 72  |uire >= 160K scr|
00000880  65 65 6e 20 6d 65 6d 6f  72 79 0d 03 f2 0c c8 97  |een memory......|
00000890  20 87 3a eb 31 33 0d 03  fc 1d 21 6d 62 6c 6f 63  | .:.13....!mbloc|
000008a0  6b 25 3d 31 34 38 3a 6d  62 6c 6f 63 6b 25 21 34  |k%=148:mblock%!4|
000008b0  3d 2d 31 0d 04 06 2c c8  99 20 22 4f 53 5f 52 65  |=-1...,.. "OS_Re|
000008c0  61 64 56 64 75 56 61 72  69 61 62 6c 65 73 22 2c  |adVduVariables",|
000008d0  6d 62 6c 6f 63 6b 25 2c  6d 62 6c 6f 63 6b 25 0d  |mblock%,mblock%.|
000008e0  04 10 12 73 63 72 73 74  3d 21 6d 62 6c 6f 63 6b  |...scrst=!mblock|
000008f0  25 0d 04 1a 09 f2 6d 61  69 6e 0d 04 24 05 e1 0d  |%.....main..$...|
00000900  04 2e 05 3a 0d 04 38 10  dd 20 a4 73 74 72 28 70  |...:..8.. .str(p|
00000910  74 72 25 29 0d 04 42 08  ea 20 53 24 0d 04 4c 27  |tr%)..B.. S$..L'|
00000920  c8 95 20 3f 70 74 72 25  3a 53 24 2b 3d bd 28 3f  |.. ?ptr%:S$+=.(?|
00000930  70 74 72 25 29 3a 70 74  72 25 2b 3d 31 3a ce 3a  |ptr%):ptr%+=1:.:|
00000940  3d 53 24 0d 04 56 05 3a  0d 04 60 0e dd 20 f2 69  |=S$..V.:..`.. .i|
00000950  6e 69 74 61 73 73 0d 04  6a 0e 6d 65 6d 31 25 3d  |nitass..j.mem1%=|
00000960  31 30 32 34 0d 04 74 2e  de 20 63 6f 64 65 31 25  |1024..t.. code1%|
00000970  20 6d 65 6d 31 25 2c 20  73 74 72 62 75 66 20 32  | mem1%, strbuf 2|
00000980  35 35 3a 4c 25 3d 63 6f  64 65 31 25 2b 6d 65 6d  |55:L%=code1%+mem|
00000990  31 25 0d 04 7e 1d 6d 74  65 78 74 25 3d 34 30 39  |1%..~.mtext%=409|
000009a0  36 3a de 20 74 65 78 74  20 6d 74 65 78 74 25 0d  |6:. text mtext%.|
000009b0  04 88 16 e3 20 70 61 73  73 25 3d 38 20 b8 20 31  |.... pass%=8 . 1|
000009c0  30 20 88 20 32 0d 04 92  0d 50 25 3d 63 6f 64 65  |0 . 2....P%=code|
000009d0  31 25 0d 04 9c 0e 5b 4f  50 54 20 70 61 73 73 25  |1%....[OPT pass%|
000009e0  0d 04 a6 14 2e 6c 6f 63  61 74 69 6f 6e 20 45 51  |.....location EQ|
000009f0  55 44 20 30 0d 04 b0 17  2e 6c 6f 63 70 72 65 76  |UD 0.....locprev|
00000a00  69 6f 75 73 20 45 51 55  44 20 30 0d 04 ba 0b 2e  |ious EQUD 0.....|
00000a10  6c 6f 63 61 74 65 0d 04  c4 30 4d 4f 56 20 52 32  |locate...0MOV R2|
00000a20  2c 23 30 3a 53 54 52 20  52 32 2c 6c 6f 63 61 74  |,#0:STR R2,locat|
00000a30  69 6f 6e 3a 53 54 52 20  52 32 2c 6c 6f 63 70 72  |ion:STR R2,locpr|
00000a40  65 76 69 6f 75 73 0d 04  ce 1b 43 4d 50 20 52 31  |evious....CMP R1|
00000a50  30 2c 23 31 3a 4d 4f 56  4e 45 20 50 43 2c 52 31  |0,#1:MOVNE PC,R1|
00000a60  34 0d 04 d8 2b 4c 44 52  20 52 32 2c 5b 52 39 2c  |4...+LDR R2,[R9,|
00000a70  23 34 5d 3a 43 4d 50 20  52 32 2c 23 31 32 38 3a  |#4]:CMP R2,#128:|
00000a80  4d 4f 56 4e 45 20 50 43  2c 52 31 34 0d 04 e2 0f  |MOVNE PC,R14....|
00000a90  4c 44 52 20 52 32 2c 5b  52 39 5d 0d 04 ec 27 4c  |LDR R2,[R9]...'L|
00000aa0  44 52 42 20 52 35 2c 5b  52 32 2c 23 34 5d 3a 43  |DRB R5,[R2,#4]:C|
00000ab0  4d 50 20 52 35 2c 23 30  3a ec 51 20 50 43 2c 52  |MP R5,#0:.Q PC,R|
00000ac0  31 34 0d 04 f6 34 4c 44  52 42 20 52 33 2c 5b 52  |14...4LDRB R3,[R|
00000ad0  32 5d 3a 4c 44 52 42 20  52 34 2c 5b 52 32 2c 23  |2]:LDRB R4,[R2,#|
00000ae0  31 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 34 2c  |1]:ADD R3,R3,R4,|
00000af0  41 53 4c 20 23 38 0d 05  00 28 4c 44 52 42 20 52  |ASL #8...(LDRB R|
00000b00  34 2c 5b 52 32 2c 23 32  5d 3a 41 44 44 20 52 33  |4,[R2,#2]:ADD R3|
00000b10  2c 52 33 2c 52 34 2c 41  53 4c 20 23 31 36 0d 05  |,R3,R4,ASL #16..|
00000b20  0a 28 4c 44 52 42 20 52  34 2c 5b 52 32 2c 23 33  |.(LDRB R4,[R2,#3|
00000b30  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 34 2c 41  |]:ADD R3,R3,R4,A|
00000b40  53 4c 20 23 32 34 0d 05  14 1d 41 44 44 20 52 31  |SL #24....ADD R1|
00000b50  2c 52 31 2c 23 31 3a 53  55 42 20 52 31 2c 52 31  |,R1,#1:SUB R1,R1|
00000b60  2c 52 35 0d 05 1e 1a 43  4d 50 20 52 30 2c 52 31  |,R5....CMP R0,R1|
00000b70  3a 4d 4f 56 47 54 20 50  43 2c 52 31 34 0d 05 28  |:MOVGT PC,R14..(|
00000b80  0d 4d 4f 56 20 52 39 2c  23 30 0d 05 32 0c 2e 6c  |.MOV R9,#0..2..l|
00000b90  6f 63 61 74 65 31 0d 05  3c 16 43 4d 50 20 52 39  |ocate1..<.CMP R9|
00000ba0  2c 23 31 3a ec 51 20 52  38 2c 52 30 0d 05 46 41  |,#1:.Q R8,R0..FA|
00000bb0  4c 44 52 42 20 52 37 2c  5b 52 30 5d 3a 43 4d 50  |LDRB R7,[R0]:CMP|
00000bc0  20 52 37 2c 23 30 3a 43  4d 50 4e 45 20 52 37 2c  | R7,#0:CMPNE R7,|
00000bd0  23 31 30 3a 43 4d 50 4e  45 20 52 37 2c 23 31 33  |#10:CMPNE R7,#13|
00000be0  3a 43 4d 50 4e 45 20 52  37 2c 23 33 32 0d 05 50  |:CMPNE R7,#32..P|
00000bf0  18 4d 4f 56 4e 45 20 52  39 2c 23 31 3a ec 51 20  |.MOVNE R9,#1:.Q |
00000c00  52 39 2c 23 30 0d 05 5a  10 53 55 42 20 52 32 2c  |R9,#0..Z.SUB R2,|
00000c10  52 35 2c 23 31 0d 05 64  0c 2e 6c 6f 63 61 74 65  |R5,#1..d..locate|
00000c20  32 0d 05 6e 39 4c 44 52  42 20 52 36 2c 5b 52 33  |2..n9LDRB R6,[R3|
00000c30  2c 52 32 5d 3a 4c 44 52  42 20 52 37 2c 5b 52 30  |,R2]:LDRB R7,[R0|
00000c40  2c 52 32 5d 3a 43 4d 50  20 52 36 2c 52 37 3a 42  |,R2]:CMP R6,R7:B|
00000c50  4e 45 20 6c 6f 63 61 74  65 33 0d 05 78 1d 53 55  |NE locate3..x.SU|
00000c60  42 53 20 52 32 2c 52 32  2c 23 31 3a 42 50 4c 20  |BS R2,R2,#1:BPL |
00000c70  6c 6f 63 61 74 65 32 0d  05 82 31 53 54 52 20 52  |locate2...1STR R|
00000c80  30 2c 6c 6f 63 61 74 69  6f 6e 3a 53 54 52 20 52  |0,location:STR R|
00000c90  38 2c 6c 6f 63 70 72 65  76 69 6f 75 73 3a 4d 4f  |8,locprevious:MO|
00000ca0  56 20 50 43 2c 52 31 34  0d 05 8c 0c 2e 6c 6f 63  |V PC,R14.....loc|
00000cb0  61 74 65 33 0d 05 96 26  41 44 44 20 52 30 2c 52  |ate3...&ADD R0,R|
00000cc0  30 2c 23 31 3a 43 4d 50  20 52 30 2c 52 31 3a 42  |0,#1:CMP R0,R1:B|
00000cd0  4c 45 20 6c 6f 63 61 74  65 31 0d 05 a0 0e 4d 4f  |LE locate1....MO|
00000ce0  56 20 50 43 2c 52 31 34  0d 05 aa 4b 2e 66 69 6e  |V PC,R14...K.fin|
00000cf0  64 20 20 20 20 20 20 3b  70 61 73 73 20 69 6e 20  |d      ;pass in |
00000d00  41 25 2c 42 25 20 72 65  67 69 6f 6e 20 74 6f 20  |A%,B% region to |
00000d10  73 65 61 72 63 68 20 26  20 69 6e 20 43 25 2c 44  |search & in C%,D|
00000d20  25 20 63 6f 64 65 73 20  74 6f 20 6c 6f 6f 6b 20  |% codes to look |
00000d30  66 6f 72 0d 05 b4 1a 4d  4f 56 20 52 34 2c 23 31  |for....MOV R4,#1|
00000d40  3a 53 55 42 20 52 30 2c  52 30 2c 23 31 0d 05 be  |:SUB R0,R0,#1...|
00000d50  0d 2e 66 69 6e 64 6c 6f  6f 70 0d 05 c8 14 4c 44  |..findloop....LD|
00000d60  52 42 20 52 35 2c 5b 52  30 2c 23 31 5d 21 0d 05  |RB R5,[R0,#1]!..|
00000d70  d2 1c 43 4d 50 20 52 35  2c 52 32 3a 41 44 44 45  |..CMP R5,R2:ADDE|
00000d80  51 20 52 34 2c 52 34 2c  23 31 0d 05 dc 1c 43 4d  |Q R4,R4,#1....CM|
00000d90  50 20 52 35 2c 52 33 3a  53 55 42 45 51 20 52 34  |P R5,R3:SUBEQ R4|
00000da0  2c 52 34 2c 23 31 0d 05  e6 17 43 4d 50 20 52 34  |,R4,#1....CMP R4|
00000db0  2c 23 30 3a ec 51 20 50  43 2c 52 31 34 0d 05 f0  |,#0:.Q PC,R14...|
00000dc0  1a 43 4d 50 20 52 30 2c  52 31 3a 42 4c 54 20 66  |.CMP R0,R1:BLT f|
00000dd0  69 6e 64 6c 6f 6f 70 0d  05 fa 47 4d 4f 56 20 52  |indloop...GMOV R|
00000de0  30 2c 23 30 3a 4d 4f 56  20 50 43 2c 52 31 34 20  |0,#0:MOV PC,R14 |
00000df0  20 20 3b 72 65 74 75 72  6e 73 20 61 64 64 72 65  |  ;returns addre|
00000e00  73 73 20 6f 66 20 63 6f  64 65 20 44 25 20 69 66  |ss of code D% if|
00000e10  20 66 6f 75 6e 64 2c 20  65 6c 73 65 20 30 0d 06  | found, else 0..|
00000e20  04 11 2e 73 63 61 6e 66  20 45 51 55 44 20 30 0d  |...scanf EQUD 0.|
00000e30  06 0e 12 2e 73 63 61 6e  61 31 20 45 51 55 44 20  |....scana1 EQUD |
00000e40  30 0d 06 18 12 2e 73 63  61 6e 61 32 20 45 51 55  |0.....scana2 EQU|
00000e50  44 20 30 0d 06 22 1c 2e  73 63 61 6e 65 6e 20 45  |D 0.."..scanen E|
00000e60  51 55 53 20 22 45 4e 44  22 3a 41 4c 49 47 4e 0d  |QUS "END":ALIGN.|
00000e70  06 2c 09 2e 73 63 61 6e  0d 06 36 1b 43 4d 50 20  |.,..scan..6.CMP |
00000e80  52 31 30 2c 23 31 3a 4d  4f 56 4e 45 20 50 43 2c  |R10,#1:MOVNE PC,|
00000e90  52 31 34 0d 06 40 2b 4c  44 52 20 52 32 2c 5b 52  |R14..@+LDR R2,[R|
00000ea0  39 2c 23 34 5d 3a 43 4d  50 20 52 32 2c 23 31 32  |9,#4]:CMP R2,#12|
00000eb0  38 3a 4d 4f 56 4e 45 20  50 43 2c 52 31 34 0d 06  |8:MOVNE PC,R14..|
00000ec0  4a 14 53 54 4d 46 44 20  52 31 33 21 2c 7b 52 31  |J.STMFD R13!,{R1|
00000ed0  34 7d 0d 06 54 1a 4d 4f  56 20 52 33 2c 23 30 3a  |4}..T.MOV R3,#0:|
00000ee0  53 55 42 20 52 30 2c 52  30 2c 23 31 0d 06 5e 0e  |SUB R0,R0,#1..^.|
00000ef0  2e 73 63 61 6e 6c 6f 6f  70 31 0d 06 68 19 43 4d  |.scanloop1..h.CM|
00000f00  50 20 52 30 2c 52 31 3a  42 47 45 20 73 63 61 6e  |P R0,R1:BGE scan|
00000f10  65 6e 64 0d 06 72 14 4c  44 52 42 20 52 35 2c 5b  |end..r.LDRB R5,[|
00000f20  52 30 2c 23 31 5d 21 0d  06 7c 34 43 4d 50 20 52  |R0,#1]!..|4CMP R|
00000f30  35 2c 23 30 3a 43 4d 50  4e 45 20 52 35 2c 23 31  |5,#0:CMPNE R5,#1|
00000f40  30 3a 43 4d 50 4e 45 20  52 35 2c 23 31 33 3a 43  |0:CMPNE R5,#13:C|
00000f50  4d 50 4e 45 20 52 35 2c  23 33 32 0d 06 86 11 42  |MPNE R5,#32....B|
00000f60  45 51 20 73 63 61 6e 6c  6f 6f 70 31 0d 06 90 1f  |EQ scanloop1....|
00000f70  43 4d 50 20 52 35 2c 23  97 22 28 22 3a 43 4d 50  |CMP R5,#."(":CMP|
00000f80  4e 45 20 52 35 2c 23 97  22 5b 22 0d 06 9a 2d 4d  |NE R5,#."["...-M|
00000f90  4f 56 4e 45 20 52 35 2c  23 33 32 3a 53 55 42 4e  |OVNE R5,#32:SUBN|
00000fa0  45 20 52 30 2c 52 30 2c  23 31 3a 53 54 52 20 52  |E R0,R0,#1:STR R|
00000fb0  30 2c 73 63 61 6e 61 31  0d 06 a4 2d 41 44 44 45  |0,scana1...-ADDE|
00000fc0  51 20 52 30 2c 52 30 2c  23 31 3a 53 54 52 20 52  |Q R0,R0,#1:STR R|
00000fd0  35 2c 73 63 61 6e 66 3a  42 4e 45 20 73 63 61 6e  |5,scanf:BNE scan|
00000fe0  73 70 61 63 65 0d 06 ae  35 4d 4f 56 20 52 32 2c  |space...5MOV R2,|
00000ff0  52 35 3a 43 4d 50 20 52  32 2c 23 97 22 28 22 3a  |R5:CMP R2,#."(":|
00001000  ec 51 20 52 33 2c 23 97  22 29 22 3a 4d 4f 56 4e  |.Q R3,#.")":MOVN|
00001010  45 20 52 33 2c 23 97 22  5d 22 0d 06 b8 0b 42 4c  |E R3,#."]"....BL|
00001020  20 66 69 6e 64 0d 06 c2  1c 43 4d 50 20 52 30 2c  | find....CMP R0,|
00001030  23 30 3a 41 44 44 45 51  20 52 30 2c 52 31 2c 23  |#0:ADDEQ R0,R1,#|
00001040  31 0d 06 cc 12 42 20 73  63 61 6e 67 6f 74 72 69  |1....B scangotri|
00001050  67 68 74 0d 06 d6 0e 2e  73 63 61 6e 73 70 61 63  |ght.....scanspac|
00001060  65 0d 06 e0 2d 43 4d 50  20 52 30 2c 52 31 3a 41  |e...-CMP R0,R1:A|
00001070  44 44 47 45 20 52 30 2c  52 30 2c 23 31 3a 42 47  |DDGE R0,R0,#1:BG|
00001080  45 20 73 63 61 6e 67 6f  74 72 69 67 68 74 0d 06  |E scangotright..|
00001090  ea 14 4c 44 52 42 20 52  35 2c 5b 52 30 2c 23 31  |..LDRB R5,[R0,#1|
000010a0  5d 21 0d 06 f4 34 43 4d  50 20 52 35 2c 23 30 3a  |]!...4CMP R5,#0:|
000010b0  43 4d 50 4e 45 20 52 35  2c 23 31 30 3a 43 4d 50  |CMPNE R5,#10:CMP|
000010c0  4e 45 20 52 35 2c 23 31  33 3a 43 4d 50 4e 45 20  |NE R5,#13:CMPNE |
000010d0  52 35 2c 23 33 32 0d 06  fe 11 42 4e 45 20 73 63  |R5,#32....BNE sc|
000010e0  61 6e 73 70 61 63 65 0d  07 08 2a 2e 73 63 61 6e  |anspace...*.scan|
000010f0  67 6f 74 72 69 67 68 74  20 20 3b 20 61 64 64 72  |gotright  ; addr|
00001100  20 72 69 67 68 74 20 63  68 61 72 20 69 6e 20 52  | right char in R|
00001110  30 0d 07 12 11 53 54 52  20 52 30 2c 73 63 61 6e  |0....STR R0,scan|
00001120  61 32 0d 07 1c 2a 4c 44  52 20 52 35 2c 73 63 61  |a2...*LDR R5,sca|
00001130  6e 66 3a 43 4d 50 20 52  35 2c 23 33 32 3a 43 4d  |nf:CMP R5,#32:CM|
00001140  50 4e 45 20 52 35 2c 23  97 22 5b 22 0d 07 26 15  |PNE R5,#."["..&.|
00001150  4c 44 4d 4e 45 46 44 20  52 31 33 21 2c 7b 50 43  |LDMNEFD R13!,{PC|
00001160  7d 0d 07 30 34 4c 44 52  20 52 33 2c 73 63 61 6e  |}..04LDR R3,scan|
00001170  61 31 3a 41 44 44 20 52  33 2c 52 33 2c 23 31 3a  |a1:ADD R3,R3,#1:|
00001180  4d 4f 56 20 52 32 2c 52  30 3a 4c 44 52 20 52 34  |MOV R2,R0:LDR R4|
00001190  2c 5b 52 39 5d 0d 07 3a  2c 53 55 42 20 52 31 30  |,[R9]..:,SUB R10|
000011a0  2c 52 32 2c 52 33 3a 43  4d 50 20 52 31 30 2c 23  |,R2,R3:CMP R10,#|
000011b0  32 35 35 3a 42 47 54 20  73 63 61 6e 65 72 72 6f  |255:BGT scanerro|
000011c0  72 0d 07 44 12 4c 44 52  20 52 30 2c 61 73 74 72  |r..D.LDR R0,astr|
000011d0  62 75 66 0d 07 4e 0e 2e  73 63 61 6e 6c 6f 6f 70  |buf..N..scanloop|
000011e0  32 0d 07 58 23 4c 44 52  42 20 52 35 2c 5b 52 33  |2..X#LDRB R5,[R3|
000011f0  5d 2c 23 31 3a 53 54 52  42 20 52 35 2c 5b 52 30  |],#1:STRB R5,[R0|
00001200  5d 2c 23 31 0d 07 62 1b  43 4d 50 20 52 33 2c 52  |],#1..b.CMP R3,R|
00001210  32 3a 42 4c 54 20 73 63  61 6e 6c 6f 6f 70 32 0d  |2:BLT scanloop2.|
00001220  07 6c 1c 4d 4f 56 20 52  32 2c 52 30 3a 4c 44 52  |.l.MOV R2,R0:LDR|
00001230  20 52 33 2c 61 73 74 72  62 75 66 0d 07 76 35 4c  | R3,astrbuf..v5L|
00001240  44 4d 46 44 20 52 31 33  21 2c 7b 52 31 30 7d 3a  |DMFD R13!,{R10}:|
00001250  41 44 52 20 52 31 34 2c  73 63 61 6e 72 65 74 31  |ADR R14,scanret1|
00001260  3a 41 44 44 20 50 43 2c  52 31 30 2c 23 26 33 38  |:ADD PC,R10,#&38|
00001270  0d 07 80 0c 2e 73 63 61  6e 65 6e 64 0d 07 8a 11  |.....scanend....|
00001280  53 54 52 20 52 31 2c 73  63 61 6e 61 32 0d 07 94  |STR R1,scana2...|
00001290  1a 4d 4f 56 20 52 34 2c  23 30 3a 53 54 52 20 52  |.MOV R4,#0:STR R|
000012a0  34 2c 73 63 61 6e 66 0d  07 9e 2a 41 44 52 20 52  |4,scanf...*ADR R|
000012b0  33 2c 73 63 61 6e 65 6e  3a 41 44 44 20 52 32 2c  |3,scanen:ADD R2,|
000012c0  52 33 2c 23 33 3a 4c 44  52 20 52 34 2c 5b 52 39  |R3,#3:LDR R4,[R9|
000012d0  5d 0d 07 a8 35 4c 44 4d  46 44 20 52 31 33 21 2c  |]...5LDMFD R13!,|
000012e0  7b 52 31 30 7d 3a 41 44  52 20 52 31 34 2c 73 63  |{R10}:ADR R14,sc|
000012f0  61 6e 72 65 74 31 3a 41  44 44 20 50 43 2c 52 31  |anret1:ADD PC,R1|
00001300  30 2c 23 26 33 38 0d 07  b2 18 2e 73 63 61 6e 72  |0,#&38.....scanr|
00001310  65 74 31 20 4d 4f 56 20  50 43 2c 52 31 30 0d 07  |et1 MOV PC,R10..|
00001320  bc 18 2e 61 73 74 72 62  75 66 20 45 51 55 44 20  |...astrbuf EQUD |
00001330  73 74 72 62 75 66 0d 07  c6 0e 2e 73 63 61 6e 65  |strbuf.....scane|
00001340  72 72 6f 72 0d 07 d0 16  41 44 52 20 52 30 2c 73  |rror....ADR R0,s|
00001350  63 61 6e 65 62 6c 6f 63  6b 25 0d 07 da 1a 53 57  |caneblock%....SW|
00001360  49 20 22 4f 53 5f 47 65  6e 65 72 61 74 65 45 72  |I "OS_GenerateEr|
00001370  72 6f 72 22 0d 07 e4 10  2e 73 63 61 6e 65 62 6c  |ror".....scanebl|
00001380  6f 63 6b 25 0d 07 ee 0b  45 51 55 44 20 31 39 0d  |ock%....EQUD 19.|
00001390  07 f8 1a 45 51 55 53 20  22 53 74 72 69 6e 67 20  |...EQUS "String |
000013a0  74 6f 6f 20 6c 6f 6e 67  22 0d 08 02 0a 45 51 55  |too long"....EQU|
000013b0  42 20 30 0d 08 0c 09 41  4c 49 47 4e 0d 08 16 05  |B 0....ALIGN....|
000013c0  5d 0d 08 20 05 ed 0d 08  2a 05 e1 0d 08 34 05 3a  |].. ....*....4.:|
000013d0  0d 08 3e 10 dd 20 f2 69  6e 69 74 76 62 6c 65 73  |..>.. .initvbles|
000013e0  0d 08 48 3d c8 99 20 22  4f 53 5f 46 69 6c 65 22  |..H=.. "OS_File"|
000013f0  2c 26 30 35 2c 22 3c 41  72 63 41 75 74 24 44 69  |,&05,"<ArcAut$Di|
00001400  72 3e 2e 49 6e 69 74 53  75 62 22 20 b8 20 2c 2c  |r>.InitSub" . ,,|
00001410  2c 2c 6c 65 6e 69 6e 69  74 73 75 62 25 0d 08 52  |,,leninitsub%..R|
00001420  1a de 20 69 6e 69 74 73  75 62 25 20 6c 65 6e 69  |.. initsub% leni|
00001430  6e 69 74 73 75 62 25 0d  08 5c 34 c8 99 20 22 4f  |nitsub%..\4.. "O|
00001440  53 5f 46 69 6c 65 22 2c  26 46 46 2c 22 3c 41 72  |S_File",&FF,"<Ar|
00001450  63 41 75 74 24 44 69 72  3e 2e 49 6e 69 74 53 75  |cAut$Dir>.InitSu|
00001460  62 22 2c 69 6e 69 74 73  75 62 25 0d 08 66 3e c8  |b",initsub%..f>.|
00001470  99 20 22 4f 53 5f 46 69  6c 65 22 2c 26 30 35 2c  |. "OS_File",&05,|
00001480  22 3c 41 72 63 41 75 74  24 44 69 72 3e 2e 4c 69  |"<ArcAut$Dir>.Li|
00001490  62 72 61 72 79 22 20 b8  20 2c 2c 2c 2c 6c 65 6e  |brary" . ,,,,len|
000014a0  54 6c 69 62 72 61 72 79  25 0d 08 70 1c de 20 54  |Tlibrary%..p.. T|
000014b0  6c 69 62 72 61 72 79 25  20 6c 65 6e 54 6c 69 62  |library% lenTlib|
000014c0  72 61 72 79 25 0d 08 7a  35 c8 99 20 22 4f 53 5f  |rary%..z5.. "OS_|
000014d0  46 69 6c 65 22 2c 26 46  46 2c 22 3c 41 72 63 41  |File",&FF,"<ArcA|
000014e0  75 74 24 44 69 72 3e 2e  4c 69 62 72 61 72 79 22  |ut$Dir>.Library"|
000014f0  2c 54 6c 69 62 72 61 72  79 25 0d 08 84 38 c8 99  |,Tlibrary%...8..|
00001500  20 22 4f 53 5f 46 69 6c  65 22 2c 26 30 35 2c 22  | "OS_File",&05,"|
00001510  3c 41 72 63 41 75 74 24  44 69 72 3e 2e 43 6f 64  |<ArcAut$Dir>.Cod|
00001520  65 22 20 b8 20 2c 2c 2c  2c 6c 65 6e 54 63 6f 64  |e" . ,,,,lenTcod|
00001530  65 25 0d 08 8e 16 de 20  54 63 6f 64 65 25 20 6c  |e%..... Tcode% l|
00001540  65 6e 54 63 6f 64 65 25  0d 08 98 2f c8 99 20 22  |enTcode%.../.. "|
00001550  4f 53 5f 46 69 6c 65 22  2c 26 46 46 2c 22 3c 41  |OS_File",&FF,"<A|
00001560  72 63 41 75 74 24 44 69  72 3e 2e 43 6f 64 65 22  |rcAut$Dir>.Code"|
00001570  2c 54 63 6f 64 65 25 0d  08 a2 0e 6d 65 6d 25 3d  |,Tcode%....mem%=|
00001580  31 30 32 34 30 0d 08 ac  10 de 20 63 6f 64 65 25  |10240..... code%|
00001590  20 6d 65 6d 25 0d 08 b6  13 de 20 72 6e 64 62 75  | mem%..... rndbu|
000015a0  66 25 20 33 32 37 36 38  0d 08 c0 0c de 20 73 74  |f% 32768..... st|
000015b0  25 28 32 29 0d 08 ca 1e  de 20 6f 70 63 6b 24 28  |%(2)..... opck$(|
000015c0  36 29 2c 73 6d 6e 25 28  36 29 2c 73 6d 78 25 28  |6),smn%(6),smx%(|
000015d0  36 29 0d 08 d4 31 72 65  67 63 6b 24 3d 22 54 4c  |6)...1regck$="TL|
000015e0  20 20 54 4d 20 20 54 52  20 20 4d 4c 20 20 43 45  |  TM  TR  ML  CE|
000015f0  4c 4c 4d 52 20 20 42 4c  20 20 42 4d 20 20 42 52  |LLMR  BL  BM  BR|
00001600  20 20 22 0d 08 de 2e 72  65 67 63 6b 24 2b 3d 22  |  "....regck$+="|
00001610  55 4c 20 20 55 52 20 20  4c 4c 20 20 4c 52 20 20  |UL  UR  LL  LR  |
00001620  4f 50 50 20 43 57 20 20  43 43 57 20 46 4c 41 47  |OPP CW  CCW FLAG|
00001630  22 0d 08 e8 36 6f 70 63  6b 24 28 30 29 3d 22 3d  |"...6opck$(0)="=|
00001640  3d 20 49 46 20 4e 4f 54  20 54 52 41 53 48 20 53  |= IF NOT TRASH S|
00001650  43 4f 55 4e 54 5f 4e 45  49 47 20 53 43 4f 55 4e  |COUNT_NEIG SCOUN|
00001660  54 5f 41 4c 4c 20 22 0d  08 f2 13 6f 70 63 6b 24  |T_ALL "....opck$|
00001670  28 31 29 3d 22 44 55 50  20 22 0d 08 fc 54 6f 70  |(1)="DUP "...Top|
00001680  63 6b 24 28 32 29 3d 22  2b 20 2d 20 2a 20 44 49  |ck$(2)="+ - * DI|
00001690  56 20 45 4f 52 20 41 4e  44 20 4f 52 20 3c 20 3e  |V EOR AND OR < >|
000016a0  20 3d 20 3c 3d 20 3e 3d  20 3c 3e 20 3c 3c 20 3e  | = <= >= <> << >|
000016b0  3e 20 3e 3e 3e 20 4d 43  4f 55 4e 54 5f 4e 45 49  |> >>> MCOUNT_NEI|
000016c0  47 20 4d 43 4f 55 4e 54  5f 41 4c 4c 20 22 0d 09  |G MCOUNT_ALL "..|
000016d0  06 50 6f 70 63 6b 24 28  33 29 3d 22 53 55 4d 5f  |.Popck$(3)="SUM_|
000016e0  4e 45 49 47 20 53 55 4d  5f 41 4c 4c 20 32 52 4e  |NEIG SUM_ALL 2RN|
000016f0  44 20 34 52 4e 44 20 38  52 4e 44 20 32 35 36 52  |D 4RND 8RND 256R|
00001700  4e 44 20 32 52 4e 44 42  20 34 52 4e 44 42 20 38  |ND 2RNDB 4RNDB 8|
00001710  52 4e 44 42 20 32 35 36  52 4e 44 42 20 22 0d 09  |RNDB 256RNDB "..|
00001720  10 22 6f 70 63 6b 24 28  34 29 3d 22 52 45 41 44  |."opck$(4)="READ|
00001730  5f 4e 45 49 47 20 45 4c  53 45 20 45 4e 44 20 22  |_NEIG ELSE END "|
00001740  0d 09 1a 13 6f 70 63 6b  24 28 35 29 3d 22 52 4f  |....opck$(5)="RO|
00001750  54 20 22 0d 09 24 14 6f  70 63 6b 24 28 36 29 3d  |T "..$.opck$(6)=|
00001760  22 53 57 41 50 20 22 0d  09 2e 2d 73 6d 6e 25 28  |"SWAP "...-smn%(|
00001770  29 3d 31 2c 31 2c 32 2c  30 2c 30 2c 33 2c 32 3a  |)=1,1,2,0,0,3,2:|
00001780  73 6d 78 25 28 29 3d 33  2c 32 2c 33 2c 32 2c 33  |smx%()=3,2,3,2,3|
00001790  2c 33 2c 33 0d 09 38 14  6d 61 78 6e 75 6d 73 74  |,3,3..8.maxnumst|
000017a0  61 74 73 25 3d 32 35 35  0d 09 42 24 de 20 62 72  |ats%=255..B$. br|
000017b0  25 28 6d 61 78 6e 75 6d  73 74 61 74 73 25 29 2c  |%(maxnumstats%),|
000017c0  63 6f 6e 64 63 6f 6e 76  25 28 37 29 0d 09 4c 25  |condconv%(7)..L%|
000017d0  63 6f 6e 64 63 6f 6e 76  25 28 29 3d 31 34 2c 30  |condconv%()=14,0|
000017e0  2c 31 31 2c 31 32 2c 31  33 2c 31 30 2c 31 2c 31  |,11,12,13,10,1,1|
000017f0  35 0d 09 56 0e 6f 6e 3d  b9 3a 6f 66 66 3d a3 0d  |5..V.on=.:off=..|
00001800  09 60 18 ff 28 22 53 65  74 45 76 61 6c 20 6f 6e  |.`..("SetEval on|
00001810  20 22 2b c3 6f 6e 29 0d  09 6a 1a ff 28 22 53 65  | "+.on)..j..("Se|
00001820  74 45 76 61 6c 20 6f 66  66 20 22 2b c3 6f 66 66  |tEval off "+.off|
00001830  29 0d 09 74 13 2a 53 65  74 45 76 61 6c 20 64 65  |)..t.*SetEval de|
00001840  61 64 20 30 0d 09 7e 16  2a 53 65 74 45 76 61 6c  |ad 0..~.*SetEval|
00001850  20 61 6c 69 76 65 20 32  35 35 0d 09 88 14 2a 53  | alive 255....*S|
00001860  65 74 45 76 61 6c 20 6d  6f 6f 72 65 20 30 0d 09  |etEval moore 0..|
00001870  92 18 2a 53 65 74 45 76  61 6c 20 6d 61 72 67 6f  |..*SetEval margo|
00001880  6c 75 73 20 2d 31 0d 09  9c 15 2a 53 65 74 45 76  |lus -1....*SetEv|
00001890  61 6c 20 62 6f 72 64 65  72 20 30 0d 09 a6 15 77  |al border 0....w|
000018a0  24 3d 22 31 32 38 22 3a  68 24 3d 22 31 32 38 22  |$="128":h$="128"|
000018b0  0d 09 b0 05 e1 0d 09 ba  05 3a 0d 09 c4 0b dd 20  |.........:..... |
000018c0  f2 6d 61 69 6e 0d 09 ce  0d f2 61 73 73 65 6d 62  |.main.....assemb|
000018d0  6c 65 0d 09 d8 0f f2 69  6e 69 74 73 63 72 65 65  |le.....initscree|
000018e0  6e 0d 09 e2 08 f2 61 75  74 0d 09 ec 05 e1 0d 09  |n.....aut.......|
000018f0  f6 05 3a 0d 0a 00 11 dd  20 f2 69 6e 69 74 73 63  |..:..... .initsc|
00001900  72 65 65 6e 0d 0a 0a 0d  2a 46 58 20 31 31 32 20  |reen....*FX 112 |
00001910  32 0d 0a 14 08 f2 73 63  72 0d 0a 1e 0d 2a 46 58  |2.....scr....*FX|
00001920  20 31 31 32 20 31 0d 0a  28 08 f2 73 63 72 0d 0a  | 112 1..(..scr..|
00001930  32 28 f2 73 75 62 74 61  73 6b 28 22 53 43 52 45  |2(.subtask("SCRE|
00001940  45 4e 2a 22 2c 22 43 4f  44 45 2a 22 2c 22 73 63  |EN*","CODE*","sc|
00001950  72 65 65 6e 22 29 0d 0a  3c 05 e1 0d 0a 46 05 3a  |reen")..<....F.:|
00001960  0d 0a 50 1a dd 20 f2 73  75 62 74 61 73 6b 28 73  |..P.. .subtask(s|
00001970  31 24 2c 73 32 24 2c 65  24 29 0d 0a 5a 08 ea 20  |1$,s2$,e$)..Z.. |
00001980  61 24 0d 0a 64 1a 41 25  3d 74 65 78 74 3a 42 25  |a$..d.A%=text:B%|
00001990  3d 41 25 2b 6d 74 65 78  74 25 2d 31 0d 0a 6e 10  |=A%+mtext%-1..n.|
000019a0  d6 20 6c 6f 63 61 74 65  2c 73 31 24 0d 0a 78 15  |. locate,s1$..x.|
000019b0  41 25 3d 21 6c 6f 63 61  74 69 6f 6e 2b a9 73 31  |A%=!location+.s1|
000019c0  24 0d 0a 82 34 e7 20 21  6c 6f 63 61 74 69 6f 6e  |$...4. !location|
000019d0  3d 30 20 85 20 32 35 35  2c 22 49 6e 63 6f 72 72  |=0 . 255,"Incorr|
000019e0  65 63 74 20 61 75 74 6f  6d 61 74 6f 6e 20 73 79  |ect automaton sy|
000019f0  6e 74 61 78 22 0d 0a 8c  10 d6 20 6c 6f 63 61 74  |ntax"..... locat|
00001a00  65 2c 73 32 24 0d 0a 96  15 42 25 3d 21 6c 6f 63  |e,s2$....B%=!loc|
00001a10  70 72 65 76 69 6f 75 73  2b 31 0d 0a a0 3b e7 20  |previous+1...;. |
00001a20  21 6c 6f 63 61 74 69 6f  6e 3d 30 20 84 20 42 25  |!location=0 . B%|
00001a30  3d 31 20 85 20 32 35 35  2c 22 49 6e 63 6f 72 72  |=1 . 255,"Incorr|
00001a40  65 63 74 20 61 75 74 6f  6d 61 74 6f 6e 20 73 79  |ect automaton sy|
00001a50  6e 74 61 78 22 0d 0a aa  0d d6 20 73 63 61 6e 2c  |ntax"..... scan,|
00001a60  61 24 0d 0a b4 10 41 25  3d 21 73 63 61 6e 61 31  |a$....A%=!scana1|
00001a70  2b 31 0d 0a be 31 61 24  3d 22 57 69 6d 70 54 61  |+1...1a$="WimpTa|
00001a80  73 6b 20 42 61 73 69 63  20 2d 71 75 69 74 20 52  |sk Basic -quit R|
00001a90  41 4d 3a 3a 30 2e 24 2e  41 72 63 41 75 74 53 63  |AM::0.$.ArcAutSc|
00001aa0  72 70 22 0d 0a c8 44 ff  28 22 54 72 61 6e 73 69  |rp"...D.("Transi|
00001ab0  65 6e 74 20 22 2b c3 28  34 30 39 36 2b 42 25 2d  |ent "+.(4096+B%-|
00001ac0  41 25 2b 6c 65 6e 69 6e  69 74 73 75 62 25 2b 6c  |A%+leninitsub%+l|
00001ad0  65 6e 54 6c 69 62 72 61  72 79 25 2b 6c 65 6e 54  |enTlibrary%+lenT|
00001ae0  63 6f 64 65 25 29 29 0d  0a d2 4e c8 99 20 22 4f  |code%))...N.. "O|
00001af0  53 5f 46 69 6c 65 22 2c  26 30 41 2c 22 52 41 4d  |S_File",&0A,"RAM|
00001b00  3a 3a 30 2e 24 2e 4c 69  62 72 61 72 79 22 2c 26  |::0.$.Library",&|
00001b10  46 46 42 2c 2c 54 6c 69  62 72 61 72 79 25 2c 54  |FFB,,Tlibrary%,T|
00001b20  6c 69 62 72 61 72 79 25  2b 6c 65 6e 54 6c 69 62  |library%+lenTlib|
00001b30  72 61 72 79 25 0d 0a dc  42 c8 99 20 22 4f 53 5f  |rary%...B.. "OS_|
00001b40  46 69 6c 65 22 2c 26 30  41 2c 22 52 41 4d 3a 3a  |File",&0A,"RAM::|
00001b50  30 2e 24 2e 43 6f 64 65  22 2c 26 46 46 44 2c 2c  |0.$.Code",&FFD,,|
00001b60  54 63 6f 64 65 25 2c 54  63 6f 64 65 25 2b 6c 65  |Tcode%,Tcode%+le|
00001b70  6e 54 63 6f 64 65 25 0d  0a e6 4e c8 99 20 22 4f  |nTcode%...N.. "O|
00001b80  53 5f 46 69 6c 65 22 2c  26 30 41 2c 22 52 41 4d  |S_File",&0A,"RAM|
00001b90  3a 3a 30 2e 24 2e 41 72  63 41 75 74 53 63 72 70  |::0.$.ArcAutScrp|
00001ba0  22 2c 26 46 46 46 2c 2c  69 6e 69 74 73 75 62 25  |",&FFF,,initsub%|
00001bb0  2c 69 6e 69 74 73 75 62  25 2b 6c 65 6e 69 6e 69  |,initsub%+lenini|
00001bc0  74 73 75 62 25 0d 0a f0  33 c8 99 20 22 4f 53 5f  |tsub%...3.. "OS_|
00001bd0  46 69 6e 64 22 2c 26 43  46 2c 22 52 41 4d 3a 3a  |Find",&CF,"RAM::|
00001be0  30 2e 24 2e 41 72 63 41  75 74 53 63 72 70 22 20  |0.$.ArcAutScrp" |
00001bf0  b8 20 66 69 6c 65 68 25  0d 0a fa 2e c8 99 20 22  |. fileh%...... "|
00001c00  4f 53 5f 47 42 50 42 22  2c 31 2c 66 69 6c 65 68  |OS_GBPB",1,fileh|
00001c10  25 2c 41 25 2c 42 25 2d  41 25 2c 6c 65 6e 69 6e  |%,A%,B%-A%,lenin|
00001c20  69 74 73 75 62 25 0d 0b  04 1b c8 99 20 22 4f 53  |itsub%...... "OS|
00001c30  5f 46 69 6e 64 22 2c 26  30 30 2c 66 69 6c 65 68  |_Find",&00,fileh|
00001c40  25 0d 0b 0e 19 2a 53 65  74 45 76 61 6c 20 41 72  |%....*SetEval Ar|
00001c50  63 41 75 74 24 53 75 63  20 30 0d 0b 18 07 ef 32  |cAut$Suc 0.....2|
00001c60  31 0d 0b 22 08 ff 20 61  24 0d 0b 2c 08 c8 97 20  |1..".. a$..,... |
00001c70  87 0d 0b 36 06 ef 36 0d  0b 40 39 2a 53 43 52 45  |...6..6..@9*SCRE|
00001c80  45 4e 53 49 5a 45 20 31  36 30 20 2a 45 52 52 4f  |ENSIZE 160 *ERRO|
00001c90  52 20 32 35 35 20 4e 65  65 64 20 3e 3d 20 31 36  |R 255 Need >= 16|
00001ca0  30 4b 20 73 63 72 65 65  6e 20 6d 65 6d 6f 72 79  |0K screen memory|
00001cb0  0d 0b 4a 1f 2a 44 45 4c  45 54 45 20 52 41 4d 3a  |..J.*DELETE RAM:|
00001cc0  3a 30 2e 24 2e 41 72 63  41 75 74 53 63 72 70 0d  |:0.$.ArcAutScrp.|
00001cd0  0b 54 19 2a 44 45 4c 45  54 45 20 52 41 4d 3a 3a  |.T.*DELETE RAM::|
00001ce0  30 2e 24 2e 43 6f 64 65  0d 0b 5e 1c 2a 44 45 4c  |0.$.Code..^.*DEL|
00001cf0  45 54 45 20 52 41 4d 3a  3a 30 2e 24 2e 4c 69 62  |ETE RAM::0.$.Lib|
00001d00  72 61 72 79 0d 0b 68 0e  2a 54 72 61 6e 73 69 65  |rary..h.*Transie|
00001d10  6e 74 0d 0b 72 30 c8 99  20 22 4f 53 5f 52 65 61  |nt..r0.. "OS_Rea|
00001d20  64 56 61 72 56 61 6c 22  2c 22 41 72 63 41 75 74  |dVarVal","ArcAut|
00001d30  24 53 75 63 22 2c 6d 62  6c 6f 63 6b 25 2c 31 30  |$Suc",mblock%,10|
00001d40  32 34 0d 0b 7c 52 e7 20  21 6d 62 6c 6f 63 6b 25  |24..|R. !mblock%|
00001d50  3d 30 20 85 20 32 35 35  2c 22 45 72 72 6f 72 20  |=0 . 255,"Error |
00001d60  69 6e 20 61 75 74 6f 6d  61 74 6f 6e 20 22 2b 65  |in automaton "+e|
00001d70  24 2b 22 20 63 6f 64 65  20 6f 72 20 69 6e 73 75  |$+" code or insu|
00001d80  66 66 69 63 69 65 6e 74  20 66 72 65 65 20 73 70  |fficient free sp|
00001d90  61 63 65 22 0d 0b 86 05  e1 0d 0b 90 05 3a 0d 0b  |ace".........:..|
00001da0  9a 10 dd 20 a4 72 6f 75  6e 64 28 6e 25 29 0d 0b  |... .round(n%)..|
00001db0  a4 0b ea 20 6d 25 2c 66  25 0d 0b ae 16 e7 20 6e  |... m%,f%..... n|
00001dc0  25 3c 30 20 66 25 3d b9  3a 6e 25 3d 2d 6e 25 0d  |%<0 f%=.:n%=-n%.|
00001dd0  0b b8 1d c8 95 20 6e 25  3e 32 35 35 20 6e 25 3d  |..... n%>255 n%=|
00001de0  6e 25 81 34 3a 6d 25 2b  3d 31 3a ce 0d 0b c2 23  |n%.4:m%+=1:....#|
00001df0  6e 25 3d 6e 25 3c 3c 28  6d 25 2a 32 29 3a e7 20  |n%=n%<<(m%*2):. |
00001e00  66 25 3d b9 20 3d 2d 6e  25 20 8b 20 3d 6e 25 0d  |f%=. =-n% . =n%.|
00001e10  0b cc 05 3a 0d 0b d6 45  dd 20 a4 61 63 6f 6c 28  |...:...E. .acol(|
00001e20  63 25 29 20 3d 20 28 28  63 25 80 33 29 3c 3c 36  |c%) = ((c%.3)<<6|
00001e30  29 2b 28 28 63 25 80 31  33 32 29 3e 3e 32 29 2b  |)+((c%.132)>>2)+|
00001e40  28 28 63 25 80 38 29 3c  3c 31 29 2b 28 28 63 25  |((c%.8)<<1)+((c%|
00001e50  80 31 31 32 29 3e 3e 33  29 0d 0b e0 46 dd 20 a4  |.112)>>3)...F. .|
00001e60  6c 63 6f 6c 28 63 25 29  20 3d 20 28 28 63 25 80  |lcol(c%) = ((c%.|
00001e70  33 33 29 3c 3c 32 29 2b  28 28 63 25 80 31 34 29  |33)<<2)+((c%.14)|
00001e80  3c 3c 33 29 2b 28 28 63  25 80 31 36 29 3e 3e 31  |<<3)+((c%.16)>>1|
00001e90  29 2b 28 28 63 25 80 31  39 32 29 3e 3e 36 29 0d  |)+((c%.192)>>6).|
00001ea0  0b ea 05 3a 0d 0b f4 0a  dd 20 f2 73 63 72 0d 0b  |...:..... .scr..|
00001eb0  fe 0e ea 20 71 24 2c 71  25 2c 66 25 0d 0c 08 19  |... q$,q%,f%....|
00001ec0  ef 32 36 2c 32 34 2c 34  3b 30 3b 31 30 32 37 3b  |.26,24,4;0;1027;|
00001ed0  31 30 32 33 3b 0d 0c 12  11 db 3a e6 20 36 33 20  |1023;.....:. 63 |
00001ee0  c8 9c 20 32 35 35 0d 0c  1c 2e c8 93 20 35 31 34  |.. 255...... 514|
00001ef0  2d 32 2a 73 75 78 25 2c  35 31 30 2d 32 2a 73 75  |-2*sux%,510-2*su|
00001f00  79 25 2c 34 2a 73 75 78  25 2b 34 2c 34 2a 73 75  |y%,4*sux%+4,4*su|
00001f10  79 25 2b 34 0d 0c 26 35  ef 20 32 34 2c 35 31 38  |y%+4..&5. 24,518|
00001f20  2d 32 2a 73 75 78 25 3b  35 31 34 2d 32 2a 73 75  |-2*sux%;514-2*su|
00001f30  79 25 3b 35 31 34 2b 32  2a 73 75 78 25 3b 35 31  |y%;514+2*sux%;51|
00001f40  30 2b 32 2a 73 75 79 25  3b 0d 0c 30 0e c8 91 20  |0+2*suy%;..0... |
00001f50  35 31 36 2c 35 31 32 0d  0c 3a 13 ef 20 32 38 2c  |516,512..:.. 28,|
00001f60  33 33 2c 33 31 2c 33 39  2c 30 0d 0c 44 09 f2 74  |33,31,39,0..D..t|
00001f70  65 78 74 0d 0c 4e 05 e1  0d 0c 58 05 3a 0d 0c 62  |ext..N....X.:..b|
00001f80  0b dd 20 f2 74 65 78 74  0d 0c 6c 07 db 3a 87 0d  |.. .text..l..:..|
00001f90  0c 76 08 f1 27 27 27 0d  0c 80 22 71 24 3d 61 75  |.v..'''..."q$=au|
00001fa0  74 24 2b 22 5f 22 3a 66  25 3d 31 3a e3 20 71 25  |t$+"_":f%=1:. q%|
00001fb0  3d 31 20 b8 20 a9 20 71  24 0d 0c 8a 15 e7 20 c1  |=1 . . q$..... .|
00001fc0  71 24 2c 71 25 2c 31 29  3d 22 5f 22 20 8c 0d 0c  |q$,q%,1)="_" ...|
00001fd0  94 13 f1 c1 71 24 2c 66  25 2c 71 25 2d 66 25 29  |....q$,f%,q%-f%)|
00001fe0  3b 0d 0c 9e 10 e7 20 71  25 2d 66 25 3c 3e 37 20  |;..... q%-f%<>7 |
00001ff0  f1 0d 0c a8 0b 66 25 3d  71 25 2b 31 0d 0c b2 05  |.....f%=q%+1....|
00002000  cd 0d 0c bc 05 ed 0d 0c  c6 2f f1 8a 30 2c 31 32  |........./..0,12|
00002010  29 3b 22 47 65 6e 2e 23  3a 22 3b 8a 30 2c 32 33  |);"Gen.#:";.0,23|
00002020  29 3b 22 4d 65 6e 75 22  27 22 20 74 6f 22 27 22  |);"Menu"'" to"'"|
00002030  65 78 69 74 22 0d 0c d0  05 e1 0d 0c da 05 3a 0d  |exit".........:.|
00002040  0c e4 0b dd 20 f2 6c 6f  61 64 0d 0c ee 17 f5 20  |.... .load..... |
00002050  fd 20 ac 20 a6 2d 38 37  3a 2a 46 58 20 31 35 20  |. . .-87:*FX 15 |
00002060  31 0d 0c f8 17 e8 20 22  4e 61 6d 65 3a 22 3b 27  |1..... "Name:";'|
00002070  66 24 3a f2 74 65 78 74  0d 0d 02 2e ff 28 22 53  |f$:.text.....("S|
00002080  63 72 65 65 6e 4c 6f 61  64 20 3c 41 72 63 41 75  |creenLoad <ArcAu|
00002090  74 24 44 69 72 3e 2e 5e  2e 53 63 72 65 65 6e 73  |t$Dir>.^.Screens|
000020a0  2e 22 2b 66 24 29 0d 0d  0c 0e f5 20 fd 20 ac 20  |."+f$)..... . . |
000020b0  a6 2d 37 34 0d 0d 16 05  e1 0d 0d 20 05 3a 0d 0d  |.-74....... .:..|
000020c0  2a 0a dd 20 f2 61 75 74  0d 0d 34 39 2a 53 43 52  |*.. .aut..49*SCR|
000020d0  45 45 4e 53 49 5a 45 20  31 36 30 20 2a 45 52 52  |EENSIZE 160 *ERR|
000020e0  4f 52 20 32 35 35 20 4e  65 65 64 20 3e 3d 20 31  |OR 255 Need >= 1|
000020f0  36 30 4b 20 73 63 72 65  65 6e 20 6d 65 6d 6f 72  |60K screen memor|
00002100  79 0d 0d 3e 16 f5 20 d6  20 61 75 74 63 6f 64 65  |y..>.. . autcode|
00002110  3a fd 20 a6 2d 31 31 0d  0d 48 11 85 20 31 37 2c  |:. .-11..H.. 17,|
00002120  22 45 73 63 61 70 65 22  0d 0d 52 05 e1 0d 0d 5c  |"Escape"..R....\|
00002130  05 3a 0d 0d 66 0f dd 20  f2 61 73 73 65 6d 62 6c  |.:..f.. .assembl|
00002140  65 0d 0d 70 1a 41 25 3d  74 65 78 74 3a 42 25 3d  |e..p.A%=text:B%=|
00002150  41 25 2b 6d 74 65 78 74  25 2d 31 0d 0d 7a 1f 61  |A%+mtext%-1..z.a|
00002160  24 3d 22 41 55 54 4f 4d  41 54 4f 4e 2a 22 3a d6  |$="AUTOMATON*":.|
00002170  20 6c 6f 63 61 74 65 2c  61 24 0d 0d 84 13 41 25  | locate,a$....A%|
00002180  3d 21 6c 6f 63 61 74 69  6f 6e 2b 31 30 0d 0d 8e  |=!location+10...|
00002190  2e e7 20 41 25 3d 31 30  20 85 20 32 35 35 2c 22  |.. A%=10 . 255,"|
000021a0  49 6e 63 6f 72 72 65 63  74 20 61 75 74 6f 6d 61  |Incorrect automa|
000021b0  74 6f 6e 20 73 79 6e 74  61 78 22 0d 0d 98 24 61  |ton syntax"...$a|
000021c0  24 3d 22 49 4e 49 54 49  41 4c 49 53 41 54 49 4f  |$="INITIALISATIO|
000021d0  4e 2a 22 3a d6 20 6c 6f  63 61 74 65 2c 61 24 0d  |N*":. locate,a$.|
000021e0  0d a2 12 42 25 3d 21 6c  6f 63 61 74 69 6f 6e 2d  |...B%=!location-|
000021f0  31 0d 0d ac 2e e7 20 42  25 3d 2d 31 20 85 20 32  |1..... B%=-1 . 2|
00002200  35 35 2c 22 49 6e 63 6f  72 72 65 63 74 20 61 75  |55,"Incorrect au|
00002210  74 6f 6d 61 74 6f 6e 20  73 79 6e 74 61 78 22 0d  |tomaton syntax".|
00002220  0d b6 0f d6 20 73 63 61  6e 2c 61 75 74 24 0d 0d  |.... scan,aut$..|
00002230  c0 16 ff 28 22 53 65 74  20 61 75 74 20 22 2b 61  |...("Set aut "+a|
00002240  75 74 24 29 0d 0d ca 0e  f2 69 6e 70 75 74 73 69  |ut$).....inputsi|
00002250  7a 65 0d 0d d4 14 2a 53  65 74 45 76 61 6c 20 77  |ze....*SetEval w|
00002260  72 61 70 20 6f 6e 0d 0d  de 17 2a 53 65 74 45 76  |rap on....*SetEv|
00002270  61 6c 20 6e 65 69 67 20  6d 6f 6f 72 65 0d 0d e8  |al neig moore...|
00002280  13 2a 53 65 74 45 76 61  6c 20 66 6c 61 67 20 30  |.*SetEval flag 0|
00002290  0d 0d f2 13 2a 53 65 74  45 76 61 6c 20 72 6e 64  |....*SetEval rnd|
000022a0  62 20 30 0d 0d fc 3a f2  73 75 62 74 61 73 6b 28  |b 0...:.subtask(|
000022b0  22 49 4e 49 54 49 41 4c  49 53 41 54 49 4f 4e 2a  |"INITIALISATION*|
000022c0  22 2c 22 53 43 52 45 45  4e 2a 22 2c 22 69 6e 69  |","SCREEN*","ini|
000022d0  74 69 61 6c 69 73 61 74  69 6f 6e 22 29 0d 0e 06  |tialisation")...|
000022e0  38 c8 99 20 22 4f 53 5f  52 65 61 64 56 61 72 56  |8.. "OS_ReadVarV|
000022f0  61 6c 22 2c 22 77 72 61  70 22 2c 6d 62 6c 6f 63  |al","wrap",mbloc|
00002300  6b 25 2c 31 30 32 34 3a  77 72 61 70 3d 21 6d 62  |k%,1024:wrap=!mb|
00002310  6c 6f 63 6b 25 0d 0e 10  3c c8 99 20 22 4f 53 5f  |lock%...<.. "OS_|
00002320  52 65 61 64 56 61 72 56  61 6c 22 2c 22 62 6f 72  |ReadVarVal","bor|
00002330  64 65 72 22 2c 6d 62 6c  6f 63 6b 25 2c 31 30 32  |der",mblock%,102|
00002340  34 3a 62 6f 72 64 65 72  3d 21 6d 62 6c 6f 63 6b  |4:border=!mblock|
00002350  25 0d 0e 1a 38 c8 99 20  22 4f 53 5f 52 65 61 64  |%...8.. "OS_Read|
00002360  56 61 72 56 61 6c 22 2c  22 64 65 61 64 22 2c 6d  |VarVal","dead",m|
00002370  62 6c 6f 63 6b 25 2c 31  30 32 34 3a 64 65 61 64  |block%,1024:dead|
00002380  3d 21 6d 62 6c 6f 63 6b  25 0d 0e 24 3a c8 99 20  |=!mblock%..$:.. |
00002390  22 4f 53 5f 52 65 61 64  56 61 72 56 61 6c 22 2c  |"OS_ReadVarVal",|
000023a0  22 61 6c 69 76 65 22 2c  6d 62 6c 6f 63 6b 25 2c  |"alive",mblock%,|
000023b0  31 30 32 34 3a 61 6c 69  76 65 3d 21 6d 62 6c 6f  |1024:alive=!mblo|
000023c0  63 6b 25 0d 0e 2e 39 c8  99 20 22 4f 53 5f 52 65  |ck%...9.. "OS_Re|
000023d0  61 64 56 61 72 56 61 6c  22 2c 22 6e 65 69 67 22  |adVarVal","neig"|
000023e0  2c 6d 62 6c 6f 63 6b 25  2c 31 30 32 34 3a 6e 65  |,mblock%,1024:ne|
000023f0  69 67 25 3d 21 6d 62 6c  6f 63 6b 25 0d 0e 38 39  |ig%=!mblock%..89|
00002400  c8 99 20 22 4f 53 5f 52  65 61 64 56 61 72 56 61  |.. "OS_ReadVarVa|
00002410  6c 22 2c 22 66 6c 61 67  22 2c 6d 62 6c 6f 63 6b  |l","flag",mblock|
00002420  25 2c 31 30 32 34 3a 66  6c 61 67 25 3d 21 6d 62  |%,1024:flag%=!mb|
00002430  6c 6f 63 6b 25 0d 0e 42  39 c8 99 20 22 4f 53 5f  |lock%..B9.. "OS_|
00002440  52 65 61 64 56 61 72 56  61 6c 22 2c 22 72 6e 64  |ReadVarVal","rnd|
00002450  62 22 2c 6d 62 6c 6f 63  6b 25 2c 31 30 32 34 3a  |b",mblock%,1024:|
00002460  72 6e 64 62 25 3d 21 6d  62 6c 6f 63 6b 25 0d 0e  |rndb%=!mblock%..|
00002470  4c 0d e7 20 6e 65 69 67  25 20 8c 0d 0e 56 18 e7  |L.. neig% ...V..|
00002480  20 28 73 75 78 25 80 31  29 3d 31 20 73 75 78 25  | (sux%.1)=1 sux%|
00002490  2b 3d 31 0d 0e 60 18 e7  20 28 73 75 79 25 80 31  |+=1..`.. (suy%.1|
000024a0  29 3d 31 20 73 75 79 25  2b 3d 31 0d 0e 6a 2d 73  |)=1 suy%+=1..j-s|
000024b0  63 31 3d 73 63 72 73 74  2b 33 32 30 2a 28 31 32  |c1=scrst+320*(12|
000024c0  38 2b 73 75 79 25 81 32  29 2b 28 73 75 78 25 2b  |8+suy%.2)+(sux%+|
000024d0  31 29 81 32 2d 31 39 32  0d 0e 74 12 73 63 32 3d  |1).2-192..t.sc2=|
000024e0  73 63 31 2b 26 31 34 30  30 30 0d 0e 7e 1b ff 28  |sc1+&14000..~..(|
000024f0  22 53 65 74 45 76 61 6c  20 73 75 78 20 22 2b c3  |"SetEval sux "+.|
00002500  73 75 78 25 29 0d 0e 88  1b ff 28 22 53 65 74 45  |sux%).....("SetE|
00002510  76 61 6c 20 73 75 79 20  22 2b c3 73 75 79 25 29  |val suy "+.suy%)|
00002520  0d 0e 92 05 cd 0d 0e 9c  1a 41 25 3d 74 65 78 74  |.........A%=text|
00002530  3a 42 25 3d 41 25 2b 6d  74 65 78 74 25 2d 31 0d  |:B%=A%+mtext%-1.|
00002540  0e a6 1a 61 24 3d 22 43  4f 44 45 2a 22 3a d6 20  |...a$="CODE*":. |
00002550  6c 6f 63 61 74 65 2c 61  24 0d 0e b0 12 41 25 3d  |locate,a$....A%=|
00002560  21 6c 6f 63 61 74 69 6f  6e 2b 35 0d 0e ba 2d e7  |!location+5...-.|
00002570  20 41 25 3d 35 20 85 20  32 35 35 2c 22 49 6e 63  | A%=5 . 255,"Inc|
00002580  6f 72 72 65 63 74 20 61  75 74 6f 6d 61 74 6f 6e  |orrect automaton|
00002590  20 73 79 6e 74 61 78 22  0d 0e c4 19 61 24 3d 22  | syntax"....a$="|
000025a0  45 4e 44 2a 22 3a d6 20  6c 6f 63 61 74 65 2c 61  |END*":. locate,a|
000025b0  24 0d 0e ce 12 42 25 3d  21 6c 6f 63 61 74 69 6f  |$....B%=!locatio|
000025c0  6e 2d 31 0d 0e d8 2e e7  20 42 25 3d 2d 31 20 85  |n-1..... B%=-1 .|
000025d0  20 32 35 35 2c 22 49 6e  63 6f 72 72 65 63 74 20  | 255,"Incorrect |
000025e0  61 75 74 6f 6d 61 74 6f  6e 20 73 79 6e 74 61 78  |automaton syntax|
000025f0  22 0d 0e e2 0d d6 20 73  63 61 6e 2c 61 24 0d 0e  |"..... scan,a$..|
00002600  ec 25 63 6f 6d 61 31 25  3d 21 73 63 61 6e 61 31  |.%coma1%=!scana1|
00002610  2b 31 3a 63 6f 6d 61 32  25 3d 21 73 63 61 6e 61  |+1:coma2%=!scana|
00002620  32 2d 31 0d 0e f6 0b 62  72 25 28 29 3d 30 0d 0f  |2-1....br%()=0..|
00002630  00 5a 54 4c 3d 30 3a 61  64 64 72 6f 3d 30 3a 54  |.ZTL=0:addro=0:T|
00002640  4d 3d 31 3a 61 64 64 72  73 63 31 3d 31 3a 54 52  |M=1:addrsc1=1:TR|
00002650  3d 32 3a 72 6f 77 3d 32  3a 4d 4c 3d 33 3a 43 45  |=2:row=2:ML=3:CE|
00002660  4c 4c 3d 34 3a 4d 52 3d  35 3a 61 64 64 72 73 63  |LL=4:MR=5:addrsc|
00002670  32 3d 35 3a 42 4c 3d 36  3a 42 4d 3d 37 3a 42 52  |2=5:BL=6:BM=7:BR|
00002680  3d 38 3a 63 6f 6c 3d 38  0d 0f 0a 2f 55 4c 3d 30  |=8:col=8.../UL=0|
00002690  3a 55 52 3d 31 3a 4c 4c  3d 32 3a 4c 52 3d 33 3a  |:UR=1:LL=2:LR=3:|
000026a0  4f 50 50 3d 35 3a 43 57  3d 36 3a 43 43 57 3d 37  |OPP=5:CW=6:CCW=7|
000026b0  3a 46 4c 41 47 3d 38 0d  0f 14 11 73 74 25 28 29  |:FLAG=8....st%()|
000026c0  3d 39 2c 31 30 2c 31 31  0d 0f 1e 29 74 65 6d 70  |=9,10,11...)temp|
000026d0  31 3d 31 32 3a 73 70 3d  31 33 3a 74 65 6d 70 32  |1=12:sp=13:temp2|
000026e0  3d 31 34 3a 6c 69 6e 6b  3d 31 34 3a 70 63 3d 31  |=14:link=14:pc=1|
000026f0  35 0d 0f 28 11 4c 25 3d  63 6f 64 65 25 2b 6d 65  |5..(.L%=code%+me|
00002700  6d 25 0d 0f 32 16 e3 20  70 61 73 73 25 3d 38 20  |m%..2.. pass%=8 |
00002710  b8 20 31 30 20 88 20 32  0d 0f 3c 11 50 25 3d 63  |. 10 . 2..<.P%=c|
00002720  6f 64 65 25 3a 6a 25 3d  30 0d 0f 46 0e 5b 4f 50  |ode%:j%=0..F.[OP|
00002730  54 20 70 61 73 73 25 0d  0f 50 11 2e 61 62 61 6e  |T pass%..P..aban|
00002740  6b 3a 45 51 55 44 20 32  0d 0f 5a 12 2e 61 73 63  |k:EQUD 2..Z..asc|
00002750  31 3a 45 51 55 44 20 73  63 32 0d 0f 64 12 2e 61  |1:EQUD sc2..d..a|
00002760  73 63 32 3a 45 51 55 44  20 73 63 31 0d 0f 6e 10  |sc2:EQUD sc1..n.|
00002770  2e 61 72 65 61 64 73 74  72 69 6e 67 0d 0f 78 12  |.areadstring..x.|
00002780  45 51 55 44 20 26 30 44  30 32 31 46 31 42 0d 0f  |EQUD &0D021F1B..|
00002790  82 11 2e 61 77 72 69 74  65 73 74 72 69 6e 67 0d  |...awritestring.|
000027a0  0f 8c 0a 45 51 55 44 20  30 0d 0f 96 0a 45 51 55  |...EQUD 0....EQU|
000027b0  44 20 30 0d 0f a0 0e 2e  61 67 3a 45 51 55 44 20  |D 0.....ag:EQUD |
000027c0  30 0d 0f aa 1a 2e 61 72  6e 64 62 75 66 25 3a 45  |0.....arndbuf%:E|
000027d0  51 55 44 20 72 6e 64 62  75 66 25 0d 0f b4 10 2e  |QUD rndbuf%.....|
000027e0  61 72 6e 64 3a 45 51 55  44 20 30 0d 0f be 19 2e  |arnd:EQUD 0.....|
000027f0  61 73 65 65 64 3a 45 51  55 44 20 26 46 46 46 46  |aseed:EQUD &FFFF|
00002800  46 46 46 46 0d 0f c8 16  2e 61 78 6f 72 3a 45 51  |FFFF.....axor:EQ|
00002810  55 44 20 26 45 44 36 41  41 37 0d 0f d2 0c 2e 61  |UD &ED6AA7.....a|
00002820  75 74 63 6f 64 65 0d 0f  dc 16 53 54 4d 46 44 20  |utcode....STMFD |
00002830  28 73 70 29 21 2c 7b 6c  69 6e 6b 7d 0d 0f e6 10  |(sp)!,{link}....|
00002840  4c 44 52 20 52 33 2c 61  62 61 6e 6b 0d 0f f0 10  |LDR R3,abank....|
00002850  52 53 42 20 52 33 2c 52  33 2c 23 33 0d 0f fa 10  |RSB R3,R3,#3....|
00002860  53 54 52 20 52 33 2c 61  62 61 6e 6b 0d 10 04 0d  |STR R3,abank....|
00002870  4d 4f 56 20 52 31 2c 52  33 0d 10 0e 0f 4d 4f 56  |MOV R1,R3....MOV|
00002880  20 52 30 2c 23 31 31 33  0d 10 18 11 53 57 49 20  | R0,#113....SWI |
00002890  22 4f 53 5f 42 79 74 65  22 0d 10 22 0d 4d 4f 56  |"OS_Byte"..".MOV|
000028a0  20 52 31 2c 52 33 0d 10  2c 0f 4d 4f 56 20 52 30  | R1,R3..,.MOV R0|
000028b0  2c 23 31 31 32 0d 10 36  11 53 57 49 20 22 4f 53  |,#112..6.SWI "OS|
000028c0  5f 42 79 74 65 22 0d 10  40 0d 4c 44 52 20 52 30  |_Byte"..@.LDR R0|
000028d0  2c 61 67 0d 10 4a 10 41  44 44 20 52 30 2c 52 30  |,ag..J.ADD R0,R0|
000028e0  2c 23 31 0d 10 54 0d 53  54 52 20 52 30 2c 61 67  |,#1..T.STR R0,ag|
000028f0  0d 10 5e 17 41 44 52 20  52 31 2c 61 77 72 69 74  |..^.ADR R1,awrit|
00002900  65 73 74 72 69 6e 67 0d  10 68 0d 4d 4f 56 20 52  |estring..h.MOV R|
00002910  32 2c 23 38 0d 10 72 1d  53 57 49 20 22 4f 53 5f  |2,#8..r.SWI "OS_|
00002920  43 6f 6e 76 65 72 74 43  61 72 64 69 6e 61 6c 32  |ConvertCardinal2|
00002930  22 0d 10 7c 16 41 44 52  20 52 30 2c 61 72 65 61  |"..|.ADR R0,area|
00002940  64 73 74 72 69 6e 67 0d  10 86 10 53 55 42 20 52  |dstring....SUB R|
00002950  31 2c 52 31 2c 52 30 0d  10 90 13 53 57 49 20 22  |1,R1,R0....SWI "|
00002960  4f 53 5f 57 72 69 74 65  4e 22 0d 10 9a 05 5d 0d  |OS_WriteN"....].|
00002970  10 a4 0d e7 20 72 6e 64  62 25 20 8c 0d 10 ae 0e  |.... rndb% .....|
00002980  5b 4f 50 54 20 70 61 73  73 25 0d 10 b8 1f 4c 44  |[OPT pass%....LD|
00002990  52 20 52 30 2c 61 72 6e  64 62 75 66 25 3a 4d 4f  |R R0,arndbuf%:MO|
000029a0  56 20 52 31 2c 23 31 32  38 0d 10 c2 2b 4d 56 4e  |V R1,#128...+MVN|
000029b0  20 52 32 2c 23 30 3a 4d  4f 56 20 52 33 2c 52 32  | R2,#0:MOV R3,R2|
000029c0  3a 4d 4f 56 20 52 34 2c  52 32 3a 4d 4f 56 20 52  |:MOV R4,R2:MOV R|
000029d0  35 2c 52 32 0d 10 cc 2b  4d 4f 56 20 52 36 2c 52  |5,R2...+MOV R6,R|
000029e0  32 3a 4d 4f 56 20 52 37  2c 52 32 3a 4d 4f 56 20  |2:MOV R7,R2:MOV |
000029f0  52 38 2c 52 32 3a 4d 4f  56 20 52 39 2c 52 32 0d  |R8,R2:MOV R9,R2.|
00002a00  10 d6 0e 2e 72 65 73 72  6e 64 62 75 66 0d 10 e0  |....resrndbuf...|
00002a10  27 53 54 4d 49 41 20 52  30 21 2c 7b 52 32 2d 52  |'STMIA R0!,{R2-R|
00002a20  39 7d 3a 53 54 4d 49 41  20 52 30 21 2c 7b 52 32  |9}:STMIA R0!,{R2|
00002a30  2d 52 39 7d 0d 10 ea 27  53 54 4d 49 41 20 52 30  |-R9}...'STMIA R0|
00002a40  21 2c 7b 52 32 2d 52 39  7d 3a 53 54 4d 49 41 20  |!,{R2-R9}:STMIA |
00002a50  52 30 21 2c 7b 52 32 2d  52 39 7d 0d 10 f4 27 53  |R0!,{R2-R9}...'S|
00002a60  54 4d 49 41 20 52 30 21  2c 7b 52 32 2d 52 39 7d  |TMIA R0!,{R2-R9}|
00002a70  3a 53 54 4d 49 41 20 52  30 21 2c 7b 52 32 2d 52  |:STMIA R0!,{R2-R|
00002a80  39 7d 0d 10 fe 27 53 54  4d 49 41 20 52 30 21 2c  |9}...'STMIA R0!,|
00002a90  7b 52 32 2d 52 39 7d 3a  53 54 4d 49 41 20 52 30  |{R2-R9}:STMIA R0|
00002aa0  21 2c 7b 52 32 2d 52 39  7d 0d 11 08 1f 53 55 42  |!,{R2-R9}....SUB|
00002ab0  53 20 52 31 2c 52 31 2c  23 31 3a 42 4e 45 20 72  |S R1,R1,#1:BNE r|
00002ac0  65 73 72 6e 64 62 75 66  0d 11 12 05 5d 0d 11 1c  |esrndbuf....]...|
00002ad0  05 cd 0d 11 26 0e 5b 4f  50 54 20 70 61 73 73 25  |....&.[OPT pass%|
00002ae0  0d 11 30 14 4c 44 52 20  61 64 64 72 73 63 31 2c  |..0.LDR addrsc1,|
00002af0  61 73 63 32 0d 11 3a 14  4c 44 52 20 61 64 64 72  |asc2..:.LDR addr|
00002b00  73 63 32 2c 61 73 63 31  0d 11 44 14 53 54 52 20  |sc2,asc1..D.STR |
00002b10  61 64 64 72 73 63 31 2c  61 73 63 31 0d 11 4e 14  |addrsc1,asc1..N.|
00002b20  53 54 52 20 61 64 64 72  73 63 32 2c 61 73 63 32  |STR addrsc2,asc2|
00002b30  0d 11 58 10 4d 4f 56 20  61 64 64 72 6f 2c 23 30  |..X.MOV addro,#0|
00002b40  0d 11 62 13 4d 4f 56 20  72 6f 77 2c 23 73 75 79  |..b.MOV row,#suy|
00002b50  25 2d 31 0d 11 6c 09 2e  6e 72 6f 77 0d 11 76 13  |%-1..l..nrow..v.|
00002b60  4d 4f 56 20 63 6f 6c 2c  23 73 75 78 25 2d 31 0d  |MOV col,#sux%-1.|
00002b70  11 80 09 2e 6e 63 6f 6c  0d 11 8a 1d 4c 44 52 42  |....ncol....LDRB|
00002b80  20 43 45 4c 4c 2c 5b 61  64 64 72 73 63 31 2c 61  | CELL,[addrsc1,a|
00002b90  64 64 72 6f 5d 0d 11 94  2f 53 54 4d 46 44 20 28  |ddro].../STMFD (|
00002ba0  73 70 29 21 2c 7b 61 64  64 72 6f 2c 61 64 64 72  |sp)!,{addro,addr|
00002bb0  73 63 31 2c 61 64 64 72  73 63 32 2c 63 6f 6c 2c  |sc1,addrsc2,col,|
00002bc0  72 6f 77 7d 0d 11 9e 05  5d 0d 11 a8 0d e7 20 72  |row}....]..... r|
00002bd0  6e 64 62 25 20 8c 0d 11  b2 0e 5b 4f 50 54 20 70  |ndb% .....[OPT p|
00002be0  61 73 73 25 0d 11 bc 1d  4c 44 52 20 74 65 6d 70  |ass%....LDR temp|
00002bf0  31 2c 61 67 3a 54 53 54  20 74 65 6d 70 31 2c 23  |1,ag:TST temp1,#|
00002c00  31 0d 11 c6 23 53 55 42  4e 45 20 74 65 6d 70 31  |1...#SUBNE temp1|
00002c10  2c 72 6f 77 2c 23 31 3a  ec 51 20 74 65 6d 70 31  |,row,#1:.Q temp1|
00002c20  2c 72 6f 77 0d 11 d0 23  53 55 42 4e 45 20 74 65  |,row...#SUBNE te|
00002c30  6d 70 32 2c 63 6f 6c 2c  23 31 3a ec 51 20 74 65  |mp2,col,#1:.Q te|
00002c40  6d 70 32 2c 63 6f 6c 0d  11 da 28 43 4d 50 20 74  |mp2,col...(CMP t|
00002c50  65 6d 70 31 2c 23 30 3a  41 44 44 4c 54 20 74 65  |emp1,#0:ADDLT te|
00002c60  6d 70 31 2c 74 65 6d 70  31 2c 23 73 75 79 25 0d  |mp1,temp1,#suy%.|
00002c70  11 e4 28 43 4d 50 20 74  65 6d 70 32 2c 23 30 3a  |..(CMP temp2,#0:|
00002c80  41 44 44 4c 54 20 74 65  6d 70 32 2c 74 65 6d 70  |ADDLT temp2,temp|
00002c90  32 2c 23 73 75 78 25 0d  11 ee 16 80 20 74 65 6d  |2,#sux%..... tem|
00002ca0  70 31 2c 74 65 6d 70 31  2c 23 32 35 34 0d 11 f8  |p1,temp1,#254...|
00002cb0  16 80 20 74 65 6d 70 32  2c 74 65 6d 70 32 2c 23  |.. temp2,temp2,#|
00002cc0  32 35 34 0d 12 02 20 41  44 44 20 74 65 6d 70 31  |254... ADD temp1|
00002cd0  2c 74 65 6d 70 32 2c 74  65 6d 70 31 2c 41 53 4c  |,temp2,temp1,ASL|
00002ce0  20 23 37 0d 12 0c 2c 4c  44 52 20 74 65 6d 70 32  | #7...,LDR temp2|
00002cf0  2c 61 72 6e 64 62 75 66  25 3a 41 44 44 20 74 65  |,arndbuf%:ADD te|
00002d00  6d 70 31 2c 74 65 6d 70  32 2c 74 65 6d 70 31 0d  |mp1,temp2,temp1.|
00002d10  12 16 12 53 54 52 20 74  65 6d 70 31 2c 61 72 6e  |...STR temp1,arn|
00002d20  64 0d 12 20 05 5d 0d 12  2a 05 cd 0d 12 34 26 f2  |d.. .]..*....4&.|
00002d30  63 6f 6d 70 69 6c 65 28  63 6f 6d 61 31 25 2c 63  |compile(coma1%,c|
00002d40  6f 6d 61 32 25 2c 22 22  2c 30 2c 73 74 25 28 29  |oma2%,"",0,st%()|
00002d50  29 0d 12 3e 39 e7 20 28  28 50 25 21 2d 34 29 80  |)..>9. ((P%!-4).|
00002d60  26 46 46 46 46 46 46 46  29 3d 26 41 46 46 46 46  |&FFFFFFF)=&AFFFF|
00002d70  46 46 20 50 25 21 2d 34  3d 50 25 21 2d 34 20 84  |FF P%!-4=P%!-4 .|
00002d80  20 26 46 30 30 30 30 30  30 30 0d 12 48 0e 5b 4f  | &F0000000..H.[O|
00002d90  50 54 20 70 61 73 73 25  0d 12 52 14 2e 63 6f 6d  |PT pass%..R..com|
00002da0  70 69 6c 61 74 69 6f 6e  64 6f 6e 65 0d 12 5c 2f  |pilationdone..\/|
00002db0  4c 44 4d 46 44 20 28 73  70 29 21 2c 7b 61 64 64  |LDMFD (sp)!,{add|
00002dc0  72 6f 2c 61 64 64 72 73  63 31 2c 61 64 64 72 73  |ro,addrsc1,addrs|
00002dd0  63 32 2c 63 6f 6c 2c 72  6f 77 7d 0d 12 66 1e 53  |c2,col,row}..f.S|
00002de0  54 52 42 20 74 65 6d 70  31 2c 5b 61 64 64 72 73  |TRB temp1,[addrs|
00002df0  63 32 2c 61 64 64 72 6f  5d 0d 12 70 16 53 55 42  |c2,addro]..p.SUB|
00002e00  20 61 64 64 72 6f 2c 61  64 64 72 6f 2c 23 31 0d  | addro,addro,#1.|
00002e10  12 7a 13 53 55 42 53 20  63 6f 6c 2c 63 6f 6c 2c  |.z.SUBS col,col,|
00002e20  23 31 0d 12 84 0c 42 50  4c 20 6e 63 6f 6c 0d 12  |#1....BPL ncol..|
00002e30  8e 18 53 55 42 20 61 64  64 72 6f 2c 61 64 64 72  |..SUB addro,addr|
00002e40  6f 2c 23 33 32 30 0d 12  98 19 41 44 44 20 61 64  |o,#320....ADD ad|
00002e50  64 72 6f 2c 61 64 64 72  6f 2c 23 73 75 78 25 0d  |dro,addro,#sux%.|
00002e60  12 a2 13 53 55 42 53 20  72 6f 77 2c 72 6f 77 2c  |...SUBS row,row,|
00002e70  23 31 0d 12 ac 0c 42 50  4c 20 6e 72 6f 77 0d 12  |#1....BPL nrow..|
00002e80  b6 14 4c 44 4d 46 44 20  28 73 70 29 21 2c 7b 70  |..LDMFD (sp)!,{p|
00002e90  63 7d 0d 12 c0 05 5d 0d  12 ca 05 ed 0d 12 d4 05  |c}....].........|
00002ea0  e1 0d 12 de 05 3a 0d 12  e8 10 dd 20 f2 69 6e 70  |.....:..... .inp|
00002eb0  75 74 73 69 7a 65 0d 12  f2 08 ea 20 6d 24 0d 12  |utsize..... m$..|
00002ec0  fc 24 f1 22 77 69 64 74  68 20 20 28 31 2d 32 35  |.$."width  (1-25|
00002ed0  36 29 20 7b 22 3b 77 24  3b 22 7d 20 22 3b 3a e8  |6) {";w$;"} ";:.|
00002ee0  6d 24 0d 13 06 1d e7 20  bb 6d 24 3e 3d 31 20 80  |m$..... .m$>=1 .|
00002ef0  20 bb 6d 24 3c 3d 32 35  36 20 77 24 3d 6d 24 0d  | .m$<=256 w$=m$.|
00002f00  13 10 15 73 75 78 25 3d  bb 77 24 3a 77 24 3d c3  |...sux%=.w$:w$=.|
00002f10  73 75 78 25 0d 13 1a 24  f1 22 68 65 69 67 68 74  |sux%...$."height|
00002f20  20 28 31 2d 32 35 36 29  20 7b 22 3b 68 24 3b 22  | (1-256) {";h$;"|
00002f30  7d 20 22 3b 3a e8 6d 24  0d 13 24 1d e7 20 bb 6d  |} ";:.m$..$.. .m|
00002f40  24 3e 3d 31 20 80 20 bb  6d 24 3c 3d 32 35 36 20  |$>=1 . .m$<=256 |
00002f50  68 24 3d 6d 24 0d 13 2e  15 73 75 79 25 3d bb 68  |h$=m$....suy%=.h|
00002f60  24 3a 68 24 3d c3 73 75  79 25 0d 13 38 2d 73 63  |$:h$=.suy%..8-sc|
00002f70  31 3d 73 63 72 73 74 2b  33 32 30 2a 28 31 32 38  |1=scrst+320*(128|
00002f80  2b 73 75 79 25 81 32 29  2b 28 73 75 78 25 2b 31  |+suy%.2)+(sux%+1|
00002f90  29 81 32 2d 31 39 32 0d  13 42 12 73 63 32 3d 73  |).2-192..B.sc2=s|
00002fa0  63 31 2b 26 31 34 30 30  30 0d 13 4c 1b ff 28 22  |c1+&14000..L..("|
00002fb0  53 65 74 45 76 61 6c 20  73 75 78 20 22 2b c3 73  |SetEval sux "+.s|
00002fc0  75 78 25 29 0d 13 56 1b  ff 28 22 53 65 74 45 76  |ux%)..V..("SetEv|
00002fd0  61 6c 20 73 75 79 20 22  2b c3 73 75 79 25 29 0d  |al suy "+.suy%).|
00002fe0  13 60 05 e1 0d 13 6a 05  3a 0d 13 74 2e dd 20 f2  |.`....j.:..t.. .|
00002ff0  63 6f 6d 70 69 6c 65 28  63 6f 31 25 2c 63 6f 32  |compile(co1%,co2|
00003000  25 2c 63 6b 63 6f 6e 64  61 73 24 2c 6e 73 69 25  |%,ckcondas$,nsi%|
00003010  2c 73 74 25 28 29 29 0d  13 7e 34 ea 20 62 72 69  |,st%())..~4. bri|
00003020  6e 64 65 78 25 2c 66 24  2c 61 24 28 29 2c 6c 61  |ndex%,f$,a$(),la|
00003030  73 74 24 2c 73 25 28 29  2c 6f 70 74 79 70 65 25  |st$,s%(),optype%|
00003040  28 29 2c 6f 70 6e 75 6d  25 28 29 0d 13 88 26 de  |(),opnum%()...&.|
00003050  20 61 24 28 33 29 2c 6f  70 74 79 70 65 25 28 33  | a$(3),optype%(3|
00003060  29 2c 6f 70 6e 75 6d 25  28 33 29 2c 73 25 28 32  |),opnum%(3),s%(2|
00003070  29 0d 13 92 0e 73 25 28  29 3d 73 74 25 28 29 0d  |)....s%()=st%().|
00003080  13 9c 0c f2 67 65 74 6e  65 78 74 0d 13 a6 0c f2  |....getnext.....|
00003090  67 65 74 6e 65 78 74 0d  13 b0 0c f2 67 65 74 6e  |getnext.....getn|
000030a0  65 78 74 0d 13 ba 15 e7  20 63 6b 63 6f 6e 64 61  |ext..... ckconda|
000030b0  73 24 3c 3e 22 22 20 8c  0d 13 c4 33 e7 20 6f 70  |s$<>"" ....3. op|
000030c0  74 79 70 65 25 28 30 29  3c 2d 31 20 80 20 61 24  |type%(0)<-1 . a$|
000030d0  28 31 29 3d 22 3d 3d 22  20 80 20 63 6b 63 6f 6e  |(1)="==" . ckcon|
000030e0  64 61 73 24 3c 3e 22 23  22 20 8c 0d 13 ce 39 5b  |das$<>"#" ....9[|
000030f0  4f 50 54 20 70 61 73 73  25 3a a4 6d 6f 76 28 74  |OPT pass%:.mov(t|
00003100  65 6d 70 31 2c 6f 70 6e  75 6d 25 28 30 29 2c 6f  |emp1,opnum%(0),o|
00003110  70 74 79 70 65 25 28 30  29 2c 63 6b 63 6f 6e 64  |ptype%(0),ckcond|
00003120  61 73 24 29 0d 13 d8 23  a4 62 28 63 6f 6d 70 69  |as$)...#.b(compi|
00003130  6c 61 74 69 6f 6e 64 6f  6e 65 2c 63 6b 63 6f 6e  |lationdone,ckcon|
00003140  64 61 73 24 29 3a 5d 0d  13 e2 14 62 72 25 28 6a  |das$):]....br%(j|
00003150  25 29 3d 2d 31 3a 6a 25  2b 3d 31 0d 13 ec 05 e1  |%)=-1:j%+=1.....|
00003160  0d 13 f6 05 cc 0d 14 00  30 64 75 6d 6d 79 25 3d  |........0dummy%=|
00003170  a4 62 28 62 72 25 28 6a  25 29 2c a4 6e 6f 74 63  |.b(br%(j%),.notc|
00003180  6f 6e 64 28 63 6b 63 6f  6e 64 61 73 24 29 29 3a  |ond(ckcondas$)):|
00003190  6a 25 2b 3d 31 0d 14 0a  05 cd 0d 14 14 05 cd 0d  |j%+=1...........|
000031a0  14 1e 13 c8 95 20 61 24  28 30 29 3c 3e 22 45 4e  |..... a$(0)<>"EN|
000031b0  44 22 0d 14 28 0a c8 8e  20 b9 20 ca 0d 14 32 33  |D"..(... . ...23|
000031c0  c9 20 6f 70 74 79 70 65  25 28 30 29 3c 2d 31 20  |. optype%(0)<-1 |
000031d0  80 20 6f 70 74 79 70 65  25 28 31 29 3c 2d 31 20  |. optype%(1)<-1 |
000031e0  80 20 6f 70 74 79 70 65  25 28 32 29 3c 2d 31 0d  |. optype%(2)<-1.|
000031f0  14 3c 1f f2 70 75 73 68  28 6f 70 6e 75 6d 25 28  |.<..push(opnum%(|
00003200  30 29 2c 6f 70 74 79 70  65 25 28 30 29 29 0d 14  |0),optype%(0))..|
00003210  46 0c f2 67 65 74 6e 65  78 74 0d 14 50 13 c9 20  |F..getnext..P.. |
00003220  6f 70 74 79 70 65 25 28  30 29 3e 3d 30 0d 14 5a  |optype%(0)>=0..Z|
00003230  35 e7 20 6e 73 69 25 3e  73 6d 78 25 28 6f 70 74  |5. nsi%>smx%(opt|
00003240  79 70 65 25 28 30 29 29  20 85 20 32 35 35 2c 22  |ype%(0)) . 255,"|
00003250  43 41 20 53 74 61 63 6b  20 4f 76 65 72 46 6c 6f  |CA Stack OverFlo|
00003260  77 22 0d 14 64 41 e7 20  6e 73 69 25 3c 73 6d 6e  |w"..dA. nsi%<smn|
00003270  25 28 6f 70 74 79 70 65  25 28 30 29 29 20 85 20  |%(optype%(0)) . |
00003280  32 35 35 2c 22 49 6e 73  75 66 66 69 63 69 65 6e  |255,"Insufficien|
00003290  74 20 64 61 74 61 20 6f  6e 20 43 41 20 53 74 61  |t data on CA Sta|
000032a0  63 6b 22 0d 14 6e 13 c8  8e 20 6f 70 74 79 70 65  |ck"..n... optype|
000032b0  25 28 30 29 20 ca 0d 14  78 30 c9 20 30 3a 66 24  |%(0) ...x0. 0:f$|
000032c0  3d 22 28 22 2b c3 73 25  28 30 29 2b 22 2c 2d 32  |="("+.s%(0)+",-2|
000032d0  2c 61 24 28 30 29 2c 6c  61 73 74 24 2c 30 29 22  |,a$(0),last$,0)"|
000032e0  3a f2 70 75 6c 6c 0d 14  82 17 c9 20 31 3a f2 70  |:.pull..... 1:.p|
000032f0  75 73 68 28 73 25 28 30  29 2c 2d 32 29 0d 14 8c  |ush(s%(0),-2)...|
00003300  36 c9 20 32 3a 66 24 3d  22 28 22 2b c3 73 25 28  |6. 2:f$="("+.s%(|
00003310  31 29 2b 22 2c 2d 32 2c  22 2b c3 73 25 28 30 29  |1)+",-2,"+.s%(0)|
00003320  2b 22 2c 2d 32 2c 61 24  28 30 29 2c 61 24 28 31  |+",-2,a$(0),a$(1|
00003330  29 29 22 0d 14 96 0f f2  70 75 6c 6c 3a f2 70 75  |))".....pull:.pu|
00003340  6c 6c 0d 14 a0 16 c9 20  33 2c 34 3a 66 24 3d 22  |ll..... 3,4:f$="|
00003350  28 61 24 28 30 29 29 22  0d 14 aa 0c c9 20 35 3a  |(a$(0))"..... 5:|
00003360  f2 72 6f 74 0d 14 b4 0d  c9 20 36 3a f2 73 77 61  |.rot..... 6:.swa|
00003370  70 0d 14 be 05 cb 0d 14  c8 3a e7 20 a7 22 30 32  |p........:. ."02|
00003380  33 34 22 2c c3 6f 70 74  79 70 65 25 28 30 29 29  |34",.optype%(0))|
00003390  20 64 75 6d 6d 79 25 3d  a0 28 22 46 4e 6f 70 22  | dummy%=.("FNop"|
000033a0  2b c3 6f 70 74 79 70 65  25 28 30 29 2b 66 24 29  |+.optype%(0)+f$)|
000033b0  0d 14 d2 0c f2 67 65 74  6e 65 78 74 0d 14 dc 13  |.....getnext....|
000033c0  c9 20 6f 70 74 79 70 65  25 28 31 29 3e 3d 30 0d  |. optype%(1)>=0.|
000033d0  14 e6 37 e7 20 6e 73 69  25 2b 31 3e 73 6d 78 25  |..7. nsi%+1>smx%|
000033e0  28 6f 70 74 79 70 65 25  28 31 29 29 20 85 20 32  |(optype%(1)) . 2|
000033f0  35 35 2c 22 43 41 20 53  74 61 63 6b 20 4f 76 65  |55,"CA Stack Ove|
00003400  72 46 6c 6f 77 22 0d 14  f0 43 e7 20 6e 73 69 25  |rFlow"...C. nsi%|
00003410  2b 31 3c 73 6d 6e 25 28  6f 70 74 79 70 65 25 28  |+1<smn%(optype%(|
00003420  31 29 29 20 85 20 32 35  35 2c 22 49 6e 73 75 66  |1)) . 255,"Insuf|
00003430  66 69 63 69 65 6e 74 20  64 61 74 61 20 6f 6e 20  |ficient data on |
00003440  43 41 20 53 74 61 63 6b  22 0d 14 fa 13 c8 8e 20  |CA Stack"...... |
00003450  6f 70 74 79 70 65 25 28  31 29 20 ca 0d 15 04 07  |optype%(1) .....|
00003460  c9 20 30 0d 15 0e 22 e7  20 a7 61 24 28 31 29 2c  |. 0...". .a$(1),|
00003470  22 53 43 22 29 20 84 20  61 24 28 31 29 3d 22 4e  |"SC") . a$(1)="N|
00003480  4f 54 22 20 8c 0d 15 18  2d 66 24 3d 22 28 6f 70  |OT" ....-f$="(op|
00003490  6e 75 6d 25 28 30 29 2c  6f 70 74 79 70 65 25 28  |num%(0),optype%(|
000034a0  30 29 2c 61 24 28 31 29  2c 61 24 28 30 29 2c 31  |0),a$(1),a$(0),1|
000034b0  29 22 0d 15 22 2c cc 20  66 24 3d 22 28 22 2b a4  |)"..",. f$="("+.|
000034c0  65 6e 73 75 72 65 72 65  67 28 30 29 2b 22 2c 61  |ensurereg(0)+",a|
000034d0  24 28 31 29 2c 61 24 28  30 29 2c 31 29 22 0d 15  |$(1),a$(0),1)"..|
000034e0  2c 05 cd 0d 15 36 18 64  75 6d 6d 79 25 3d a0 28  |,....6.dummy%=.(|
000034f0  22 46 4e 6f 70 30 22 2b  66 24 29 0d 15 40 3f c9  |"FNop0"+f$)..@?.|
00003500  20 31 3a f2 70 75 73 68  28 6f 70 6e 75 6d 25 28  | 1:.push(opnum%(|
00003510  30 29 2c 6f 70 74 79 70  65 25 28 30 29 29 3a f2  |0),optype%(0)):.|
00003520  70 75 73 68 28 6f 70 6e  75 6d 25 28 30 29 2c 6f  |push(opnum%(0),o|
00003530  70 74 79 70 65 25 28 30  29 29 0d 15 4a 07 c9 20  |ptype%(0))..J.. |
00003540  32 0d 15 54 3c e7 20 61  24 28 31 29 3d 22 2a 22  |2..T<. a$(1)="*"|
00003550  20 66 24 3d a4 65 6e 73  75 72 65 72 65 67 28 30  | f$=.ensurereg(0|
00003560  29 20 8b 20 66 24 3d 22  6f 70 6e 75 6d 25 28 30  |) . f$="opnum%(0|
00003570  29 2c 6f 70 74 79 70 65  25 28 30 29 22 0d 15 5e  |),optype%(0)"..^|
00003580  1d 66 24 3d c3 73 25 28  30 29 2b 22 2c 2d 32 2c  |.f$=.s%(0)+",-2,|
00003590  22 2b 66 24 3a f2 70 75  6c 6c 0d 15 68 29 64 75  |"+f$:.pull..h)du|
000035a0  6d 6d 79 25 3d a0 28 22  46 4e 6f 70 32 28 22 2b  |mmy%=.("FNop2("+|
000035b0  66 24 2b 22 2c 61 24 28  31 29 2c 61 24 28 32 29  |f$+",a$(1),a$(2)|
000035c0  29 22 29 0d 15 72 25 c9  20 33 2c 34 3a f2 70 75  |)")..r%. 3,4:.pu|
000035d0  73 68 28 6f 70 6e 75 6d  25 28 30 29 2c 6f 70 74  |sh(opnum%(0),opt|
000035e0  79 70 65 25 28 30 29 29  0d 15 7c 2a 64 75 6d 6d  |ype%(0))..|*dumm|
000035f0  79 25 3d a0 28 22 46 4e  6f 70 22 2b c3 6f 70 74  |y%=.("FNop"+.opt|
00003600  79 70 65 25 28 31 29 2b  22 28 61 24 28 31 29 29  |ype%(1)+"(a$(1))|
00003610  22 29 0d 15 86 28 c9 20  35 3a f2 70 75 73 68 28  |")...(. 5:.push(|
00003620  6f 70 6e 75 6d 25 28 30  29 2c 6f 70 74 79 70 65  |opnum%(0),optype|
00003630  25 28 30 29 29 3a f2 72  6f 74 0d 15 90 29 c9 20  |%(0)):.rot...). |
00003640  36 3a f2 70 75 73 68 28  6f 70 6e 75 6d 25 28 30  |6:.push(opnum%(0|
00003650  29 2c 6f 70 74 79 70 65  25 28 30 29 29 3a f2 73  |),optype%(0)):.s|
00003660  77 61 70 0d 15 9a 05 cb  0d 15 a4 15 f2 67 65 74  |wap..........get|
00003670  6e 65 78 74 3a f2 67 65  74 6e 65 78 74 0d 15 ae  |next:.getnext...|
00003680  05 7f 0d 15 b8 37 e7 20  6e 73 69 25 2b 32 3e 73  |.....7. nsi%+2>s|
00003690  6d 78 25 28 6f 70 74 79  70 65 25 28 32 29 29 20  |mx%(optype%(2)) |
000036a0  85 20 32 35 35 2c 22 43  41 20 53 74 61 63 6b 20  |. 255,"CA Stack |
000036b0  4f 76 65 72 46 6c 6f 77  22 0d 15 c2 43 e7 20 6e  |OverFlow"...C. n|
000036c0  73 69 25 2b 32 3c 73 6d  6e 25 28 6f 70 74 79 70  |si%+2<smn%(optyp|
000036d0  65 25 28 32 29 29 20 85  20 32 35 35 2c 22 49 6e  |e%(2)) . 255,"In|
000036e0  73 75 66 66 69 63 69 65  6e 74 20 64 61 74 61 20  |sufficient data |
000036f0  6f 6e 20 43 41 20 53 74  61 63 6b 22 0d 15 cc 13  |on CA Stack"....|
00003700  c8 8e 20 6f 70 74 79 70  65 25 28 32 29 20 ca 0d  |.. optype%(2) ..|
00003710  15 d6 18 c9 20 32 3a f2  67 65 74 6e 64 65 63 6f  |.... 2:.getndeco|
00003720  64 65 28 33 2c a3 29 0d  15 e0 0a c8 8e 20 b9 20  |de(3,.)...... . |
00003730  ca 0d 15 ea 13 c9 20 6f  70 74 79 70 65 25 28 31  |...... optype%(1|
00003740  29 3d 2d 33 0d 15 f4 23  e7 20 6f 70 74 79 70 65  |)=-3...#. optype|
00003750  25 28 30 29 3d 2d 33 20  84 20 61 24 28 32 29 3d  |%(0)=-3 . a$(2)=|
00003760  22 44 49 56 22 20 8c 0d  15 fe 28 f2 70 75 73 68  |"DIV" ....(.push|
00003770  28 6f 70 6e 75 6d 25 28  30 29 2c 2d 33 29 3a 66  |(opnum%(0),-3):f|
00003780  24 3d c3 73 25 28 30 29  2b 22 2c 2d 32 2c 22 0d  |$=.s%(0)+",-2,".|
00003790  16 08 05 cc 0d 16 12 16  66 24 3d 22 6f 70 6e 75  |........f$="opnu|
000037a0  6d 25 28 30 29 2c 2d 32  2c 22 0d 16 1c 05 cd 0d  |m%(0),-2,"......|
000037b0  16 26 3e e7 20 61 24 28  32 29 3d 22 2a 22 20 66  |.&>. a$(2)="*" f|
000037c0  24 2b 3d a4 65 6e 73 75  72 65 72 65 67 28 31 29  |$+=.ensurereg(1)|
000037d0  20 8b 20 66 24 2b 3d 22  6f 70 6e 75 6d 25 28 31  | . f$+="opnum%(1|
000037e0  29 2c 6f 70 74 79 70 65  25 28 31 29 22 0d 16 30  |),optype%(1)"..0|
000037f0  27 e7 20 6f 70 74 79 70  65 25 28 30 29 3d 2d 33  |'. optype%(0)=-3|
00003800  20 84 20 61 24 28 32 29  3d 22 44 49 56 22 20 f2  | . a$(2)="DIV" .|
00003810  70 75 6c 6c 0d 16 3a 29  64 75 6d 6d 79 25 3d a0  |pull..:)dummy%=.|
00003820  28 22 46 4e 6f 70 32 28  22 2b 66 24 2b 22 2c 61  |("FNop2("+f$+",a|
00003830  24 28 32 29 2c 61 24 28  33 29 29 22 29 0d 16 44  |$(2),a$(3))")..D|
00003840  13 c9 20 6f 70 74 79 70  65 25 28 30 29 3d 2d 32  |.. optype%(0)=-2|
00003850  0d 16 4e 36 64 75 6d 6d  79 25 3d a4 6f 70 32 28  |..N6dummy%=.op2(|
00003860  6f 70 6e 75 6d 25 28 30  29 2c 2d 32 2c 6f 70 6e  |opnum%(0),-2,opn|
00003870  75 6d 25 28 31 29 2c 2d  32 2c 61 24 28 32 29 2c  |um%(1),-2,a$(2),|
00003880  61 24 28 33 29 29 0d 16  58 13 c9 20 6f 70 74 79  |a$(3))..X.. opty|
00003890  70 65 25 28 30 29 3d 2d  33 0d 16 62 0e c8 8e 20  |pe%(0)=-3..b... |
000038a0  61 24 28 32 29 20 ca 0d  16 6c 25 c9 20 22 2a 22  |a$(2) ...l%. "*"|
000038b0  2c 22 44 49 56 22 2c 22  4d 4f 44 22 2c 22 3c 3c  |,"DIV","MOD","<<|
000038c0  22 2c 22 3e 3e 22 2c 22  3e 3e 3e 22 0d 16 76 41  |",">>",">>>"..vA|
000038d0  64 75 6d 6d 79 25 3d a0  28 22 46 4e 6f 70 32 28  |dummy%=.("FNop2(|
000038e0  22 2b a4 65 6e 73 75 72  65 72 65 67 28 30 29 2b  |"+.ensurereg(0)+|
000038f0  22 2c 6f 70 6e 75 6d 25  28 31 29 2c 2d 32 2c 61  |",opnum%(1),-2,a|
00003900  24 28 32 29 2c 61 24 28  33 29 29 22 29 0d 16 80  |$(2),a$(3))")...|
00003910  05 7f 0d 16 8a 0e c8 8e  20 61 24 28 32 29 20 ca  |........ a$(2) .|
00003920  0d 16 94 13 c9 20 22 2d  22 3a 61 24 28 32 29 3d  |..... "-":a$(2)=|
00003930  22 52 22 0d 16 9e 13 c9  20 22 3c 22 3a 61 24 28  |"R"..... "<":a$(|
00003940  32 29 3d 22 3e 22 0d 16  a8 13 c9 20 22 3e 22 3a  |2)=">"..... ">":|
00003950  61 24 28 32 29 3d 22 3c  22 0d 16 b2 15 c9 20 22  |a$(2)="<"..... "|
00003960  3e 3d 22 3a 61 24 28 32  29 3d 22 3c 3d 22 0d 16  |>=":a$(2)="<="..|
00003970  bc 15 c9 20 22 3c 3d 22  3a 61 24 28 32 29 3d 22  |... "<=":a$(2)="|
00003980  3e 3d 22 0d 16 c6 05 cb  0d 16 d0 36 64 75 6d 6d  |>="........6dumm|
00003990  79 25 3d a4 6f 70 32 28  6f 70 6e 75 6d 25 28 31  |y%=.op2(opnum%(1|
000039a0  29 2c 2d 32 2c 6f 70 6e  75 6d 25 28 30 29 2c 2d  |),-2,opnum%(0),-|
000039b0  33 2c 61 24 28 32 29 2c  61 24 28 33 29 29 0d 16  |3,a$(2),a$(3))..|
000039c0  da 05 cb 0d 16 e4 05 cb  0d 16 ee 1e f2 67 65 74  |.............get|
000039d0  6e 65 78 74 3a f2 67 65  74 6e 65 78 74 3a f2 67  |next:.getnext:.g|
000039e0  65 74 6e 65 78 74 0d 16  f8 05 7f 0d 17 02 28 f2  |etnext........(.|
000039f0  70 75 73 68 28 6f 70 6e  75 6d 25 28 30 29 2c 6f  |push(opnum%(0),o|
00003a00  70 74 79 70 65 25 28 30  29 29 3a f2 67 65 74 6e  |ptype%(0)):.getn|
00003a10  65 78 74 0d 17 0c 05 cb  0d 17 16 05 cb 0d 17 20  |ext............ |
00003a20  05 ce 0d 17 2a 05 e1 0d  17 34 05 3a 0d 17 3e 1a  |....*....4.:..>.|
00003a30  dd 20 f2 67 65 74 6e 65  78 74 20 6c 61 73 74 24  |. .getnext last$|
00003a40  3d 61 24 28 30 29 0d 17  48 0e e3 20 69 25 3d 31  |=a$(0)..H.. i%=1|
00003a50  20 b8 20 32 0d 17 52 13  61 24 28 69 25 2d 31 29  | . 2..R.a$(i%-1)|
00003a60  3d 61 24 28 69 25 29 0d  17 5c 1d 6f 70 74 79 70  |=a$(i%)..\.optyp|
00003a70  65 25 28 69 25 2d 31 29  3d 6f 70 74 79 70 65 25  |e%(i%-1)=optype%|
00003a80  28 69 25 29 0d 17 66 1b  6f 70 6e 75 6d 25 28 69  |(i%)..f.opnum%(i|
00003a90  25 2d 31 29 3d 6f 70 6e  75 6d 25 28 69 25 29 0d  |%-1)=opnum%(i%).|
00003aa0  17 70 05 ed 0d 17 7a 14  f2 67 65 74 6e 64 65 63  |.p....z..getndec|
00003ab0  6f 64 65 28 32 2c b9 29  0d 17 84 05 e1 0d 17 8e  |ode(2,.)........|
00003ac0  05 3a 0d 17 98 1d dd 20  f2 67 65 74 6e 64 65 63  |.:..... .getndec|
00003ad0  6f 64 65 28 69 25 2c 70  63 66 6c 61 67 25 29 0d  |ode(i%,pcflag%).|
00003ae0  17 a2 17 ea 20 61 24 2c  6f 70 74 79 70 65 25 2c  |.... a$,optype%,|
00003af0  6f 70 6e 75 6d 25 0d 17  ac 1d 41 25 3d 63 6f 31  |opnum%....A%=co1|
00003b00  25 3a 42 25 3d 63 6f 32  25 3a d6 20 73 63 61 6e  |%:B%=co2%:. scan|
00003b10  2c 61 24 0d 17 b6 5e e7  20 21 73 63 61 6e 66 3d  |,a$...^. !scanf=|
00003b20  34 30 20 63 6f 6d 31 25  3d 21 73 63 61 6e 61 31  |40 com1%=!scana1|
00003b30  2b 31 3a 63 6f 6d 32 25  3d 21 73 63 61 6e 61 32  |+1:com2%=!scana2|
00003b40  2d 31 3a 61 24 3d c2 22  30 30 30 30 30 30 30 30  |-1:a$=."00000000|
00003b50  22 2b c3 63 6f 6d 31 25  2c 38 29 2b c2 22 30 30  |"+.com1%,8)+."00|
00003b60  30 30 30 30 30 30 22 2b  c3 63 6f 6d 32 25 2c 38  |000000"+.com2%,8|
00003b70  29 0d 17 c0 1c e7 20 70  63 66 6c 61 67 25 20 63  |)..... pcflag% c|
00003b80  6f 31 25 3d 21 73 63 61  6e 61 32 2b 31 0d 17 ca  |o1%=!scana2+1...|
00003b90  17 6f 70 6e 75 6d 25 3d  30 3a 6f 70 74 79 70 65  |.opnum%=0:optype|
00003ba0  25 3d 2d 33 0d 17 d4 13  e7 20 a7 72 65 67 63 6b  |%=-3..... .regck|
00003bb0  24 2c 61 24 29 20 8c 0d  17 de 0e 6f 70 74 79 70  |$,a$) .....optyp|
00003bc0  65 25 3d 2d 32 0d 17 e8  05 cc 0d 17 f2 0e e3 20  |e%=-2.......... |
00003bd0  71 25 3d 30 20 b8 20 36  0d 17 fc 25 e7 20 a7 6f  |q%=0 . 6...%. .o|
00003be0  70 63 6b 24 28 71 25 29  2c 61 24 2b 22 20 22 29  |pck$(q%),a$+" ")|
00003bf0  20 8c 20 6f 70 74 79 70  65 25 3d 71 25 0d 18 06  | . optype%=q%...|
00003c00  05 ed 0d 18 10 05 cd 0d  18 1a 19 e7 20 21 73 63  |............ !sc|
00003c10  61 6e 66 3d 34 30 20 6f  70 74 79 70 65 25 3d 39  |anf=40 optype%=9|
00003c20  0d 18 24 12 e7 20 6f 70  74 79 70 65 25 3c 2d 31  |..$.. optype%<-1|
00003c30  20 8c 0d 18 2e 2c c8 99  20 22 4f 53 5f 47 53 54  | ....,.. "OS_GST|
00003c40  72 61 6e 73 22 2c 61 24  2c 6d 62 6c 6f 63 6b 25  |rans",a$,mblock%|
00003c50  2c 31 30 32 34 20 b8 20  2c 2c 6c 65 6e 25 0d 18  |,1024 . ,,len%..|
00003c60  38 20 6f 70 6e 75 6d 25  3d a0 20 a4 73 74 72 6e  |8 opnum%=. .strn|
00003c70  28 6d 62 6c 6f 63 6b 25  2c 6c 65 6e 25 29 0d 18  |(mblock%,len%)..|
00003c80  42 05 cd 0d 18 4c 33 6f  70 74 79 70 65 25 28 69  |B....L3optype%(i|
00003c90  25 29 3d 6f 70 74 79 70  65 25 3a 6f 70 6e 75 6d  |%)=optype%:opnum|
00003ca0  25 28 69 25 29 3d 6f 70  6e 75 6d 25 3a 61 24 28  |%(i%)=opnum%:a$(|
00003cb0  69 25 29 3d 61 24 0d 18  56 05 e1 0d 18 60 05 3a  |i%)=a$..V....`.:|
00003cc0  0d 18 6a 13 dd 20 a4 73  74 72 6e 28 61 64 25 2c  |..j.. .strn(ad%,|
00003cd0  6c 25 29 0d 18 74 0b ea  20 51 25 2c 53 24 0d 18  |l%)..t.. Q%,S$..|
00003ce0  7e 21 e3 20 51 25 3d 30  20 b8 20 6c 25 2d 31 3a  |~!. Q%=0 . l%-1:|
00003cf0  53 24 2b 3d bd 28 61 64  25 3f 51 25 29 3a ed 0d  |S$+=.(ad%?Q%):..|
00003d00  18 88 07 3d 53 24 0d 18  92 05 3a 0d 18 9c 1d dd  |...=S$....:.....|
00003d10  20 a4 6f 70 30 28 76 31  25 2c 74 31 25 2c 61 24  | .op0(v1%,t1%,a$|
00003d20  2c 6f 24 2c 69 6e 25 29  0d 18 a6 15 ea 20 72 25  |,o$,in%)..... r%|
00003d30  2c 63 6f 6e 64 24 2c 73  24 2c 63 6f 24 0d 18 b0  |,cond$,s$,co$...|
00003d40  0b c8 8e 20 61 24 20 ca  0d 18 ba 0b c9 20 22 4e  |... a$ ...... "N|
00003d50  4f 54 22 0d 18 c4 0a c8  8e 20 b9 20 ca 0d 18 ce  |OT"...... . ....|
00003d60  28 c9 20 74 31 25 3d 2d  32 3a 5b 4f 50 54 20 70  |(. t1%=-2:[OPT p|
00003d70  61 73 73 25 3a 4d 56 4e  53 20 73 25 28 32 29 2c  |ass%:MVNS s%(2),|
00003d80  76 31 25 3a 5d 0d 18 d8  29 c9 20 76 31 25 3e 3d  |v1%:]...). v1%>=|
00003d90  30 3a 5b 4f 50 54 20 70  61 73 73 25 3a 4d 56 4e  |0:[OPT pass%:MVN|
00003da0  53 20 73 25 28 32 29 2c  23 76 31 25 3a 5d 0d 18  |S s%(2),#v1%:]..|
00003db0  e2 27 7f 3a 5b 4f 50 54  20 70 61 73 73 25 3a 4d  |.'.:[OPT pass%:M|
00003dc0  4f 56 53 20 73 25 28 32  29 2c 23 2d 28 76 31 25  |OVS s%(2),#-(v1%|
00003dd0  2b 31 29 3a 5d 0d 18 ec  05 cb 0d 18 f6 11 f2 69  |+1):]..........i|
00003de0  72 6f 74 3a 6e 73 69 25  2b 3d 31 0d 19 00 20 c9  |rot:nsi%+=1... .|
00003df0  20 22 53 43 4f 55 4e 54  5f 4e 45 49 47 22 2c 22  | "SCOUNT_NEIG","|
00003e00  53 43 4f 55 4e 54 5f 41  4c 4c 22 0d 19 0a 1d 5b  |SCOUNT_ALL"....[|
00003e10  4f 50 54 20 70 61 73 73  25 3a 4d 4f 56 20 74 65  |OPT pass%:MOV te|
00003e20  6d 70 31 2c 23 30 3a 5d  0d 19 14 25 e7 20 6e 65  |mp1,#0:]...%. ne|
00003e30  69 67 25 20 6b 31 25 3d  35 3a 6b 32 25 3d 37 20  |ig% k1%=5:k2%=7 |
00003e40  8b 20 6b 31 25 3d 30 3a  6b 32 25 3d 38 0d 19 1e  |. k1%=0:k2%=8...|
00003e50  1d e3 20 72 25 3d 6b 31  25 20 b8 20 6b 32 25 3a  |.. r%=k1% . k2%:|
00003e60  72 25 2d 3d 28 72 25 3d  34 29 0d 19 28 22 5b 4f  |r%-=(r%=4)..("[O|
00003e70  50 54 20 70 61 73 73 25  3a a4 63 6d 70 28 72 25  |PT pass%:.cmp(r%|
00003e80  2c 76 31 25 2c 74 31 25  2c 22 22 29 0d 19 32 1a  |,v1%,t1%,"")..2.|
00003e90  41 44 44 45 51 20 74 65  6d 70 31 2c 74 65 6d 70  |ADDEQ temp1,temp|
00003ea0  31 2c 23 31 3a 5d 0d 19  3c 05 ed 0d 19 46 17 e7  |1,#1:]..<....F..|
00003eb0  20 61 24 3d 22 53 43 4f  55 4e 54 5f 41 4c 4c 22  | a$="SCOUNT_ALL"|
00003ec0  20 8c 0d 19 50 24 5b 4f  50 54 20 70 61 73 73 25  | ...P$[OPT pass%|
00003ed0  3a a4 63 6d 70 28 43 45  4c 4c 2c 76 31 25 2c 74  |:.cmp(CELL,v1%,t|
00003ee0  31 25 2c 22 22 29 0d 19  5a 1a 41 44 44 45 51 20  |1%,"")..Z.ADDEQ |
00003ef0  74 65 6d 70 31 2c 74 65  6d 70 31 2c 23 31 3a 5d  |temp1,temp1,#1:]|
00003f00  0d 19 64 05 cd 0d 19 6e  21 5b 4f 50 54 20 70 61  |..d....n![OPT pa|
00003f10  73 73 25 3a 4d 4f 56 53  20 73 25 28 32 29 2c 74  |ss%:MOVS s%(2),t|
00003f20  65 6d 70 31 3a 5d 0d 19  78 11 f2 69 72 6f 74 3a  |emp1:]..x..irot:|
00003f30  6e 73 69 25 2b 3d 31 0d  19 82 1b c9 20 22 3d 3d  |nsi%+=1..... "==|
00003f40  22 3a f2 67 65 74 6e 64  65 63 6f 64 65 28 33 2c  |":.getndecode(3,|
00003f50  a3 29 0d 19 8c 25 5b 4f  50 54 20 70 61 73 73 25  |.)...%[OPT pass%|
00003f60  3a a4 6d 6f 76 28 74 65  6d 70 31 2c 76 31 25 2c  |:.mov(temp1,v1%,|
00003f70  74 31 25 2c 22 22 29 0d  19 96 17 42 20 63 6f 6d  |t1%,"")....B com|
00003f80  70 69 6c 61 74 69 6f 6e  64 6f 6e 65 3a 5d 0d 19  |pilationdone:]..|
00003f90  a0 0a c9 20 22 49 46 22  0d 19 aa 0a c8 8e 20 b9  |... "IF"...... .|
00003fa0  20 ca 0d 19 b4 2c c9 20  a7 22 54 52 41 53 48 53  | ....,. ."TRASHS|
00003fb0  57 41 50 52 4f 54 52 45  41 44 5f 4e 45 49 47 22  |WAPROTREAD_NEIG"|
00003fc0  2b 72 65 67 63 6b 24 2c  6f 24 29 3c 3e 30 0d 19  |+regck$,o$)<>0..|
00003fd0  be 1b 5b 4f 50 54 20 70  61 73 73 25 3a 43 4d 50  |..[OPT pass%:CMP|
00003fe0  20 76 31 25 2c 23 30 3a  5d 0d 19 c8 0e 63 6f 6e  | v1%,#0:]....con|
00003ff0  64 24 3d 22 3c 3e 22 0d  19 d2 15 c9 20 a7 22 3c  |d$="<>"..... ."<|
00004000  3e 3d 3c 3d 22 2c 6f 24  29 3c 3e 30 0d 19 dc 12  |>=<=",o$)<>0....|
00004010  63 6f 6e 64 24 3d 6f 24  3a f2 69 72 6f 74 0d 19  |cond$=o$:.irot..|
00004020  e6 10 7f 3a 63 6f 6e 64  24 3d 22 3c 3e 22 0d 19  |...:cond$="<>"..|
00004030  f0 05 cb 0d 19 fa 17 f2  67 65 74 6e 65 78 74 3a  |........getnext:|
00004040  73 24 3d 61 24 28 69 6e  25 29 0d 1a 04 3b 62 72  |s$=a$(in%)...;br|
00004050  69 6e 64 65 78 25 3d 6a  25 3a f2 63 6f 6d 70 69  |index%=j%:.compi|
00004060  6c 65 28 a0 20 c0 73 24  2c 38 29 2c a0 20 c2 73  |le(. .s$,8),. .s|
00004070  24 2c 38 29 2c 63 6f 6e  64 24 2c 6e 73 69 25 2c  |$,8),cond$,nsi%,|
00004080  73 25 28 29 29 0d 1a 0e  14 f2 67 65 74 6e 64 65  |s%()).....getnde|
00004090  63 6f 64 65 28 33 2c a3  29 0d 1a 18 19 e7 20 61  |code(3,.)..... a|
000040a0  24 28 69 6e 25 2b 31 29  3c 3e 22 45 4c 53 45 22  |$(in%+1)<>"ELSE"|
000040b0  20 8c 0d 1a 22 14 62 72  25 28 62 72 69 6e 64 65  | ...".br%(brinde|
000040c0  78 25 29 3d 50 25 0d 1a  2c 05 cc 0d 1a 36 15 f2  |x%)=P%..,....6..|
000040d0  67 65 74 6e 65 78 74 3a  f2 67 65 74 6e 65 78 74  |getnext:.getnext|
000040e0  0d 1a 40 0e 73 24 3d 61  24 28 69 6e 25 29 0d 1a  |..@.s$=a$(in%)..|
000040f0  4a 19 e7 20 62 72 25 28  62 72 69 6e 64 65 78 25  |J.. br%(brindex%|
00004100  29 3c 3e 2d 31 20 8c 0d  1a 54 1e 62 72 25 28 62  |)<>-1 ...T.br%(b|
00004110  72 69 6e 64 65 78 25 29  3d 50 25 2b 34 3a 63 6f  |rindex%)=P%+4:co|
00004120  24 3d 22 23 22 0d 1a 5e  19 cc 20 63 6f 24 3d a4  |$="#"..^.. co$=.|
00004130  6e 6f 74 63 6f 6e 64 28  63 6f 6e 64 24 29 0d 1a  |notcond(cond$)..|
00004140  68 05 cd 0d 1a 72 39 62  72 69 6e 64 65 78 25 3d  |h....r9brindex%=|
00004150  6a 25 3a f2 63 6f 6d 70  69 6c 65 28 a0 20 c0 73  |j%:.compile(. .s|
00004160  24 2c 38 29 2c a0 20 c2  73 24 2c 38 29 2c 63 6f  |$,8),. .s$,8),co|
00004170  24 2c 6e 73 69 25 2c 73  25 28 29 29 0d 1a 7c 14  |$,nsi%,s%())..|.|
00004180  62 72 25 28 62 72 69 6e  64 65 78 25 29 3d 50 25  |br%(brindex%)=P%|
00004190  0d 1a 86 05 cd 0d 1a 90  05 cb 0d 1a 9a 06 3d 30  |..............=0|
000041a0  0d 1a a4 05 3a 0d 1a ae  21 dd 20 a4 6f 70 32 28  |....:...!. .op2(|
000041b0  76 31 25 2c 74 31 25 2c  76 32 25 2c 74 32 25 2c  |v1%,t1%,v2%,t2%,|
000041c0  61 24 2c 6e 24 29 0d 1a  b8 08 ea 20 72 25 0d 1a  |a$,n$)..... r%..|
000041d0  c2 0b c8 8e 20 61 24 20  ca 0d 1a cc 09 c9 20 22  |.... a$ ...... "|
000041e0  2a 22 0d 1a d6 1a e7 20  73 25 28 32 29 3d 76 31  |*"..... s%(2)=v1|
000041f0  25 20 c8 94 20 76 31 25  2c 76 32 25 0d 1a e0 23  |% .. v1%,v2%...#|
00004200  5b 4f 50 54 20 70 61 73  73 25 3a 4d 55 4c 53 20  |[OPT pass%:MULS |
00004210  73 25 28 32 29 2c 76 31  25 2c 76 32 25 3a 5d 0d  |s%(2),v1%,v2%:].|
00004220  1a ea 11 f2 69 72 6f 74  3a 6e 73 69 25 2b 3d 31  |....irot:nsi%+=1|
00004230  0d 1a f4 0b c9 20 22 44  49 56 22 0d 1a fe 0e 5b  |..... "DIV"....[|
00004240  4f 50 54 20 70 61 73 73  25 0d 1b 08 10 4d 4f 56  |OPT pass%....MOV|
00004250  20 74 65 6d 70 31 2c 23  30 0d 1b 12 11 4d 4f 56  | temp1,#0....MOV|
00004260  20 74 65 6d 70 32 2c 23  33 32 0d 1b 1c 0d 2e 64  | temp2,#32.....d|
00004270  69 76 6c 6f 6f 70 25 0d  1b 26 1b 4d 4f 56 53 20  |ivloop%..&.MOVS |
00004280  73 25 28 32 29 2c 73 25  28 32 29 2c 41 53 4c 20  |s%(2),s%(2),ASL |
00004290  23 31 0d 1b 30 1b 41 44  43 20 74 65 6d 70 31 2c  |#1..0.ADC temp1,|
000042a0  74 65 6d 70 31 2c 74 65  6d 70 31 3a 5d 0d 1b 3a  |temp1,temp1:]..:|
000042b0  0e e7 20 74 32 25 3d 2d  32 20 8c 0d 1b 44 1c 5b  |.. t2%=-2 ...D.[|
000042c0  4f 50 54 20 70 61 73 73  25 3a 43 4d 50 20 74 65  |OPT pass%:CMP te|
000042d0  6d 70 31 2c 76 32 25 0d  1b 4e 1b 53 55 42 47 45  |mp1,v2%..N.SUBGE|
000042e0  20 74 65 6d 70 31 2c 74  65 6d 70 31 2c 76 32 25  | temp1,temp1,v2%|
000042f0  3a 5d 0d 1b 58 05 cc 0d  1b 62 1f 5b 4f 50 54 20  |:]..X....b.[OPT |
00004300  70 61 73 73 25 3a 43 4d  50 20 74 65 6d 70 31 2c  |pass%:CMP temp1,|
00004310  23 94 20 76 32 25 0d 1b  6c 1e 53 55 42 47 45 20  |#. v2%..l.SUBGE |
00004320  74 65 6d 70 31 2c 74 65  6d 70 31 2c 23 94 20 76  |temp1,temp1,#. v|
00004330  32 25 3a 5d 0d 1b 76 05  cd 0d 1b 80 0e 5b 4f 50  |2%:]..v......[OP|
00004340  54 20 70 61 73 73 25 0d  1b 8a 17 84 52 47 45 20  |T pass%.....RGE |
00004350  73 25 28 32 29 2c 73 25  28 32 29 2c 23 31 0d 1b  |s%(2),s%(2),#1..|
00004360  94 17 53 55 42 53 20 74  65 6d 70 32 2c 74 65 6d  |..SUBS temp2,tem|
00004370  70 32 2c 23 31 0d 1b 9e  10 42 4e 45 20 64 69 76  |p2,#1....BNE div|
00004380  6c 6f 6f 70 25 0d 1b a8  16 4d 4f 56 53 20 73 25  |loop%....MOVS s%|
00004390  28 31 29 2c 74 65 6d 70  31 3a 5d 0d 1b b2 10 f2  |(1),temp1:].....|
000043a0  72 6f 74 3a 6e 73 69 25  2b 3d 32 0d 1b bc 15 c9  |rot:nsi%+=2.....|
000043b0  20 22 3c 3c 22 2c 22 3e  3e 22 2c 22 3e 3e 3e 22  | "<<",">>",">>>"|
000043c0  0d 1b c6 16 e7 20 74 32  25 3d 2d 33 20 80 20 76  |..... t2%=-3 . v|
000043d0  32 25 3c 30 20 8c 0d 1b  d0 0b c8 8e 20 61 24 20  |2%<0 ....... a$ |
000043e0  ca 0d 1b da 12 c9 20 22  3c 3c 22 3a 61 24 3d 22  |...... "<<":a$="|
000043f0  3e 3e 22 0d 1b e4 18 c9  20 22 3e 3e 22 2c 22 3e  |>>"..... ">>",">|
00004400  3e 3e 22 3a 61 24 3d 22  3c 3c 22 0d 1b ee 05 cb  |>>":a$="<<".....|
00004410  0d 1b f8 0c 76 32 25 3d  2d 76 32 25 0d 1c 02 05  |....v2%=-v2%....|
00004420  cd 0d 1c 0c 0b c8 8e 20  61 24 20 ca 0d 1c 16 0a  |....... a$ .....|
00004430  c9 20 22 3c 3c 22 0d 1c  20 0e e7 20 74 32 25 3d  |. "<<".. .. t2%=|
00004440  2d 32 20 8c 0d 1c 2a 27  5b 4f 50 54 20 70 61 73  |-2 ...*'[OPT pas|
00004450  73 25 3a 4d 4f 56 53 20  73 25 28 32 29 2c 76 31  |s%:MOVS s%(2),v1|
00004460  25 2c 4c 53 4c 20 76 32  25 3a 5d 0d 1c 34 2a cc  |%,LSL v2%:]..4*.|
00004470  20 5b 4f 50 54 20 70 61  73 73 25 3a 4d 4f 56 53  | [OPT pass%:MOVS|
00004480  20 73 25 28 32 29 2c 76  31 25 2c 4c 53 4c 20 23  | s%(2),v1%,LSL #|
00004490  76 32 25 3a 5d 0d 1c 3e  05 cd 0d 1c 48 0a c9 20  |v2%:]..>....H.. |
000044a0  22 3e 3e 22 0d 1c 52 0e  e7 20 74 32 25 3d 2d 32  |">>"..R.. t2%=-2|
000044b0  20 8c 0d 1c 5c 27 5b 4f  50 54 20 70 61 73 73 25  | ...\'[OPT pass%|
000044c0  3a 4d 4f 56 53 20 73 25  28 32 29 2c 76 31 25 2c  |:MOVS s%(2),v1%,|
000044d0  4c 53 52 20 76 32 25 3a  5d 0d 1c 66 2a cc 20 5b  |LSR v2%:]..f*. [|
000044e0  4f 50 54 20 70 61 73 73  25 3a 4d 4f 56 53 20 73  |OPT pass%:MOVS s|
000044f0  25 28 32 29 2c 76 31 25  2c 4c 53 52 20 23 76 32  |%(2),v1%,LSR #v2|
00004500  25 3a 5d 0d 1c 70 05 cd  0d 1c 7a 0b c9 20 22 3e  |%:]..p....z.. ">|
00004510  3e 3e 22 0d 1c 84 0e e7  20 74 32 25 3d 2d 32 20  |>>"..... t2%=-2 |
00004520  8c 0d 1c 8e 27 5b 4f 50  54 20 70 61 73 73 25 3a  |....'[OPT pass%:|
00004530  4d 4f 56 53 20 73 25 28  32 29 2c 76 31 25 2c 41  |MOVS s%(2),v1%,A|
00004540  53 52 20 76 32 25 3a 5d  0d 1c 98 2a cc 20 5b 4f  |SR v2%:]...*. [O|
00004550  50 54 20 70 61 73 73 25  3a 4d 4f 56 53 20 73 25  |PT pass%:MOVS s%|
00004560  28 32 29 2c 76 31 25 2c  41 53 52 20 23 76 32 25  |(2),v1%,ASR #v2%|
00004570  3a 5d 0d 1c a2 05 cd 0d  1c ac 05 cb 0d 1c b6 11  |:]..............|
00004580  f2 69 72 6f 74 3a 6e 73  69 25 2b 3d 31 0d 1c c0  |.irot:nsi%+=1...|
00004590  0d c9 20 22 2b 22 2c 22  2d 22 0d 1c ca 34 e7 20  |.. "+","-"...4. |
000045a0  74 32 25 3d 2d 33 20 80  20 76 32 25 3c 30 20 61  |t2%=-3 . v2%<0 a|
000045b0  24 3d c1 22 2b 2d 22 2c  28 61 24 3d 22 2d 22 29  |$=."+-",(a$="-")|
000045c0  2b 32 2c 31 29 3a 76 32  25 3d 2d 76 32 25 0d 1c  |+2,1):v2%=-v2%..|
000045d0  d4 0e e7 20 61 24 3d 22  2b 22 20 8c 0d 1c de 0e  |... a$="+" .....|
000045e0  e7 20 74 32 25 3d 2d 32  20 8c 0d 1c e8 23 5b 4f  |. t2%=-2 ....#[O|
000045f0  50 54 20 70 61 73 73 25  3a 41 44 44 53 20 73 25  |PT pass%:ADDS s%|
00004600  28 32 29 2c 76 31 25 2c  76 32 25 3a 5d 0d 1c f2  |(2),v1%,v2%:]...|
00004610  26 cc 20 5b 4f 50 54 20  70 61 73 73 25 3a 41 44  |&. [OPT pass%:AD|
00004620  44 53 20 73 25 28 32 29  2c 76 31 25 2c 23 76 32  |DS s%(2),v1%,#v2|
00004630  25 3a 5d 0d 1c fc 05 cd  0d 1d 06 05 cc 0d 1d 10  |%:].............|
00004640  0e e7 20 74 32 25 3d 2d  32 20 8c 0d 1d 1a 23 5b  |.. t2%=-2 ....#[|
00004650  4f 50 54 20 70 61 73 73  25 3a 53 55 42 53 20 73  |OPT pass%:SUBS s|
00004660  25 28 32 29 2c 76 31 25  2c 76 32 25 3a 5d 0d 1d  |%(2),v1%,v2%:]..|
00004670  24 26 cc 20 5b 4f 50 54  20 70 61 73 73 25 3a 53  |$&. [OPT pass%:S|
00004680  55 42 53 20 73 25 28 32  29 2c 76 31 25 2c 23 76  |UBS s%(2),v1%,#v|
00004690  32 25 3a 5d 0d 1d 2e 05  cd 0d 1d 38 05 cd 0d 1d  |2%:].......8....|
000046a0  42 11 f2 69 72 6f 74 3a  6e 73 69 25 2b 3d 31 0d  |B..irot:nsi%+=1.|
000046b0  1d 4c 09 c9 20 22 52 22  0d 1d 56 0e e7 20 76 32  |.L.. "R"..V.. v2|
000046c0  25 3e 3d 30 20 8c 0d 1d  60 24 5b 4f 50 54 20 70  |%>=0 ...`$[OPT p|
000046d0  61 73 73 25 3a 52 53 42  53 20 73 25 28 32 29 2c  |ass%:RSBS s%(2),|
000046e0  76 31 25 2c 23 76 32 25  3a 5d 0d 1d 6a 05 cc 0d  |v1%,#v2%:]..j...|
000046f0  1d 74 37 5b 4f 50 54 20  70 61 73 73 25 3a 41 44  |.t7[OPT pass%:AD|
00004700  44 20 73 25 28 32 29 2c  76 31 25 2c 23 2d 76 32  |D s%(2),v1%,#-v2|
00004710  25 3a 52 53 42 20 73 25  28 32 29 2c 73 25 28 32  |%:RSB s%(2),s%(2|
00004720  29 2c 23 30 3a 5d 0d 1d  7e 05 cd 0d 1d 88 11 f2  |),#0:]..~.......|
00004730  69 72 6f 74 3a 6e 73 69  25 2b 3d 31 0d 1d 92 0b  |irot:nsi%+=1....|
00004740  c9 20 22 45 4f 52 22 0d  1d 9c 0e e7 20 74 32 25  |. "EOR"..... t2%|
00004750  3d 2d 32 20 8c 0d 1d a6  21 5b 4f 50 54 20 70 61  |=-2 ....![OPT pa|
00004760  73 73 25 3a 82 53 20 73  25 28 32 29 2c 76 31 25  |ss%:.S s%(2),v1%|
00004770  2c 76 32 25 3a 5d 0d 1d  b0 25 cc 20 5b 4f 50 54  |,v2%:]...%. [OPT|
00004780  20 70 61 73 73 25 3a 82  53 20 20 73 25 28 32 29  | pass%:.S  s%(2)|
00004790  2c 76 31 25 2c 23 76 32  25 3a 5d 0d 1d ba 05 cd  |,v1%,#v2%:].....|
000047a0  0d 1d c4 11 f2 69 72 6f  74 3a 6e 73 69 25 2b 3d  |.....irot:nsi%+=|
000047b0  31 0d 1d ce 0a c9 20 22  4f 52 22 0d 1d d8 0e e7  |1..... "OR".....|
000047c0  20 74 32 25 3d 2d 32 20  8c 0d 1d e2 22 5b 4f 50  | t2%=-2 ...."[OP|
000047d0  54 20 70 61 73 73 25 3a  84 52 53 20 73 25 28 32  |T pass%:.RS s%(2|
000047e0  29 2c 76 31 25 2c 76 32  25 3a 5d 0d 1d ec 26 cc  |),v1%,v2%:]...&.|
000047f0  20 5b 4f 50 54 20 70 61  73 73 25 3a 84 52 53 20  | [OPT pass%:.RS |
00004800  20 73 25 28 32 29 2c 76  31 25 2c 23 76 32 25 3a  | s%(2),v1%,#v2%:|
00004810  5d 0d 1d f6 05 cd 0d 1e  00 11 f2 69 72 6f 74 3a  |]..........irot:|
00004820  6e 73 69 25 2b 3d 31 0d  1e 0a 0b c9 20 22 41 4e  |nsi%+=1..... "AN|
00004830  44 22 0d 1e 14 0e e7 20  74 32 25 3d 2d 32 20 8c  |D"..... t2%=-2 .|
00004840  0d 1e 1e 21 5b 4f 50 54  20 70 61 73 73 25 3a 80  |...![OPT pass%:.|
00004850  53 20 73 25 28 32 29 2c  76 31 25 2c 76 32 25 3a  |S s%(2),v1%,v2%:|
00004860  5d 0d 1e 28 25 cc 20 5b  4f 50 54 20 70 61 73 73  |]..(%. [OPT pass|
00004870  25 3a 80 53 20 20 73 25  28 32 29 2c 76 31 25 2c  |%:.S  s%(2),v1%,|
00004880  23 76 32 25 3a 5d 0d 1e  32 05 cd 0d 1e 3c 11 f2  |#v2%:]..2....<..|
00004890  69 72 6f 74 3a 6e 73 69  25 2b 3d 31 0d 1e 46 20  |irot:nsi%+=1..F |
000048a0  c9 20 22 4d 43 4f 55 4e  54 5f 4e 45 49 47 22 2c  |. "MCOUNT_NEIG",|
000048b0  22 4d 43 4f 55 4e 54 5f  41 4c 4c 22 0d 1e 50 1d  |"MCOUNT_ALL"..P.|
000048c0  5b 4f 50 54 20 70 61 73  73 25 3a 4d 4f 56 20 74  |[OPT pass%:MOV t|
000048d0  65 6d 70 31 2c 23 30 3a  5d 0d 1e 5a 25 e7 20 6e  |emp1,#0:]..Z%. n|
000048e0  65 69 67 25 20 6b 31 25  3d 35 3a 6b 32 25 3d 37  |eig% k1%=5:k2%=7|
000048f0  20 8b 20 6b 31 25 3d 30  3a 6b 32 25 3d 38 0d 1e  | . k1%=0:k2%=8..|
00004900  64 1d e3 20 72 25 3d 6b  31 25 20 b8 20 6b 32 25  |d.. r%=k1% . k2%|
00004910  3a 72 25 2d 3d 28 72 25  3d 34 29 0d 1e 6e 22 5b  |:r%-=(r%=4)..n"[|
00004920  4f 50 54 20 70 61 73 73  25 3a a4 63 6d 70 28 72  |OPT pass%:.cmp(r|
00004930  25 2c 76 31 25 2c 74 31  25 2c 22 22 29 0d 1e 78  |%,v1%,t1%,"")..x|
00004940  2e 53 55 42 4c 54 20 74  65 6d 70 31 2c 74 65 6d  |.SUBLT temp1,tem|
00004950  70 31 2c 23 31 3a a4 63  6d 70 28 72 25 2c 76 32  |p1,#1:.cmp(r%,v2|
00004960  25 2c 74 32 25 2c 22 3e  3d 22 29 0d 1e 82 1a 41  |%,t2%,">=")....A|
00004970  44 44 4c 45 20 74 65 6d  70 31 2c 74 65 6d 70 31  |DDLE temp1,temp1|
00004980  2c 23 31 3a 5d 0d 1e 8c  05 ed 0d 1e 96 17 e7 20  |,#1:].......... |
00004990  61 24 3d 22 4d 43 4f 55  4e 54 5f 41 4c 4c 22 20  |a$="MCOUNT_ALL" |
000049a0  8c 0d 1e a0 24 5b 4f 50  54 20 70 61 73 73 25 3a  |....$[OPT pass%:|
000049b0  a4 63 6d 70 28 43 45 4c  4c 2c 76 31 25 2c 74 31  |.cmp(CELL,v1%,t1|
000049c0  25 2c 22 22 29 0d 1e aa  30 53 55 42 4c 54 20 74  |%,"")...0SUBLT t|
000049d0  65 6d 70 31 2c 74 65 6d  70 31 2c 23 31 3a a4 63  |emp1,temp1,#1:.c|
000049e0  6d 70 28 43 45 4c 4c 2c  76 32 25 2c 74 32 25 2c  |mp(CELL,v2%,t2%,|
000049f0  22 3e 3d 22 29 0d 1e b4  1a 41 44 44 4c 45 20 74  |">=")....ADDLE t|
00004a00  65 6d 70 31 2c 74 65 6d  70 31 2c 23 31 3a 5d 0d  |emp1,temp1,#1:].|
00004a10  1e be 05 cd 0d 1e c8 21  5b 4f 50 54 20 70 61 73  |.......![OPT pas|
00004a20  73 25 3a 4d 4f 56 53 20  73 25 28 32 29 2c 74 65  |s%:MOVS s%(2),te|
00004a30  6d 70 31 3a 5d 0d 1e d2  11 f2 69 72 6f 74 3a 6e  |mp1:].....irot:n|
00004a40  73 69 25 2b 3d 31 0d 1e  dc 20 c9 20 22 3d 22 2c  |si%+=1... . "=",|
00004a50  22 3c 3e 22 2c 22 3c 3d  22 2c 22 3e 3d 22 2c 22  |"<>","<=",">=","|
00004a60  3c 22 2c 22 3e 22 0d 1e  e6 25 5b 4f 50 54 20 70  |<",">"...%[OPT p|
00004a70  61 73 73 25 3a a4 63 6d  70 28 76 31 25 2c 76 32  |ass%:.cmp(v1%,v2|
00004a80  25 2c 74 32 25 2c 22 22  29 3a 5d 0d 1e f0 10 e7  |%,t2%,""):].....|
00004a90  20 6e 24 3c 3e 22 49 46  22 20 8c 0d 1e fa 2c 5b  | n$<>"IF" ....,[|
00004aa0  4f 50 54 20 70 61 73 73  25 3a a4 6d 6f 76 28 73  |OPT pass%:.mov(s|
00004ab0  25 28 32 29 2c 30 2c 2d  33 2c a4 6e 6f 74 63 6f  |%(2),0,-3,.notco|
00004ac0  6e 64 28 61 24 29 29 0d  1f 04 1a a4 6d 6f 76 28  |nd(a$)).....mov(|
00004ad0  73 25 28 32 29 2c 2d 31  2c 2d 33 2c 61 24 29 3a  |s%(2),-1,-3,a$):|
00004ae0  5d 0d 1f 0e 11 f2 69 72  6f 74 3a 6e 73 69 25 2b  |].....irot:nsi%+|
00004af0  3d 31 0d 1f 18 0d cc 20  6e 73 69 25 2b 3d 31 0d  |=1..... nsi%+=1.|
00004b00  1f 22 05 cd 0d 1f 2c 05  cb 0d 1f 36 06 3d 30 0d  |."....,....6.=0.|
00004b10  1f 40 05 3a 0d 1f 4a 0e  dd 20 a4 6f 70 33 28 61  |.@.:..J.. .op3(a|
00004b20  24 29 0d 1f 54 0b c8 8e  20 61 24 20 ca 0d 1f 5e  |$)..T... a$ ...^|
00004b30  23 c9 20 22 32 52 4e 44  22 2c 22 34 52 4e 44 22  |#. "2RND","4RND"|
00004b40  2c 22 38 52 4e 44 22 2c  22 32 35 36 52 4e 44 22  |,"8RND","256RND"|
00004b50  0d 1f 68 11 6b 25 3d aa  28 bb 20 61 24 29 2f aa  |..h.k%=.(. a$)/.|
00004b60  32 0d 1f 72 2f 5b 4f 50  54 20 70 61 73 73 25 3a  |2..r/[OPT pass%:|
00004b70  4c 44 52 20 74 65 6d 70  31 2c 61 78 6f 72 3a 4c  |LDR temp1,axor:L|
00004b80  44 52 20 74 65 6d 70 32  2c 61 73 65 65 64 3a 5d  |DR temp2,aseed:]|
00004b90  0d 1f 7c 0f e3 20 51 25  3d 31 20 b8 20 6b 25 0d  |..|.. Q%=1 . k%.|
00004ba0  1f 86 3e 5b 4f 50 54 20  70 61 73 73 25 3a 4d 4f  |..>[OPT pass%:MO|
00004bb0  56 53 20 74 65 6d 70 32  2c 74 65 6d 70 32 2c 4c  |VS temp2,temp2,L|
00004bc0  53 4c 20 23 31 3a 82 43  43 20 74 65 6d 70 32 2c  |SL #1:.CC temp2,|
00004bd0  74 65 6d 70 32 2c 74 65  6d 70 31 3a 5d 0d 1f 90  |temp2,temp1:]...|
00004be0  05 ed 0d 1f 9a 0e 5b 4f  50 54 20 70 61 73 73 25  |......[OPT pass%|
00004bf0  0d 1f a4 13 53 54 52 20  74 65 6d 70 32 2c 61 73  |....STR temp2,as|
00004c00  65 65 64 0d 1f ae 1b 80  53 20 73 25 28 32 29 2c  |eed.....S s%(2),|
00004c10  74 65 6d 70 32 2c 23 28  bb 61 24 29 2d 31 0d 1f  |temp2,#(.a$)-1..|
00004c20  b8 05 5d 0d 1f c2 11 f2  69 72 6f 74 3a 6e 73 69  |..].....irot:nsi|
00004c30  25 2b 3d 31 0d 1f cc 27  c9 20 22 32 52 4e 44 42  |%+=1...'. "2RNDB|
00004c40  22 2c 22 34 52 4e 44 42  22 2c 22 38 52 4e 44 42  |","4RNDB","8RNDB|
00004c50  22 2c 22 32 35 36 52 4e  44 42 22 0d 1f d6 11 6b  |","256RNDB"....k|
00004c60  25 3d aa 28 bb 20 61 24  29 2f aa 32 0d 1f e0 0e  |%=.(. a$)/.2....|
00004c70  5b 4f 50 54 20 70 61 73  73 25 0d 1f ea 12 4c 44  |[OPT pass%....LD|
00004c80  52 20 74 65 6d 70 31 2c  61 72 6e 64 0d 1f f4 25  |R temp1,arnd...%|
00004c90  4c 44 52 42 20 74 65 6d  70 32 2c 5b 74 65 6d 70  |LDRB temp2,[temp|
00004ca0  31 5d 3a 43 4d 50 20 74  65 6d 70 32 2c 23 26 46  |1]:CMP temp2,#&F|
00004cb0  46 0d 1f fe 2d 4c 44 52  4e 45 42 20 74 65 6d 70  |F...-LDRNEB temp|
00004cc0  32 2c 5b 74 65 6d 70 31  2c 23 31 5d 3a 42 4e 45  |2,[temp1,#1]:BNE|
00004cd0  20 50 25 2b 34 2a 28 37  2b 32 2a 6b 25 29 0d 20  | P%+4*(7+2*k%). |
00004ce0  08 23 4d 4f 56 20 74 65  6d 70 32 2c 23 30 3a 53  |.#MOV temp2,#0:S|
00004cf0  54 52 42 20 74 65 6d 70  32 2c 5b 74 65 6d 70 31  |TRB temp2,[temp1|
00004d00  5d 0d 20 12 24 4c 44 52  20 73 25 28 32 29 2c 61  |]. .$LDR s%(2),a|
00004d10  78 6f 72 3a 4c 44 52 20  74 65 6d 70 32 2c 61 73  |xor:LDR temp2,as|
00004d20  65 65 64 3a 5d 0d 20 1c  0f e3 20 51 25 3d 31 20  |eed:]. ... Q%=1 |
00004d30  b8 20 6b 25 0d 20 26 3e  5b 4f 50 54 20 70 61 73  |. k%. &>[OPT pas|
00004d40  73 25 3a 4d 4f 56 53 20  74 65 6d 70 32 2c 74 65  |s%:MOVS temp2,te|
00004d50  6d 70 32 2c 4c 53 4c 20  23 31 3a 82 43 43 20 74  |mp2,LSL #1:.CC t|
00004d60  65 6d 70 32 2c 74 65 6d  70 32 2c 73 25 28 32 29  |emp2,temp2,s%(2)|
00004d70  3a 5d 0d 20 30 05 ed 0d  20 3a 0e 5b 4f 50 54 20  |:]. 0... :.[OPT |
00004d80  70 61 73 73 25 0d 20 44  13 53 54 52 20 74 65 6d  |pass%. D.STR tem|
00004d90  70 32 2c 61 73 65 65 64  0d 20 4e 19 53 54 52 42  |p2,aseed. N.STRB|
00004da0  20 74 65 6d 70 32 2c 5b  74 65 6d 70 31 2c 23 31  | temp2,[temp1,#1|
00004db0  5d 0d 20 58 1b 80 53 20  73 25 28 32 29 2c 74 65  |]. X..S s%(2),te|
00004dc0  6d 70 32 2c 23 28 bb 61  24 29 2d 31 0d 20 62 05  |mp2,#(.a$)-1. b.|
00004dd0  5d 0d 20 6c 11 f2 69 72  6f 74 3a 6e 73 69 25 2b  |]. l..irot:nsi%+|
00004de0  3d 31 0d 20 76 1a c9 20  22 53 55 4d 5f 4e 45 49  |=1. v.. "SUM_NEI|
00004df0  47 22 2c 22 53 55 4d 5f  41 4c 4c 22 0d 20 80 0d  |G","SUM_ALL". ..|
00004e00  e7 20 6e 65 69 67 25 20  8c 0d 20 8a 0e 5b 4f 50  |. neig% .. ..[OP|
00004e10  54 20 70 61 73 73 25 0d  20 94 29 41 44 44 20 73  |T pass%. .)ADD s|
00004e20  25 28 32 29 2c 4f 50 50  2c 43 57 3a 41 44 44 53  |%(2),OPP,CW:ADDS|
00004e30  20 73 25 28 32 29 2c 73  25 28 32 29 2c 43 43 57  | s%(2),s%(2),CCW|
00004e40  0d 20 9e 05 5d 0d 20 a8  05 cc 0d 20 b2 0e 5b 4f  |. ..]. .... ..[O|
00004e50  50 54 20 70 61 73 73 25  0d 20 bc 26 41 44 44 20  |PT pass%. .&ADD |
00004e60  73 25 28 32 29 2c 54 4c  2c 54 4d 3a 41 44 44 20  |s%(2),TL,TM:ADD |
00004e70  73 25 28 32 29 2c 73 25  28 32 29 2c 54 52 0d 20  |s%(2),s%(2),TR. |
00004e80  c6 29 41 44 44 20 73 25  28 32 29 2c 73 25 28 32  |.)ADD s%(2),s%(2|
00004e90  29 2c 4d 4c 3a 41 44 44  20 73 25 28 32 29 2c 73  |),ML:ADD s%(2),s|
00004ea0  25 28 32 29 2c 4d 52 0d  20 d0 29 41 44 44 20 73  |%(2),MR. .)ADD s|
00004eb0  25 28 32 29 2c 73 25 28  32 29 2c 42 4c 3a 41 44  |%(2),s%(2),BL:AD|
00004ec0  44 20 73 25 28 32 29 2c  73 25 28 32 29 2c 42 4d  |D s%(2),s%(2),BM|
00004ed0  0d 20 da 17 41 44 44 53  20 73 25 28 32 29 2c 73  |. ..ADDS s%(2),s|
00004ee0  25 28 32 29 2c 42 52 0d  20 e4 05 5d 0d 20 ee 05  |%(2),BR. ..]. ..|
00004ef0  cd 0d 20 f8 35 e7 20 61  24 3d 22 53 55 4d 5f 41  |.. .5. a$="SUM_A|
00004f00  4c 4c 22 20 5b 4f 50 54  20 70 61 73 73 25 3a 41  |LL" [OPT pass%:A|
00004f10  44 44 53 20 73 25 28 32  29 2c 73 25 28 32 29 2c  |DDS s%(2),s%(2),|
00004f20  43 45 4c 4c 3a 5d 0d 21  02 11 f2 69 72 6f 74 3a  |CELL:].!...irot:|
00004f30  6e 73 69 25 2b 3d 31 0d  21 0c 05 cb 0d 21 16 06  |nsi%+=1.!....!..|
00004f40  3d 30 0d 21 20 05 3a 0d  21 2a 0e dd 20 a4 6f 70  |=0.! .:.!*.. .op|
00004f50  34 28 61 24 29 0d 21 34  0b c8 8e 20 61 24 20 ca  |4(a$).!4... a$ .|
00004f60  0d 21 3e 11 c9 20 22 52  45 41 44 5f 4e 45 49 47  |.!>.. "READ_NEIG|
00004f70  22 0d 21 48 0e e7 20 20  6e 65 69 67 25 20 8c 0d  |".!H..  neig% ..|
00004f80  21 52 0f e7 20 77 72 61  70 3d 6f 6e 20 8c 0d 21  |!R.. wrap=on ..!|
00004f90  5c 0e 5b 4f 50 54 20 70  61 73 73 25 0d 21 66 1b  |\.[OPT pass%.!f.|
00004fa0  41 44 44 20 74 65 6d 70  31 2c 61 64 64 72 73 63  |ADD temp1,addrsc|
00004fb0  31 2c 61 64 64 72 6f 0d  21 70 27 4c 44 52 20 74  |1,addro.!p'LDR t|
00004fc0  65 6d 70 32 2c 61 67 3a  54 53 54 20 74 65 6d 70  |emp2,ag:TST temp|
00004fd0  32 2c 23 31 3a 42 4e 45  20 6d 61 72 67 31 0d 21  |2,#1:BNE marg1.!|
00004fe0  7a 18 54 53 54 20 72 6f  77 2c 23 31 3a 42 4e 45  |z.TST row,#1:BNE|
00004ff0  20 6d 61 72 67 33 0d 21  84 18 54 53 54 20 63 6f  | marg3.!..TST co|
00005000  6c 2c 23 31 3a 42 4e 45  20 6d 61 72 67 34 0d 21  |l,#1:BNE marg4.!|
00005010  8e 0f 4d 4f 56 20 55 4c  2c 43 45 4c 4c 0d 21 98  |..MOV UL,CELL.!.|
00005020  16 4c 44 52 42 20 55 52  2c 5b 74 65 6d 70 31 2c  |.LDRB UR,[temp1,|
00005030  23 31 5d 0d 21 a2 2d 4c  44 52 42 20 4c 4c 2c 5b  |#1].!.-LDRB LL,[|
00005040  74 65 6d 70 31 2c 23 33  32 30 5d 3a 4c 44 52 42  |temp1,#320]:LDRB|
00005050  20 4c 52 2c 5b 74 65 6d  70 31 2c 23 33 32 31 5d  | LR,[temp1,#321]|
00005060  0d 21 ac 2f 4d 4f 56 20  4f 50 50 2c 4c 52 3a 4d  |.!./MOV OPP,LR:M|
00005070  4f 56 20 43 57 2c 55 52  3a 4d 4f 56 20 43 43 57  |OV CW,UR:MOV CCW|
00005080  2c 4c 4c 3a 4d 4f 56 20  46 4c 41 47 2c 23 30 0d  |,LL:MOV FLAG,#0.|
00005090  21 b6 0b 42 20 6d 61 72  67 32 0d 21 c0 0a 2e 6d  |!..B marg2.!...m|
000050a0  61 72 67 34 0d 21 ca 0f  4d 4f 56 20 55 52 2c 43  |arg4.!..MOV UR,C|
000050b0  45 4c 4c 0d 21 d4 17 4c  44 52 42 20 55 4c 2c 5b  |ELL.!..LDRB UL,[|
000050c0  74 65 6d 70 31 2c 23 2d  31 5d 0d 21 de 2d 4c 44  |temp1,#-1].!.-LD|
000050d0  52 42 20 4c 4c 2c 5b 74  65 6d 70 31 2c 23 33 31  |RB LL,[temp1,#31|
000050e0  39 5d 3a 4c 44 52 42 20  4c 52 2c 5b 74 65 6d 70  |9]:LDRB LR,[temp|
000050f0  31 2c 23 33 32 30 5d 0d  21 e8 25 4d 4f 56 20 4f  |1,#320].!.%MOV O|
00005100  50 50 2c 4c 4c 3a 4d 4f  56 20 43 57 2c 4c 52 3a  |PP,LL:MOV CW,LR:|
00005110  4d 4f 56 20 43 43 57 2c  55 4c 3a 5d 0d 21 f2 43  |MOV CCW,UL:].!.C|
00005120  e7 20 66 6c 61 67 25 80  33 20 8c 20 5b 4f 50 54  |. flag%.3 . [OPT|
00005130  20 70 61 73 73 25 3a 4d  4f 56 20 46 4c 41 47 2c  | pass%:MOV FLAG,|
00005140  23 31 3a 5d 20 8b 20 5b  4f 50 54 20 70 61 73 73  |#1:] . [OPT pass|
00005150  25 3a 4d 4f 56 20 46 4c  41 47 2c 23 30 3a 5d 0d  |%:MOV FLAG,#0:].|
00005160  21 fc 0e 5b 4f 50 54 20  70 61 73 73 25 0d 22 06  |!..[OPT pass%.".|
00005170  0b 42 20 6d 61 72 67 32  0d 22 10 0a 2e 6d 61 72  |.B marg2."...mar|
00005180  67 33 0d 22 1a 18 54 53  54 20 63 6f 6c 2c 23 31  |g3."..TST col,#1|
00005190  3a 42 4e 45 20 6d 61 72  67 35 0d 22 24 0f 4d 4f  |:BNE marg5."$.MO|
000051a0  56 20 4c 4c 2c 43 45 4c  4c 0d 22 2e 16 4c 44 52  |V LL,CELL."..LDR|
000051b0  42 20 4c 52 2c 5b 74 65  6d 70 31 2c 23 31 5d 0d  |B LR,[temp1,#1].|
000051c0  22 38 2f 4c 44 52 42 20  55 4c 2c 5b 74 65 6d 70  |"8/LDRB UL,[temp|
000051d0  31 2c 23 2d 33 32 30 5d  3a 4c 44 52 42 20 55 52  |1,#-320]:LDRB UR|
000051e0  2c 5b 74 65 6d 70 31 2c  23 2d 33 31 39 5d 0d 22  |,[temp1,#-319]."|
000051f0  42 25 4d 4f 56 20 4f 50  50 2c 55 52 3a 4d 4f 56  |B%MOV OPP,UR:MOV|
00005200  20 43 57 2c 55 4c 3a 4d  4f 56 20 43 43 57 2c 4c  | CW,UL:MOV CCW,L|
00005210  52 3a 5d 0d 22 4c 43 e7  20 66 6c 61 67 25 80 33  |R:]."LC. flag%.3|
00005220  20 8c 20 5b 4f 50 54 20  70 61 73 73 25 3a 4d 4f  | . [OPT pass%:MO|
00005230  56 20 46 4c 41 47 2c 23  32 3a 5d 20 8b 20 5b 4f  |V FLAG,#2:] . [O|
00005240  50 54 20 70 61 73 73 25  3a 4d 4f 56 20 46 4c 41  |PT pass%:MOV FLA|
00005250  47 2c 23 30 3a 5d 0d 22  56 0e 5b 4f 50 54 20 70  |G,#0:]."V.[OPT p|
00005260  61 73 73 25 0d 22 60 0b  42 20 6d 61 72 67 32 0d  |ass%."`.B marg2.|
00005270  22 6a 0a 2e 6d 61 72 67  35 0d 22 74 0f 4d 4f 56  |"j..marg5."t.MOV|
00005280  20 4c 52 2c 43 45 4c 4c  0d 22 7e 17 4c 44 52 42  | LR,CELL."~.LDRB|
00005290  20 4c 4c 2c 5b 74 65 6d  70 31 2c 23 2d 31 5d 0d  | LL,[temp1,#-1].|
000052a0  22 88 2f 4c 44 52 42 20  55 4c 2c 5b 74 65 6d 70  |"./LDRB UL,[temp|
000052b0  31 2c 23 2d 33 32 31 5d  3a 4c 44 52 42 20 55 52  |1,#-321]:LDRB UR|
000052c0  2c 5b 74 65 6d 70 31 2c  23 2d 33 32 30 5d 0d 22  |,[temp1,#-320]."|
000052d0  92 25 4d 4f 56 20 4f 50  50 2c 55 4c 3a 4d 4f 56  |.%MOV OPP,UL:MOV|
000052e0  20 43 57 2c 4c 4c 3a 4d  4f 56 20 43 43 57 2c 55  | CW,LL:MOV CCW,U|
000052f0  52 3a 5d 0d 22 9c 43 e7  20 66 6c 61 67 25 80 33  |R:].".C. flag%.3|
00005300  20 8c 20 5b 4f 50 54 20  70 61 73 73 25 3a 4d 4f  | . [OPT pass%:MO|
00005310  56 20 46 4c 41 47 2c 23  33 3a 5d 20 8b 20 5b 4f  |V FLAG,#3:] . [O|
00005320  50 54 20 70 61 73 73 25  3a 4d 4f 56 20 46 4c 41  |PT pass%:MOV FLA|
00005330  47 2c 23 30 3a 5d 0d 22  a6 0e 5b 4f 50 54 20 70  |G,#0:]."..[OPT p|
00005340  61 73 73 25 0d 22 b0 0b  42 20 6d 61 72 67 32 0d  |ass%."..B marg2.|
00005350  22 ba 0a 2e 6d 61 72 67  31 0d 22 c4 18 54 53 54  |"...marg1."..TST|
00005360  20 72 6f 77 2c 23 31 3a  42 45 51 20 6d 61 72 67  | row,#1:BEQ marg|
00005370  36 0d 22 ce 18 54 53 54  20 63 6f 6c 2c 23 31 3a  |6."..TST col,#1:|
00005380  42 45 51 20 6d 61 72 67  37 0d 22 d8 2a 43 4d 50  |BEQ marg7.".*CMP|
00005390  20 72 6f 77 2c 23 73 75  79 25 2d 31 3a 41 44 44  | row,#suy%-1:ADD|
000053a0  4e 45 20 74 65 6d 70 32  2c 74 65 6d 70 31 2c 23  |NE temp2,temp1,#|
000053b0  33 32 30 0d 22 e2 42 53  55 42 45 51 20 74 65 6d  |320.".BSUBEQ tem|
000053c0  70 32 2c 74 65 6d 70 31  2c 23 32 35 36 2a 28 73  |p2,temp1,#256*(s|
000053d0  75 79 25 2d 31 29 3a 53  55 42 45 51 20 74 65 6d  |uy%-1):SUBEQ tem|
000053e0  70 32 2c 74 65 6d 70 32  2c 23 36 34 2a 28 73 75  |p2,temp2,#64*(su|
000053f0  79 25 2d 31 29 0d 22 ec  0f 4d 4f 56 20 55 4c 2c  |y%-1)."..MOV UL,|
00005400  43 45 4c 4c 0d 22 f6 42  43 4d 50 20 63 6f 6c 2c  |CELL.".BCMP col,|
00005410  23 73 75 78 25 2d 31 3a  4c 44 52 4e 45 42 20 55  |#sux%-1:LDRNEB U|
00005420  52 2c 5b 74 65 6d 70 31  2c 23 31 5d 3a 4c 44 52  |R,[temp1,#1]:LDR|
00005430  45 51 42 20 55 52 2c 5b  74 65 6d 70 31 2c 23 31  |EQB UR,[temp1,#1|
00005440  2d 73 75 78 25 5d 0d 23  00 42 4c 44 52 42 20 4c  |-sux%].#.BLDRB L|
00005450  4c 2c 5b 74 65 6d 70 32  5d 3a 4c 44 52 4e 45 42  |L,[temp2]:LDRNEB|
00005460  20 4c 52 2c 5b 74 65 6d  70 32 2c 23 31 5d 3a 4c  | LR,[temp2,#1]:L|
00005470  44 52 45 51 42 20 4c 52  2c 5b 74 65 6d 70 32 2c  |DREQB LR,[temp2,|
00005480  23 31 2d 73 75 78 25 5d  0d 23 0a 25 4d 4f 56 20  |#1-sux%].#.%MOV |
00005490  4f 50 50 2c 4c 52 3a 4d  4f 56 20 43 57 2c 55 52  |OPP,LR:MOV CW,UR|
000054a0  3a 4d 4f 56 20 43 43 57  2c 4c 4c 3a 5d 0d 23 14  |:MOV CCW,LL:].#.|
000054b0  43 e7 20 66 6c 61 67 25  80 34 20 8c 20 5b 4f 50  |C. flag%.4 . [OP|
000054c0  54 20 70 61 73 73 25 3a  4d 4f 56 20 46 4c 41 47  |T pass%:MOV FLAG|
000054d0  2c 23 34 3a 5d 20 8b 20  5b 4f 50 54 20 70 61 73  |,#4:] . [OPT pas|
000054e0  73 25 3a 4d 4f 56 20 46  4c 41 47 2c 23 30 3a 5d  |s%:MOV FLAG,#0:]|
000054f0  0d 23 1e 0e 5b 4f 50 54  20 70 61 73 73 25 0d 23  |.#..[OPT pass%.#|
00005500  28 0b 42 20 6d 61 72 67  32 0d 23 32 0a 2e 6d 61  |(.B marg2.#2..ma|
00005510  72 67 37 0d 23 3c 2a 43  4d 50 20 72 6f 77 2c 23  |rg7.#<*CMP row,#|
00005520  73 75 79 25 2d 31 3a 41  44 44 4e 45 20 74 65 6d  |suy%-1:ADDNE tem|
00005530  70 32 2c 74 65 6d 70 31  2c 23 33 32 30 0d 23 46  |p2,temp1,#320.#F|
00005540  42 53 55 42 45 51 20 74  65 6d 70 32 2c 74 65 6d  |BSUBEQ temp2,tem|
00005550  70 31 2c 23 32 35 36 2a  28 73 75 79 25 2d 31 29  |p1,#256*(suy%-1)|
00005560  3a 53 55 42 45 51 20 74  65 6d 70 32 2c 74 65 6d  |:SUBEQ temp2,tem|
00005570  70 32 2c 23 36 34 2a 28  73 75 79 25 2d 31 29 0d  |p2,#64*(suy%-1).|
00005580  23 50 0f 4d 4f 56 20 55  52 2c 43 45 4c 4c 0d 23  |#P.MOV UR,CELL.#|
00005590  5a 3e 43 4d 50 20 63 6f  6c 2c 23 30 3a 4c 44 52  |Z>CMP col,#0:LDR|
000055a0  4e 45 42 20 55 4c 2c 5b  74 65 6d 70 31 2c 23 2d  |NEB UL,[temp1,#-|
000055b0  31 5d 3a 4c 44 52 45 51  42 20 55 4c 2c 5b 74 65  |1]:LDREQB UL,[te|
000055c0  6d 70 31 2c 23 73 75 78  25 2d 31 5d 0d 23 64 43  |mp1,#sux%-1].#dC|
000055d0  4c 44 52 42 20 4c 52 2c  5b 74 65 6d 70 32 5d 3a  |LDRB LR,[temp2]:|
000055e0  4c 44 52 4e 45 42 20 4c  4c 2c 5b 74 65 6d 70 32  |LDRNEB LL,[temp2|
000055f0  2c 23 2d 31 5d 3a 4c 44  52 45 51 42 20 4c 4c 2c  |,#-1]:LDREQB LL,|
00005600  5b 74 65 6d 70 32 2c 23  73 75 78 25 2d 31 5d 0d  |[temp2,#sux%-1].|
00005610  23 6e 25 4d 4f 56 20 4f  50 50 2c 4c 4c 3a 4d 4f  |#n%MOV OPP,LL:MO|
00005620  56 20 43 57 2c 4c 52 3a  4d 4f 56 20 43 43 57 2c  |V CW,LR:MOV CCW,|
00005630  55 4c 3a 5d 0d 23 78 0a  c8 8e 20 b9 20 ca 0d 23  |UL:].#x... . ..#|
00005640  82 3a c9 20 28 66 6c 61  67 25 80 34 29 3c 3e 30  |.:. (flag%.4)<>0|
00005650  20 80 20 28 66 6c 61 67  25 80 33 29 3c 3e 30 3a  | . (flag%.3)<>0:|
00005660  5b 4f 50 54 20 70 61 73  73 25 3a 4d 4f 56 20 46  |[OPT pass%:MOV F|
00005670  4c 41 47 2c 23 35 3a 5d  0d 23 8c 39 c9 20 28 66  |LAG,#5:].#.9. (f|
00005680  6c 61 67 25 80 34 29 3c  3e 30 20 80 20 28 66 6c  |lag%.4)<>0 . (fl|
00005690  61 67 25 80 33 29 3d 30  3a 5b 4f 50 54 20 70 61  |ag%.3)=0:[OPT pa|
000056a0  73 73 25 3a 4d 4f 56 20  46 4c 41 47 2c 23 34 3a  |ss%:MOV FLAG,#4:|
000056b0  5d 0d 23 96 39 c9 20 28  66 6c 61 67 25 80 34 29  |].#.9. (flag%.4)|
000056c0  3d 30 20 80 20 28 66 6c  61 67 25 80 33 29 3c 3e  |=0 . (flag%.3)<>|
000056d0  30 3a 5b 4f 50 54 20 70  61 73 73 25 3a 4d 4f 56  |0:[OPT pass%:MOV|
000056e0  20 46 4c 41 47 2c 23 31  3a 5d 0d 23 a0 38 c9 20  | FLAG,#1:].#.8. |
000056f0  28 66 6c 61 67 25 80 34  29 3d 30 20 80 20 28 66  |(flag%.4)=0 . (f|
00005700  6c 61 67 25 80 33 29 3d  30 3a 5b 4f 50 54 20 70  |lag%.3)=0:[OPT p|
00005710  61 73 73 25 3a 4d 4f 56  20 46 4c 41 47 2c 23 30  |ass%:MOV FLAG,#0|
00005720  3a 5d 0d 23 aa 05 cb 0d  23 b4 0e 5b 4f 50 54 20  |:].#....#..[OPT |
00005730  70 61 73 73 25 0d 23 be  0b 42 20 6d 61 72 67 32  |pass%.#..B marg2|
00005740  0d 23 c8 0a 2e 6d 61 72  67 36 0d 23 d2 18 54 53  |.#...marg6.#..TS|
00005750  54 20 63 6f 6c 2c 23 31  3a 42 45 51 20 6d 61 72  |T col,#1:BEQ mar|
00005760  67 38 0d 23 dc 25 43 4d  50 20 72 6f 77 2c 23 30  |g8.#.%CMP row,#0|
00005770  3a 53 55 42 4e 45 20 74  65 6d 70 32 2c 74 65 6d  |:SUBNE temp2,tem|
00005780  70 31 2c 23 33 32 30 0d  23 e6 42 41 44 44 45 51  |p1,#320.#.BADDEQ|
00005790  20 74 65 6d 70 32 2c 74  65 6d 70 31 2c 23 32 35  | temp2,temp1,#25|
000057a0  36 2a 28 73 75 79 25 2d  31 29 3a 41 44 44 45 51  |6*(suy%-1):ADDEQ|
000057b0  20 74 65 6d 70 32 2c 74  65 6d 70 32 2c 23 36 34  | temp2,temp2,#64|
000057c0  2a 28 73 75 79 25 2d 31  29 0d 23 f0 0f 4d 4f 56  |*(suy%-1).#..MOV|
000057d0  20 4c 4c 2c 43 45 4c 4c  0d 23 fa 42 43 4d 50 20  | LL,CELL.#.BCMP |
000057e0  63 6f 6c 2c 23 73 75 78  25 2d 31 3a 4c 44 52 4e  |col,#sux%-1:LDRN|
000057f0  45 42 20 4c 52 2c 5b 74  65 6d 70 31 2c 23 31 5d  |EB LR,[temp1,#1]|
00005800  3a 4c 44 52 45 51 42 20  4c 52 2c 5b 74 65 6d 70  |:LDREQB LR,[temp|
00005810  31 2c 23 31 2d 73 75 78  25 5d 0d 24 04 42 4c 44  |1,#1-sux%].$.BLD|
00005820  52 42 20 55 4c 2c 5b 74  65 6d 70 32 5d 3a 4c 44  |RB UL,[temp2]:LD|
00005830  52 4e 45 42 20 55 52 2c  5b 74 65 6d 70 32 2c 23  |RNEB UR,[temp2,#|
00005840  31 5d 3a 4c 44 52 45 51  42 20 55 52 2c 5b 74 65  |1]:LDREQB UR,[te|
00005850  6d 70 32 2c 23 31 2d 73  75 78 25 5d 0d 24 0e 25  |mp2,#1-sux%].$.%|
00005860  4d 4f 56 20 4f 50 50 2c  55 52 3a 4d 4f 56 20 43  |MOV OPP,UR:MOV C|
00005870  57 2c 55 4c 3a 4d 4f 56  20 43 43 57 2c 4c 52 3a  |W,UL:MOV CCW,LR:|
00005880  5d 0d 24 18 0a c8 8e 20  b9 20 ca 0d 24 22 3a c9  |].$.... . ..$":.|
00005890  20 28 66 6c 61 67 25 80  34 29 3c 3e 30 20 80 20  | (flag%.4)<>0 . |
000058a0  28 66 6c 61 67 25 80 33  29 3c 3e 30 3a 5b 4f 50  |(flag%.3)<>0:[OP|
000058b0  54 20 70 61 73 73 25 3a  4d 4f 56 20 46 4c 41 47  |T pass%:MOV FLAG|
000058c0  2c 23 36 3a 5d 0d 24 2c  39 c9 20 28 66 6c 61 67  |,#6:].$,9. (flag|
000058d0  25 80 34 29 3c 3e 30 20  80 20 28 66 6c 61 67 25  |%.4)<>0 . (flag%|
000058e0  80 33 29 3d 30 3a 5b 4f  50 54 20 70 61 73 73 25  |.3)=0:[OPT pass%|
000058f0  3a 4d 4f 56 20 46 4c 41  47 2c 23 34 3a 5d 0d 24  |:MOV FLAG,#4:].$|
00005900  36 39 c9 20 28 66 6c 61  67 25 80 34 29 3d 30 20  |69. (flag%.4)=0 |
00005910  80 20 28 66 6c 61 67 25  80 33 29 3c 3e 30 3a 5b  |. (flag%.3)<>0:[|
00005920  4f 50 54 20 70 61 73 73  25 3a 4d 4f 56 20 46 4c  |OPT pass%:MOV FL|
00005930  41 47 2c 23 32 3a 5d 0d  24 40 38 c9 20 28 66 6c  |AG,#2:].$@8. (fl|
00005940  61 67 25 80 34 29 3d 30  20 80 20 28 66 6c 61 67  |ag%.4)=0 . (flag|
00005950  25 80 33 29 3d 30 3a 5b  4f 50 54 20 70 61 73 73  |%.3)=0:[OPT pass|
00005960  25 3a 4d 4f 56 20 46 4c  41 47 2c 23 30 3a 5d 0d  |%:MOV FLAG,#0:].|
00005970  24 4a 05 cb 0d 24 54 0e  5b 4f 50 54 20 70 61 73  |$J...$T.[OPT pas|
00005980  73 25 0d 24 5e 0b 42 20  6d 61 72 67 32 0d 24 68  |s%.$^.B marg2.$h|
00005990  0a 2e 6d 61 72 67 38 0d  24 72 25 43 4d 50 20 72  |..marg8.$r%CMP r|
000059a0  6f 77 2c 23 30 3a 53 55  42 4e 45 20 74 65 6d 70  |ow,#0:SUBNE temp|
000059b0  32 2c 74 65 6d 70 31 2c  23 33 32 30 0d 24 7c 42  |2,temp1,#320.$|B|
000059c0  41 44 44 45 51 20 74 65  6d 70 32 2c 74 65 6d 70  |ADDEQ temp2,temp|
000059d0  31 2c 23 32 35 36 2a 28  73 75 79 25 2d 31 29 3a  |1,#256*(suy%-1):|
000059e0  41 44 44 45 51 20 74 65  6d 70 32 2c 74 65 6d 70  |ADDEQ temp2,temp|
000059f0  32 2c 23 36 34 2a 28 73  75 79 25 2d 31 29 0d 24  |2,#64*(suy%-1).$|
00005a00  86 0f 4d 4f 56 20 4c 52  2c 43 45 4c 4c 0d 24 90  |..MOV LR,CELL.$.|
00005a10  3e 43 4d 50 20 63 6f 6c  2c 23 30 3a 4c 44 52 4e  |>CMP col,#0:LDRN|
00005a20  45 42 20 4c 4c 2c 5b 74  65 6d 70 31 2c 23 2d 31  |EB LL,[temp1,#-1|
00005a30  5d 3a 4c 44 52 45 51 42  20 4c 4c 2c 5b 74 65 6d  |]:LDREQB LL,[tem|
00005a40  70 31 2c 23 73 75 78 25  2d 31 5d 0d 24 9a 43 4c  |p1,#sux%-1].$.CL|
00005a50  44 52 42 20 55 52 2c 5b  74 65 6d 70 32 5d 3a 4c  |DRB UR,[temp2]:L|
00005a60  44 52 4e 45 42 20 55 4c  2c 5b 74 65 6d 70 32 2c  |DRNEB UL,[temp2,|
00005a70  23 2d 31 5d 3a 4c 44 52  45 51 42 20 55 4c 2c 5b  |#-1]:LDREQB UL,[|
00005a80  74 65 6d 70 32 2c 23 73  75 78 25 2d 31 5d 0d 24  |temp2,#sux%-1].$|
00005a90  a4 25 4d 4f 56 20 4f 50  50 2c 55 4c 3a 4d 4f 56  |.%MOV OPP,UL:MOV|
00005aa0  20 43 57 2c 4c 4c 3a 4d  4f 56 20 43 43 57 2c 55  | CW,LL:MOV CCW,U|
00005ab0  52 3a 5d 0d 24 ae 0a c8  8e 20 b9 20 ca 0d 24 b8  |R:].$.... . ..$.|
00005ac0  3a c9 20 28 66 6c 61 67  25 80 34 29 3c 3e 30 20  |:. (flag%.4)<>0 |
00005ad0  80 20 28 66 6c 61 67 25  80 33 29 3c 3e 30 3a 5b  |. (flag%.3)<>0:[|
00005ae0  4f 50 54 20 70 61 73 73  25 3a 4d 4f 56 20 46 4c  |OPT pass%:MOV FL|
00005af0  41 47 2c 23 37 3a 5d 0d  24 c2 39 c9 20 28 66 6c  |AG,#7:].$.9. (fl|
00005b00  61 67 25 80 34 29 3c 3e  30 20 80 20 28 66 6c 61  |ag%.4)<>0 . (fla|
00005b10  67 25 80 33 29 3d 30 3a  5b 4f 50 54 20 70 61 73  |g%.3)=0:[OPT pas|
00005b20  73 25 3a 4d 4f 56 20 46  4c 41 47 2c 23 34 3a 5d  |s%:MOV FLAG,#4:]|
00005b30  0d 24 cc 39 c9 20 28 66  6c 61 67 25 80 34 29 3d  |.$.9. (flag%.4)=|
00005b40  30 20 80 20 28 66 6c 61  67 25 80 33 29 3c 3e 30  |0 . (flag%.3)<>0|
00005b50  3a 5b 4f 50 54 20 70 61  73 73 25 3a 4d 4f 56 20  |:[OPT pass%:MOV |
00005b60  46 4c 41 47 2c 23 33 3a  5d 0d 24 d6 38 c9 20 28  |FLAG,#3:].$.8. (|
00005b70  66 6c 61 67 25 80 34 29  3d 30 20 80 20 28 66 6c  |flag%.4)=0 . (fl|
00005b80  61 67 25 80 33 29 3d 30  3a 5b 4f 50 54 20 70 61  |ag%.3)=0:[OPT pa|
00005b90  73 73 25 3a 4d 4f 56 20  46 4c 41 47 2c 23 30 3a  |ss%:MOV FLAG,#0:|
00005ba0  5d 0d 24 e0 05 cb 0d 24  ea 0e 5b 4f 50 54 20 70  |].$....$..[OPT p|
00005bb0  61 73 73 25 0d 24 f4 0a  2e 6d 61 72 67 32 0d 24  |ass%.$...marg2.$|
00005bc0  fe 05 5d 0d 25 08 05 cc  0d 25 12 0e 5b 4f 50 54  |..].%....%..[OPT|
00005bd0  20 70 61 73 73 25 0d 25  1c 1b 41 44 44 20 74 65  | pass%.%..ADD te|
00005be0  6d 70 31 2c 61 64 64 72  73 63 31 2c 61 64 64 72  |mp1,addrsc1,addr|
00005bf0  6f 0d 25 26 27 4c 44 52  20 74 65 6d 70 32 2c 61  |o.%&'LDR temp2,a|
00005c00  67 3a 54 53 54 20 74 65  6d 70 32 2c 23 31 3a 42  |g:TST temp2,#1:B|
00005c10  4e 45 20 6d 61 72 67 31  0d 25 30 18 54 53 54 20  |NE marg1.%0.TST |
00005c20  72 6f 77 2c 23 31 3a 42  4e 45 20 6d 61 72 67 33  |row,#1:BNE marg3|
00005c30  0d 25 3a 18 54 53 54 20  63 6f 6c 2c 23 31 3a 42  |.%:.TST col,#1:B|
00005c40  4e 45 20 6d 61 72 67 34  0d 25 44 0f 4d 4f 56 20  |NE marg4.%D.MOV |
00005c50  55 4c 2c 43 45 4c 4c 0d  25 4e 16 4c 44 52 42 20  |UL,CELL.%N.LDRB |
00005c60  55 52 2c 5b 74 65 6d 70  31 2c 23 31 5d 0d 25 58  |UR,[temp1,#1].%X|
00005c70  2d 4c 44 52 42 20 4c 4c  2c 5b 74 65 6d 70 31 2c  |-LDRB LL,[temp1,|
00005c80  23 33 32 30 5d 3a 4c 44  52 42 20 4c 52 2c 5b 74  |#320]:LDRB LR,[t|
00005c90  65 6d 70 31 2c 23 33 32  31 5d 0d 25 62 2f 4d 4f  |emp1,#321].%b/MO|
00005ca0  56 20 4f 50 50 2c 4c 52  3a 4d 4f 56 20 43 57 2c  |V OPP,LR:MOV CW,|
00005cb0  55 52 3a 4d 4f 56 20 43  43 57 2c 4c 4c 3a 4d 4f  |UR:MOV CCW,LL:MO|
00005cc0  56 20 46 4c 41 47 2c 23  30 0d 25 6c 0b 42 20 6d  |V FLAG,#0.%l.B m|
00005cd0  61 72 67 32 0d 25 76 0a  2e 6d 61 72 67 34 0d 25  |arg2.%v..marg4.%|
00005ce0  80 0f 4d 4f 56 20 55 52  2c 43 45 4c 4c 0d 25 8a  |..MOV UR,CELL.%.|
00005cf0  17 4c 44 52 42 20 55 4c  2c 5b 74 65 6d 70 31 2c  |.LDRB UL,[temp1,|
00005d00  23 2d 31 5d 0d 25 94 2d  4c 44 52 42 20 4c 4c 2c  |#-1].%.-LDRB LL,|
00005d10  5b 74 65 6d 70 31 2c 23  33 31 39 5d 3a 4c 44 52  |[temp1,#319]:LDR|
00005d20  42 20 4c 52 2c 5b 74 65  6d 70 31 2c 23 33 32 30  |B LR,[temp1,#320|
00005d30  5d 0d 25 9e 25 4d 4f 56  20 4f 50 50 2c 4c 4c 3a  |].%.%MOV OPP,LL:|
00005d40  4d 4f 56 20 43 57 2c 4c  52 3a 4d 4f 56 20 43 43  |MOV CW,LR:MOV CC|
00005d50  57 2c 55 4c 3a 5d 0d 25  a8 43 e7 20 66 6c 61 67  |W,UL:].%.C. flag|
00005d60  25 80 33 20 8c 20 5b 4f  50 54 20 70 61 73 73 25  |%.3 . [OPT pass%|
00005d70  3a 4d 4f 56 20 46 4c 41  47 2c 23 31 3a 5d 20 8b  |:MOV FLAG,#1:] .|
00005d80  20 5b 4f 50 54 20 70 61  73 73 25 3a 4d 4f 56 20  | [OPT pass%:MOV |
00005d90  46 4c 41 47 2c 23 30 3a  5d 0d 25 b2 0e 5b 4f 50  |FLAG,#0:].%..[OP|
00005da0  54 20 70 61 73 73 25 0d  25 bc 0b 42 20 6d 61 72  |T pass%.%..B mar|
00005db0  67 32 0d 25 c6 0a 2e 6d  61 72 67 33 0d 25 d0 18  |g2.%...marg3.%..|
00005dc0  54 53 54 20 63 6f 6c 2c  23 31 3a 42 4e 45 20 6d  |TST col,#1:BNE m|
00005dd0  61 72 67 35 0d 25 da 0f  4d 4f 56 20 4c 4c 2c 43  |arg5.%..MOV LL,C|
00005de0  45 4c 4c 0d 25 e4 16 4c  44 52 42 20 4c 52 2c 5b  |ELL.%..LDRB LR,[|
00005df0  74 65 6d 70 31 2c 23 31  5d 0d 25 ee 2f 4c 44 52  |temp1,#1].%./LDR|
00005e00  42 20 55 4c 2c 5b 74 65  6d 70 31 2c 23 2d 33 32  |B UL,[temp1,#-32|
00005e10  30 5d 3a 4c 44 52 42 20  55 52 2c 5b 74 65 6d 70  |0]:LDRB UR,[temp|
00005e20  31 2c 23 2d 33 31 39 5d  0d 25 f8 25 4d 4f 56 20  |1,#-319].%.%MOV |
00005e30  4f 50 50 2c 55 52 3a 4d  4f 56 20 43 57 2c 55 4c  |OPP,UR:MOV CW,UL|
00005e40  3a 4d 4f 56 20 43 43 57  2c 4c 52 3a 5d 0d 26 02  |:MOV CCW,LR:].&.|
00005e50  43 e7 20 66 6c 61 67 25  80 33 20 8c 20 5b 4f 50  |C. flag%.3 . [OP|
00005e60  54 20 70 61 73 73 25 3a  4d 4f 56 20 46 4c 41 47  |T pass%:MOV FLAG|
00005e70  2c 23 32 3a 5d 20 8b 20  5b 4f 50 54 20 70 61 73  |,#2:] . [OPT pas|
00005e80  73 25 3a 4d 4f 56 20 46  4c 41 47 2c 23 30 3a 5d  |s%:MOV FLAG,#0:]|
00005e90  0d 26 0c 0e 5b 4f 50 54  20 70 61 73 73 25 0d 26  |.&..[OPT pass%.&|
00005ea0  16 0b 42 20 6d 61 72 67  32 0d 26 20 0a 2e 6d 61  |..B marg2.& ..ma|
00005eb0  72 67 35 0d 26 2a 0f 4d  4f 56 20 4c 52 2c 43 45  |rg5.&*.MOV LR,CE|
00005ec0  4c 4c 0d 26 34 17 4c 44  52 42 20 4c 4c 2c 5b 74  |LL.&4.LDRB LL,[t|
00005ed0  65 6d 70 31 2c 23 2d 31  5d 0d 26 3e 2f 4c 44 52  |emp1,#-1].&>/LDR|
00005ee0  42 20 55 4c 2c 5b 74 65  6d 70 31 2c 23 2d 33 32  |B UL,[temp1,#-32|
00005ef0  31 5d 3a 4c 44 52 42 20  55 52 2c 5b 74 65 6d 70  |1]:LDRB UR,[temp|
00005f00  31 2c 23 2d 33 32 30 5d  0d 26 48 25 4d 4f 56 20  |1,#-320].&H%MOV |
00005f10  4f 50 50 2c 55 4c 3a 4d  4f 56 20 43 57 2c 4c 4c  |OPP,UL:MOV CW,LL|
00005f20  3a 4d 4f 56 20 43 43 57  2c 55 52 3a 5d 0d 26 52  |:MOV CCW,UR:].&R|
00005f30  43 e7 20 66 6c 61 67 25  80 33 20 8c 20 5b 4f 50  |C. flag%.3 . [OP|
00005f40  54 20 70 61 73 73 25 3a  4d 4f 56 20 46 4c 41 47  |T pass%:MOV FLAG|
00005f50  2c 23 33 3a 5d 20 8b 20  5b 4f 50 54 20 70 61 73  |,#3:] . [OPT pas|
00005f60  73 25 3a 4d 4f 56 20 46  4c 41 47 2c 23 30 3a 5d  |s%:MOV FLAG,#0:]|
00005f70  0d 26 5c 0e 5b 4f 50 54  20 70 61 73 73 25 0d 26  |.&\.[OPT pass%.&|
00005f80  66 0b 42 20 6d 61 72 67  32 0d 26 70 0a 2e 6d 61  |f.B marg2.&p..ma|
00005f90  72 67 31 0d 26 7a 18 54  53 54 20 72 6f 77 2c 23  |rg1.&z.TST row,#|
00005fa0  31 3a 42 45 51 20 6d 61  72 67 36 0d 26 84 18 54  |1:BEQ marg6.&..T|
00005fb0  53 54 20 63 6f 6c 2c 23  31 3a 42 45 51 20 6d 61  |ST col,#1:BEQ ma|
00005fc0  72 67 37 0d 26 8e 13 43  4d 50 20 72 6f 77 2c 23  |rg7.&..CMP row,#|
00005fd0  73 75 79 25 2d 31 0d 26  98 3c 4d 4f 56 20 55 4c  |suy%-1.&.<MOV UL|
00005fe0  2c 43 45 4c 4c 3a 4d 4f  56 20 55 52 2c 23 62 6f  |,CELL:MOV UR,#bo|
00005ff0  72 64 65 72 3a 4d 4f 56  20 4c 4c 2c 23 62 6f 72  |rder:MOV LL,#bor|
00006000  64 65 72 3a 4d 4f 56 20  4c 52 2c 23 62 6f 72 64  |der:MOV LR,#bord|
00006010  65 72 0d 26 a2 31 4c 44  52 4e 45 42 20 4c 4c 2c  |er.&.1LDRNEB LL,|
00006020  5b 74 65 6d 70 31 2c 23  33 32 30 5d 3a 4c 44 52  |[temp1,#320]:LDR|
00006030  4e 45 42 20 4c 52 2c 5b  74 65 6d 70 31 2c 23 33  |NEB LR,[temp1,#3|
00006040  32 31 5d 0d 26 ac 13 43  4d 50 20 63 6f 6c 2c 23  |21].&..CMP col,#|
00006050  73 75 78 25 2d 31 0d 26  b6 26 4c 44 52 4e 45 42  |sux%-1.&.&LDRNEB|
00006060  20 55 52 2c 5b 74 65 6d  70 31 2c 23 31 5d 3a ec  | UR,[temp1,#1]:.|
00006070  51 20 4c 52 2c 23 62 6f  72 64 65 72 0d 26 c0 25  |Q LR,#border.&.%|
00006080  4d 4f 56 20 4f 50 50 2c  4c 52 3a 4d 4f 56 20 43  |MOV OPP,LR:MOV C|
00006090  57 2c 55 52 3a 4d 4f 56  20 43 43 57 2c 4c 4c 3a  |W,UR:MOV CCW,LL:|
000060a0  5d 0d 26 ca 43 e7 20 66  6c 61 67 25 80 34 20 8c  |].&.C. flag%.4 .|
000060b0  20 5b 4f 50 54 20 70 61  73 73 25 3a 4d 4f 56 20  | [OPT pass%:MOV |
000060c0  46 4c 41 47 2c 23 34 3a  5d 20 8b 20 5b 4f 50 54  |FLAG,#4:] . [OPT|
000060d0  20 70 61 73 73 25 3a 4d  4f 56 20 46 4c 41 47 2c  | pass%:MOV FLAG,|
000060e0  23 30 3a 5d 0d 26 d4 0e  5b 4f 50 54 20 70 61 73  |#0:].&..[OPT pas|
000060f0  73 25 0d 26 de 0b 42 20  6d 61 72 67 32 0d 26 e8  |s%.&..B marg2.&.|
00006100  0a 2e 6d 61 72 67 37 0d  26 f2 13 43 4d 50 20 72  |..marg7.&..CMP r|
00006110  6f 77 2c 23 73 75 79 25  2d 31 0d 26 fc 3c 4d 4f  |ow,#suy%-1.&.<MO|
00006120  56 20 55 52 2c 43 45 4c  4c 3a 4d 4f 56 20 55 4c  |V UR,CELL:MOV UL|
00006130  2c 23 62 6f 72 64 65 72  3a 4d 4f 56 20 4c 4c 2c  |,#border:MOV LL,|
00006140  23 62 6f 72 64 65 72 3a  4d 4f 56 20 4c 52 2c 23  |#border:MOV LR,#|
00006150  62 6f 72 64 65 72 0d 27  06 31 4c 44 52 4e 45 42  |border.'.1LDRNEB|
00006160  20 4c 4c 2c 5b 74 65 6d  70 31 2c 23 33 31 39 5d  | LL,[temp1,#319]|
00006170  3a 4c 44 52 4e 45 42 20  4c 52 2c 5b 74 65 6d 70  |:LDRNEB LR,[temp|
00006180  31 2c 23 33 32 30 5d 0d  27 10 0e 43 4d 50 20 63  |1,#320].'..CMP c|
00006190  6f 6c 2c 23 30 0d 27 1a  27 4c 44 52 4e 45 42 20  |ol,#0.'.'LDRNEB |
000061a0  55 4c 2c 5b 74 65 6d 70  31 2c 23 2d 31 5d 3a ec  |UL,[temp1,#-1]:.|
000061b0  51 20 4c 4c 2c 23 62 6f  72 64 65 72 0d 27 24 25  |Q LL,#border.'$%|
000061c0  4d 4f 56 20 4f 50 50 2c  4c 4c 3a 4d 4f 56 20 43  |MOV OPP,LL:MOV C|
000061d0  57 2c 4c 52 3a 4d 4f 56  20 43 43 57 2c 55 4c 3a  |W,LR:MOV CCW,UL:|
000061e0  5d 0d 27 2e 0a c8 8e 20  b9 20 ca 0d 27 38 3a c9  |].'.... . ..'8:.|
000061f0  20 28 66 6c 61 67 25 80  34 29 3c 3e 30 20 80 20  | (flag%.4)<>0 . |
00006200  28 66 6c 61 67 25 80 33  29 3c 3e 30 3a 5b 4f 50  |(flag%.3)<>0:[OP|
00006210  54 20 70 61 73 73 25 3a  4d 4f 56 20 46 4c 41 47  |T pass%:MOV FLAG|
00006220  2c 23 35 3a 5d 0d 27 42  39 c9 20 28 66 6c 61 67  |,#5:].'B9. (flag|
00006230  25 80 34 29 3c 3e 30 20  80 20 28 66 6c 61 67 25  |%.4)<>0 . (flag%|
00006240  80 33 29 3d 30 3a 5b 4f  50 54 20 70 61 73 73 25  |.3)=0:[OPT pass%|
00006250  3a 4d 4f 56 20 46 4c 41  47 2c 23 34 3a 5d 0d 27  |:MOV FLAG,#4:].'|
00006260  4c 39 c9 20 28 66 6c 61  67 25 80 34 29 3d 30 20  |L9. (flag%.4)=0 |
00006270  80 20 28 66 6c 61 67 25  80 33 29 3c 3e 30 3a 5b  |. (flag%.3)<>0:[|
00006280  4f 50 54 20 70 61 73 73  25 3a 4d 4f 56 20 46 4c  |OPT pass%:MOV FL|
00006290  41 47 2c 23 31 3a 5d 0d  27 56 38 c9 20 28 66 6c  |AG,#1:].'V8. (fl|
000062a0  61 67 25 80 34 29 3d 30  20 80 20 28 66 6c 61 67  |ag%.4)=0 . (flag|
000062b0  25 80 33 29 3d 30 3a 5b  4f 50 54 20 70 61 73 73  |%.3)=0:[OPT pass|
000062c0  25 3a 4d 4f 56 20 46 4c  41 47 2c 23 30 3a 5d 0d  |%:MOV FLAG,#0:].|
000062d0  27 60 05 cb 0d 27 6a 0e  5b 4f 50 54 20 70 61 73  |'`...'j.[OPT pas|
000062e0  73 25 0d 27 74 0b 42 20  6d 61 72 67 32 0d 27 7e  |s%.'t.B marg2.'~|
000062f0  0a 2e 6d 61 72 67 36 0d  27 88 18 54 53 54 20 63  |..marg6.'..TST c|
00006300  6f 6c 2c 23 31 3a 42 45  51 20 6d 61 72 67 38 0d  |ol,#1:BEQ marg8.|
00006310  27 92 0e 43 4d 50 20 72  6f 77 2c 23 30 0d 27 9c  |'..CMP row,#0.'.|
00006320  3c 4d 4f 56 20 4c 4c 2c  43 45 4c 4c 3a 4d 4f 56  |<MOV LL,CELL:MOV|
00006330  20 55 4c 2c 23 62 6f 72  64 65 72 3a 4d 4f 56 20  | UL,#border:MOV |
00006340  55 52 2c 23 62 6f 72 64  65 72 3a 4d 4f 56 20 4c  |UR,#border:MOV L|
00006350  52 2c 23 62 6f 72 64 65  72 0d 27 a6 33 4c 44 52  |R,#border.'.3LDR|
00006360  4e 45 42 20 55 4c 2c 5b  74 65 6d 70 31 2c 23 2d  |NEB UL,[temp1,#-|
00006370  33 32 30 5d 3a 4c 44 52  4e 45 42 20 55 52 2c 5b  |320]:LDRNEB UR,[|
00006380  74 65 6d 70 31 2c 23 2d  33 31 39 5d 0d 27 b0 13  |temp1,#-319].'..|
00006390  43 4d 50 20 63 6f 6c 2c  23 73 75 78 25 2d 31 0d  |CMP col,#sux%-1.|
000063a0  27 ba 26 4c 44 52 4e 45  42 20 4c 52 2c 5b 74 65  |'.&LDRNEB LR,[te|
000063b0  6d 70 31 2c 23 31 5d 3a  ec 51 20 55 52 2c 23 62  |mp1,#1]:.Q UR,#b|
000063c0  6f 72 64 65 72 0d 27 c4  25 4d 4f 56 20 4f 50 50  |order.'.%MOV OPP|
000063d0  2c 55 52 3a 4d 4f 56 20  43 57 2c 55 4c 3a 4d 4f  |,UR:MOV CW,UL:MO|
000063e0  56 20 43 43 57 2c 4c 52  3a 5d 0d 27 ce 0a c8 8e  |V CCW,LR:].'....|
000063f0  20 b9 20 ca 0d 27 d8 3a  c9 20 28 66 6c 61 67 25  | . ..'.:. (flag%|
00006400  80 34 29 3c 3e 30 20 80  20 28 66 6c 61 67 25 80  |.4)<>0 . (flag%.|
00006410  33 29 3c 3e 30 3a 5b 4f  50 54 20 70 61 73 73 25  |3)<>0:[OPT pass%|
00006420  3a 4d 4f 56 20 46 4c 41  47 2c 23 36 3a 5d 0d 27  |:MOV FLAG,#6:].'|
00006430  e2 39 c9 20 28 66 6c 61  67 25 80 34 29 3c 3e 30  |.9. (flag%.4)<>0|
00006440  20 80 20 28 66 6c 61 67  25 80 33 29 3d 30 3a 5b  | . (flag%.3)=0:[|
00006450  4f 50 54 20 70 61 73 73  25 3a 4d 4f 56 20 46 4c  |OPT pass%:MOV FL|
00006460  41 47 2c 23 34 3a 5d 0d  27 ec 39 c9 20 28 66 6c  |AG,#4:].'.9. (fl|
00006470  61 67 25 80 34 29 3d 30  20 80 20 28 66 6c 61 67  |ag%.4)=0 . (flag|
00006480  25 80 33 29 3c 3e 30 3a  5b 4f 50 54 20 70 61 73  |%.3)<>0:[OPT pas|
00006490  73 25 3a 4d 4f 56 20 46  4c 41 47 2c 23 32 3a 5d  |s%:MOV FLAG,#2:]|
000064a0  0d 27 f6 38 c9 20 28 66  6c 61 67 25 80 34 29 3d  |.'.8. (flag%.4)=|
000064b0  30 20 80 20 28 66 6c 61  67 25 80 33 29 3d 30 3a  |0 . (flag%.3)=0:|
000064c0  5b 4f 50 54 20 70 61 73  73 25 3a 4d 4f 56 20 46  |[OPT pass%:MOV F|
000064d0  4c 41 47 2c 23 30 3a 5d  0d 28 00 05 cb 0d 28 0a  |LAG,#0:].(....(.|
000064e0  0e 5b 4f 50 54 20 70 61  73 73 25 0d 28 14 0b 42  |.[OPT pass%.(..B|
000064f0  20 6d 61 72 67 32 0d 28  1e 0a 2e 6d 61 72 67 38  | marg2.(...marg8|
00006500  0d 28 28 0e 43 4d 50 20  72 6f 77 2c 23 30 0d 28  |.((.CMP row,#0.(|
00006510  32 3c 4d 4f 56 20 4c 52  2c 43 45 4c 4c 3a 4d 4f  |2<MOV LR,CELL:MO|
00006520  56 20 55 4c 2c 23 62 6f  72 64 65 72 3a 4d 4f 56  |V UL,#border:MOV|
00006530  20 55 52 2c 23 62 6f 72  64 65 72 3a 4d 4f 56 20  | UR,#border:MOV |
00006540  4c 4c 2c 23 62 6f 72 64  65 72 0d 28 3c 33 4c 44  |LL,#border.(<3LD|
00006550  52 4e 45 42 20 55 4c 2c  5b 74 65 6d 70 31 2c 23  |RNEB UL,[temp1,#|
00006560  2d 33 32 31 5d 3a 4c 44  52 4e 45 42 20 55 52 2c  |-321]:LDRNEB UR,|
00006570  5b 74 65 6d 70 31 2c 23  2d 33 32 30 5d 0d 28 46  |[temp1,#-320].(F|
00006580  0e 43 4d 50 20 63 6f 6c  2c 23 30 0d 28 50 27 4c  |.CMP col,#0.(P'L|
00006590  44 52 4e 45 42 20 4c 4c  2c 5b 74 65 6d 70 31 2c  |DRNEB LL,[temp1,|
000065a0  23 2d 31 5d 3a ec 51 20  55 4c 2c 23 62 6f 72 64  |#-1]:.Q UL,#bord|
000065b0  65 72 0d 28 5a 25 4d 4f  56 20 4f 50 50 2c 55 4c  |er.(Z%MOV OPP,UL|
000065c0  3a 4d 4f 56 20 43 57 2c  4c 4c 3a 4d 4f 56 20 43  |:MOV CW,LL:MOV C|
000065d0  43 57 2c 55 52 3a 5d 0d  28 64 0a c8 8e 20 b9 20  |CW,UR:].(d... . |
000065e0  ca 0d 28 6e 3a c9 20 28  66 6c 61 67 25 80 34 29  |..(n:. (flag%.4)|
000065f0  3c 3e 30 20 80 20 28 66  6c 61 67 25 80 33 29 3c  |<>0 . (flag%.3)<|
00006600  3e 30 3a 5b 4f 50 54 20  70 61 73 73 25 3a 4d 4f  |>0:[OPT pass%:MO|
00006610  56 20 46 4c 41 47 2c 23  37 3a 5d 0d 28 78 39 c9  |V FLAG,#7:].(x9.|
00006620  20 28 66 6c 61 67 25 80  34 29 3c 3e 30 20 80 20  | (flag%.4)<>0 . |
00006630  28 66 6c 61 67 25 80 33  29 3d 30 3a 5b 4f 50 54  |(flag%.3)=0:[OPT|
00006640  20 70 61 73 73 25 3a 4d  4f 56 20 46 4c 41 47 2c  | pass%:MOV FLAG,|
00006650  23 34 3a 5d 0d 28 82 39  c9 20 28 66 6c 61 67 25  |#4:].(.9. (flag%|
00006660  80 34 29 3d 30 20 80 20  28 66 6c 61 67 25 80 33  |.4)=0 . (flag%.3|
00006670  29 3c 3e 30 3a 5b 4f 50  54 20 70 61 73 73 25 3a  |)<>0:[OPT pass%:|
00006680  4d 4f 56 20 46 4c 41 47  2c 23 33 3a 5d 0d 28 8c  |MOV FLAG,#3:].(.|
00006690  38 c9 20 28 66 6c 61 67  25 80 34 29 3d 30 20 80  |8. (flag%.4)=0 .|
000066a0  20 28 66 6c 61 67 25 80  33 29 3d 30 3a 5b 4f 50  | (flag%.3)=0:[OP|
000066b0  54 20 70 61 73 73 25 3a  4d 4f 56 20 46 4c 41 47  |T pass%:MOV FLAG|
000066c0  2c 23 30 3a 5d 0d 28 96  05 cb 0d 28 a0 0e 5b 4f  |,#0:].(....(..[O|
000066d0  50 54 20 70 61 73 73 25  0d 28 aa 0a 2e 6d 61 72  |PT pass%.(...mar|
000066e0  67 32 0d 28 b4 05 5d 0d  28 be 05 cd 0d 28 c8 05  |g2.(..].(....(..|
000066f0  cc 0d 28 d2 0f e7 20 77  72 61 70 3d 6f 6e 20 8c  |..(... wrap=on .|
00006700  0d 28 dc 0e 5b 4f 50 54  20 70 61 73 73 25 0d 28  |.(..[OPT pass%.(|
00006710  e6 18 41 44 44 20 4d 52  2c 61 64 64 72 6f 2c 61  |..ADD MR,addro,a|
00006720  64 64 72 73 63 31 0d 28  f0 0e 43 4d 50 20 72 6f  |ddrsc1.(..CMP ro|
00006730  77 2c 23 30 0d 28 fa 1b  4d 4f 56 20 74 65 6d 70  |w,#0.(..MOV temp|
00006740  31 2c 23 32 35 36 2a 28  73 75 79 25 2d 31 29 0d  |1,#256*(suy%-1).|
00006750  29 04 20 41 44 44 20 74  65 6d 70 31 2c 74 65 6d  |). ADD temp1,tem|
00006760  70 31 2c 74 65 6d 70 31  2c 41 53 52 20 23 32 0d  |p1,temp1,ASR #2.|
00006770  29 0e 14 4d 4f 56 4e 45  20 74 65 6d 70 32 2c 23  |)..MOVNE temp2,#|
00006780  33 32 30 0d 29 18 18 52  53 42 4e 45 20 74 65 6d  |320.)..RSBNE tem|
00006790  70 32 2c 74 65 6d 70 32  2c 23 30 0d 29 22 12 ec  |p2,temp2,#0.)"..|
000067a0  51 20 74 65 6d 70 32 2c  74 65 6d 70 31 0d 29 2c  |Q temp2,temp1.),|
000067b0  13 43 4d 50 20 72 6f 77  2c 23 73 75 79 25 2d 31  |.CMP row,#suy%-1|
000067c0  0d 29 36 14 4d 4f 56 4e  45 20 74 65 6d 70 31 2c  |.)6.MOVNE temp1,|
000067d0  23 33 32 30 0d 29 40 18  52 53 42 45 51 20 74 65  |#320.)@.RSBEQ te|
000067e0  6d 70 31 2c 74 65 6d 70  31 2c 23 30 0d 29 4a 16  |mp1,temp1,#0.)J.|
000067f0  4c 44 52 42 20 54 4d 2c  5b 4d 52 2c 74 65 6d 70  |LDRB TM,[MR,temp|
00006800  32 5d 0d 29 54 16 4c 44  52 42 20 42 4d 2c 5b 4d  |2].)T.LDRB BM,[M|
00006810  52 2c 74 65 6d 70 31 5d  0d 29 5e 0e 43 4d 50 20  |R,temp1].)^.CMP |
00006820  63 6f 6c 2c 23 30 0d 29  68 12 53 55 42 4e 45 20  |col,#0.)h.SUBNE |
00006830  54 52 2c 4d 52 2c 23 31  0d 29 72 17 41 44 44 45  |TR,MR,#1.)r.ADDE|
00006840  51 20 54 52 2c 4d 52 2c  23 73 75 78 25 2d 31 0d  |Q TR,MR,#sux%-1.|
00006850  29 7c 16 4c 44 52 42 20  54 4c 2c 5b 54 52 2c 74  |)|.LDRB TL,[TR,t|
00006860  65 6d 70 32 5d 0d 29 86  16 4c 44 52 42 20 42 4c  |emp2].)..LDRB BL|
00006870  2c 5b 54 52 2c 74 65 6d  70 31 5d 0d 29 90 10 4c  |,[TR,temp1].)..L|
00006880  44 52 42 20 4d 4c 2c 5b  54 52 5d 0d 29 9a 13 43  |DRB ML,[TR].)..C|
00006890  4d 50 20 63 6f 6c 2c 23  73 75 78 25 2d 31 0d 29  |MP col,#sux%-1.)|
000068a0  a4 12 41 44 44 4e 45 20  4d 52 2c 4d 52 2c 23 31  |..ADDNE MR,MR,#1|
000068b0  0d 29 ae 17 53 55 42 45  51 20 4d 52 2c 4d 52 2c  |.)..SUBEQ MR,MR,|
000068c0  23 73 75 78 25 2d 31 0d  29 b8 16 4c 44 52 42 20  |#sux%-1.)..LDRB |
000068d0  54 52 2c 5b 4d 52 2c 74  65 6d 70 32 5d 0d 29 c2  |TR,[MR,temp2].).|
000068e0  16 4c 44 52 42 20 42 52  2c 5b 4d 52 2c 74 65 6d  |.LDRB BR,[MR,tem|
000068f0  70 31 5d 0d 29 cc 10 4c  44 52 42 20 4d 52 2c 5b  |p1].)..LDRB MR,[|
00006900  4d 52 5d 0d 29 d6 05 5d  0d 29 e0 05 cc 0d 29 ea  |MR].)..].)....).|
00006910  0e 5b 4f 50 54 20 70 61  73 73 25 0d 29 f4 18 41  |.[OPT pass%.)..A|
00006920  44 44 20 4d 52 2c 61 64  64 72 6f 2c 61 64 64 72  |DD MR,addro,addr|
00006930  73 63 31 0d 29 fe 11 4d  4f 56 20 74 65 6d 70 31  |sc1.)..MOV temp1|
00006940  2c 63 6f 6c 0d 2a 08 12  4d 4f 56 53 20 74 65 6d  |,col.*..MOVS tem|
00006950  70 32 2c 72 6f 77 0d 2a  12 18 4c 44 52 4e 45 42  |p2,row.*..LDRNEB|
00006960  20 54 52 2c 5b 4d 52 2c  23 2d 33 31 39 5d 0d 2a  | TR,[MR,#-319].*|
00006970  1c 18 4c 44 52 4e 45 42  20 54 4d 2c 5b 4d 52 2c  |..LDRNEB TM,[MR,|
00006980  23 2d 33 32 30 5d 0d 2a  26 18 4c 44 52 4e 45 42  |#-320].*&.LDRNEB|
00006990  20 54 4c 2c 5b 4d 52 2c  23 2d 33 32 31 5d 0d 2a  | TL,[MR,#-321].*|
000069a0  30 11 ec 51 20 54 52 2c  23 62 6f 72 64 65 72 0d  |0..Q TR,#border.|
000069b0  2a 3a 11 ec 51 20 54 4d  2c 23 62 6f 72 64 65 72  |*:..Q TM,#border|
000069c0  0d 2a 44 11 ec 51 20 54  4c 2c 23 62 6f 72 64 65  |.*D..Q TL,#borde|
000069d0  72 0d 2a 4e 15 43 4d 50  20 74 65 6d 70 32 2c 23  |r.*N.CMP temp2,#|
000069e0  73 75 79 25 2d 31 0d 2a  58 17 4c 44 52 4e 45 42  |suy%-1.*X.LDRNEB|
000069f0  20 42 4c 2c 5b 4d 52 2c  23 33 31 39 5d 0d 2a 62  | BL,[MR,#319].*b|
00006a00  17 4c 44 52 4e 45 42 20  42 4d 2c 5b 4d 52 2c 23  |.LDRNEB BM,[MR,#|
00006a10  33 32 30 5d 0d 2a 6c 17  4c 44 52 4e 45 42 20 42  |320].*l.LDRNEB B|
00006a20  52 2c 5b 4d 52 2c 23 33  32 31 5d 0d 2a 76 11 ec  |R,[MR,#321].*v..|
00006a30  51 20 42 52 2c 23 62 6f  72 64 65 72 0d 2a 80 11  |Q BR,#border.*..|
00006a40  ec 51 20 42 4d 2c 23 62  6f 72 64 65 72 0d 2a 8a  |.Q BM,#border.*.|
00006a50  11 ec 51 20 42 4c 2c 23  62 6f 72 64 65 72 0d 2a  |..Q BL,#border.*|
00006a60  94 14 4c 44 52 42 20 4d  4c 2c 5b 4d 52 2c 23 2d  |..LDRB ML,[MR,#-|
00006a70  31 5d 0d 2a 9e 13 4c 44  52 42 20 4d 52 2c 5b 4d  |1].*..LDRB MR,[M|
00006a80  52 2c 23 31 5d 0d 2a a8  10 43 4d 50 20 74 65 6d  |R,#1].*..CMP tem|
00006a90  70 31 2c 23 30 0d 2a b2  11 ec 51 20 54 4c 2c 23  |p1,#0.*...Q TL,#|
00006aa0  62 6f 72 64 65 72 0d 2a  bc 11 ec 51 20 4d 4c 2c  |border.*...Q ML,|
00006ab0  23 62 6f 72 64 65 72 0d  2a c6 11 ec 51 20 42 4c  |#border.*...Q BL|
00006ac0  2c 23 62 6f 72 64 65 72  0d 2a d0 15 43 4d 50 20  |,#border.*..CMP |
00006ad0  74 65 6d 70 31 2c 23 73  75 78 25 2d 31 0d 2a da  |temp1,#sux%-1.*.|
00006ae0  11 ec 51 20 54 52 2c 23  62 6f 72 64 65 72 0d 2a  |..Q TR,#border.*|
00006af0  e4 11 ec 51 20 4d 52 2c  23 62 6f 72 64 65 72 0d  |...Q MR,#border.|
00006b00  2a ee 11 ec 51 20 42 52  2c 23 62 6f 72 64 65 72  |*...Q BR,#border|
00006b10  0d 2a f8 05 5d 0d 2b 02  05 cd 0d 2b 0c 05 cd 0d  |.*..].+....+....|
00006b20  2b 16 05 7f 0d 2b 20 56  85 20 32 35 35 2c 22 50  |+....+ V. 255,"P|
00006b30  72 6f 67 72 61 6d 20 45  72 72 6f 72 3a 20 61 74  |rogram Error: at|
00006b40  74 65 6d 70 74 20 74 6f  20 63 6f 6d 70 69 6c 65  |tempt to compile|
00006b50  20 45 4c 53 45 20 6f 72  20 45 4e 44 3b 20 73 68  | ELSE or END; sh|
00006b60  6f 75 6c 64 20 62 65 20  68 61 6e 64 6c 65 64 20  |ould be handled |
00006b70  65 6c 73 65 77 68 65 72  65 22 0d 2b 2a 05 cb 0d  |elsewhere".+*...|
00006b80  2b 34 06 3d 30 0d 2b 3e  05 3a 0d 2b 48 12 dd 20  |+4.=0.+>.:.+H.. |
00006b90  f2 70 75 73 68 28 76 25  2c 74 25 29 0d 2b 52 08  |.push(v%,t%).+R.|
00006ba0  ea 20 71 25 0d 2b 5c 26  e7 20 6e 73 69 25 3d 33  |. q%.+\&. nsi%=3|
00006bb0  20 85 20 32 35 35 2c 22  43 41 20 53 74 61 63 6b  | . 255,"CA Stack|
00006bc0  20 4f 76 65 72 46 6c 6f  77 22 0d 2b 66 29 c8 94  | OverFlow".+f)..|
00006bd0  20 73 25 28 31 29 2c 73  25 28 32 29 3a c8 94 20  | s%(1),s%(2):.. |
00006be0  73 25 28 30 29 2c 73 25  28 31 29 3a 6e 73 69 25  |s%(0),s%(1):nsi%|
00006bf0  2b 3d 31 0d 2b 70 35 64  75 6d 6d 79 25 3d a4 6d  |+=1.+p5dummy%=.m|
00006c00  6f 76 28 73 25 28 30 29  2c 76 25 2c 74 25 2c 22  |ov(s%(0),v%,t%,"|
00006c10  22 29 3a 50 25 21 2d 34  3d 28 50 25 21 2d 34 29  |"):P%!-4=(P%!-4)|
00006c20  84 28 31 3c 3c 32 30 29  0d 2b 7a 05 e1 0d 2b 84  |.(1<<20).+z...+.|
00006c30  05 3a 0d 2b 8e 0b dd 20  f2 70 75 6c 6c 0d 2b 98  |.:.+... .pull.+.|
00006c40  32 e7 20 6e 73 69 25 3d  30 20 85 20 32 35 35 2c  |2. nsi%=0 . 255,|
00006c50  22 49 6e 73 75 66 66 69  63 69 65 6e 74 20 64 61  |"Insufficient da|
00006c60  74 61 20 6f 6e 20 43 41  20 53 74 61 63 6b 22 0d  |ta on CA Stack".|
00006c70  2b a2 29 c8 94 20 73 25  28 30 29 2c 73 25 28 31  |+.).. s%(0),s%(1|
00006c80  29 3a c8 94 20 73 25 28  31 29 2c 73 25 28 32 29  |):.. s%(1),s%(2)|
00006c90  3a 6e 73 69 25 2d 3d 31  0d 2b ac 05 e1 0d 2b b6  |:nsi%-=1.+....+.|
00006ca0  05 3a 0d 2b c0 14 dd 20  a4 65 6e 73 75 72 65 72  |.:.+... .ensurer|
00006cb0  65 67 28 69 25 29 0d 2b  ca 08 ea 20 66 24 0d 2b  |eg(i%).+... f$.+|
00006cc0  d4 16 e7 20 6f 70 74 79  70 65 25 28 69 25 29 3d  |... optype%(i%)=|
00006cd0  2d 33 20 8c 0d 2b de 2e  f2 70 75 73 68 28 6f 70  |-3 ..+...push(op|
00006ce0  6e 75 6d 25 28 69 25 29  2c 2d 33 29 3a 66 24 3d  |num%(i%),-3):f$=|
00006cf0  c3 73 25 28 30 29 2b 22  2c 2d 32 22 3a f2 70 75  |.s%(0)+",-2":.pu|
00006d00  6c 6c 0d 2b e8 1a cc 20  66 24 3d c3 6f 70 6e 75  |ll.+... f$=.opnu|
00006d10  6d 25 28 69 25 29 2b 22  2c 2d 32 22 0d 2b f2 05  |m%(i%)+",-2".+..|
00006d20  cd 0d 2b fc 07 3d 66 24  0d 2c 06 05 3a 0d 2c 10  |..+..=f$.,..:.,.|
00006d30  2a dd 20 f2 72 6f 74 20  c8 94 20 73 25 28 30 29  |*. .rot .. s%(0)|
00006d40  2c 73 25 28 31 29 3a c8  94 20 73 25 28 31 29 2c  |,s%(1):.. s%(1),|
00006d50  73 25 28 32 29 3a e1 0d  2c 1a 1c dd 20 f2 73 77  |s%(2):..,... .sw|
00006d60  61 70 20 c8 94 20 73 25  28 30 29 2c 73 25 28 31  |ap .. s%(0),s%(1|
00006d70  29 3a e1 0d 2c 24 2b dd  20 f2 69 72 6f 74 20 c8  |):..,$+. .irot .|
00006d80  94 20 73 25 28 31 29 2c  73 25 28 32 29 3a c8 94  |. s%(1),s%(2):..|
00006d90  20 73 25 28 30 29 2c 73  25 28 31 29 3a e1 0d 2c  | s%(0),s%(1):..,|
00006da0  2e 05 3a 0d 2c 38 12 dd  20 a4 6e 6f 74 63 6f 6e  |..:.,8.. .notcon|
00006db0  64 28 63 24 29 0d 2c 42  0b c8 8e 20 63 24 20 ca  |d(c$).,B... c$ .|
00006dc0  0d 2c 4c 0d c9 20 22 22  3a 3d 22 23 22 0d 2c 56  |.,L.. "":="#".,V|
00006dd0  0d c9 20 22 23 22 3a 3d  22 22 0d 2c 60 0f c9 20  |.. "#":="".,`.. |
00006de0  22 3d 22 3a 3d 22 3c 3e  22 0d 2c 6a 0f c9 20 22  |"=":="<>".,j.. "|
00006df0  3c 3e 22 3a 3d 22 3d 22  0d 2c 74 0f c9 20 22 3e  |<>":="=".,t.. ">|
00006e00  22 3a 3d 22 3c 3d 22 0d  2c 7e 0f c9 20 22 3c 3d  |":="<=".,~.. "<=|
00006e10  22 3a 3d 22 3e 22 0d 2c  88 0f c9 20 22 3c 22 3a  |":=">".,... "<":|
00006e20  3d 22 3e 3d 22 0d 2c 92  0f c9 20 22 3e 3d 22 3a  |=">=".,... ">=":|
00006e30  3d 22 3c 22 0d 2c 9c 05  cb 0d 2c a6 1e 85 20 32  |="<".,....,... 2|
00006e40  35 35 2c 22 45 72 72 6f  72 20 69 6e 20 46 4e 6e  |55,"Error in FNn|
00006e50  6f 74 63 6f 6e 64 22 0d  2c b0 05 3a 0d 2c ba 1c  |otcond".,..:.,..|
00006e60  dd 20 a4 6d 6f 76 28 72  65 67 25 2c 76 25 2c 74  |. .mov(reg%,v%,t|
00006e70  25 2c 63 6f 6e 64 24 29  0d 2c c4 0a c8 8e 20 b9  |%,cond$).,.... .|
00006e80  20 ca 0d 2c ce 23 c9 20  74 25 3d 2d 32 3a 5b 4f  | ..,.#. t%=-2:[O|
00006e90  50 54 20 70 61 73 73 25  3a ec 51 20 72 65 67 25  |PT pass%:.Q reg%|
00006ea0  2c 76 25 3a 5d 0d 2c d8  24 c9 20 76 25 3e 3d 30  |,v%:].,.$. v%>=0|
00006eb0  3a 5b 4f 50 54 20 70 61  73 73 25 3a ec 51 20 72  |:[OPT pass%:.Q r|
00006ec0  65 67 25 2c 23 76 25 3a  5d 0d 2c e2 23 7f 3a 5b  |eg%,#v%:].,.#.:[|
00006ed0  4f 50 54 20 70 61 73 73  25 3a 4d 56 4e 45 51 20  |OPT pass%:MVNEQ |
00006ee0  72 65 67 25 2c 23 ac 20  76 25 3a 5d 0d 2c ec 05  |reg%,#. v%:].,..|
00006ef0  cb 0d 2c f6 28 50 25 21  2d 34 3d 28 50 25 21 2d  |..,.(P%!-4=(P%!-|
00006f00  34 29 84 28 a4 63 6f 6e  64 63 6f 64 65 28 63 6f  |4).(.condcode(co|
00006f10  6e 64 24 29 3c 3c 32 38  29 0d 2d 00 06 3d 30 0d  |nd$)<<28).-..=0.|
00006f20  2d 0a 05 3a 0d 2d 14 1c  dd 20 a4 63 6d 70 28 72  |-..:.-... .cmp(r|
00006f30  65 67 25 2c 76 25 2c 74  25 2c 63 6f 6e 64 24 29  |eg%,v%,t%,cond$)|
00006f40  0d 2d 1e 0a c8 8e 20 b9  20 ca 0d 2d 28 26 c9 20  |.-.... . ..-(&. |
00006f50  74 25 3d 2d 32 3a 5b 4f  50 54 20 70 61 73 73 25  |t%=-2:[OPT pass%|
00006f60  3a 43 4d 50 45 51 20 72  65 67 25 2c 76 25 3a 5d  |:CMPEQ reg%,v%:]|
00006f70  0d 2d 32 27 c9 20 76 25  3e 3d 30 3a 5b 4f 50 54  |.-2'. v%>=0:[OPT|
00006f80  20 70 61 73 73 25 3a 43  4d 50 45 51 20 72 65 67  | pass%:CMPEQ reg|
00006f90  25 2c 23 76 25 3a 5d 0d  2d 3c 22 7f 3a 5b 4f 50  |%,#v%:].-<".:[OP|
00006fa0  54 20 70 61 73 73 25 3a  43 4d 4e 45 51 20 72 65  |T pass%:CMNEQ re|
00006fb0  67 25 2c 23 2d 76 25 3a  5d 0d 2d 46 05 cb 0d 2d  |g%,#-v%:].-F...-|
00006fc0  50 28 50 25 21 2d 34 3d  28 50 25 21 2d 34 29 84  |P(P%!-4=(P%!-4).|
00006fd0  28 a4 63 6f 6e 64 63 6f  64 65 28 63 6f 6e 64 24  |(.condcode(cond$|
00006fe0  29 3c 3c 32 38 29 0d 2d  5a 06 3d 30 0d 2d 64 05  |)<<28).-Z.=0.-d.|
00006ff0  3a 0d 2d 6e 15 dd 20 a4  62 28 61 64 64 72 25 2c  |:.-n.. .b(addr%,|
00007000  63 6f 6e 64 24 29 0d 2d  78 1a 5b 4f 50 54 20 70  |cond$).-x.[OPT p|
00007010  61 73 73 25 3a 42 45 51  20 61 64 64 72 25 3a 5d  |ass%:BEQ addr%:]|
00007020  0d 2d 82 28 50 25 21 2d  34 3d 28 50 25 21 2d 34  |.-.(P%!-4=(P%!-4|
00007030  29 84 28 a4 63 6f 6e 64  63 6f 64 65 28 63 6f 6e  |).(.condcode(con|
00007040  64 24 29 3c 3c 32 38 29  0d 2d 8c 06 3d 30 0d 2d  |d$)<<28).-..=0.-|
00007050  96 05 3a 0d 2d a0 3d dd  20 a4 63 6f 6e 64 63 6f  |..:.-.=. .condco|
00007060  64 65 28 63 24 29 20 3d  20 63 6f 6e 64 63 6f 6e  |de(c$) = condcon|
00007070  76 25 28 28 a7 22 40 20  3d 20 3c 20 3e 20 3c 3d  |v%((."@ = < > <=|
00007080  3e 3d 3c 3e 23 22 2c 63  24 29 2d 31 29 81 32 29  |>=<>#",c$)-1).2)|
00007090  0d 2d aa 05 3a 0d 2d b4  0b dd 20 f2 71 75 69 74  |.-..:.-... .quit|
000070a0  0d 2d be 1b c8 99 20 22  57 69 6d 70 5f 53 65 74  |.-.... "Wimp_Set|
000070b0  4d 6f 64 65 22 2c 6d 6f  64 65 25 0d 2d c8 08 c8  |Mode",mode%.-...|
000070c0  97 20 ee 0d 2d d2 05 e1  0d 2d dc 05 3a 0d 2d e6  |. ..-....-..:.-.|
000070d0  10 dd 20 a4 77 69 6d 70  65 72 72 6f 72 0d 2d f0  |.. .wimperror.-.|
000070e0  06 ef 36 0d 2d fa 0e ea  20 66 24 2c 63 6b 24 2c  |..6.-... f$,ck$,|
000070f0  6b 0d 2e 04 0d e7 20 9f  3c 3e 31 37 20 8c 0d 2e  |k..... .<>17 ...|
00007100  0e 0d 2a 46 58 20 31 31  33 20 31 0d 2e 18 0d 2a  |..*FX 113 1....*|
00007110  46 58 20 31 31 32 20 31  0d 2e 22 09 ef 32 36 3a  |FX 112 1.."..26:|
00007120  ee 0d 2e 2c 09 f2 71 75  69 74 0d 2e 36 25 c8 99  |...,..quit..6%..|
00007130  20 22 57 69 6d 70 5f 50  6f 6c 6c 22 2c 30 2c 75  | "Wimp_Poll",0,u|
00007140  62 6c 6f 63 6b 25 20 b8  20 72 65 61 73 6f 6e 0d  |block% . reason.|
00007150  2e 40 41 21 6d 62 6c 6f  63 6b 25 3d 9f 3a 24 28  |.@A!mblock%=.:$(|
00007160  6d 62 6c 6f 63 6b 25 2b  34 29 3d f6 24 2b 22 20  |mblock%+4)=.$+" |
00007170  28 69 6e 74 65 72 6e 61  6c 20 65 72 72 6f 72 20  |(internal error |
00007180  63 6f 64 65 20 22 2b c3  9e 2b 22 29 22 2b bd 30  |code "+..+")"+.0|
00007190  0d 2e 4a 35 c8 99 20 22  57 69 6d 70 5f 52 65 70  |..J5.. "Wimp_Rep|
000071a0  6f 72 74 45 72 72 6f 72  22 2c 6d 62 6c 6f 63 6b  |ortError",mblock|
000071b0  25 2c 31 2c 22 41 72 63  41 75 74 22 20 b8 20 2c  |%,1,"ArcAut" . ,|
000071c0  72 65 73 70 25 0d 2e 54  15 e7 20 72 65 73 70 25  |resp%..T.. resp%|
000071d0  3d 32 20 3d b9 20 8b 20  3d a3 0d 2e 5e 05 cd 0d  |=2 =. . =...^...|
000071e0  2e 68 0b 2a 46 58 31 35  20 31 0d 2e 72 07 f5 20  |.h.*FX15 1..r.. |
000071f0  db 0d 2e 7c 3a 74 24 3d  22 41 67 61 69 6e 20 20  |...|:t$="Again  |
00007200  53 61 76 65 20 20 20 4c  6f 61 64 20 20 20 4e 65  |Save   Load   Ne|
00007210  78 74 20 20 20 43 6f 6e  74 2e 20 20 50 68 61 73  |xt   Cont.  Phas|
00007220  65 20 20 51 75 69 74 20  20 20 22 0d 2e 86 23 c8  |e  Quit   "...#.|
00007230  97 20 c8 93 20 31 32 38  30 2d 32 32 34 2c 31 30  |. .. 1280-224,10|
00007240  32 34 2d 32 32 34 2c 32  32 33 2c 32 32 33 0d 2e  |24-224,223,223..|
00007250  90 08 c8 97 20 ee 0d 2e  9a 07 f1 74 24 0d 2e a4  |.... ......t$...|
00007260  18 f5 20 c8 97 20 78 25  2c 79 25 2c 7a 25 3a fd  |.. .. x%,y%,z%:.|
00007270  20 7a 25 3d 30 0d 2e ae  05 f5 0d 2e b8 0f c8 97  | z%=0...........|
00007280  20 78 25 2c 79 25 2c 62  25 0d 2e c2 14 6b 31 25  | x%,y%,b%....k1%|
00007290  3d 28 31 30 32 33 2d 79  25 29 81 33 32 0d 2e cc  |=(1023-y%).32...|
000072a0  1c fb 20 30 20 c8 9c 20  30 3a fb 20 31 32 38 2b  |.. 0 .. 0:. 128+|
000072b0  36 33 20 c8 9c 20 32 35  35 0d 2e d6 1b f1 8a 30  |63 .. 255......0|
000072c0  2c 6b 31 25 29 3b c1 74  24 2c 37 2a 6b 31 25 2b  |,k1%);.t$,7*k1%+|
000072d0  31 2c 35 29 0d 2e e0 11  f5 20 c8 97 20 78 25 2c  |1,5)..... .. x%,|
000072e0  79 25 2c 7a 25 0d 2e ea  14 6b 32 25 3d 28 31 30  |y%,z%....k2%=(10|
000072f0  32 33 2d 79 25 29 81 33  32 0d 2e f4 16 fd 20 6b  |23-y%).32..... k|
00007300  32 25 3c 3e 6b 31 25 20  84 20 7a 25 3e 3d 34 0d  |2%<>k1% . z%>=4.|
00007310  2e fe 1a fb 20 36 33 20  c8 9c 20 32 35 35 3a fb  |.... 63 .. 255:.|
00007320  20 31 32 38 20 c8 9c 20  30 0d 2f 08 1b f1 8a 30  | 128 .. 0./....0|
00007330  2c 6b 31 25 29 3b c1 74  24 2c 37 2a 6b 31 25 2b  |,k1%);.t$,7*k1%+|
00007340  31 2c 35 29 0d 2f 12 0b  fd 20 7a 25 3e 3d 34 0d  |1,5)./... z%>=4.|
00007350  2f 1c 08 c8 97 20 87 0d  2f 26 17 c8 97 20 c8 93  |/.... ../&... ..|
00007360  20 30 2c 30 2c 31 32 37  39 2c 31 30 32 33 0d 2f  | 0,0,1279,1023./|
00007370  30 0c c8 8e 20 6b 31 25  20 ca 0d 2f 3a 07 c9 20  |0... k1% ../:.. |
00007380  30 0d 2f 44 0d 2a 46 58  20 31 31 33 20 31 0d 2f  |0./D.*FX 113 1./|
00007390  4e 0d 2a 46 58 20 31 31  32 20 31 0d 2f 58 0b ef  |N.*FX 112 1./X..|
000073a0  32 36 3a ee 3a db 0d 2f  62 09 f2 6d 61 69 6e 0d  |26:.:../b..main.|
000073b0  2f 6c 07 c9 20 31 0d 2f  76 0b f1 8a 30 2c 37 29  |/l.. 1./v...0,7)|
000073c0  3b 0d 2f 80 10 e8 20 22  4e 61 6d 65 22 3b 27 66  |;./... "Name";'f|
000073d0  24 0d 2f 8a 2e ff 28 22  53 63 72 65 65 6e 53 61  |$./...("ScreenSa|
000073e0  76 65 20 3c 41 72 63 41  75 74 24 44 69 72 3e 2e  |ve <ArcAut$Dir>.|
000073f0  5e 2e 53 63 72 65 65 6e  73 2e 22 2b 66 24 29 0d  |^.Screens."+f$).|
00007400  2f 94 07 c9 20 32 0d 2f  9e 0b f1 8a 30 2c 37 29  |/... 2./....0,7)|
00007410  3b 0d 2f a8 09 f2 6c 6f  61 64 0d 2f b2 22 c8 94  |;./...load./."..|
00007420  20 21 61 73 63 31 2c 21  61 73 63 32 3a 21 61 62  | !asc1,!asc2:!ab|
00007430  61 6e 6b 3d 33 2d 21 61  62 61 6e 6b 0d 2f bc 1a  |ank=3-!abank./..|
00007440  c9 20 33 3a f2 74 65 78  74 3a c8 96 3a d6 20 61  |. 3:.text:..:. a|
00007450  75 74 63 6f 64 65 0d 2f  c6 12 c9 20 34 3a f2 74  |utcode./... 4:.t|
00007460  65 78 74 3a f2 61 75 74  0d 2f d0 13 c9 20 35 3a  |ext:.aut./... 5:|
00007470  21 61 67 3d 21 61 67 20  82 20 31 0d 2f da 10 c9  |!ag=!ag . 1./...|
00007480  20 36 3a f2 71 75 69 74  3a 3d a3 0d 2f e4 05 cb  | 6:.quit:=../...|
00007490  0d 2f ee 07 fd 20 a3 0d  ff                       |./... ...|
00007499