Home » Personal collection » Acorn hard disk » zipped_disks » 2000_apps_2 » apps2/!ChangeFSI/ChangeFSI

apps2/!ChangeFSI/ChangeFSI

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

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

Tape/disk: Home » Personal collection » Acorn hard disk » zipped_disks » 2000_apps_2
Filename: apps2/!ChangeFSI/ChangeFSI
Read OK:
File size: 28885 bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10REM > ChangeFSI
  140areanumber%=0
  150SYS"OS_GetEnv" TO A$
  160task%=INSTR(A$," -wimp"):IFtask% THEN
  170DIM z%(1),p%(3),s%(3),m$(30)
  180A%=OPENIN"<ChangeFSI$Dir>.Messages"
  190B%=-1:REPEAT B%+=1:m$(B%)=GET$#A%:UNTILEOF#A%:CLOSE#A%
  200startfile%=RIGHT$(A$,6)<>"-wimp "
  210DIM taskid%4:$taskid%="TASK"
  220SYS "Wimp_Initialise",200,!taskid%,m$(20) TO version%
  230IF version%>=350 THEN
  240SYS"OS_Memory",8+(2<<8) TO ,r1,r2:vramsize%=r1*r2
  250IF vramsize%>0 vram%=TRUE ELSEvram%=FALSE
  260ELSE
  270vram%=FALSE
  280ENDIF
  290Wimp    = (1<<18) + (3<<6)
  300CreateW = Wimp+1:OpenW   = Wimp+5 :CloseW  = Wimp+6:RedrawW = Wimp+8
  310UpdateW = Wimp+9:GetR%   = Wimp+10:GetW    = Wimp+11:SetI   = Wimp+13
  320GetI    = Wimp+14:GetP   = Wimp+15:Drag    = Wimp+16:CrMenu = Wimp+20
  330DcMenu  = Wimp+21
  340SYS "OS_SWINumberFromString",,"Wimp_PollIdle" TO Poll%
  350SYS "OS_SWINumberFromString",,"XOS_SpriteOp" TO spopx%
  360SYS "OS_SWINumberFromString",,"OS_SpriteOp" TO spop%
  370SYS "OS_SWINumberFromString",,"OS_ReadMonotonicTime" TO Time%
  380SYS "OS_SWINumberFromString",,"ColourTrans_ReturnColourNumber" TO ctran%
  390SYS "OS_SWINumberFromString",,"Wimp_SetCaretPosition" TO Caretpos%
  400SYS "OS_SWINumberFromString",,"Wimp_GetCaretPosition" TO Getcaret%
  410SYS "XOS_SWINumberFromString",,"DragASprite_Start" TO dstart%;f%:IFf%AND 1 dstart%=0
  420SYS "XOS_SWINumberFromString",,"JPEG_PlotScaled" TO jpegpaint%;f%:IFf%AND 1 jpegpaint%=0
  430SYS "OS_Byte",161,&1C TO ,,f%:IF(f%AND2)=0 dstart%=0
  440nextlocation%=HIMEM
  450SYS "Wimp_SlotSize",-1,-1 TO originalslot%
  460PROClocale_initialise
  480IF version%>=300 THEN
  490DIM q% 255,ifactors% 15,factors% 15,pixtrans% 255,paltemp% 1023,buffer% 255,idata% 1023
  500ELSE
  510DIM z% 1699,q% 255,ifactors% 15,factors% 15,pixtrans% 255,paltemp% 1023,buffer% 255,idata% 2399
  520eidata%=idata%+2400
  530ENDIF
  550scrap%=FALSE:sprite%=FALSE:sar%=FALSE:saved%=TRUE:z$=STRING$(12,CHR$13)
  570SYS "OS_Byte",161,&8C TO ,,f%
  580IFf% AND 1 THEN
  590SYS"Wimp_OpenTemplate",,"<ChangeFSI$Dir>.3dTemplate"
  600ELSE
  610SYS"Wimp_OpenTemplate",,"<ChangeFSI$Dir>.Templates"
  620ENDIF
  640LOCAL ERROR
  650ON ERROR SYS"Wimp_CloseTemplate":ERROR 0,REPORT$+" (code "+STR$ERL+")"
  670IFversion%>=300 THEN
  690name=q%
  700$name="*":here%=0:largest_tem%=0
  710SYS "Wimp_LoadTemplate", ,0,,,,name,0 TO ,size%,,,,,here%
  720WHILE here%
  730IF largest_tem%<size% largest_tem%=size%
  740$name="*"
  750SYS "Wimp_LoadTemplate", ,0,,,,name,here% TO ,size%,,,,,here%
  760ENDWHILE
  770DIM z% largest_tem%
  780ENDIF
  800PROCdotemplate("Info")
  810SYS CreateW,,z% TO infow%:$!(z%+88+7*32+20)=m$(21)
  830PROCdotemplate("Processing")
  840SYS CreateW,,z% TO proc%
  850p%(0)=!(z%+88+8*32+20):p%(1)=!(z%+88+9*32+20):p%(2)=!(z%+88+10*32+20):p%(3)=!(z%+88+12*32+20)
  870PROCdotemplate("Output")
  880SYS CreateW,,z% TO output%:admode%=!(z%+88+20*32+20):adspcl%=!(z%+88+19*32+20):oldmode%=!(z%+88+34*32+20)
  900PROCdotemplate("Scaling")
  910SYS CreateW,,z% TO scalew%:adscale%=!(z%+88+1*32+20)
  920s%(0)=!(z%+88+10*32+20):s%(1)=!(z%+88+11*32+20):s%(2)=!(z%+88+12*32+20):s%(3)=!(z%+88+13*32+20)
  940PROCdotemplate("Save")
  950SYS CreateW,,z% TO save%:adsave%=!(z%+88+1*32+20):adsavesprite%=!(z%+88+0*32+20)
  970PROCdotemplate("Sprite")
  980SYS CreateW,,z% TO sinfo%:adsname%=!(z%+88+5*32+20):adsbytes%=!(z%+88+8*32+20)
  990adsx%=!(z%+88+7*32+20):adsy%=!(z%+88+9*32+20):adsm%=!(z%+88+6*32+20)
 1010PROCdotemplate("Source")
 1020SYS CreateW,,z% TO srcinfo%:adsrc%=!(z%+88+0*32+20)
 1040PROCdotemplate("Range")
 1050SYS CreateW,,z% TO raninfo%:adran%=!(z%+88+0*32+20)
 1070PROCdotemplate("Zoom")
 1080SYS CreateW,,z% TO zoom%:z%(0)=!(z%+88+4*32+20):z%(1)=!(z%+88+5*32+20)
 1100PROCdotemplate("JPEGOutput")
 1110SYS CreateW,,z% TO jpego%:adjpegq%=!(z%+88+5*32+20)
 1130PROCdotemplate("Pic")
 1140SYS CreateW,,z% TO pic%:adtitle%=z%!72
 1160RESTORE ERROR
 1170SYS"Wimp_CloseTemplate"
 1180!q%=-1:q%!4=0:q%!8=0:q%!12=68:q%!16=68:q%!20=%11000000000010
 1190$(q%+24)="!"+m$(20):SYS"Wimp_CreateIcon",,q% TO iconbar%
 1200A%=OPENIN"<ChangeFSI$Dir>.Choices":IFA%=0 THEN
 1210fast%=FALSE:dest%=1:statescale%=%10000000100:stateproc%=0:stateoutput%=&4052008:statejpeg%=&2
 1220$p%(0)="":$p%(1)="2"+decimal_point$+"2":$p%(2)="24":$p%(3)="4":$adspcl%=""
 1230$admode%="28":$s%(0)="1":$s%(1)="4":$s%(2)="1":$s%(3)="4"
 1240$adjpegq%="75":$oldmode%=""
 1250ELSE
 1260INPUT#A%,fast%,dest%,statescale%,stateproc%,stateoutput%,statejpeg%,$adjpegq%,$oldmode%
 1270INPUT#A%,$p%(0),$p%(1),$p%(2),$p%(3),$admode%,$adspcl%
 1280$p%(1)=FNlocale_convert($p%(1),".",decimal_point$)
 1290INPUT#A%,$s%(0),$s%(1),$s%(2),$s%(3)
 1300CLOSE#A%
 1310ENDIF
 1320q%!12=1<<21
 1330!q%=scalew%:FORI%=0TO9:IFstatescale%>>I%AND1 q%!8=1<<21 ELSEq%!8=0
 1340q%!4=I%:SYS SetI,,q%:NEXT
 1350FORI%=10TO13:IFstatescale%>>I%AND1 q%!8=1<<21 ELSEq%!8=0
 1360q%!4=I%+6:SYS SetI,,q%:NEXT
 1370!q%=proc%:FORI%=0TO7:IFstateproc%>>I%AND1 q%!8=1<<21 ELSEq%!8=0
 1380q%!4=I%:SYS SetI,,q%:NEXT
 1390!q%=output%:FORI%=0TO26:IFstateoutput%>>I%AND1 q%!8=1<<21 ELSEq%!8=0
 1400q%!4=I%:SYS SetI,,q%:NEXT
 1410!q%=jpego%:FORI%=0TO3:IFstatejpeg%>>I%AND1 q%!8=1<<21 ELSEq%!8=0
 1420q%!4=I%:SYS SetI,,q%:NEXT
 1430IFstateoutput%>>17AND1 q%!8=1<<22 ELSEq%!8=0
 1440!q%=output%:q%!12=1<<22:q%!4=7:SYS SetI,,q%:q%!4=8:SYS SetI,,q%:q%!4=13:SYS SetI,,q%:q%!4=14:SYS SetI,,q%
 1450PROCshowscaletofit:$z%(0)="1":$z%(1)="1"
 1460SYS "OS_UpdateMEMC" TO oldmemc
 1470jpegsave%=FALSE
 1480ON ERROR SYS"OS_UpdateMEMC",oldmemc,&700:PROCerrorbox:SYS CrMenu,,-1
 1490SYS Drag,,-1
 1500IFNOTsprite% SYS "Wimp_SlotSize",originalslot%,-1
 1510F$="":IFstartfile% startfile%=FALSE:F$=MID$(A$,INSTR(A$,"-wimp")+6):PROCcallFSI
 1520REPEAT
 1530SYS Poll%,1,q% TO A%
 1540CASE A% OF
 1550WHEN 1 :IFsprite% PROCredraw_window(!q%)
 1560WHEN 2 :PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
 1570WHEN 3 :SYS &400c3,,q%:nextlocation%=HIMEM:PROCremovearea
 1580SYS "Wimp_SlotSize",originalslot%,-1:saved%=TRUE:sprite%=FALSE
 1590WHEN 6 :PROCcheckmouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20)
 1600WHEN 7 :SYS GetP,,q%:dw%=q%!12:di%=q%!16:IFdstart% SYS"DragASprite_Stop"
 1610q%!12=0:q%!16=1:q%!20=dw%:q%!24=di%:q%!28=!q%:q%!32=q%!4:q%!36=!sar%+3
 1620IFjpegsave% THENq%!40=&c85 ELSEq%!40=&ff9
 1630temp$=FNZS(adsave%):foo%=INSTR(temp$,"."):WHILEfoo%
 1640temp$=MID$(temp$,foo%+1):foo%=INSTR(temp$,".")
 1650ENDWHILE
 1660$(q%+44)=temp$+CHR$0:!q%=44+(LENtemp$+1+3ANDNOT3)
 1670SYS "Wimp_SendMessage",17,q%,dw%,di%:myref%=q%!8
 1680WHEN 8 :PROCkey(!q%,q%!4,q%!24)
 1690WHEN 9 :PROCmenuselect(q%)
 1700WHEN 17,18:PROCreceive(q%)
 1710ENDCASE
 1720UNTIL FALSE
 1730ELSE
 1740Q%=HIMEM
 1750END=&4000000
 1760ON ERROR ON ERROR OFF:OSCLI"Set ChangeFSI$ReturnCode "+REPORT$+" (code "+STR$ERL+")":PROCremovearea:CLEAR:END=Q%:END
 1770foo%=0:A%=FNChangeFSI(A$,-1,-1,0,-1,-1,foo%,TRUE)
 1780PROCremovearea:*unset ChangeFSI$ReturnCode
 1790CLEAR:END=Q%
 1800ENDIF
 1810END
 1830DEF PROCdotemplate(a$)
 1840LOCAL A%
 1850IFversion%>300 THEN
 1860SYS "Wimp_LoadTemplate",,0,,,,a$+z$,0 TO ,,indsize%
 1870DIM A% indsize%
 1880SYS"Wimp_LoadTemplate",,z%,A%,A%+indsize%,-1,a$+z$,0
 1890ELSE
 1900SYS"Wimp_LoadTemplate",,z%,idata%,eidata%,-1,a$+z$,0 TO ,,idata%
 1910ENDIF
 1920ENDPROC
 1940DEF PROClocale_initialise
 1950LOCAL p%
 1960LOCAL ERROR
 1970ON ERROR LOCAL decimal_point$=".":ENDPROC
 1980SYS "Territory_ReadSymbols",-1,0 TO p%
 1990decimal_point$=CHR$?p%
 2000ENDPROC
 2020DEF FNlocale_convert(n$,f$,t$)
 2030IF f$=t$ THEN=n$
 2040LOCAL i%
 2050i%=INSTR(n$,f$)
 2060IF i%<>0 THEN=LEFT$(n$,i%-1)+t$+MID$(n$,i%+1)
 2070=n$
 2090DEF PROCreceive(q%)
 2100CASE q%!16 OF
 2110WHEN 0:PROCremovearea:SYS "Wimp_CloseDown":END
 2120WHEN 1:IFq%!20<>save% THEN
 2130!q%=60:q%!12=q%!8:q%!16=2:q%!36=-1:$(q%+44)="<Wimp$Scrap>"+CHR$0
 2140SYS"Wimp_SendMessage",17,q%,q%!4:scrap%=q%!8
 2150ENDIF
 2160WHEN 2:IFjpegsave% THEN
 2170SYS"OS_File",10,FNZS(q%+44),&c85,,sar%,sar%+jpegsize%
 2180ELSE
 2190SYSspop%,&10C,sar%,FNZS(q%+44)
 2200ENDIF
 2210$adsave%=FNZS(q%+44)
 2220q%!12=q%!8:q%!16=3:SYS "Wimp_SendMessage",18,q%,q%!4
 2230IF q%!36<>-1 saved%=TRUE
 2240SYS CrMenu,,-1
 2250WHEN 3:F$=FNZS(q%+44):IFscrap% scrap%=scrap%=q%!12
 2260q%!12=q%!8:q%!16=4:SYS"Wimp_SendMessage",17,q%,q%!4
 2270PROCcallFSI
 2280WHEN 5:CASE q%!40 OF
 2290WHEN &ff0,&c85
 2300q%!12=q%!8:q%!16=4:SYS"Wimp_SendMessage",17,q%,q%!4
 2310F$=FNZS(q%+44):PROCcallFSI
 2320ENDCASE
 2330WHEN 8:IFsaved%ORNOTsprite% ENDPROC
 2340!buffer%=ERR:$(buffer%+4)=m$(2)+F$+m$(3)+CHR$0
 2350SYS"Wimp_ReportError",buffer%,%10111,m$(20) TO ,A%
 2360q%!12=q%!8:IFA%<>1 SYS"Wimp_SendMessage",19,q%,0
 2370WHEN9,&400C1:IFsprite% PROCgetmodeinfo:SYS&400d1,pic%,0,-32767,32767,0
 2380PROCshowscaletofit
 2390WHEN 10:SYS"XOS_ReadVarVal","ChangeFSI$Dir",paltemp%,256,0,3 TO,,bootlen%
 2400paltemp%?bootlen%=13
 2410BPUT#q%!20,"Run "+$paltemp%
 2420ENDCASE
 2430ENDPROC
 2450DEF PROCcallFSI
 2460IF FNcheckvalues THENENDPROC
 2470A$=FNdeducemode:A%=47
 2480jpegsave%=FALSE:IFdest%=0 THEN
 2490jpegsave%=TRUE:A$="JPEG":IFFNgeticonstate(jpego%,2) A$="JPEGMONO"
 2500A$+=$adjpegq%
 2510ELSE
 2520IFFNgeticonstate(output%,15) THEN
 2530A$+=$adspcl%
 2540ELSE
 2550IFFNgeticonstate(output%,16) THEN
 2560IFFNgeticonstate(output%,5)ORFNgeticonstate(output%,11) A$+="R"
 2570ELSE
 2580SYS53,VALA$,3 TO,,A%
 2590IFA%=63 THEN
 2600IFFNgeticonstate(output%,6) A$="27t"
 2610IFFNgeticonstate(output%,12) A$="12t"
 2620ELSE
 2630IFA%=255 A$+="d"
 2640ENDIF
 2650ENDIF
 2660ENDIF
 2670ENDIF
 2680A$="garbage "+F$+" <ChangeFSI$Dir>.Foo "+A$
 2690PROCChangeFSISuffix
 2700info$="":range$=m$(19):cputime%=0
 2710IFsprite% !q%=pic%:SYS &400c3,,q%:saved%=TRUE:sprite%=FALSE
 2720nextlocation%=HIMEM
 2730SYS "Wimp_SlotSize",originalslot%,-1:PROCremovearea
 2740IFfast% SYS "OS_UpdateMEMC",&300,&700 TO oldmemc
 2750A%=FNChangeFSI(A$,-1,-1,nextlocation%,0,0,sar%,0)
 2760IFfast% SYS "OS_UpdateMEMC",oldmemc,&700
 2770IFscrap% scrap%=FALSE:SYS"OS_File",6,F$
 2780IFA%<2 AND sar%<>0 THEN
 2790$adsx%=STR$xsp%:$adsy%=STR$ysp%:IFjpegsave% THEN
 2800$adsm%="JPEG":$adsname%="JPEG"
 2810$adsbytes%=STR$jpegsize%
 2820x=xsp%*2:y=ysp%*2
 2830SYS&35,-1,4 TO,,nx:SYS&35,-1,5 TO,,ny
 2840!ifactors%=1:ifactors%!4=1:ifactors%!8=nx:ifactors%!12=ny
 2850$adsavesprite%="file_c85"
 2860IF LEFT$(F$,7)="<Wimp$S" F$="JPEGImage"
 2870ELSE
 2880SYS spopx%,&10d,sar%,pixtrans%,255,1
 2890n$=FNZS(pixtrans%):SYS spopx%,&128,sar%,n$ TO,,,x,y,,m
 2900$adsm%=STR$m:$adsname%=n$
 2910$adsbytes%=STR$sar%!12
 2920SYS&35,m,4 TO,,nx:x=x<<nx
 2930SYS&35,m,5 TO,,ny:y=y<<ny:PROCgetmodeinfo
 2940$adsavesprite%="file_ff9"
 2950IF LEFT$(F$,7)="<Wimp$S" F$="SpriteFile"
 2960ENDIF
 2970!q%=save%:q%!4=0:q%!8=0:q%!12=0:SYS SetI,,q%
 2980$adran%=range$:$adsrc%=info$+m$(0)+STR$(cputime%DIV100)+decimal_point$+RIGHT$("0"+STR$(cputime%MOD100),2)+m$(1)
 2990saved%=FALSE:sprite%=TRUE
 3030A%=LENF$:WHILEMID$("."+F$,A%,1)<>".":A%-=1:ENDWHILE
 3040$adsave%=MID$("."+F$,A%+1)
 3060pic%=FNcreate_window(x,y,F$)
 3070PROCpopup(pic%,-1)
 3080ENDIF
 3090ENDPROC
 3110DEF FNcheckvalues
 3120LOCAL e,error$,flag%
 3140IF dest%=0 AND VAL$adjpegq%>100 THEN
 3150e=1:error$=m$(22)+m$(25)+m$(23)+m$(27)+m$(24)
 3160ENDIF
 3180IF LEFT$($admode%,1)<"A" AND dest%=1 THEN
 3190SYS &35,VAL$admode%,0 TO ;flag%
 3210IF LEN$admode%=0 flag%=2
 3220IF VAL$admode%>127 AND VAL$admode%<256 flag%=2
 3230IF (flag%AND2)>0 THEN
 3240e=2:error$=m$(22)+m$(26)+m$(23)+m$(13)+m$(24)
 3250ENDIF
 3260ENDIF
 3270IF e THEN
 3280SYS Drag,,-1:!buffer%=e:$(buffer%+4)=error$+CHR$0
 3290SYS "Wimp_ReportError",buffer%,%01,m$(20) TO ,A%
 3300IFA%=2 PROCremovearea:SYS "Wimp_CloseDown":END
 3310ENDIF
 3320=e
 3340DEF PROCChangeFSISuffix
 3350safe%=TRUE
 3360IFFNgeticonstate(scalew%,1) A$+=" "+STR$tofitx+": "+STR$tofity+":":safe%=FALSE
 3370IFFNgeticonstate(scalew%,5) A$+=" 1:2":safe%=FALSE
 3380IFFNgeticonstate(scalew%,4) A$+=" 1:2 1:1":safe%=FALSE
 3390IFFNgeticonstate(scalew%,3) A$+=" 1:1 1:2":safe%=FALSE
 3400IFFNgeticonstate(scalew%,9) THEN
 3410safe%=FALSE
 3420IFVAL$s%(0) A$+=" "+$s%(0) ELSEA$+=" 1"
 3430A$+=":"+$s%(1)
 3440IFVAL$s%(2) A$+=" "+$s%(2) ELSEA$+=" 1"
 3450A$+=":"+$s%(3)
 3460ENDIF
 3470IFFNgeticonstate(scalew%,0) A$+=" -nosize"
 3480IFFNgeticonstate(scalew%,18) A$+=" -noscale"
 3490IFFNgeticonstate(scalew%,19) A$+=" -lock"
 3500IFFNgeticonstate(scalew%,6) THEN
 3510safe%=FALSE:IFFNgeticonstate(scalew%,16) A$+=" -rotate" ELSEA$+=" -rotate-"
 3520ENDIF
 3530IFFNgeticonstate(scalew%,7) A$+=" -hflip":safe%=FALSE
 3540IFFNgeticonstate(scalew%,8) A$+=" -vflip":safe%=FALSE
 3550IFFNgeticonstate(proc%,0) A$+=" -range":safe%=FALSE
 3560IFFNgeticonstate(proc%,1) A$+=" -equal":safe%=FALSE
 3570IFFNgeticonstate(proc%,2) A$+=" -nodither"
 3580IFFNgeticonstate(proc%,3) A$+=" -invert":safe%=FALSE
 3590IFFNgeticonstate(proc%,4) A$+=" -brighten"
 3600IFFNgeticonstate(proc%,5) A$+=" -black"+$p%(0)
 3610IFFNgeticonstate(proc%,6) A$+=" -gamma"+FNlocale_convert($p%(1),decimal_point$,"."):safe%=FALSE
 3620IFFNgeticonstate(proc%,7) A$+=" -sharpen"+$p%(2):safe%=FALSE
 3630IFFNgeticonstate(proc%,11) A$+=" -smooth"+$p%(3)
 3640ENDPROC
 3660DEF PROCcheckandfinish
 3670IFsaved% ORNOTsprite% PROCremovearea:SYS "Wimp_CloseDown":END
 3680!buffer%=ERR:$(buffer%+4)=m$(2)+F$+m$(3)+CHR$0
 3690SYS "Wimp_ReportError",buffer%,%10111,m$(20) TO ,A%
 3700IFA%=1 PROCremovearea:SYS "Wimp_CloseDown":END
 3710ENDPROC
 3730DEF PROCkey(handle%,icon%,key%)
 3740IFkey%=&1b SYS CrMenu,,-1:ENDPROC
 3750CASE handle% OF
 3760WHEN zoom%:CASE key% OF
 3770WHEN 13:PROCdozoom(icon%-4,0):IFicon%=4 SYS &400d2,zoom%,5,,,-1,LEN$z%(0)
 3780IFicon%=5 SYS CrMenu,,-1
 3790ENDPROC
 3800WHEN &18e,&18f:PROCdozoom(icon%-4,0)
 3810SYS &400d2,zoom%,icon%EOR1,,,-1,LEN$z%(icon%EOR5):ENDPROC
 3820ENDCASE
 3830WHEN save%
 3840IFkey%=13 PROCsavesprite:ENDPROC
 3850WHEN output%
 3860IF icon%=34 AND FNgeticonstate(output%, 24) THEN$admode% = $oldmode%:!q%=output%:q%!4=20:q%!8=0:q%!12=0:SYS SetI,,q%
 3870PROCshowscaletofit
 3880IFkey%=13 SYS CrMenu,,-1:ENDPROC
 3890IFkey%=&18e THEN
 3900CASE icon% OF
 3910WHEN 19:icon%=34:key%=oldmode%
 3920WHEN 34:icon%=22:key%=adjpegq%
 3930WHEN 22:icon%=19:key%=adspcl%
 3940ENDCASE
 3950ENDIF
 3960IFkey%=&18f THEN
 3970CASE icon% OF
 3980WHEN 22:icon%=34:key%=oldmode%
 3990WHEN 34:icon%=19:key%=adspcl%
 4000WHEN 19:icon%=22:key%=adjpegq%
 4010ENDCASE
 4020ENDIF
 4030IFkey%>1024 SYS &400d2,output%,icon%,,,-1,LEN$key%:ENDPROC
 4040WHEN proc%:CASE key% OF
 4050WHEN &18e,13:icon%+=1:IFicon%>10 icon%=8:IFkey%=13 SYS CrMenu,,-1:ENDPROC
 4060SYS &400d2,proc%,icon%,,,-1,LEN$p%(icon%-8):ENDPROC
 4070WHEN &18f:icon%-=1:IFicon%<8 icon%=10
 4080SYS &400d2,proc%,icon%,,,-1,LEN$p%(icon%-8):ENDPROC
 4090ENDCASE
 4100WHEN scalew%:CASE key% OF
 4110WHEN &18e,13:icon%+=1:IFicon%>13 icon%=10:IFkey%=13 SYS CrMenu,,-1:ENDPROC
 4120SYS &400d2,scalew%,icon%,,,-1,LEN$s%(icon%-10):ENDPROC
 4130WHEN &18f:icon%-=1:IFicon%<10 icon%=13
 4140SYS &400d2,scalew%,icon%,,,-1,LEN$s%(icon%-10):ENDPROC
 4150ENDCASE
 4160ENDCASE
 4170SYS "Wimp_ProcessKey",key%
 4180ENDPROC
 4200DEF PROCsavesprite
 4210IF F$=$adsave% THEN
 4220SYS Drag,,-1:!buffer%=3:$(buffer%+4)=m$(28)+CHR$0
 4230SYS "Wimp_ReportError",buffer%,%11,m$(20) TO ,A%
 4240IFA%=2 THEN
 4250SYS CrMenu,,-1
 4260ENDPROC
 4270ENDIF
 4280ENDIF
 4290IFjpegsave% THEN
 4300SYS"OS_File",10,$adsave%,&c85,,sar%,sar%+jpegsize%
 4310ELSE
 4320SYS spop%,&10C,sar%,$adsave%
 4330ENDIF
 4340SYS CrMenu,,-1
 4350ENDPROC
 4370DEF PROCcheckmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
 4380LOCAL moved%:moved%=FALSE
 4390IFb%AND2 THEN
 4400CASE handle% OF
 4410WHEN pic%:PROCdomenu(pic%,m$(4)+">sinfo%,"+m$(5)+">srcinfo%,"+m$(6)+">raninfo%,"+m$(7)+">zoom%,"+m$(8)+">save%,"+m$(9),m$(20))
 4420WHEN -2:PROCdomenu(101,m$(10)+">infow%,"+m$(11)+">scalew%,"+m$(12)+">proc%,"+m$(13)+">output%:dest%,"+m$(27)+">jpego%:1-dest%,"+m$(9)+","+m$(14)+":fast%AND1,"+m$(15)+","+m$(16),m$(20))
 4430ENDCASE
 4440rmenuhandle%=handle%
 4450ENDIF
 4460IFb%AND4 THEN
 4470CASE handle% OF
 4480WHEN zoom%:CASE icon% OF
 4490WHEN 0:PROCdozoom(0,1)
 4500WHEN 1:PROCdozoom(0,-1)
 4510WHEN 2:PROCdozoom(1,1)
 4520WHEN 3:PROCdozoom(1,-1)
 4530ENDCASE
 4540ENDCASE
 4550ENDIF
 4560IFb%AND1 THEN
 4570CASE handle% OF
 4580WHEN zoom%:CASE icon% OF
 4590WHEN 0:PROCdozoom(0,-1)
 4600WHEN 1:PROCdozoom(0,1)
 4610WHEN 2:PROCdozoom(1,-1)
 4620WHEN 3:PROCdozoom(1,1)
 4630ENDCASE
 4640ENDCASE
 4650ENDIF
 4660IFb%AND5 THEN
 4670CASE handle% OF
 4680WHEN output%:IF dest%=0 dest%=1:PROCdomenu(101,m$(10)+">infow%,"+m$(11)+">scalew%,"+m$(12)+">proc%,"+m$(13)+">output%:dest%,"+m$(27)+">jpego%:1-dest%,"+m$(9)+","+m$(14)+":fast%AND1,"+m$(15)+","+m$(16),m$(20)):SYS Getcaret%,,q%:moved%=TRUE
 4690CASE icon% OF
 4700WHEN 3,4,5,6:PROCkillcurrent(STR$(22+icon%)):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4710WHEN 7:PROCkillcurrent("S16,90,90"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4720WHEN 8:PROCkillcurrent("S32,90,90"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4730WHEN 9:PROCkillcurrent("0"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4740WHEN 10:PROCkillcurrent("8"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4750WHEN 11:PROCkillcurrent("12"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4760WHEN 12:PROCkillcurrent("15"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4770WHEN 13:PROCkillcurrent("S16,90,45"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4780WHEN 14:PROCkillcurrent("S32,90,45"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4790WHEN 15:PROCkillcurrent(FNdeducemode):SYS SetI,,q%:SYS Caretpos%,output%,19,,,-1,LEN($adspcl%):!q%=output%:q%!4=7:q%!8=0:q%!12=1<<22:SYS SetI,,q%:q%!4=8:SYS SetI,,q%:q%!4=13:SYS SetI,,q%:q%!4=14:SYS SetI,,q%
 4800WHEN 16:PROCkillcurrent(FNdeducemode):!q%=output%:q%!4=7:q%!8=0:q%!12=1<<22:SYS SetI,,q%:q%!4=8:SYS SetI,,q%:q%!4=13:SYS SetI,,q%:q%!4=14:SYS SetI,,q%
 4810WHEN 17:PROCkillcurrent(FNdeducemode):!q%=output%:q%!4=7:q%!8=1<<22:q%!12=1<<22:SYS SetI,,q%:q%!4=8:SYS SetI,,q%:q%!4=13:SYS SetI,,q%:q%!4=14:SYS SetI,,q%
 4820IF LEFT$($admode%,1) = "S" THEN
 4830IF RIGHT$($admode%,2) = "45" THEN
 4840PROCkillcurrent("15"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4850ELSE
 4860PROCkillcurrent("28"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:q%!4=24:SYS SetI,,q%
 4870ENDIF
 4880ENDIF
 4890WHEN 18:!q%=output%:q%!4=24:q%!8=0:q%!12=1<<21:SYS SetI,,q%
 4900WHEN 24:!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:SYS SetI,,q%:PROCkillcurrent(FNdeducemode):SYS Caretpos%,output%,34,,,-1,LEN($oldmode%)
 4910WHEN 34:IF moved% SYS Caretpos%,output%,q%!4,q%!8,q%!12,q%!16,q%!20
 4920WHEN 19:IF moved% SYS Caretpos%,output%,q%!4,q%!8,q%!12,q%!16,q%!20
 4930ENDCASE
 4940IFFNgeticonstate(output%,18) $admode%=FNdeducemode
 4950!q%=output%:q%!4=20:q%!8=0:q%!12=0:SYS SetI,,q%
 4960PROCshowscaletofit
 4970WHEN save%:CASE icon% OF
 4980WHEN 2:PROCsavesprite
 4990ENDCASE
 5000WHEN -2:IFsprite% PROCgetw(pic%):PROCopen_window(pic%,x0%,y0%,x1%,y1%,scx%,scy%,-1)
 5010WHEN jpego%:IF dest%=1 THEN
 5020SYS Getcaret%,,q%
 5030dest%=0:PROCdomenu(101,m$(10)+">infow%,"+m$(11)+">scalew%,"+m$(12)+">proc%,"+m$(13)+">output%:dest%,"+m$(27)+">jpego%:1-dest%,"+m$(9)+","+m$(14)+":fast%AND1,"+m$(15)+","+m$(16),m$(20))
 5040IF icon%=5 SYS Caretpos%,jpego%,q%!4,q%!8,q%!12,q%!16,q%!20
 5050ENDIF
 5060CASE icon% OF
 5070WHEN 3:IF b%AND4 THEN$adjpegq%=STR$(VAL$adjpegq%-1) ELSE$adjpegq%=STR$(VAL$adjpegq%+1)
 5080IF VAL$adjpegq%<0 $adjpegq%="0"
 5090IF VAL$adjpegq%>100 $adjpegq%="100"
 5100!q%=jpego%:q%!4=5:q%!8=0:q%!12=0:SYS SetI,,q%
 5110SYS Caretpos%,jpego%,5,,,-1,LEN$adjpegq%
 5120WHEN 4:IF b%AND4 THEN$adjpegq%=STR$(VAL$adjpegq%+1) ELSE$adjpegq%=STR$(VAL$adjpegq%-1)
 5130IF VAL$adjpegq%<0 $adjpegq%="0"
 5140IF VAL$adjpegq%>100 $adjpegq%="100"
 5150!q%=jpego%:q%!4=5:q%!8=0:q%!12=0:SYS SetI,,q%
 5160SYS Caretpos%,jpego%,5,,,-1,LEN$adjpegq%
 5170WHEN 5
 5180ENDCASE
 5190ENDCASE
 5200ENDIF
 5210IFb%AND&50 THEN
 5220CASE handle% OF
 5230WHEN save%:CASE icon% OF
 5240WHEN 0:PROCgetw(save%)
 5250!q%=save%:q%!4=0:SYS GetI,,q%
 5260!q%=save%:q%!4=5:q%!8+=bx%:q%!12+=by%:q%!16+=bx%:q%!20+=by%
 5270q%!24=0:q%!28=0:q%!32=&7FFFFFFF:q%!36=&7FFFFFFF
 5280t$="file_ff9":IFjpegsave% t$="file_c85"
 5290IFdstart% SYS dstart%,%11000101,1,t$,q%+8,q%+24 ELSESYS "Wimp_DragBox",,q%
 5300ENDCASE
 5310ENDCASE
 5320ENDIF
 5330ENDPROC
 5350DEF PROCdozoom(s%,a%)
 5360IFs%=0 THEN
 5370$z%(0)=STR$(VAL$z%(0)+a%):IF$z%(0)="0" $z%(0)="1"
 5380ELSE
 5390$z%(1)=STR$(VAL$z%(1)+a%):IF$z%(1)="0" $z%(1)="1"
 5400ENDIF
 5410!q%=zoom%:q%!4=4+s%:q%!8=0:q%!12=0:SYS SetI,,q%
 5420!q%=pic%:SYS GetW,,q%:f%=q%!28:SYS &400c3,,q%
 5430pic%=FNcreate_window(x,y,F$)
 5440PROCpopup(pic%,f%)
 5450ENDPROC
 5470DEF PROCdomenu(handle%,menu$,menutitle$)
 5480menuhandle%=handle%
 5490menuptr%=buffer%:indirect%=idata%
 5500i%=0
 5510menuptr%!20=44
 5520$menuptr%=menutitle$
 5530menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0
 5540menuptr%!16=200:menuptr%!24=0
 5550menuptr%+=28
 5560REPEAT i1%=i%+1:i%=INSTR(menu$+",",",",i1%)
 5570item$=MID$(menu$,i1%,i%-i1%):PROCmenuitem(item$):UNTIL item$=""
 5580menuptr%!-24=(menuptr%!-24)OR&80
 5590IFhandle%=101 SYS CrMenu,,buffer%,mousex%-64,96+9*44 ELSESYS CrMenu,,buffer%,mousex%-32,mousey%+16
 5600ENDPROC
 5620DEF PROCmenuitem(text$)
 5630IF text$="" ENDPROC
 5640flg%=0:submenu%=-1:I%=INSTR(text$,":"):IFI%THEN
 5650flg%=EVALMID$(text$,I%+1):text$=LEFT$(text$,I%-1)
 5660ENDIF
 5670I%=INSTR(text$,">"):IFI%THEN
 5680submenu%=EVALMID$(text$,I%+1):text$=LEFT$(text$,I%-1)
 5690ENDIF
 5700menuptr%!0=flg%
 5710menuptr%!4=submenu%
 5720IF(text$=m$(9)AND(F$="" OR F$="SpriteFile" OR F$="JPEGImage")) OR (text$=m$(14)ANDvram%) THEN
 5730menuptr%!8=&07400021
 5740ELSE
 5750menuptr%!8=&07000021
 5760ENDIF
 5770IFLENtext$*16+8>buffer%!16 buffer%!16=LENtext$*16+8
 5780IFLENtext$>12 THEN
 5790menuptr%!8=menuptr%!8 OR 256:menuptr%!20=LENtext$+1:menuptr%!16=0
 5800menuptr%!12=indirect%:$indirect%=text$:indirect%+=LENtext$+2
 5810ELSE
 5820$(menuptr%+12)=text$
 5830ENDIF
 5840menuptr%+=24
 5850ENDPROC
 5870DEF PROCmenuselect(menus%)
 5880SYS GetP,,paltemp%:adjust%=paltemp%!8 AND 1
 5890SYS DcMenu,,buffer%,menus%,STRING$(200," ")TO,,,a$
 5900IF a$="" THENENDPROC
 5910CASE menuhandle% OF
 5920WHEN pic%
 5930CASE a$ OF
 5940WHEN m$(9):PROCcallFSI
 5950ENDCASE
 5960WHEN 101
 5970CASE a$ OF
 5980WHEN m$(14):fast%=NOTfast%
 5990WHEN m$(27):dest%=0
 6000WHEN m$(13):dest%=1
 6010WHEN m$(9):PROCcallFSI
 6020WHEN m$(15)
 6030statescale%=0:FORI%=0TO9:statescale%+=FNgeticonstate(scalew%,I%)<<I%:NEXT
 6040FORI%=10TO13:statescale%+=FNgeticonstate(scalew%,I%+6)<<I%:NEXT
 6050stateproc%=0:FORI%=0TO7:stateproc%+=FNgeticonstate(proc%,I%)<<I%:NEXT
 6060stateoutput%=0:FORI%=0TO26:stateoutput%+=FNgeticonstate(output%,I%)<<I%:NEXT
 6070statejpeg%=0:FORI%=0TO3:statejpeg%+=FNgeticonstate(jpego%,I%)<<I%:NEXT
 6080A%=OPENOUT"<ChangeFSI$Dir>.Choices"
 6090PRINT#A%,fast%,dest%,statescale%,stateproc%,stateoutput%,statejpeg%,$adjpegq%,$oldmode%
 6100PRINT#A%,$p%(0),FNlocale_convert($p%(1),decimal_point$,"."),$p%(2),$p%(3),$admode%,$adspcl%
 6110PRINT#A%,$s%(0),$s%(1),$s%(2),$s%(3)
 6120CLOSE#A%
 6130WHEN m$(16):PROCcheckandfinish
 6140ENDCASE
 6150ENDCASE
 6160IFadjust% PROCcheckmouse(0,0,2,rmenuhandle%,0,0)
 6170ENDPROC
 6190DEF FNcreate_window(x,y,title$)
 6200x=x*VAL$z%(0)DIVVAL$z%(1):y=y*VAL$z%(0)DIVVAL$z%(1)
 6210!z%=0:z%!4=-y:z%!8=x:z%!12=0
 6220z%!40=0:z%!44=-y:z%!48=x:z%!52=0
 6230IFx<128 OR y<128 z%?35=0 ELSEz%?35=255
 6240$adtitle%="":SYS CreateW,,z% TO handle%
 6250$adtitle%=title$
 6260=handle%
 6280DEF PROCpopup(handle%,f%)
 6290SYS "OS_ReadModeVariable",-1,4 TO ,,modexshift%
 6300SYS "OS_ReadModeVariable",-1,5 TO ,,modeyshift%
 6310SYS "OS_ReadModeVariable",-1,11 TO ,,rightscr%
 6320SYS "OS_ReadModeVariable",-1,12 TO ,,topscr%
 6330rightscr%=rightscr%<<modexshift%:topscr%=topscr%<<modeyshift%
 6340PROCgetw(handle%)
 6350xo%=rightscr%/2-(x0%+x1%)/2:yo%=topscr%/2-(y0%+y1%)/2
 6360PROCopen_window(handle%,x0%+xo%,y0%+yo%,x1%+xo%,y1%+yo%,scx%,scy%,f%)
 6370ENDPROC
 6390DEF PROCopen_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%)
 6400IFhandle%=-1THENENDPROC
 6410q%!0=handle%:q%!28=bhandle%
 6420q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1%
 6430q%!20=scx%:q%!24=scy%
 6440SYS OpenW,,q%
 6450ENDPROC
 6470DEF PROCgetw(handle%)
 6480!q%=handle%:SYS GetW,,q%
 6490PROCinfo(q%+4):bhandle%=q%!28:flags%=q%!32
 6500ENDPROC
 6520DEF PROCinfo(q%)
 6530x0%=!q%:y0%=q%!4:x1%=q%!8:y1%=q%!12:scx%=q%!16:scy%=q%!20
 6540bx%=x0%-scx%:by%=y1%-scy%
 6550ENDPROC
 6570DEF PROCredraw_window(handle%)
 6580IF handle%=pic% THEN
 6590!factors%=!ifactors%*VAL$z%(0):factors%!4=ifactors%!4*VAL$z%(0)
 6600factors%!8=ifactors%!8*VAL$z%(1):factors%!12=ifactors%!12*VAL$z%(1)
 6610PROCreduce(!factors%,factors%!8):PROCreduce(factors%!4,factors%!12)
 6620!q%=handle%
 6630SYS RedrawW,,q% TO more%
 6640PROCinfo(q%+4):by%=by%-INT(y*VAL$z%(0)DIVVAL$z%(1))
 6650WHILE more%
 6660IFjpegsave% THEN
 6670IFjpegpaint% SYS jpegpaint%,sar%,bx%,by%,factors%,jpegsize%,1 TO;V%:IF(V%AND1)=0 ELSECLG
 6680ELSE
 6690SYS spopx%,&134,sar%,n$,bx%,by%,,factors%,spx%
 6700ENDIF
 6710SYS GetR%,0,q% TO more%
 6720ENDWHILE
 6730ENDIF
 6740ENDPROC
 6760DEF FNgeticonstate(handle%,icon%)
 6770!q%=handle%:q%!4=icon%:SYS GetI,,q%
 6780=q%!24>>21 AND 1
 6800DEF PROCgetmodeinfo
 6810IFjpegsave% THEN
 6820SYS&35,-1,4 TO,,nx:SYS&35,-1,5 TO,,ny
 6830!ifactors%=1:ifactors%!4=1:ifactors%!8=nx:ifactors%!12=ny
 6840ENDPROC
 6850ENDIF
 6860SYS"XWimp_ReadPixTrans",&100,sar%,n$,,,,ifactors%,pixtrans%
 6870SYS spopx%,&118,sar%,n$ TO ,,sptr%
 6880IF sptr%!32=44 THEN
 6890palptr%=0
 6900ELSE
 6910FOR grab%=0 TO 2048-8 STEP 8:paltemp%!(grab%>>1)=sptr%!(grab%+44):NEXT
 6920palptr%=paltemp%
 6930ENDIF
 6940FORQ%=0TO255:pixtrans%?Q%=Q%:NEXT
 6950IFsptr%!32=44+2048 THEN
 6960FORQ%=0TO255:SYSctran%,palptr%!(Q%<<2)TOpixtrans%?Q%:NEXT
 6970ELSE
 6980SYS "ColourTrans_SelectTable",m,palptr%,-1,-1,pixtrans%
 6990ENDIF
 7000spx%=-1:FORQ%=0TO255:IFpixtrans%?Q%<>Q% spx%=pixtrans%
 7010NEXT
 7020ENDPROC
 7040DEF FNdeducemode
 7050LOCAL m,x,y
 7060IFFNgeticonstate(output%,21) THEN
 7070IFFNgeticonstate(output%,17) THEN="JPEG8" ELSE="JPEG24"
 7080ELSE
 7090IFFNgeticonstate(output%,18) THEN
 7100SYS &6,135 TO ,,m
 7120SYS&35,-1,9 TO,,m
 7130IFm>3 THEN
 7140SYS&35,-1,4 TO,,x:SYS&35,-1,5 TO,,y
 7150x=180/(2^x):y=180/(2^y)
 7160="S"+STR$(2^m)+","+STR$x+","+STR$y
 7170ELSE
 7180=STR$MODE
 7190ENDIF
 7200ELSE
 7210IF FNgeticonstate(output%,24) THEN
 7220=$oldmode%
 7230ELSE
 7240=$admode%
 7250ENDIF
 7260ENDIF
 7270ENDIF
 7290DEF PROCshowscaletofit
 7300LOCAL m,x,y
 7310$admode%=FNdeducemode
 7320CASE ?admode% OF
 7330WHEN ASC"S"
 7340IFVALMID$($admode%,5)>VALMID$($admode%,8) x=6 ELSEx=0
 7350IFVALMID$($admode%,2)>16 x+=5 ELSEx+=4
 7360SYS&35,-1,11 TO,,tofitx:SYS&35,-1,12 TO,,tofity
 7370WHEN ASC"J"
 7380SYS&35,-1,11 TO,,tofitx:SYS&35,-1,12 TO,,tofity
 7400x=12
 7410OTHERWISE
 7420m=VAL$admode%
 7430SYS&35,m,11 TO,,tofitx:SYS&35,m,12 TO,,tofity
 7440SYS&35,m,4 TO,,x:SYS&35,m,5 TO,,y:IFy>x x=6 ELSEx=0
 7450SYS&35,m,9 TO,,y:x+=y
 7460ENDCASE
 7470tofitx+=1:tofity+=1:$adscale%=m$(17)+STR$tofitx+m$(18)+STR$tofity
 7480q%!12=1<<21:!q%=output%:FORI%=0TO11:IFI%=x q%!8=1<<21 ELSEq%!8=0
 7490q%!4=I%+3:SYS SetI,,q%:NEXT:IFx=12 q%!8=0:q%!4=24:SYS SetI,,q%
 7500ENDPROC
 7520DEF PROCkillcurrent(m$)
 7530q%!12=1<<21:!q%=output%:q%!8=0
 7540q%!4=20:SYS SetI,,q%
 7550$admode%=m$
 7570ENDPROC
 7590DEFFNZS(I%)LOCALA$:REPEATA$+=CHR$?I%:I%+=1:UNTIL?I%<14:=A$
 7610DEF PROCerrorbox
 7620SYS Drag,,-1:!buffer%=ERR:$(buffer%+4)=REPORT$+" (code "+STR$ERL+")"+CHR$0
 7630SYS "Wimp_ReportError",buffer%,%11,m$(20) TO ,A%
 7640IFA%=2 PROCremovearea:SYS "Wimp_CloseDown":END
 7650ENDPROC
 7880DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%,fast%)
 7890LOCAL A$(),r%(),g%(),b%(),rpal%(),gpal%(),bpal%(),table%(),cl%(),xl%(),xl2%()
 7900LOCAL xp%(),rm%(),rm1%(),rm2%(),vals%(),nl%(),A%(),B%(),new%(),st%(),jpq%(),m
 7910WHILELEFT$(A$,1)<>" "ANDLENA$<>0 A$=MID$(A$,2):ENDWHILE
 7920WHILELEFT$(A$,1)=" " A$=MID$(A$,2):ENDWHILE
 7930WHILERIGHT$(A$,1)=" " A$=LEFT$(A$):ENDWHILE
 7940IFFNuc(LEFT$(A$,5))="-QUIT" THEN
 7950A$=MID$(A$,7):WHILELEFT$(A$,1)<>" "ANDLENA$<>0 A$=MID$(A$,2):ENDWHILE
 7960WHILELEFT$(A$,1)=" " A$=MID$(A$,2):ENDWHILE
 7970ENDIF
 7980DIM A$(100):ARG%=0:B%=INSTR(A$," ")
 7990WHILE B%<>0
 8000ARG%+=1:A$(ARG%)=LEFT$(A$,B%-1):A$=MID$(A$,B%+1)
 8010WHILE LEFT$(A$,1)=" ":A$=MID$(A$,2):ENDWHILE
 8020B%=INSTR(A$," ")
 8030ENDWHILE
 8040IFA$<>"" ARG%+=1:A$(ARG%)=A$
 8050invert%=FALSE:range%=FALSE:sharpen%=FALSE:info%=FALSE:cache%=FALSE:cacheareanumber%=0:dither%=TRUE:black%=FALSE
 8060hist%=FALSE:equal%=FALSE:vflip%=FALSE:hflip%=FALSE:scale%=TRUE:scaleo%=TRUE:scrapf%=FALSE
 8070gamma=1:rotate%=FALSE:max%=20000000:bright%=15:lock%=FALSE
 8080rwt=.299:gwt=.587:bwt=.114
 8090IFARG%<3 THEN
 8100PRINT"ChangeFSI interactive input (read FSIinfo for command line details)"
 8110INPUT"Source file: "s$,"Destination file: "f$,"Output mode: "m$
 8120INPUT"(X)Scale (e.g. 2:1): "xs$:INPUT"Y Scale: "ys$
 8130INPUT"Info on input picture?"a$:IFFNuc(LEFT$(a$,1))="Y" info%=TRUE
 8140INPUT"Invert picture colours?"a$:IFFNuc(LEFT$(a$,1))="Y" invert%=TRUE
 8150INPUT"Compute histogram of input?"a$:IFFNuc(LEFT$(a$,1))="Y" hist%=TRUE
 8160INPUT"Apply histogram equalisation?"a$:IFFNuc(LEFT$(a$,1))="Y" equal%=TRUE
 8170INPUT"Expand input dynamic range?"a$:IFFNuc(LEFT$(a$,1))="Y" range%=TRUE:equal%=FALSE
 8180INPUT"Sharpen picture by (e.g. 12 for harsh, 24 for soft) "a$
 8190IFa$<>"" sharpen%=VALa$
 8200INPUT"Rotate?"a$:IFFNuc(LEFT$(a$,1))="Y" rotate%=1
 8210scale%=FALSE:scaleo%=FALSE:fast%=FALSE
 8220ELSE
 8230REPEAT A%=ARG%
 8240IFFNuc(A$(ARG%))="-INFO" info%=TRUE:A$(ARG%)="":ARG%-=1
 8250IFFNuc(A$(ARG%))="-HIST" hist%=TRUE:A$(ARG%)="":ARG%-=1
 8260IFFNuc(A$(ARG%))="-LOCK" lock%=TRUE:A$(ARG%)="":ARG%-=1
 8270IFFNuc(A$(ARG%))="-EQUAL" equal%=TRUE:range%=FALSE:A$(ARG%)="":ARG%-=1
 8280IFFNuc(A$(ARG%))="-RANGE" range%=TRUE:equal%=FALSE:A$(ARG%)="":ARG%-=1
 8290IFFNuc(A$(ARG%))="-INVERT" invert%=TRUE:A$(ARG%)="":ARG%-=1
 8300IFFNuc(A$(ARG%))="-NOSCALE" scale%=FALSE:scaleo%=FALSE:A$(ARG%)="":ARG%-=1
 8310IFFNuc(A$(ARG%))="-NOSIZE" scale%=FALSE:A$(ARG%)="":ARG%-=1
 8320IFFNuc(A$(ARG%))="-NODITHER" dither%=FALSE:A$(ARG%)="":ARG%-=1
 8330IFFNuc(A$(ARG%))="-BRIGHTEN" bright%=16:A$(ARG%)="":ARG%-=1
 8340IFFNuc(A$(ARG%))="-ROTATE" rotate%=1:A$(ARG%)="":ARG%-=1
 8350IFFNuc(A$(ARG%))="-ROTATE-" rotate%=-1:A$(ARG%)="":ARG%-=1
 8360IFFNuc(A$(ARG%))="-VFLIP" vflip%=TRUE:A$(ARG%)="":ARG%-=1
 8370IFFNuc(A$(ARG%))="-HFLIP" hflip%=TRUE:A$(ARG%)="":ARG%-=1
 8380IFFNuc(A$(ARG%))="-NOMODE" fast%=FALSE:A$(ARG%)="":ARG%-=1
 8390IFFNuc(LEFT$(A$(ARG%),6))="-BLACK" THEN
 8400black%=32:IFLENA$(ARG%)>6 black%=VALMID$(A$(ARG%),7):IFblack%>128 black%=128
 8410A$(ARG%)="":ARG%-=1
 8420ENDIF
 8430IFFNuc(LEFT$(A$(ARG%),6))="-GAMMA" THEN
 8440gamma=2.2:IFLENA$(ARG%)>6 gamma=VALMID$(A$(ARG%),7)
 8450A$(ARG%)="":ARG%-=1
 8460ENDIF
 8470IFFNuc(LEFT$(A$(ARG%),8))="-SHARPEN" THEN
 8480sharpen%=24:IFLENA$(ARG%)>8 sharpen%=VALMID$(A$(ARG%),9)
 8490A$(ARG%)="":ARG%-=1
 8500ENDIF
 8510IFFNuc(LEFT$(A$(ARG%),7))="-SMOOTH" THEN
 8520sharpen%=-1:IFLENA$(ARG%)>7 sharpen%=-VALMID$(A$(ARG%),8)
 8530A$(ARG%)="":ARG%-=1:IFsharpen%<-23 sharpen%=-23
 8540ENDIF
 8550IFFNuc(LEFT$(A$(ARG%),4))="-RED" rwt=VALMID$(A$(ARG%),5):A$(ARG%)="":ARG%-=1
 8560IFFNuc(LEFT$(A$(ARG%),6))="-GREEN" gwt=VALMID$(A$(ARG%),7):A$(ARG%)="":ARG%-=1
 8570IFFNuc(LEFT$(A$(ARG%),5))="-BLUE" bwt=VALMID$(A$(ARG%),6):A$(ARG%)="":ARG%-=1
 8580IFFNuc(LEFT$(A$(ARG%),4))="-MAX" THEN
 8590max%=VALMID$(A$(ARG%),5):IFINSTR(A$(ARG%),"K")ORINSTR(A$(ARG%),"k") max%=max%*1024
 8600A$(ARG%)="":ARG%-=1
 8610ENDIF
 8620UNTILA%=ARG%
 8630s$=A$(1):f$=A$(2):m$=A$(3):xs$=A$(4):ys$=A$(5)
 8640ENDIF
 8650IFokinfo% ELSEinfo%=FALSE
 8660IFworkspace%>=0 THEN
 8670flex%=FALSE
 8680ELSE
 8690IFworklimit%=0 THENflex%=FALSE ELSEflex%=TRUE:nextlocation%=worklimit%
 8700ENDIF
 8710pnm$=FNuc(m$):CASE LEFT$(pnm$+",",3) OF
 8720WHEN"AIM":m=-1:m$=""
 8730WHEN"P1,","P4,":m=-2:m$="":spm=18
 8740WHEN"P2,","P5,":m=-2:m$="T":spm=20
 8750WHEN"P3,","P6,":m=-4:pnm$=LEFT$(pnm$,2):p6bits=8:I%=VALMID$(m$,4):m$=""
 8760IFI%>0IFI%<8 p6bits=I%
 8770WHEN"P15":m=-3:m$=""
 8780WHEN"C15":m=-5:m$=""
 8790WHEN"IRL":m=-4:m$="":p6bits=8
 8800WHEN"S16":m=-6:m$=""
 8810WHEN"S24":m=-7:m$="":p6bits=8
 8820WHEN"S32":m=-8:m$="":p6bits=8
 8830WHEN"JPE":m$="":p6bits=8:IFLEFT$(pnm$,8)="JPEGMONO" m=-9:jpegquality%=VALMID$(pnm$,9) ELSEm=-10:jpegquality%=VALMID$(pnm$,5)
 8840OTHERWISE:m=VALm$:spm=m:m$=FNuc(RIGHT$(m$,1)):IFINSTR("CDRT",m$)=0 m$=""
 8850ENDCASE
 8860IFxs$="" OR LEFT$(xs$,1)="-" THEN
 8870xmul%=1:xdiv%=1:ymul%=1:ydiv%=1
 8880ELSE
 8890IFys$="" ys$=xs$
 8900xmul%=VALxs$:xdiv%=VALMID$(xs$,INSTR(xs$,":")+1)
 8910ymul%=VALys$:ydiv%=VALMID$(ys$,INSTR(ys$,":")+1)
 8920ENDIF
 8930flag=-1:SYS8,5,s$ TO r0,,r2:dir=r0=2
 8940IFdir THEN
 8950panic=TRUE:SYS8,5,s$+".raw" TO r0,,r2:IFr0=1 s$+=".raw":dir=FALSE:panic=FALSE
 8960IFpanic SYS8,5,s$+".red" TO r0,,r2:IFr0=1 panic=FALSE
 8970IFpanic ERROR 42,"Directory given"
 8980ENDIF
 8990ftype=r2>>8 AND &FFF:bits=28:F=2^bits:c%=0:cc%=0:ccc%=0:o%=0
 9000IFdir THEN
 9010c%=OPENIN(s$+".red"):IFc%=0 ERROR 42,"Red file "+s$+".red not found"
 9020cc%=OPENIN(s$+".green"):IFcc%=0 ERROR42,"Green file "+s$+".green not found"
 9030ccc%=OPENIN(s$+".blue"):IFccc%=0 ERROR42,"Blue file "+s$+".blue not found"
 9040ELSE
 9050c%=OPENINs$:IFc%=0 ERROR 42,"File "+s$+" not found"
 9060ENDIF
 9070LOCAL ERROR
 9080ON ERROR LOCAL RESTORE ERROR:TRACE OFF:PROCclose:ERROR ERR,REPORT$
 9110colourindex=255
 9120SYS&66f4d TO;pcd%
 9130CASE ftype OF
 9140WHEN &FF9:flag=0
 9150IFINSTR("."+FNuc(s$),".HIP.")ORINSTR(FNuc(s$),":HIP.") THEN
 9160flag=300:I%=INSTR(FNuc(s$),"HIP.")
 9170MID$(s$,I%)="LOP.":cc%=OPENINs$:IFcc%=0 ERROR42,"Can't find Lop file "+s$
 9180ENDIF
 9190WHEN &FF0:PTR#c%=0:S$="":FORI%=1TO4:S$+=CHR$BGET#c%:NEXT
 9200IFS$="II*"+CHR$0 flag=1500:bigendian=FALSE
 9210IFS$="MM"+CHR$0+"*" flag=1500:bigendian=TRUE
 9220WHEN &DFA:flag=800:IFdir flag=801
 9230WHEN &DE2:flag=1000
 9240WHEN &CBE:flag=3800
 9250WHEN &BE8:IF(pcd%AND1)=0 flag=3600
 9260WHEN &7A0:flag=1200
 9270WHEN &69d:flag=2000
 9280WHEN &699:flag=700
 9290WHEN &698:flag=100
 9300WHEN &697:flag=1900
 9310WHEN &691:flag=2600
 9320WHEN &690:flag=2500
 9330WHEN &666:flag=666
 9340WHEN &601:flag=3000
 9350WHEN &371:flag=3100
 9360WHEN &300:flag=1300:IFdir flag=1301
 9370WHEN 4:flag=900:IFdir flag=901
 9380WHEN 6:flag=950
 9390ENDCASE
 9400IFflag=-1 THEN
 9410PTR#c%=0:S$="":FORI%=1TO22:S$+=CHR$BGET#c%:NEXT
 9420IFLEFT$(S$,7)="FSIfile" flag=2100
 9430IFflag=-1 IFLEFT$(S$,8)="SIMPLE  " flag=2800
 9440IFflag=-1 IFFNuc(LEFT$(S$,8))="MERCSOFT"ORFNuc(LEFT$(S$,8))="SNAPSHOT"flag=902
 9450IFflag=-1 IFFNuc(LEFT$(S$,8))="MERCSOF1" flag=903
 9460IFflag=-1 IFFNuc(LEFT$(S$,13))="IRLAM YUV 411" flag=2250
 9470IFflag=-1 IFLEFT$(S$,5)="Irlam" flag=2200
 9480IFflag=-1 IFLEFT$(S$,2)="BM" flag=2400:riffoff%=0
 9490IFflag=-1 IFLEFT$(S$,4)="RIFF" AND MID$(S$,9,8)="RDIBdata" AND MID$(S$,21,2)="BM" flag=2400:riffoff%=20
 9500IFflag=-1 IFLEFT$(S$,4)="GIF8" flag=500
 9510IFflag=-1 IFLEFT$(S$,5)="AV_VO" flag=600
 9520IFflag=-1 IFLEFT$(S$,4)=CHR$&59+CHR$&A6+CHR$&6A+CHR$&95 flag=1100
 9530IFflag=-1 IFLEFT$(S$,4)=CHR$0+CHR$1+CHR$0+CHR$8 flag=1400
 9540IFflag=-1 IFLEFT$(S$,4)=CHR$0+CHR$1+CHR$0+CHR$1 flag=2900
 9550IFflag=-1 IFLEFT$(S$,4)="RIX3" flag=2700
 9560IFflag=-1 IFLEFT$(S$,4)="II*"+CHR$0 flag=1500:bigendian=FALSE
 9570IFflag=-1 IFLEFT$(S$,4)="MM"+CHR$0+"*" flag=1500:bigendian=TRUE
 9580IFflag=-1 IFLEFT$(S$,2)=CHR$&52+CHR$&CC flag=2300
 9590IFflag=-1 IFLEFT$(S$,2)="P4"ORLEFT$(S$,2)="P5"ORLEFT$(S$,2)="P6" flag=3300:info$=""
 9600IFflag=-1 IFLEFT$(S$,3)="P15" flag=3400
 9610IFflag=-1 IFLEFT$(S$,3)="PIC" flag=3500
 9620IFflag=-1 IFLEFT$(S$,3)="T-I" flag=3800
 9630IFflag=-1 IFFNuc(LEFT$(S$,3))="P13" flag=3450
 9640IFflag=-1 IFLEFT$(S$,4)="FORM" IFMID$(S$,9,4)="ILBM" flag=1600
 9650IFflag=-1 IFLEFT$(S$,8)="ALPIAR12" flag=3900:colourindex=4095
 9660IFflag=-1 IFLEFT$(S$,8)="ALPIAR16" flag=3905:colourindex=65535
 9670IFflag=-1 THEN
 9680IFMID$(S$,7,4)="JFIF" OR ftype=&C85 THEN
 9690jpegblk%=FNdim(20):PROCcachesize(jpegblk%)
 9700IFcache%<EXT#c% THEN
 9710CLOSE#c%:c%=0:X%=OPENIN"Run:djpeg"
 9720IFX% THEN
 9730CLOSE#X%:PROCsubtask("djpeg "+s$+" <Wimp$Scrap>")
 9740ELSE
 9750SYS"XOS_CLI","djpeg "+s$+" <Wimp$Scrap>" TO ;V
 9760IFV AND1 THEN
 9770PROCsubtask("<ChangeFSI$Dir>.djpeg "+s$+" <Wimp$Scrap>")
 9780ENDIF
 9790ENDIF
 9800c%=OPENIN"<Wimp$Scrap>":IFc%=0 THEN=100
 9810scrapf%=TRUE:flag=3300:info$="JPEG (JFIF) file converted to "
 9820ELSE
 9830flag=3700
 9840ENDIF
 9850ENDIF
 9860ENDIF
 9870IFflag=-1 THEN
 9880IFLEFT$(S$,5)="btpc " THEN
 9890CLOSE#c%:c%=0:PROCsubtask("<ChangeFSI$Dir>.btpc "+s$+" <Wimp$Scrap>")
 9900c%=OPENIN"<Wimp$Scrap>":IFc%=0 THEN=100
 9910scrapf%=TRUE:flag=3300:info$="BTPC file converted to "
 9920ENDIF
 9930ENDIF
 9940IFflag=-1 THEN
 9950PTR#c%=&10:S$="":FORI%=1TO9:S$+=CHR$BGET#c%:NEXT
 9960IFS$="MILLIPEDE" flag=200
 9970ENDIF
 9980IFflag=-1 THEN
 9990PTR#c%=&41:S$="":FORI%=1TO8:S$+=CHR$BGET#c%:NEXT
10000IFLEFT$(S$,4)="PNTG" flag=1800:st%=&280
10010ENDIF
10020IFflag=-1 THEN
10030PTR#c%=196:S$="":FORI%=1TO8:S$+=CHR$BGET#c%:NEXT
10040IFLEFT$(S$,4)="PNTG" flag=1800:st%=&2e2
10050ENDIF
10060IFflag=-1 THEN
10070PTR#c%=522:S$="":FORI%=1TO8:S$+=CHR$BGET#c%:NEXT
10080IFS$=CHR$0+CHR$&11+CHR$2+CHR$&ff+CHR$&c+CHR$0+CHR$&ff+CHR$&fe flag=1850
10090ENDIF
10100IFflag=-1 THEN
10110PTR#c%=0:IFBGET#c%=10 THEN
10120C%=BGET#c%:IFC%<6 AND C%<>1 ANDBGET#c%=1 flag=1900
10130ENDIF
10140ENDIF
10150IFflag=-1 IFINSTR("."+FNuc(s$),".PCX.")ORINSTR(FNuc(s$),":PCX.")ORRIGHT$(s$,4)="/PCX" flag=1900
10160IFflag=-1 IFINSTR("."+FNuc(s$),".IMAGE.")ORINSTR(FNuc(s$),":IMAGE.") flag=400
10170IFflag=-1 IFFNuc(RIGHT$(s$,4))=".RAW" flag=100
10180IFflag=-1 IFFNuc(RIGHT$(s$,3))="TGA" flag=2000
10190IFflag=-1 IFFNuc(RIGHT$(s$,3))="VDA" flag=2000
10200IFflag=-1 IFINSTR("."+FNuc(s$),".PIC.")ORINSTR(FNuc(s$),":PIC.") flag=700
10210IFflag=-1 IFINSTR("."+FNuc(s$),".IMG.")ORINSTR(FNuc(s$),":IMG.")ORRIGHT$(s$,4)="/IMG" flag=1400
10220IFflag=-1 IFINSTR("."+FNuc(s$),".DSP.")ORINSTR(FNuc(s$),":DSP.")ORRIGHT$(s$,4)="/DSP" flag=1700
10230IFflag=-1 IFFNuc(RIGHT$(s$,4))="/RGB" flag=3200
10240IFflag=-1 AND(FNuc(RIGHT$(s$,4))="/PCD"ORftype=&be8)AND((pcd%AND1)=1) THEN
10250CLOSE#c%:c%=0:PROCsubtask("<ChangeFSI$Dir>.hpcdtoppm -3 -a "+s$+" <Wimp$Scrap> { > <ChangeFSI$Dir>.pcdtemp }")
10260c%=OPENIN"<Wimp$Scrap>":scrapf%=TRUE:flag=3300:info$="PhotoCD file converted to "
10270ENDIF
10280ENDIF
10290IFflag=-1 PROCclose:ERROR 42,"Sorry: format not recognised - please try again or contact your supplier"
10300step24=1:input=8:ham=0:planar%=0:bigendianbits=FALSE:r$="FN"+STR$flag
10310compression=0:hpredict%=1:striprows%=-1:cachebytes%=FALSE
10320IFxdiv%=0 AND ydiv%=0 scale%=FALSE
10330DIM r%(colourindex)
10340DIM g%(colourindex),b%(colourindex)
10350CASE flag OF
10360WHEN 0
10370quant%=4:PTR#c%=4:F%=FNW+&1C:PTR#c%=F%:st%=FNW+F%-&20:K%=FNW+F%-&20
10380sm=FNW:IFsm<256 THEN
10390SYS53,sm,3 TO ,,I%
10400CASE I% OF
10410WHEN 1:IFst%=F%+12 PROCdefpal2 ELSEPROCipal(2)
10420PTR#c%=F%-16:sx%=(FNW+1)*32:rowbytes%=sx%>>3:input=1
10430sy%=FNW+1:I%=FNW:sx%-=31-FNW
10440WHEN 3:IFst%=F%+12 PROCdefpal4 ELSEPROCipal(4)
10450PTR#c%=F%-16:sx%=(FNW+1)*16:rowbytes%=sx%>>2:input=2
10460sy%=FNW+1:I%=FNW:sx%-=(31-FNW)DIV2
10470WHEN 15:IFst%=F%+12 PROCdefpal16 ELSEPROCipal(16)
10480PTR#c%=F%-16:sx%=(FNW+1)*8:rowbytes%=sx%>>1:input=4
10490sy%=FNW+1:I%=FNW:sx%-=(31-FNW)DIV4
10500WHEN 63,255:IFst%=F%+12 THEN
10510PROCdefpal
10520ELSE
10530IFK%>st% K%=st%
10540IFK%-12-F%=2048 ORI%=255 THEN
10550PTR#c%=&38
10560FORC%=0TO255:D%=BGET#c%
10570r%(C%)=BGET#c%/255*F:g%(C%)=BGET#c%/255*F:b%(C%)=BGET#c%/255*F
10580D%=FNW:NEXT
10590ELSE
10600PROCipal63
10610ENDIF
10620ENDIF
10630PTR#c%=F%-16:sx%=(FNW+1)*4:rowbytes%=sx%:sy%=FNW+1:I%=FNW:sx%-=(31-FNW)DIV8
10640OTHERWISE ERROR42,"Not understood RISC OS sprite"
10650ENDCASE
10660r$="FN8":SYS53,sm,4 TO ,,nx:SYS53,sm,5 TO ,,ny:nx=1<<nx:ny=1<<ny
10670IFscale% xmul%=xmul%*nx/2:ymul%=ymul%*ny/2
10680info$="RISC OS sprite, mode "+STR$sm+" "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
10690ELSE
10700bpp%=sm>>>27:CASEbpp% OF
10710WHEN 1:bpp%=1:r$="FN8":IFst%=F%+12 PROCdefpal2 ELSEPROCnewropal(2)
10720WHEN 2:bpp%=2:r$="FN8":IFst%=F%+12 PROCdefpal4 ELSEPROCnewropal(4)
10730WHEN 3:bpp%=4:r$="FN8":IFst%=F%+12 PROCdefpal16 ELSEPROCnewropal(16)
10740WHEN 4:bpp%=8:r$="FN8":IFst%=F%+12 PROCdefpal ELSEPROCnewropal(256)
10750WHEN 5:bpp%=16:r$="FN16":IFst%=F%+12 ELSE
10760DIM rpal%(255),gpal%(255):step24=2
10770FORC%=0TO255
10780gpal%(C%)=(C%>>5)<<8 OR (C%AND31)
10790rpal%(C%)=((C%>>2)AND31)<<16 OR (C%AND3)<<11
10800NEXT
10810FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
10820WHEN 6:bpp%=32:r$="FN24":IFst%=F%+12 PROCnopal ELSE
10830rbo%=0:gbo%=1:bbo%=2:step24=4
10840WHEN 8:bpp%=24:r$="FN24":IFst%=F%+12 PROCnopal ELSE
10850rbo%=0:gbo%=1:bbo%=2
10860OTHERWISE ERROR42,"Not understood new format RISC OS sprite bpp"
10870ENDCASE
10880nx=(sm>>1) AND&1fff:ny=(sm>>14) AND&1fff
10890IFscale% xdiv%=xdiv%*nx:ydiv%=ydiv%*ny:xmul%=xmul%*90:ymul%=ymul%*90
10900PTR#c%=F%-16:rowbytes%=(FNW+1)*4:sy%=FNW+1:I%=FNW:sx%=(rowbytes%*8-(31-FNW))/bpp%:input=bpp%
10910info$="New RISC OS sprite, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
10920IFbpp%=32 input=24
10930ENDIF
10940PTR#c%=st%:cache%=TRUE
10950WHEN 100
10960quant%=8:PTR#c%=0:sx%=FNHW:sy%=FNHW:PROCnopal:input=24:rowbytes%=sx%*3+2
10970rbo%=2:gbo%=2+sx%:bbo%=2+2*sx%:r$="FN24":cache%=TRUE
10980info$="QRT .raw image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
10990WHEN 200
11000quant%=8:PTR#c%=5:sx%=FNHW:sy%=FNHW:sx%=(FNHW-sx%+2)/2:sy%=(FNHW-sy%+2)/2
11010PTR#c%=&1a:cadsoft%=BGET#c%:PTR#c%=&200
11020FORC%=0TO255:r%(C%)=BGET#c%/255*F:NEXT:FORC%=0TO255:g%(C%)=BGET#c%/255*F:NEXT
11030FORC%=0TO255:b%(C%)=BGET#c%/255*F:NEXT
11040PTR#c%=&600:st%=&600:cache%=TRUE:IFcadsoft%=2 THEN
11050rep%=0:r$="FN1100":plbuff%=FNdim(sx%):plbytes%=sx%:cachebytes%=TRUE
11060ELSE
11070r$="FN8":rowbytes%=sx%
11080ENDIF
11090info$="Cadsoft type "+STR$cadsoft%+" image, "+STR$sx%+" by "+STR$sy%+" pixels, 8 bits per pixel"
11100WHEN 300
11110quant%=5:PTR#c%=&2c:st%=FNW+(&38-&2c):PTR#cc%=&2c:stcc%=FNW1(cc%)+(&38-&2c)
11120PTR#c%=&1c:sx%=(FNW+1)*4:sy%=FNW+1:PTR#c%=st%:PTR#cc%=stcc%
11130DIM rpal%(255),gpal%(255):input=16:cache%=TRUE:rowbytes%=sx%
11140FORC%=0TO255
11150rpal%(C%)=C%AND7 OR (C%AND64)<<2 OR (C%AND&38)<<13
11160gpal%(C%)=(C%AND4)<<1ORC%AND16 OR ((C%AND3)<<1OR(C%AND&60)>>2)<<8 OR (C%AND8OR(C%AND128)>>3)<<16
11170NEXT
11180FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
11190pbuff%=FNdim(sx%):IFscale% ymul%=ymul%*2
11200info$="ArVis image, "+STR$sx%+" by "+STR$sy%+" pixels, 15 bits per pixel"
11210WHEN 400
11220quant%=8:PTR#c%=0:sx%=FNbeHW:sy%=FNbeHW:X%=FNbeHW:st%=PTR#c%+X%:PTR#c%=st%
11230plbuff%=FNdim(sx%*3):plbytes%=sx%*3:rb%=plbuff%:gb%=plbuff%+1:bb%=plbuff%+2:rbo%=-1
11240PROCnopal:input=24:rep%=0:cachebytes%=TRUE:cache%=TRUE:step24=3
11250info$="RT image. run length encoded image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
11260WHEN 500
11270compression=5:PTR#c%=6:GIFsx=FNHW:GIFsy=FNHW
11280GIF=BGET#c%:GIFback=BGET#c%:GIFext=BGET#c%:quant%=(GIF AND 7)+1
11290IFGIF AND &80 THEN
11300FORC%=0TO(1<<quant%)-1
11310r%(C%)=BGET#c%/255*F:g%(C%)=BGET#c%/255*F:b%(C%)=BGET#c%/255*F
11320NEXT
11330ENDIF
11340I%=BGET#c%:WHILE I%=ASC"!"
11360IF BGET#c%
11370REPEAT
11380GIFgcesz=BGET#c%:PTR#c%=PTR#c%+GIFgcesz
11410UNTIL GIFgcesz=0:I%=BGET#c%
11420ENDWHILE
11430IFI%<>ASC"," ERROR 42,"GIF file without , in right place"
11450IFGIFext<>0 AND GIFext<>49 THEN
11460IFGIFext>49 THEN
11480xdiv%=xdiv%*64:xmul%=xmul%*(GIFext+15)
11490ELSE
11500ydiv%=ydiv%*(GIFext+15):ymul%=ymul%*64
11510ENDIF
11520ENDIF
11530GIFleft=FNHW:GIFright=FNHW:sx%=FNHW:sy%=FNHW
11540IFGIFsx<sx% OR GIFsy<sy% THEN
11550IFinfo% THEN
11560PRINT"GIF file with bigger image inside:"
11570PRINT"Screen ";GIFsx"x by "GIFsy"y; image "sx%"x by "sy%"y"
11580INPUT"Continue with monitor's size [Y or y]?"A$
11590IFA$="Y"ORA$="y" sx%=GIFsx:sy%=GIFsy
11600PRINT"Continuing with ";sx%"x by "sy%"y"
11610ENDIF
11620ENDIF
11630GIF=BGET#c%:IFGIF AND &40 flag=501:r$="FN8"
11640setcodes%=BGET#c%:clearcode%=1<<setcodes%:st%=PTR#c%:cache%=TRUE:cachebytes%=TRUE
11650DIM table%(1<<12):stk%=FNdim(1<<13):buf%=FNdim(280):plbuff%=FNdim(sx%)
11660FORI%=0TOclearcode%-1:table%(I%)=I%:NEXT
11670info$="GIF file, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(quant%)
11680WHEN 600
11690quant%=8:PTR#c%=&5c:FORC%=0TO255
11700r%(C%)=BGET#c%/255*F:g%(C%)=BGET#c%/255*F:b%(C%)=BGET#c%/255*F
11710NEXT
11720PTR#c%=&36e:sy%=FNHW:sx%=FNHW
11730st%=&380:PTR#c%=st%:rowbytes%=sx%:r$="FN8":cache%=TRUE
11740info$=".PIC image, "+STR$sx%+" by "+STR$sy%+" pixels, 8 bits per pixel"
11750WHEN 700
11760quant%=8:PTR#c%=0:a$=GET$#c%:st%=PTR#c%
11770sx%=VALa$:sy%=VAL(MID$(a$,INSTR(a$," ")))
11780PROCnopal:input=24:step24=3:rowbytes%=sx%*3:r$="FN24"
11790rbo%=0:gbo%=1:bbo%=2:cache%=TRUE
11800info$="MTV .pic image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
11810WHEN 800
11820sx%=512:sy%=256:IFscale% ymul%=ymul%*2
11830plbuff%=FNdim(sx%):rep%=0:wt%=0:wtsx%=plbuff%+sx%
11840cache%=TRUE:cachebytes%=TRUE
11850FORC%=0TO255:r%(C%)=(C%AND63)/63*F:NEXT:g%()=r%():b%()=r%():quant%=6
11860info$="Watford digitiser picture, 512 by 256 pixels, 6 bits per pixel"
11870WHEN 801
11880sx%=512:sy%=256:input=24:quant%=6:IFscale% ymul%=ymul%*2
11890rep1%=0:wt1%=0:rep2%=0:wt2%=0:rep3%=0:wt3%=0
11900buff%=FNdim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+2*sx%
11910wtsx1%=buff%+sx%:wtsx2%=buff%+2*sx%:wtsx3%=buff%+3*sx%
11920FORC%=0TO255:r%(C%)=(C%AND63)/63*F:NEXT:g%()=r%():b%()=r%()
11930info$="Triple Watford digitiser picture, 512 by 256 pixels, 18 bits per pixel"
11940WHEN 900
11950quant%=8:st%=0:PTR#c%=0:IFEXT#c%=65536 THEN
11960sx%=256:sy%=256:IFscale% ymul%=ymul%*2:xmul%=xmul%*2
11970ELSE
11980sx%=512:sy%=512
11990ENDIF
12000FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%():rowbytes%=sx%:r$="FN8":cache%=TRUE
12010info$="AIM .raw image, 256 by 256 pixels, 8 bits per pixel"
12020WHEN 901
12030quant%=4:IFEXT#c%=65536 THEN
12040sx%=256:sy%=256:IFscale% ymul%=ymul%*2:xmul%=xmul%*2
12050ELSE
12060sx%=512:sy%=512
12070ENDIF
12080buff%=FNdim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2
12090FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%()
12100input=24:info$="Hawk V9 Triple image, 256 by 256 pixels, 24 bits per pixel"
12110WHEN 902
12120quant%=4:PTR#c%=8:sx%=FNW:rowbytes%=sx%*3/2:sy%=FNW:st%=20:PTR#c%=20
12130IFscale% ymul%=ymul%*2
12140plbuff%=FNdim(sx%*3):rb%=plbuff%:gb%=plbuff%+sx%:bb%=plbuff%+sx%*2:rbo%=-1
12150FORC%=0TO255:r%(C%)=(C%AND&F)/&F*F:NEXT:g%()=r%():b%()=r%():cache%=TRUE
12160input=24:info$="Hawk V9/Snapshot Colour image, "+STR$sx%+" by "+STR$sy%+" pixels, 12 bits per pixel"
12170WHEN 903
12180quant%=5:PTR#c%=8:sx%=FNW:rowbytes%=sx%*2:sy%=FNW:st%=20:PTR#c%=20:cache%=TRUE:r$="FN16":flag=700
12190DIM rpal%(255),gpal%(255):input=16:step24=2
12200FORC%=0TO255
12210gpal%(C%)=(C%>>5)<<8 OR (C%AND31)
12220rpal%(C%)=((C%>>2)AND31)<<16 OR (C%AND3)<<11
12230NEXT
12240FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
12250input=16:info$="Hawk V9 mk II Colour image, "+STR$sx%+" by "+STR$sy%+" pixels, 16 bits per pixel"
12260WHEN 950
12270quant%=8:PTR#c%=0:sx%=512:rowbytes%=512:sy%=512:st%=0:flag=900
12280FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%():r$="FN8":cache%=TRUE
12290info$="Wild Vision V12 image, 512 by 512 pixels, 8 bits per pixel"
12300WHEN 1000
12310quant%=4:sx%=640:sy%=256:PROCdefpal:st%=FNW:r$="FN"+STR$(1000+FNW):IFscale% ymul%=ymul%*2
12330buff%=FNdim(sx%):ctable%=FNdim(st%)
12340SYS12,4,c%,ctable%,st%:st%=PTR#c%
12350pa%=ctable%:rep%=0:rep2%=0:pasx%=buff%+sx%
12360info$="ProArtisan image, 640 by 256 pixels, 8 bits per pixel"
12370WHEN 1100
12380quant%=1:PTR#c%=4:sx%=FNbeW:sy%=FNbeW:input=FNbeW:bigendianbits=TRUE
12390S%=FNbeW:S%=FNbeW
12400cache%=TRUE:IFS%=2 cachebytes%=TRUE:info$="Byte Encoded " ELSEinfo$="":r$="FN8"
12410C%=FNbeW
12420D%=FNbeW
12430CASE C% OF
12440WHEN 1,2
12450FORI%=0TOD%/3-1:r%(I%)=BGET#c%/255*F:NEXT
12460FORI%=0TOD%/3-1:g%(I%)=BGET#c%/255*F:NEXT
12470FORI%=0TOD%/3-1:b%(I%)=BGET#c%/255*F:NEXT
12480OTHERWISE
12490CASE input OF
12500WHEN 1:r%(0)=F:g%(0)=F:b%(0)=F
12510WHEN 4,8:PROCnopal
12520WHEN 24:PROCnopal
12530ENDCASE
12540ENDCASE
12550CASE input OF
12560WHEN 1:rowbytes%=(sx%+15>>4)<<1
12570WHEN 4:rowbytes%=(sx%+3>>2)<<1
12580WHEN 8:rowbytes%=(sx%+1>>1)<<1
12590WHEN 24:rowbytes%=(3*sx%+1>>1)<<1:r$="FN24":rbo%=0:gbo%=1:bbo%=2:step24=3
12600IFS%=1 bbo%=0:rbo%=2
12610OTHERWISE:ERROR 42,"Can't do this Sun pixrect"
12620ENDCASE
12630st%=D%+&20:rep%=0:IFcachebytes% plbuff%=FNdim(rowbytes%):plbytes%=rowbytes%
12640info$+="Sun image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
12650WHEN 1200
12660quant%=8:sx%=800:sy%=800:st%=1600:PTR#c%=st%:vflip%=NOT vflip%
12670PROCnopal:r$="FN8":rowbytes%=sx%:cache%=TRUE
12680info$="TimeStep satellite image, 800 by 800 pixels, 8 bits per pixel"
12690WHEN 1300
12700quant%=8:sx%=128:sy%=256:st%=0:PTR#c%=0:IFscale% xmul%=xmul%*2
12710PROCnopal:r$="FN8":rowbytes%=sx%:cache%=TRUE
12720info$="satellite image, 128 by 256 pixels, 8 bits per pixel"
12730WHEN 1301
12740input=24:quant%=8:sx%=128:sy%=256:IFscale% xmul%=xmul%*2
12750buff%=FNdim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+2*sx%:PROCnopal:r$="FN901"
12760info$="Triple satellite image, 128 by 256 pixels, 24 bits per pixel"
12770WHEN 1400
12780planar%=TRUE:PTR#c%=0:Z%=FNHW:IFZ%>255 THEN
12790st%=FNbeHW*2:planes%=FNbeHW:patlen%=FNbeHW
12800pw%=FNbeHW:ph%=FNbeHW:sx%=FNbeHW:sy%=FNbeHW
12810ELSE
12820st%=FNHW*2:input=FNHW:patlen%=FNHW:pw%=FNHW:ph%=FNHW:sx%=FNHW:sy%=FNHW
12830ENDIF
12840IFscale% THEN
12850xmul%=xmul%*pw%:xdiv%=xdiv%*282
12860ymul%=ymul%*ph%:ydiv%=ydiv%*282
12870ENDIF
12880rowbytes%=sx%+7>>3:pbuff%=FNdim(sx%):plbytes%=rowbytes%*planes%:buff%=FNdim(plbytes%)
12890PTR#c%=st%:vrep%=0
12900FORC%=0TO(1<<planes%)-1:r%(C%)=F-C%/((1<<planes%)-1)*F:NEXT:g%()=r%():b%()=r%()
12910info$="IMG file, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(planes%)
12920WHEN 1500
12930PTR#c%=4:dir%=FNtiff(4):PTR#c%=dir%
12940rgb=FALSE:greyunit=100:planar%=1:fillorder=1:resunit=2
12950xnum%=90:xdenom%=1:ynum%=90:ydenom%=1
12960E%=FNtiff(3):FORZ%=1TOE%
12970T%=FNtiff(3):D%=FNtiff(3):C%=FNtiff(4)
12980IFC%>1 V%=FNtiff(4) ELSEIFD%=2 PTR#c%=dir%+2+Z%*12 ELSEIFD%<4 V%=FNtiff(D%):PTR#c%=dir%+2+Z%*12 ELSEV%=FNtiff(4)
12990PRINT"Read tag ";T%" datatype "D%" count "C%" value/pointer "V%
13000CASE T% OF
13010WHEN 256:sx%=V%
13020WHEN 257:sy%=V%
13030WHEN 258:IFC%>1 THEN
13040IFD%*C%>6 THEN
13050PTR#c%=V%:quant%=FNtiff(D%)
13060input=quant%:FORI%=1TOC%-1:V%=FNtiff(D%)
13070IFV%<>quant% ERROR42,"Can't do RGB TIFF with different numbers of bits per pixel"
13080input+=V%
13090NEXT:PROCnopal
13100ELSE
13110quant%=V% AND &FF:input=quant%
13120FORI%=0TO(1<<quant%)-1:r%(I%)=I%/((1<<quant%)-1)*F:NEXT
13130g%()=r%():b%()=r%()
13140ENDIF
13150PTR#c%=dir%+2+Z%*12
13160ELSE
13170quant%=V%:input=quant%
13180FORI%=0TO(1<<quant%)-1:r%(I%)=I%/((1<<quant%)-1)*F:NEXT
13190g%()=r%():b%()=r%()
13200ENDIF
13210WHEN 259:compression=V%
13220WHEN 262:photometric=V%:IFV%=0 invert%=NOTinvert%
13230WHEN 266:fillorder=V%
13240WHEN 273:stc%=C%:stv%=V%:std%=D%
13250WHEN 277:sampperpix%=V%:input=quant%*V%:rgb=V%=3
13260WHEN 278:striprows%=V%
13270WHEN 279:stcbyte%=C%:stvbyte%=V%:stdbyte%=D%
13280WHEN 282:PTR#c%=V%:xnum%=FNtiff(4):xdenom%=FNtiff(4)
13290PTR#c%=dir%+2+Z%*12
13300WHEN 283:PTR#c%=V%:ynum%=FNtiff(4):ydenom%=FNtiff(4)
13310PTR#c%=dir%+2+Z%*12
13320WHEN 284:planar%=V%:IFplanar%=2 input=quant%
13330WHEN 290:greyunit=10^V%
13340WHEN 291:PTR#c%=V%:FORI%=0TOC%-1:r%(I%)=FNtiff(D%)/greyunit/2*F:NEXT
13350g%()=r%():b%()=r%()
13360PTR#c%=dir%+2+Z%*12
13370WHEN 296:resunit=V%
13380WHEN 317:hpredict%=V%
13390WHEN 320:PTR#c%=V%:FORI%=0TOC%/3-1:r%(I%)=FNtiff(3)/65535*F:NEXT
13400FORI%=0TOC%/3-1:g%(I%)=FNtiff(3)/65535*F:NEXT
13410FORI%=0TOC%/3-1:b%(I%)=FNtiff(3)/65535*F:NEXT
13420PTR#c%=dir%+2+Z%*12
13430OTHERWISE
13440IFinfo% PRINT"Ignoring tag ";T%" datatype "D%" count "C%" value/pointer "V%
13450ENDCASE
13460NEXT
13470DIM st%(stc%):IFstc%>1 THEN
13480PTR#c%=stv%:FORI%=0TOstc%-1:st%(I%)=FNtiff(std%):NEXT
13500ELSE
13510st%(0)=stv%
13520ENDIF
13530CASE compression OF
13540WHEN 0,1:info$=""
13550WHEN 2:info$="CCITT Group 3 compressed "
13560WHEN 5:info$="LZW compressed ":r$="FN1505"
13570IFhpredict%=2 THENinfo$+="horizontal differenced " ELSEIFhpredict%>2 info$+=" unknown predictor ("+STR$hpredict%+") "
13580setcodes%=8:clearcode%=1<<setcodes%
13590DIM table%(1<<12):stk%=FNdim(1<<13):buf%=FNdim(280)
13600FORI%=0TOclearcode%-1:table%(I%)=I%:NEXT
13610WHEN 32773:info$="PackBits compressed ":r$="FN1501"
13620WHEN 6:info$="JPEG compressed "
13630OTHERWISE info$="Compress "+STR$compression+" - unknown "
13640ENDCASE
13650info$+="TIFF file, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
13660bigendianbits=fillorder=1:PTR#c%=st%(0):stripptr=0:IFstriprows%>=sy% striprows%=-1
13670CASE input OF
13680WHEN 1:rowbytes%=sx%+7>>3
13690WHEN 2:rowbytes%=sx%+3>>2
13700WHEN 4:rowbytes%=sx%+1>>1
13710WHEN 8:rowbytes%=sx%
13720WHEN 24:rowbytes%=3*sx%
13730WHEN 32:rowbytes%=4*sx%:IFphotometric<>5 ERROR 42,"32 bpp TIFF but not CMYK"
13740OTHERWISE ERROR 42,"Can't do "+FNbits(input)+" TIFF"
13750ENDCASE
13760IFplanar%=2 rowbytes%=rowbytes%*sampperpix%
13770IFplanar%<>1 AND rgb<>0 ERROR42,"Can't do this style of TIFF yet" ELSEplanar%=FALSE
13780IF compression<2 THEN
13790cache%=TRUE:stripptr=-1:r$="FN8":IFinput=24 rbo%=0:gbo%=1:bbo%=2:step24=3:r$="FN24"
13800IFinput=32 rbo%=0:gbo%=1:bbo%=2:step24=4:r$="FN24":r%()=F-r%():g%()=F-g%():b%()=F-b%():input=24
13810ELSE
13820IFcompression=5 ORcompression=32773 THEN
13830cache%=TRUE:cachebytes%=rowbytes%*striprows%
13840plbuff%=FNdim(rowbytes%):rowstogo%=striprows%
13850IFinput=24 rb%=plbuff%:gb%=plbuff%+1:bb%=plbuff%+2:r$="FN"+STR$(VALMID$(r$,3)+10):step24=3:rbo%=-1
13860ELSE
13870buff%=FNdim(rowbytes%):rowstogo%=striprows%
13880IFinput=24 rb%=buff%:gb%=buff%+1:bb%=buff%+2:r$="FN"+STR$(VALMID$(r$,3)+10):step24=3
13890ENDIF
13900ENDIF
13910IFscale% THEN
13920S%=resunit:IFS%=2 S%=90
13930IFS%=3 S%=35
13940xdiv%=xdiv%*xnum%:xmul%=xmul%*xdenom%*S%
13950ydiv%=ydiv%*ynum%:ymul%=ymul%*ydenom%*S%
13960ENDIF
13970IFr$="FN1500" r$="FN8"
13980WHEN 1600
13990PTR#c%=12:camg=0:planar%=TRUE:REPEAT
14000S$=CHR$BGET#c%+CHR$BGET#c%+CHR$BGET#c%+CHR$BGET#c%:S%=FNbeW
14010CASE S$ OF
14020WHEN "BMHD":sx%=FNbeHW:sy%=FNbeHW:S%=FNW:planes%=BGET#c%:masking%=BGET#c%=1
14030compression=BGET#c%:S%=BGET#c%+FNHW:U%=BGET#c%:V%=BGET#c%:S%=FNW
14040IFscale% ymul%=ymul%*V%:ydiv%=ydiv%*U%
14050FORI%=0TO(1<<planes%)-1:r%(I%)=I%/((1<<planes%)-1)*F:NEXT:g%()=r%():b%()=r%()
14060WHEN "CMAP":S%=PTR#c%+S%:FORI%=0TO(1<<planes%)-1:r%(I%)=(BGET#c%>>4)/15*F
14070g%(I%)=(BGET#c%>>4)/15*F:b%(I%)=(BGET#c%>>4)/15*F:NEXT
14080PTR#c%=S%:IFinfo% PRINT"Warning: truncated IFF CMAP information to 4 bits"
14090WHEN "CAMG":camg=FNbeW:IFinfo% PRINT"Amiga viewport mode ";~camg
14100WHEN "BODY":st%=PTR#c%
14110OTHERWISE IF info% PRINT"Ignoring IFF property "S$" size ";S%
14120PTR#c%=PTR#c%+S%
14130ENDCASE
14140UNTILS$="BODY":IFcompression info$="Compressed " ELSEinfo$=""
14160ham=(camg AND &800)<>0:IFham info$+="HAM "
14170half=(camg AND &80)<>0:IFhalf info$+="half-bright "
14180IFhalf half%=1<<planes%-1:FORI%=0TOhalf%-1:r%(I%+half%)=r%(I%)/2:g%(I%+half%)=g%(I%)/2:b%(I%+half%)=b%(I%)/2:NEXT
14190info$+="IFF file, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(planes%)
14200IFmasking% info$+=" with mask (ignored)"
14210rowbytes%=(sx%+15>>4)<<1:plbytes%=rowbytes%*planes%
14220pbuff%=FNdim(sx%):r$="FN"+STR$(1600+compression):cache%=TRUE
14230IFcompression THEN
14240cachebytes%=TRUE:plbuff%=FNdim(plbytes%)
14250ELSE
14260realrowbytes%=rowbytes%:rowbytes%=plbytes%:IFmasking% rowbytes%+=realrowbytes%
14270ENDIF
14280PTR#c%=st%
14290WHEN 1700
14300sx%=640:rowbytes%=80:sy%=350:planes%=4:plbytes%=4*80:planar%=TRUE
14310buff%=FNdim(80*4):pbuff%=FNdim(640):G=F/3:H=F*2/3
14320r%()=0,0,0,0,F,F,F,H,G,G,G,G,F,F,F,F
14330g%()=0,0,F,F,0,0,F,H,G,G,F,F,G,G,F,F
14340b%()=0,F,0,F,0,F,0,H,G,F,G,F,G,F,G,F
14350masking%=FALSE:r$="FN1600":st%=16:PTR#c%=16:cache%=TRUE:realrowbytes%=80:rowbytes%=plbytes%
14360info$="PC EGA '.dsp' file, 640 by 350 pixels, 4 bits per pixel (fixed palette)"
14370WHEN 1800
14380sx%=72*8:sy%=720:quant%=1:input=1:PTR#c%=st%:plbuff%=FNdim(72)
14390cache%=TRUE:cachebytes%=TRUE
14400r%(0)=F:g%(0)=F:b%(0)=F:bigendianbits=TRUE:rowbytes%=72:r$="FN1501":rowstogo%=-1
14410IFscale% xmul%=xmul%*90:xdiv%=xdiv%*72:ymul%=ymul%*90:ydiv%=ydiv%*72
14420info$="MacPaint file, 576 by 720 bits, creator id "+RIGHT$(S$,4)
14430WHEN 1850
14440PTR#c%=552
14450done%=FALSE
14460REPEAT
14470code%=FNbeHW:CASE code% OF
14480WHEN &01:PTR#c%=PTR#c%+FNbeHW
14490WHEN &1E
14500WHEN &98
14510rowbytes%=FNbeHW:IF(rowbytes% AND&8000)=0 ERROR42,"PICT without Pixmap"
14520sy%=FNbeHW:sx%=FNbeHW:sy%=FNbeHW-sy%:sx%=FNbeHW-sx%
14530junk%=FNHW:packtype%=FNbeHW:junk%=FNW:resx%=FNbeW:resy%=FNbeW
14540IFFNbeHW<>0 CLOSE#c%:ERROR42,"ChangeFSI expected Mac PICT2 pixeltype=Chunky"
14550bpp%=FNbeHW:junk%=FNbeHW:junk%=FNbeHW
14560junk%=FNbeW:junk%=FNbeW:junk%=FNbeW
14570junk%=FNbeW:junk%=FNbeHW
14580C%=FNbeHW:FORI%=0TOC%:J%=FNbeHW:r%(J%)=FNbeHW/65535*F:g%(J%)=FNbeHW/65535*F:b%(J%)=FNbeHW/65535*F:NEXT
14590done%=TRUE
14600WHEN &9A:junk%=FNW:rowbytes%=FNbeHW:IF(rowbytes% AND&8000)=0 ERROR42,"PICT without Pixmap"
14610sy%=FNbeHW:sx%=FNbeHW:sy%=FNbeHW-sy%:sx%=FNbeHW-sx%
14620junk%=FNHW:packtype%=FNbeHW:junk%=FNW:resx%=FNbeW:resy%=FNbeW
14630IFFNbeHW<>16 CLOSE#c%:ERROR42,"ChangeFSI expected Mac PICT2 pixeltype=RGBDirect"
14640bpp%=FNbeHW:comps%=FNbeHW:junk%=FNbeHW
14650junk%=FNbeW:junk%=FNbeW
14660junk%=FNbeHW:junk%=FNbeHW
14670IFbpp%>16 PROCnopal ELSEJ%=2^(bpp%DIV3):FORI%=0TOJ%-1:r%(I%)=I%/(J%-1)*F:NEXT:g%()=r%():b%()=r%()
14680IFbpp%=32 AND comps%=3 bpp%=24:rowbytes%=3*sx%
14690done%=TRUE
14700OTHERWISE:CLOSE#c%:ERROR42,"ChangeFSI can't understand Mac PICT2 code "+STR$~code%
14710ENDCASE
14720UNTIL done%
14730junk%=FNbeHW:junk%=FNbeHW:junk%=FNbeHW:junk%=FNbeHW
14740junk%=FNbeHW:junk%=FNbeHW:junk%=FNbeHW:junk%=FNbeHW
14750junk%=FNbeHW
14760cache%=TRUE:cachebytes%=TRUE:bigendianbits=TRUE:st%=PTR#c%:rowbytes%=rowbytes%ANDNOT&8000
14770IFscale% xmul%=xmul%*90*65536:xdiv%=xdiv%*resx%:ymul%=ymul%*90*65536:ydiv%=ydiv%*resy%
14780info$="Mac PICT2, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(bpp%)
14790plbuff%=FNdim(rowbytes%):IFbpp%>8 THEN
14800rbo%=-1:rb%=plbuff%+sx%:gb%=plbuff%+sx%*2:bb%=plbuff%+sx%*3:r$="FN1851":input=24
14810IFcomps%=3 rb%=plbuff%:gb%=plbuff%+sx%:bb%=plbuff%+sx%*2
14820ENDIF
14830WHEN 1900
14840PTR#c%=1:C%=BGET#c%
14850E%=BGET#c%:IFE%<>1 ERROR 42,"ZSoft .PCX file with unknown encoding"
14860E%=BGET#c%:sx%=FNHW:sy%=FNHW:sx%=FNHW+1-sx%:sy%=FNHW+1-sy%
14870IFscale% xmul%=xmul%*90:xdiv%=xdiv%*FNHW:ymul%=ymul%*90:ydiv%=ydiv%*FNHW ELSEIFFNW
14880PTR#c%=65:planes%=BGET#c%:planar%=planes%>1:rowbytes%=FNHW:bpp%=E%*planes%
14890pcxpal=16:IFbpp%>4 AND C%=5 THEN
14900PTR#c%=EXT#c%-769:IFBGET#c%=12 pcxpal=EXT#c%-768
14910ENDIF
14920PTR#c%=pcxpal:E%=0:FORC%=0TO(1<<bpp%)*3-1:E%=E%ORBGET#c%:NEXT
14930IFinfo% PRINT".PCX palette mask established at ";~E%
14940IFE%=0 THEN
14950FORC%=0TO(1<<bpp%)-1:r%(C%)=C%/((1<<bpp%)-1)*F:NEXT:g%()=r%():b%()=r%()
14960ELSE
14970PTR#c%=pcxpal:FORC%=0TO(1<<bpp%)-1
14980r%(C%)=(BGET#c%ANDE%)/E%*F:g%(C%)=(BGET#c%ANDE%)/E%*F:b%(C%)=(BGET#c%ANDE%)/E%*F
14990NEXT
15000ENDIF
15010PROCrewind
15020plbytes%=rowbytes%*planes%:plbuff%=FNdim(plbytes%):cache%=TRUE:cachebytes%=TRUE
15030IFplanar% pbuff%=FNdim(sx%) ELSEinput=bpp%:bigendianbits=TRUE:r$="FN1100"
15040info$="ZSoft .PCX file, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(bpp%)
15050WHEN 2000
15060PTR#c%=0:L%=BGET#c%:C%=BGET#c%:I%=BGET#c%:J%=FNHW:K%=FNHW:M%=BGET#c%
15070sx%=FNW:sx%=FNHW:sy%=FNHW:B%=BGET#c%:ID%=BGET#c%:IFID%AND&10 hflip%=NOThflip%
15080IF(ID% AND&20)=0 vflip%=NOTvflip%
15090PTR#c%=PTR#c%+L%:CASE C% OF
15100WHEN 1:IFM%=&18 THEN
15110FORC%=J%TOK%-1
15120b%(C%)=BGET#c%/255*F:g%(C%)=BGET#c%/255*F:r%(C%)=BGET#c%/255*F
15130NEXT
15140ELSE
15150ENDIF
15160OTHERWISE PROCnopal
15170ENDCASE
15180st%=PTR#c%
15190CASE I% OF
15200WHEN 1,2,3:cache%=TRUE:IFB%>8 THEN
15210IFB%>16 THEN
15220input=24:bbo%=0:gbo%=1:rbo%=2:step24=B%DIV8:r$="FN24":rowbytes%=step24*sx%
15230ELSE
15240rowbytes%=sx%*2
15250DIM rpal%(255),gpal%(255):input=16:step24=2:r$="FN16"
15260FORC%=0TO255
15270gpal%(C%)=(C%>>5)<<8 OR (C%AND31)<<16
15280rpal%(C%)=(C%>>2)AND31 OR (C%AND3)<<11
15290NEXT
15300FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
15310ENDIF
15320ELSE
15330r$="FN8":rowbytes%=sx%
15340ENDIF
15350info$="Truevision TGA image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(B%)
15360WHEN 9,10,11:step24=B%DIV8:rowbytes%=step24*sx%:buff%=FNdim(rowbytes%)
15370IFB%>8 THEN
15380IFB%>16 THEN
15390input=24:bb%=buff%:gb%=buff%+1:rb%=buff%+2:r$="FN2002"
15400ELSE
15410DIM rpal%(255),gpal%(255):input=16:step24=2:r$="FN2001"
15420FORC%=0TO255
15430gpal%(C%)=(C%>>5)<<8 OR (C%AND31)<<16
15440rpal%(C%)=(C%>>2)AND31 OR (C%AND3)<<11
15450NEXT
15460FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
15470ENDIF
15480ENDIF
15490info$="Truevision TGA RLE image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(B%)
15500ENDCASE
15510WHEN 2100
15520quant%=6:sx%=512:rowbytes%=2*sx%:sy%=256:cache%=TRUE:r$="FN16"
15530DIM rpal%(255),gpal%(255):input=16:step24=2
15540FORC%=0TO255
15550gpal%(C%)=C%>>3 OR (C%AND7)<<11
15560rpal%(C%)=(C%AND7)<<8 OR (C%>>3)<<16
15570NEXT
15580FORC%=0TO31:r%(C%)=C%/31*F:NEXT:b%()=r%()
15590FORC%=0TO63:g%(C%)=C%/63*F:NEXT
15600IFscale% ymul%=ymul%*2
15610info$="Pineapple image, 512 by 256 pixels, 16 bits per pixel":PTR#c%=7
15620WHEN 2200
15630quant%=8:step24=1:PTR#c%=0:s$=GET$#c%:E%=INSTR(s$,":"):st%=PTR#c%
15640sx%=VALMID$(s$,E%+1):sy%=VALMID$(s$,E%+2+LENSTR$sx%):PROCnopal:input=24
15650rowbytes%=sx%*3:rbo%=0:gbo%=sx%:bbo%=2*sx%:cache%=TRUE:r$="FN24"
15660info$="Irlam image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
15670WHEN 2250
15680PTR#c%=16:sx%=FNW:sy%=FNW:DIM rpal%(255),gpal%(255),bpal%(255),table%(255)
15690FORC%=0TO255:D%=C%OR1
15700table%(C%)=(D%-16)/219*F
15710IFD%AND128 D%-=256
15720r%(C%)=INT(D%/160*F):b%(C%)=INT(D%/126*F)
15730g%(C%)=INT(-D%/160*rwt/gwt*F):gpal%(C%)=INT(-D%/126*bwt/gwt*F)
15740NEXT
15750table%()=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
15760st%=32:PTR#c%=32:cache%=TRUE:rowbytes%=2*sx%:input=411
15770info$="Irlam YUV 4:1:1 file "+STR$sx%+" by "+STR$sy%+" pixels"
15780WHEN 2300
15790PTR#c%=6:sx%=FNHW:sy%=FNHW:D%=BGET#c%:ncolors%=BGET#c%:input=24
15800vflip%=NOTvflip%:quant%=BGET#c%:ncmap%=BGET#c%:cmaplen%=1<<BGET#c%
15810PROCnopal:back%=FNdim(4):!back%=0
15820clrfirst%=D%AND1
15830IF(D%AND2)=0 THEN
15840FORI%=0TOncolors%-1:back%?I%=BGET#c%:NEXT
15850IF(ncolors%AND1)=0 IFBGET#c%
15860ENDIF
15870IFD%AND4 alpha%=FNdim(sx%)
15880IFncmap%>0 THEN
15890FORI%=0TOcmaplen%-1:r%(I%)=FNHW/&FF00*F:NEXT
15900FORI%=0TOcmaplen%-1:g%(I%)=FNHW/&FF00*F:NEXT
15910FORI%=0TOcmaplen%-1:b%(I%)=FNHW/&FF00*F:NEXT
15920ENDIF
15930IFD%AND8 THEN
15940PTR#c%=FNHW+PTR#c%:IFPTR#c%AND1 PTR#c%=PTR#c%+1
15950ENDIF
15960st%=PTR#c%:buff%=FNdim(sx%*3):rb%=buff%:gb%=buff%+1*sx%:bb%=buff%+2*sx%
15970PROCrewind
15980info$="Utah rle image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(ncolors%*quant%)
15990WHEN 2400
16000PTR#c%=riffoff%+&0a:st%=FNW:pal%=FNW:sx%=FNW:sy%=FNW
16010CASE pal% OF
16020WHEN 12
16030PTR#c%=riffoff%+&18:input=FNHW:compression=0
16040WHEN 40
16050PTR#c%=riffoff%+&1c:input=FNHW:compression=FNW
16060PTR#c%=riffoff%+&26:xppm=FNW:yppm=FNW
16070IF xppm<>0 AND yppm<>0 AND scale%<>0 THEN
16080xdiv%=xdiv%*xppm:xmul%=xmul%*3543
16090ydiv%=ydiv%*yppm:ymul%=ymul%*3543
16100ENDIF
16110OTHERWISE
16120ERROR 42,"Unknown .BMP variant ("+STR$pal%+")"
16130ENDCASE
16140bigendianbits=TRUE:vflip%=NOTvflip%
16150CASE input OF
16160WHEN 1:rowbytes%=sx%+7>>3
16170WHEN 4:rowbytes%=sx%+1>>1
16180WHEN 8:rowbytes%=sx%
16190WHEN 16:rowbytes%=sx%*2:r$="FN16":step24=2
16200DIM rpal%(255),gpal%(255)
16210rmask%=&7c00:gmask%=42:bmask%=-42
16220IFcompression=3 PTR#c%=riffoff%+14+pal%:rmask%=FNW:gmask%=FNW:bmask%=FNW:compression=0
16230IFrmask%=&7c00 THEN
16240FORC%=0TO255
16250gpal%(C%)=(C%>>5)<<8 OR (C%AND31)<<16
16260rpal%(C%)=(C%>>2)AND31 OR (C%AND3)<<11
16270NEXT
16280FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
16290ENDIF
16300IFrmask%=&f800 THEN
16310FORC%=0TO255
16320gpal%(C%)=(C%>>5)<<8 OR (C%AND31)<<16
16330rpal%(C%)=(C%>>3)AND31 OR (C%AND7)<<11
16340NEXT
16350FORC%=0TO31:r%(C%)=C%/31*F:NEXT:b%()=r%()
16360FORC%=0TO63:g%(C%)=C%/63*F:NEXT
16370ENDIF
16380WHEN 24,32
16390rbo%=2:gbo%=1:bbo%=0:r$="FN24"
16400FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%()
16410r$="FN24":step24=input/8:rowbytes%=sx%*step24
16420rmask%=-1:gmask%=42:bmask%=-42
16430IFcompression=3 PTR#c%=riffoff%+14+pal%:rmask%=FNW:gmask%=FNW:bmask%=FNW:compression=0
16440IFrmask%=&FF THENrbo%=0:gbo%=1:bbo%=2
16450IFgmask%=&FF THENgbo%=0:bbo%=1:rbo%=2
16460IFbmask%=&FF THENbbo%=0:gbo%=1:rbo%=2
16470input=24
16480OTHERWISE ERROR 42,".BMP file of unusual depth ("+STR$input+")"
16490ENDCASE
16500IFinput<=8 THEN
16510PTR#c%=riffoff%+14+pal%:r$="FN8"
16520FORC%=0TO2^input-1
16530b%(C%)=BGET#c%/255*F:g%(C%)=BGET#c%/255*F:r%(C%)=BGET#c%/255*F:IFBGET#c%
16540NEXT
16550ENDIF
16560CASE compression OF
16570WHEN 0:info$="Uncompressed "
16580WHEN 1:info$="RLE8 compressed ":r$="FN2401"
16590WHEN 2:info$="RLE4 compressed ":r$="FN2402"
16600OTHERWISE ERROR 42,".BMP compression type not supported ("+STR$compression+")"
16610ENDCASE
16620rowbytes%=rowbytes%+3ANDNOT3
16630IF compression<>0 cachebytes%=TRUE:plbuff%=FNdim(rowbytes%)
16640cache%=TRUE:PTR#c%=riffoff%+st%
16650info$+="Windows 3.0 .BMP image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
16660WHEN 2500
16670PTR#c%=0:s$="":C%=BGET#c%:WHILEC%<>0 s$+=CHR$C%:C%=BGET#c%:ENDWHILE
16680s$+=" version "+STR$FNW:sx%=FNW:sy%=FNW:input=FNW:cache%=TRUE
16690info$="!Translator Clear format made by "+s$+", "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
16700IFinput>8 THEN
16710PROCnopal:input=24:step24=3:rowbytes%=3*sx%:rbo%=0:gbo%=1:bbo%=2:r$="FN24"
16720ELSE
16730FORC%=0TO2^input-1
16740r%(C%)=BGET#c%/255*F:g%(C%)=BGET#c%/255*F:b%(C%)=BGET#c%/255*F
16750NEXT
16760input=8:r$="FN8":rowbytes%=sx%
16770ENDIF
16780st%=PTR#c%
16790WHEN 2600
16800PTR#c%=0:C%=BGET#c%
16810D%=BGET#c%:CASE D% OF
16820WHEN 0:sx%=320:sy%=200:planes%=4
16830WHEN 1:sx%=640:sy%=200:planes%=2
16840WHEN 2:sx%=640:sy%=400:planes%=1
16850OTHERWISE ERROR42,"ChangeFSI knows nothing of "+STR$C%+" type Degas files"
16860ENDCASE
16870FORI%=0TO(1<<input)-1:D%=FNbeHW:r%(I%)=(D%>>8AND7)/7*F:g%(I%)=(D%>>4AND7)/7*F:b%(I%)=(D%AND7)/7*F:NEXT
16880cache%=TRUE:planar%=TRUE:masking%=FALSE:st%=34:PTR#c%=34:r$="FN1600"
16890rowbytes%=(sx%+15>>4)<<1:plbytes%=rowbytes%*planes%:pbuff%=FNdim(sx%)
16900IFC%AND128 r$="FN1601":flag=1600:cachebytes%=TRUE:plbuff%=FNdim(plbytes%) ELSErealrowbytes%=2:rowbytes%=plbytes%
16910info$="Degas file "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(planes%)
16920WHEN 2700
16930PTR#c%=4:sx%=FNHW:sy%=FNHW
16940CASE FNHW OF
16950WHEN &AF:rowbytes%=sx%:cache%=TRUE:r$="FN8":st%=&30A
16960OTHERWISE CLOSE#c%:ERROR 42,"Panic in ColoRIX reading - ChangeFSI largely ignorant of format!"
16970ENDCASE
16980FORC%=0TO2^input-1
16990r%(C%)=BGET#c%/63*F:g%(C%)=BGET#c%/63*F:b%(C%)=BGET#c%/63*F
17000NEXT
17010PTR#c%=st%
17020info$="ColoRIX file "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
17030WHEN 2800
17040PTR#c%=0:REPEAT s$=FNfits:CASE LEFT$(s$,8) OF
17050WHEN "SIMPLE  ":IFMID$(s$,30,1)<>"T" ERROR42,"ChangeFSI can only read Simple FITS format"
17060WHEN "BITPIX  ":input=VALMID$(s$,10)
17070WHEN "NAXIS   ":IFVALMID$(s$,10)<>2 ERROR42,"ChangeFSI can only read 2d FITS images"
17080WHEN "NAXIS1  ":sx%=VALMID$(s$,10)
17090WHEN "NAXIS2  ":sy%=VALMID$(s$,10)
17100WHEN "END     "
17110OTHERWISE IFinfo% PRINT"Ignoring FITS record "s$
17120ENDCASE
17130UNTILLEFT$(s$,8)="END     "
17140st%=(PTR#c%DIV2880 + 1)*2880:cache%=TRUE:PTR#c%=st%
17150CASE input OF
17160WHEN 8:r$="FN8":rowbytes%=sx%:PROCnopal
17170WHEN 16:rowbytes%=2*sx%:DIM rpal%(255),gpal%(255):step24=2:r$="FN16"
17180FORC%=0TO255
17190gpal%(C%)=C%<<8
17200rpal%(C%)=C%
17210NEXT:cheat%=0:IFinvert% cheat%=F
17220FORC%=0TO255:r%(C%)=cheat%+C%/65535*F:g%(C%)=((C%EOR&80)<<8)/65535*F:b%(C%)=cheat%:NEXT:rwt=1:gwt=1:bwt=1
17230OTHERWISE ERROR 42,"ChangeFSI can't read a FITS image with this number of bits per pixel"
17240ENDCASE
17250info$="FITS file "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
17260WHEN 2900
17270PTR#c%=4:sx%=FNbeHW:sy%=FNbeHW:PTR#c%=&42:input=FNbeHW:C%=FNbeHW
17280rowbytes%=FNbeHW:C%=FNbeW:st%=FNbeW:PTR#c%=st%:r$="FN8":PROCnopal
17290DIM rpal%(15),gpal%(15),bpal%(15)
17300rpal%()=&e6,&23,&e6,&7f,&17,&00,&a1,&45,&e6,&4a,&e6,&73,&6e,&47,&8a,0
17310gpal%()=&e6,&78,&00,&23,&a1,&73,&2e,&2e,&c8,&a6,&75,&40,&b8,&78,&55,0
17320bpal%()=&b8,&e6,&00,&a1,&17,&2e,&0c,&2e,&00,&c6,&00,&e6,&00,&00,&00,0
17330FORC%=&80TO&8F:r%(C%)=rpal%(C%-&80)/255*F:g%(C%)=gpal%(C%-&80)/255*F:b%(C%)=bpal%(C%-&80)/255*F:NEXT:cache%=TRUE
17340info$="Apollo GPR file "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
17350WHEN 3000
17360sx%=720:sy%=EXT#c%/1440:DIM rpal%(255),gpal%(255),bpal%(255),table%(255)
17380IFFALSE THEN
17390FORC%=0TO255
17400table%(C%)=(C%-16)/219*F
17410r%(C%)=(C%-128)/186*0.624*F:rpal%(C%)=(C%-128)/160*0.952*F
17420g%(C%)=-(C%-128)/186*0.64*F:gpal%(C%)=-(C%-128)/160*0.277*F
17430b%(C%)=(C%-128)/186*1.73*F:bpal%(C%)=-(C%-128)/160*1.11*F
17440NEXT
17450ELSE
17470FORC%=0TO255
17480table%(C%)=(C%-16)/219*F
17490r%(C%)=INT((C%-128)/160*F):b%(C%)=INT((C%-128)/126*F)
17500g%(C%)=INT(-(C%-128)/160*rwt/gwt*F):gpal%(C%)=INT(-(C%-128)/126*bwt/gwt*F)
17510NEXT
17520ENDIF
17530table%()=-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
17540st%=0:PTR#c%=0:cache%=TRUE:rowbytes%=1440:input=422:gamma=1
17550IFscale% ymul%=ymul%*2
17560info$="CCIR601 4:2:2 file "+STR$sx%+" by "+STR$sy%+" pixels"
17570WHEN 3100
17580quant%=8:PTR#c%=0:a$=GET$#c%:st%=PTR#c%
17590sx%=VALa$:sy%=VAL(MID$(a$,INSTR(a$," ")))
17600PROCnopal:input=24:step24=3:rowbytes%=sx%*3
17610rbo%=0:gbo%=1:bbo%=2:cache%=TRUE:flag=700:r$="FN24"
17620info$="!RayShade 'RGB' image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
17630WHEN 3200
17640quant%=8:PTR#c%=0:st%=0
17650sx%=VALMID$(s$,INSTR(s$,"_")+1,1)
17660CASE sx% OF
17670WHEN 5:sx%=768:sy%=512
17680WHEN 2:sx%=3072:sy%=2048
17690WHEN 1:sx%=1536:sy%=1024
17700ENDCASE
17710PROCnopal:input=24:step24=3:rowbytes%=sx%*3
17720rbo%=0:gbo%=1:bbo%=2:cache%=TRUE:flag=700:r$="FN24"
17730info$="Kodak /RGB image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
17740WHEN 3300
17750PTR#c%=0:input=VALMID$(FNGET,2)
17760s$=FNGET:sx%=VALs$:sy%=VALMID$(s$,INSTR(s$," ")):IFsy%=0 sy%=VALFNGET
17770cache%=TRUE:CASE input OF
17780WHEN 4:input=1:r$="FN8":r%(0)=F:g%()=r%():b%()=r%():bigendianbits=TRUE
17790rowbytes%=(sx%+7)DIV8
17800WHEN 5:input=8:r$="FN8":E%=VALFNGET
17810FORC%=0TOE%:r%(C%)=C%/E%*F:NEXT:g%()=r%():b%()=r%()
17820rowbytes%=sx%
17830WHEN 6:input=24:r$="FN24":E%=VALFNGET:step24=3:rbo%=0:gbo%=1:bbo%=2
17840FORC%=0TOE%:r%(C%)=C%/E%*F:NEXT:g%()=r%():b%()=r%()
17850rowbytes%=sx%*3
17860ENDCASE
17870st%=PTR#c%:flag=700
17880info$+="pbm image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
17890DEF FNGET REPEATs$=GET$#c%:UNTILLEFT$(s$,1)<>"#":=s$
17900WHEN 3400
17910PTR#c%=0:s$=FNGET:input=16:quant%=5
17920s$=FNGET:sx%=VALs$:sy%=VALMID$(s$,INSTR(s$," ")):s$=FNGET
17930DIM rpal%(255),gpal%(255):input=16:step24=2
17940FORC%=0TO255
17950gpal%(C%)=(C%>>5)<<8 OR (C%AND31)
17960rpal%(C%)=((C%>>2)AND31)<<16 OR (C%AND3)<<11
17970NEXT
17980cache%=TRUE:r$="FN16"
17990FORC%=0TO31:r%(C%)=C%/31*F:NEXT:g%()=r%():b%()=r%()
18000rowbytes%=sx%*2:st%=PTR#c%:flag=700
18010info$="p15 image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
18020WHEN 3450
18030PTR#c%=0:info$=FNGET
18040ybits%=VALMID$(info$,INSTR(info$," ")):ymax%=(1<<ybits%)-1
18050ubits%=VALMID$(info$,INSTR(info$,"Y ")+1):umax%=(1<<(ubits%-1))-1
18060vbits%=VALMID$(info$,INSTR(info$,"U ")+1):vmax%=(1<<(vbits%-1))-1
18070s$=FNGET:sx%=VALs$:sy%=VALMID$(s$,INSTR(s$," "))
18080DIM rpal%(255),gpal%(255),bpal%(255),table%(255)
18090FORC%=0TOymax%:table%(C%)=C%/ymax%*F:NEXT
18100D%=(1<<ubits%)-1
18110FORC%=0TOD%:d=C%/umax%:IFd>1 d=-(D%-C%)/umax%
18120b%(C%)=INT(d*(1-bwt)*F):gpal%(C%)=INT(-d*(1-bwt)*bwt/gwt*F)
18130NEXT
18140D%=(1<<vbits%)-1
18150FORC%=0TOD%:d=C%/vmax%:IFd>1 d=-(D%-C%)/vmax%
18160r%(C%)=INT(d*(1-rwt)*F):g%(C%)=INT(-d*(1-rwt)*rwt/gwt*F)
18170NEXT
18180rowbytes%=sx%*2:st%=PTR#c%:cache%=TRUE:r$="FN2250":input=555
18190info$+=", "+STR$sx%+" by "+STR$sy%+" pixels"
18200WHEN 3500
18210quant%=1:PTR#c%=6:E%=FNHW:sx%=FNHW:sx%=FNHW:sy%=FNHW:st%=FNHW:st%=FNW
18220rowbytes%=sx%/8+1ANDNOT1:cache%=TRUE:st%+=PTR#c%:PTR#c%=st%
18230CASE E% OF
18240WHEN 1
18250r$="FN8":input=1:r%(0)=F:g%(0)=F:b%(0)=F
18260info$="Pocketbook bitmap, "+STR$sx%+" by "+STR$sy%+" pixels, 1 bit per pixel"
18270WHEN 2
18280planar%=TRUE:planes%=2:r$="FN1600":input=8:cachebytes%=TRUE
18290r%(0)=F:r%(1)=(F/3)*2:r%(2)=F/3:r%(3)=0:g%()=r%():b%()=r%()
18300plbytes%=rowbytes%*planes%:buff%=FNdim(plbytes%*sy%):pbuff%=FNdim(sx%)
18310realrowbytes%=rowbytes%*sy%
18320info$="PocketbookII bitmap, "+STR$sx%+" by "+STR$sy%+" pixels, 2 bits per pixel"
18330OTHERWISE
18340ERROR 42,"Unknown Pocketbook PIC format"
18350ENDCASE
18360WHEN 3600
18370pcdblk%=FNdim(40):SYS&20023,"ChangeFSI$PCDindex",pcdblk%,20 TO,,Z
18380IFZ THENpcdblk%?Z=13:pcdindex%=VAL$pcdblk% ELSEpcdindex%=3
18390SYS"PhotoCD_Open",1,c%,1 TO pcdh%:SYS"PhotoCD_GetCount",pcdh% TO,Z
18400IF(Z>>pcdindex%)=0 CLOSE#c%:ERROR42,"Desired resolution unavailable"
18410SYS"PhotoCD_GetRotation",pcdh% TO,,pcdtr%
18420SYS"PhotoCD_GetSize",pcdh%,,pcdindex% TO,,,,sx%,sy%
18430pcdblk%!0=0:pcdblk%!8=sx%:pcdblk%!4=0
18440pcdblk%!16=0:pcdblk%!20=2:pcdblk%!24=1:pcdblk%!28=3
18460CASE pcdtr% OF
18470WHEN 0
18480WHEN &80000000:hflip%=NOThflip%
18490WHEN 90
18500CASE rotate% OF
18510WHEN 0:rotate%=1
18520WHEN -1:rotate%=0
18530WHEN 1:rotate%=0:vflip%=NOTvflip%:hflip%=NOThflip%
18540ENDCASE
18550WHEN &8000005A
18560CASE rotate% OF
18570WHEN 0:rotate%=1:vflip%=NOTvflip%
18580WHEN -1:rotate%=0:vflip%=NOTvflip%
18590WHEN 1:rotate%=0:hflip%=NOThflip%
18600ENDCASE
18610WHEN 180:hflip%=NOThflip%:vflip%=NOTvflip%
18620WHEN &800000B4:vflip%=NOTvflip%
18630WHEN 270
18640CASE rotate% OF
18650WHEN 0:rotate%=-1
18660WHEN 1:rotate%=0
18670WHEN -1:rotate%=0:vflip%=NOTvflip%:hflip%=NOThflip%
18680ENDCASE
18690WHEN &8000010E
18700CASE rotate% OF
18710WHEN 0:rotate%=-1:vflip%=NOTvflip%
18720WHEN 1:rotate%=0:vflip%=NOTvflip%
18730WHEN -1:rotate%=0:hflip%=NOThflip%
18740ENDCASE
18750OTHERWISE PANIC
18760ENDCASE
18780input=24:step24=3:rbo%=0:gbo%=1:bbo%=2:pcdcachesize%=32*1024
18790rowbytes%=sx%*3:PROCnopal:cache%=TRUE:pcdcache%=FNdim(pcdcachesize%)
18800info$="PhotoCD image, "+STR$sx%+" by "+STR$sy%+" pixels, 24 bits per pixel"
18810WHEN 3700
18820A%=OPENIN"<ChangeFSI$Dir>.CFSIjpeg":jpeg%=FNdim(EXT#A%)
18830SYS12,4,A%,jpeg%,EXT#A%:CLOSE#A%
18840datacache%=FNcachedim(EXT#c%):IFdatacache%=-1 datacache%=FNdim(EXT#c%)
18850PTR#c%=0:SYS12,4,c%,datacache%,EXT#c%
18860A%=datacache%:B%=jpegblk%:C%=jpegblk%+4:D%=jpegblk%+8:E%=jpegblk%+12:CALLjpeg%+8
18870B%=jpegblk%!12:jpegspace%=FNdim(B%)
18880C%=datacache%:A%=jpegspace%:D%=EXT#c%
18890CALLjpeg%:cache%=FALSE:IF!A% ERROR42,"JPEG code error: "+STR$!A%
18900sx%=A%!20:sy%=A%!24:input=8*A%?28:PROCnopal:step24=4
18910info$="JFIF image, "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
18920jpegy%=sy%:r$="FN"+STR$INT(3700+input)
18930WHEN 3800
18940PTR#c%=24:sx%=FNW:sy%=FNW
18950IFscale% ymul%=ymul%*2
18960DIM rpal%(255),gpal%(255),bpal%(255),table%(255)
18970FORC%=0TO255
18980IFC%<128 table%(C%)=C%/127*F
18990D%=C%:IFD%AND128 D%-=256
19000r%(C%)=INT(D%/160*F):b%(C%)=INT(D%/126*F)
19010g%(C%)=INT(-D%/160*rwt/gwt*F):gpal%(C%)=INT(-D%/126*bwt/gwt*F)
19020NEXT
19040PTR#c%=52:st%=FNW:PTR#c%=64:cache%=TRUE:rowbytes%=2*sx%:input=411
19050info$="Uncompressed Techno-I YUV file "+STR$sx%+" by "+STR$sy%+" pixels"
19060WHEN 3900
19070PTR#c%=8:sx%=FNW:sy%=FNW:st%=16:quant%=12:step24=6
19080FORC%=0TO4095:r%(C%)=C%/4095*F:NEXT:g%()=r%():b%()=r%()
19090input=48:rowbytes%=sx%*6:cache%=TRUE:r$="FN24":rbo%=0:gbo%=2:bbo%=4
19100info$="Ronald Alpiar format, "+STR$sx%+" by "+STR$sy%+" pixels, 36 bits per pixel"
19110WHEN 3905
19120PTR#c%=8:sx%=FNW:sy%=FNW:st%=16:quant%=16:step24=6
19130FORC%=0TO65535:r%(C%)=C%/65535*F:NEXT:g%()=r%():b%()=r%()
19140input=48:rowbytes%=sx%*6:cache%=TRUE:r$="FN24":rbo%=0:gbo%=2:bbo%=4
19150info$="Ronald Alpiar format, "+STR$sx%+" by "+STR$sy%+" pixels, 48 bits per pixel"
19160WHEN 666
19270st%=0:PTR#c%=0:sx%=160:sy%=128:input=8:cache%=TRUE:rowbytes%=sx%
19280FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%():r$="FN8"
19290info$="The number of the beast, 160 by "+STR$sy%+" pixels, 8 bits per pixel"
19300ENDCASE
19310IFinfo% PRINTinfo$
19320SYS"Hourglass_On",1:hour%=&406c4
19330IFm=-9 OR m=-10 THEN
19340SYS"XOS_CLI","rmensure CompressJPEG 0 rmload System:Modules.jcompmod"
19350SYS"XOS_CLI","rmensure CompressJPEG 0 IF ""<ChangeFSI$Dir>"" <> """" THEN rmload <ChangeFSI$Dir>.jcompmod"
19360*rmensure CompressJPEG 0 ERROR Can't find CompressJPEG module.
19370ENDIF
19380IFinvert% r%()=F-r%():g%()=F-g%():b%()=F-b%()
19390IFxdiv% PROCreduce(xmul%,xdiv%)
19400IFydiv% PROCreduce(ymul%,ydiv%)
19410CASE m OF
19420WHEN -1:x%=256:y%=256:ncol=256:IFscaleo% xdiv%=xdiv%*2:ydiv%=ydiv%*2
19430WHEN -2:x%=sx%:y%=sy%:IFspm=18 ncol=1 ELSEncol=15
19440WHEN -3,-5,-6:x%=sx%:y%=sy%:ncol=2^15-1
19450WHEN -4,-7,-8:x%=sx%:y%=sy%:ncol=2^24-1
19460WHEN -9,-10:x%=sx%:y%=sy%:ncol=2^24-1:IFm=-9 ncol=256
19470OTHERWISE
19480SYS53,m,4 TO ,,nx:SYS53,m,5 TO ,,ny:nx=1<<nx:ny=1<<ny
19490SYS53,m,11 TO ,,x%:SYS53,m,12 TO ,,y%:x%+=1:y%+=1
19500SYS53,m,3 TO ,,ncol:IFscaleo% THEN
19510IFrotate% THEN
19520xdiv%=xdiv%*ny:ydiv%=ydiv%*nx
19530IFxdiv% ymul%=ymul%*2
19540IFydiv% xmul%=xmul%*2
19550ELSE
19560xdiv%=xdiv%*nx:ydiv%=ydiv%*ny
19570IFxdiv% xmul%=xmul%*2
19580IFydiv% ymul%=ymul%*2
19590ENDIF
19600ENDIF
19610SYS&62A51,m TO r0;V:IF(V AND1)=0 THEN
19630IFr0=1 THEN
19640ncol=255:IFm$<>"D" m$="R"
19650ENDIF
19660ENDIF
19670ENDCASE
19680IFm=-6 OR m=-7 OR m=-8 THEN
19690nx=VALMID$(pnm$,5):ny=VALMID$(pnm$,INSTR(pnm$,",",5)+1)
19700IFscaleo% THEN
19710IFrotate% THEN
19720IFxdiv% ymul%=ymul%*nx
19730IFydiv% xmul%=xmul%*ny
19740ELSE
19750IFxdiv% xmul%=xmul%*nx
19760IFydiv% ymul%=ymul%*ny
19770ENDIF
19780xdiv%=xdiv%*90:ydiv%=ydiv%*90
19790ENDIF
19800ENDIF
19810IFrotate% SWAP x%,y%
19830IFxdiv%=0 xdiv%=sx%
19840IFydiv%=0 ydiv%=sy%
19850IFxs$="=" xmul%=x%:xdiv%=sx%
19860IFys$="=" ymul%=y%:ydiv%=sy%
19870IFlock% THEN
19880IFxmul%/xdiv%>ymul%/ydiv% xmul%=ymul%:xdiv%=ydiv% ELSEymul%=xmul%:ydiv%=xdiv%
19890ENDIF
19900IFncol=1 THEN
19910CASE m$ OF
19920WHEN"C":xdiv%=xdiv%*4:ydiv%=ydiv%*4
19930DIM A%(16),B%(16)
19940A%()=0,&00000001,&08000001,&08000101,&08080101,&08080103,&0C080103,&0C080303,&0C0C0303,&0C0E0303,&0C0E0703,&0E0E0703,&0E0E0707,&0E0F0707,&0E0F0F07,&0F0F0F07,&0F0F0F0F
19950B%()=0,&00000008,&01000008,&01000808,&01010808,&0101080C,&0301080C,&03010C0C,&03030C0C,&03070C0C,&03070E0C,&07070E0C,&07070E0E,&070F0E0E,&070F0F0E,&0F0F0F0E,&0F0F0F0F
19960even_gard=FNdim(17*32*4):odd_gard=FNdim(17*32*4)
19970FORI%=0TO16:FORJ%=0TO16:even_gard!(J%*32*4+I%*4)=A%(I%)ORB%(J%)<<4:NEXT:NEXT
19980FORI%=0TO16:FORJ%=0TO16:odd_gard!(I%*32*4+J%*4)=B%(I%)ORA%(J%)<<4:NEXT:NEXT
19990WHEN"T":xdiv%=xdiv%*3:ydiv%=ydiv%*3
20000DIM A%(9),B%(9)
20010A%()=0,&0001,&4001,&4041,&4043,&40C3,&60C3,&61C3,&71C3,&71C7
20020B%()=0,&0004,&1004,&1104,&1106,&1186,&3186,&31C6,&71C6,&71C7
20030even_gard=FNdim(10*16*4):odd_gard=FNdim(10*16*4)
20040FORI%=0TO9:FORJ%=0TO9:even_gard!(J%*16*4+I%*4)=A%(I%)ORB%(J%)<<3:NEXT:NEXT
20050FORI%=0TO9:FORJ%=0TO9:odd_gard!(I%*16*4+J%*4)=B%(I%)ORA%(J%)<<3:NEXT:NEXT
20060WHEN"D":xdiv%=xdiv%*2:ydiv%=ydiv%*2
20070DIM A%(4),B%(4)
20080A%()=0,&1,&21,&31,&33
20090B%()=0,&2,&12,&32,&33
20100even_gard=FNdim(5*8):odd_gard=FNdim(5*8)
20110FORI%=0TO4:FORJ%=0TO4:even_gard?(J%*8+I%)=A%(I%)ORB%(J%)<<2:NEXT:NEXT
20120FORI%=0TO4:FORJ%=0TO4:odd_gard?(I%*8+J%)=B%(I%)ORA%(J%)<<2:NEXT:NEXT
20130ENDCASE
20140ENDIF
20150REPEAT
20160PROCreduce(xmul%,xdiv%):PROCreduce(ymul%,ydiv%)
20170IFxdiv%*ydiv%*255>2^32 xdiv%=xdiv%ANDNOT1:ydiv%=ydiv%ANDNOT1:xmul%=xmul%ANDNOT1:ymul%=ymul%ANDNOT1
20180UNTILxdiv%*ydiv%*255<2^32
20190IFinfo% PRINT"Size ratios are x ";xmul%":"xdiv%" y "ymul%":"ydiv%
20200x%=sx%*xmul%/xdiv%+.9999:y%=sy%*ymul%/ydiv%+.9999:rows%=sy%
20210order%=x%*y%>sx%*sy%
20220code%=FNdim(8192):SP=13
20230IFcache% THEN
20240PROCcachesize(code%)
20250IFcachebytes% THEN
20260filesize%=EXT#c%-PTR#c%:IFcache%>filesize% cache%=filesize%
20270IFcachebytes%>0 IFcache%>cachebytes% cache%=cachebytes%
20280cacherows%=cache%
20290ELSE
20300filesize%=sy%*rowbytes%:IFcache%<rowbytes% cache%=rowbytes%
20310IFcache%>filesize% cache%=filesize%
20320cacherows%=striprows%:IFcacherows%<1 cacherows%=cache%DIVrowbytes%
20330cache%=cacherows%*rowbytes%
20340ENDIF
20350datacache%=FNcachedim(cache%):IFdatacache%=-1 datacache%=FNdim(cache%)
20360ENDIF
20370IFncol=255 IFm$<>"D" m$="R"
20380IFm$="R" OR(ncol=63 ANDm$="") THEN
20390SYS53,-1,3 TO,,J%:IFncol=255 AND MODE=m J%=ncol
20400IFncol=63 AND(m$=""ORm$="R") J%=ncol
20410IFJ%<>ncol PROCclose:ERROR42,"You must be in a "+STR$(ncol+1)+" colour mode to do this"
20420J%=ncol:IFJ%=63 J%=255
20430palette%=FNdim((J%+1)*4)
20440IFncol=255 THEN
20450SYS"ColourTrans_ReadPalette",-1,-1,palette%,256*4
20460FORI%=0TO255:palette%!(I%<<2)=palette%!(I%<<2)>>>8:NEXT
20470ELSE
20480IFncol=63 THEN
20490FORI%=0TO255
20500palette%!(I%<<2)=(I%AND7 OR (I%AND16)>>1)*17
20510palette%?(I%<<2 OR1)=(I%AND3 OR (I%AND&60)>>3)*17
20520palette%?(I%<<2 OR2)=(I%AND3 OR (I%AND8)>>1 OR (I%AND128)>>4)*17
20530NEXT
20540ELSE
20550FORI%=0TOncol:SYS"OS_ReadPalette",I%,16 TO ,,i%:palette%!(I%<<2)=i%>>>8:NEXT
20560ENDIF
20570ENDIF
20580t%=TRUE:k%=palette%+1:nk%=palette%+2
20590FORI%=0TOncol*4STEP4
20600IFpalette%?I%<>k%?I% OR palette%?I%<>nk%?I% t%=FALSE
20610NEXT
20620IFncol>16 IFt% m$="D"
20630IFncol=15 IFt% m$="T"
20640IFm$="R" THEN
20650IF sx%*xmul%/xdiv%*sy%*ymul%/ydiv%<200000 k%=3 ELSEk%=4
20660nk%=8-k%
20670t%=1<<nk%
20680mask%=t%-1
20690td2%=1<<nk%-1
20700step%=1<<(8-k%)
20710ncol%=ncol+1:IFncol%=64 ncol%=256
20720ict%=FNdim(2^(k%*3)*4-1)
20730IFcache%<8192*6 scratch%=FNdim(8192*6):scratchsz%=8192*6 ELSEscratch%=datacache%:scratchsz%=cache%
20740IFinfo% PRINT"Begin table generation with ";scratchsz%" bytes."
20750FORZ%=0TO2STEP2
20760P%=code%
20770[OPT Z%
20780.make%
20790STMFD r13!,{r14}
20800LDR r4,ict
20810MOV r2,#step%/2
20820.blueloop
20830MOV r1,#step%/2
20840.greenloop
20850MOV r0,#step%/2
20860.redloop
20880MOV r3,r0,LSR #nk%
20890MOV r14,r1,LSR #nk%
20900MOV r5,r2,LSR #nk%
20910ORR r3,r3,r14,LSL #k%
20920ORR r3,r3,r5,LSL #k%*2
20930BL devious
20940ADD r0,r0,#step%*2
20950CMP r0,#256
20960BCC redloop
20970ADD r1,r1,#step%
20980CMP r1,#256
20990BCC greenloop
21000ADD r2,r2,#step%
21010CMP r2,#256
21020BCC blueloop
21030LDMFD r13!,{pc}^
21040.ct DCD palette%
21050.min DCD code%+8192-256*2*4
21060.ict DCD ict%
21070.fsaad DCD scratch%
21080.fsalim DCD scratch%+scratchsz%
21090.devious
21100STMFD r13!,{r0,r1,r2,r3,r4,r8,r14}
21110BIC r0,r0,#(mask%<<1)+1
21120BIC r1,r1,#mask%
21130BIC r2,r2,#mask%
21160MOV r5,#0
21170LDR r6,ct
21180MOV r9,#&ff0000
21190MOV r14,#&ff0000
21200LDR r12,min
21210.devloop
21220LDR r7,[r6,r5,LSL #2]
21230MOV r8,r7,lsr #16
21240BIC r10,r8,#mask%
21250ADD r11,r2,#t%
21260CMP r10,r2
21270BEQ blueequal
21280SUBCC r10,r2,r8
21290SUBCC r11,r11,r8
21300SUBCS r10,r8,r11
21310SUBCS r11,r8,r2
21320MUL r3,r10,r10
21330.doneblue
21340MUL r4,r11,r11
21350MOV r8,r7,lsr #8
21360AND r8,r8,#255
21370BIC r10,r8,#mask%
21380ADD r11,r1,#t%
21390CMP r10,r1
21400BEQ greenequal
21410SUBCC r10,r1,r8
21420SUBCC r11,r11,r8
21430SUBCS r10,r8,r11
21440SUBCS r11,r8,r1
21460MUL r8,r10,r10
21470ADD r8,r8,r8,LSL #2
21480ADD r3,r3,r8,LSL #1
21490.donegreen
21500MUL r8,r11,r11
21510ADD r8,r8,r8,LSL #2
21520ADD r4,r4,r8,LSL #1
21540AND r8,r7,#255
21560BIC r10,r8,#mask%
21570ADD r11,r0,#t%
21580CMP r10,r0
21590BEQ redequal0
21600SUBCC r10,r0,r8
21610SUBCC r11,r11,r8
21620SUBCS r10,r8,r11
21630SUBCS r11,r8,r0
21650MUL r7,r10,r10
21660ADD r7,r7,r7,LSL #1
21670ADD r7,r3,r7
21680STR r7,[r12,r5,LSL #2]
21690.donered0
21700MUL r7,r11,r11
21710ADD r7,r7,r7,LSL #1
21720ADD r7,r4,r7
21740CMP r7,r9
21750MOVCC r9,r7
21770ADD r7,r0,#t%
21780BIC r10,r8,#mask%
21790ADD r11,r7,#t%
21800CMP r10,r7
21810BEQ redequal1
21820SUBCC r10,r7,r8
21830SUBCC r11,r11,r8
21840SUBCS r10,r8,r11
21850SUBCS r11,r8,r7
21860MUL r7,r10,r10
21870ADD r7,r7,r7,LSL #1
21880ADD r3,r3,r7
21900.donered1
21910ADD r7,r5,#ncol%
21920STR r3,[r12,r7,LSL #2]
21930MUL r7,r11,r11
21940ADD r7,r7,r7,LSL #1
21950ADD r7,r4,r7
21970CMP r7,r14
21980MOVCC r14,r7
21990ADD r5,r5,#1
22000CMP r5,#ncol%
22010BCC devloop
22020LDMFD r13!,{r0,r1,r2,r3,r4}
22040LDR r5,fsaad
22050MOV r7,r5
22060MOV r10,#0
22070.calcnum0
22080LDMIA r12!,{r8,r11}
22090CMP r8,r9
22100STRLEB r10,[r7],#1
22110ADD r10,r10,#1
22120CMP r11,r9
22130STRLEB r10,[r7],#1
22140ADD r10,r10,#1
22150LDMIA r12!,{r8,r11}
22160CMP r8,r9
22170STRLEB r10,[r7],#1
22180ADD r10,r10,#1
22190CMP r11,r9
22200STRLEB r10,[r7],#1
22210ADD r10,r10,#1
22220CMP r10,#ncol%
22230BCC calcnum0
22240SUBS r10,r7,r5
22250SWIEQ 256+ASC"A"
22260CMP r10,#4 ;if<4 then
22270MOVCC r7,r5 ;reset list pointer
22280LDRCCB r5,[r7] ;first possible
22290LDRCCB r8,[r7,#1] ;second possible
22300ORRCC r5,r5,r8,lsl #8
22310LDRCCB r8,[r7,#2] ;third possible
22320ORRCC r5,r5,r8,lsl #16
22330ADD r5,r5,r10,lsl #24
22340BIC r10,r3,#1
22350STR r5,[r4,r10,LSL #2]
22360MOV r5,r7
22370MOV r10,#0
22380.calcnum1
22390LDMIA r12!,{r8,r11}
22400CMP r8,r14
22410STRLEB r10,[r7],#1
22420ADD r10,r10,#1
22430CMP r11,r14
22440STRLEB r10,[r7],#1
22450ADD r10,r10,#1
22460LDMIA r12!,{r8,r11}
22470CMP r8,r14
22480STRLEB r10,[r7],#1
22490ADD r10,r10,#1
22500CMP r11,r14
22510STRLEB r10,[r7],#1
22520ADD r10,r10,#1
22530CMP r10,#ncol%
22540BCC calcnum1
22550SUBS r10,r7,r5
22560SWIEQ 256+ASC"B"
22570CMP r10,#4 ;if<4 then
22580MOVCC r7,r5
22590LDRCCB r5,[r7]
22600LDRCCB r8,[r7,#1]
22610ORRCC r5,r5,r8,lsl #8
22620LDRCCB r8,[r7,#2]
22630ORRCC r5,r5,r8,lsl #16
22640ADD r5,r5,r10,lsl #24
22650ORR r10,r3,#1
22660STR r5,[r4,r10,LSL #2]
22670STR r7,fsaad
22680LDR r8,fsalim
22690CMP r7,r8
22700SWICS 256+ASC"!"
22710LDMFD r13!,{r8,pc}^
22720.redequal0
22730STR r3,[r12,r5,LSL #2]
22740TST r8,#td2%
22750SUBNE r11,r8,r0
22760SUBEQ r11,r11,r8
22770B donered0
22780.redequal1
22790TST r8,#td2%
22800SUBNE r11,r8,r7
22810SUBEQ r11,r11,r8
22820B donered1
22830.greenequal
22840TST r8,#td2%
22850SUBNE r11,r8,r1
22860SUBEQ r11,r11,r8
22870B donegreen
22880.blueequal
22890MOV r3,#0
22900TST r8,#td2%
22910SUBNE r11,r8,r2
22920SUBEQ r11,r11,r8
22930B doneblue
22940]
22950NEXT
22960I%=TIME:CALLmake%
22970IFinfo% PRINT"Generated 'r'";k%" tables for ";ncol%" colours using ";!fsaad-scratch%" bytes, taking "TIME-I%" cS"
22980safesubict%=FNdim(!fsaad-scratch%)
22990FORI%=0TO!fsaad-scratch%+4STEP4:safesubict%!I%=scratch%!I%:NEXT
23000FORI%=0TO2^(k%*3)*4-1STEP4:IF(ict%!I%>>>24)>3 ict%!I%=ict%!I%-scratch%+safesubict%
23010NEXT
23020ENDIF
23030ENDIF
23040IFfast% IFMODE<>0 MODE0
23060CASE m OF
23070WHEN -1,-9:col=0
23080WHEN -3,-4,-5,-6,-7,-8,-10:col=2
23090OTHERWISE
23100IFm$="D" IFncol=3 m$=""
23110col=0:IFncol>15 ORm$="C" ORm$="D" ORm$="R" col=2
23120IFncol=63 OR ncol=255 IFm$="D" col=0:ncol=256
23130ENDCASE
23140IFncol=1 THEN
23150CASE m$ OF
23160WHEN"C":col=0:x%=x%+1ANDNOT1
23170WHEN"D":col=0:x%=x%+3ANDNOT3
23180WHEN"T":col=0:x%=x%+1ANDNOT1
23190ENDCASE
23200ENDIF
23210DIM cl%(x%+7,col)
23220DIM xl%(x%+7,col),xp%(sx%+7,col)
23230DIM xl2%(x%+7,col)
23240IFsharpen% THEN
23250IForder% THEN
23260DIM rm%(sx%+7,col),rm1%(sx%+7,col),rm2%(sx%+7,col)
23270ELSE
23280DIM rm%(x%+7,col),rm1%(x%+7,col),rm2%(x%+7,col)
23290ENDIF
23300ENDIF
23310IFhist%ORequal% DIM vals%(256,col)
23320DIM nl%(x%+7,col)
23330totvals%=x%*(col+1)
23340totvals2%=sx%*(col+1)
23350FORZ=0TO2STEP2:P%=code%
23360CASE ncol OF
23370WHEN 2^24-1
23380[OPT Z
23390.div255
23400]
23410FORI%=0TO2^p6bits-1
23420[OPT Z
23430EQUD I%/(2^p6bits-1)*F
23440]
23450NEXT
23460[OPT Z
23470.fs%
23480STMFD SP !,{R14}
23490LDR R1,[R9,#5*8]:LDR R1,[R1]
23500LDR R10,[R9,#4*8]
23510LDR R11,[R9,#3*8]
23520LDR R12,[R9,#2*8]:LDR R12,[R12]
23530LDR R8,[R9,#8]:LDR R8,[R8]
23540LDR R9,[R9]:LDR R9,[R9]
23550LDR R4,[R10]
23560LDR R5,[R10,#4]
23570LDR R6,[R10,#8]
23580ADR R7,div255
23590.fsloop
23600ADD R10,R10,R8
23610CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
23620SUB R0,R4,R4,LSR #p6bits:ADD R0,R0,#1<<(bits-p6bits-1):MOV R0,R0,LSR #(bits-p6bits)
23630LDR R2,[R7,R0,LSL #2]:SUB R4,R4,R2
23640CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
23650SUB R3,R5,R5,LSR #p6bits:ADD R3,R3,#1<<(bits-p6bits-1):MOV R3,R3,LSR #(bits-p6bits):ORR R0,R0,R3,LSL #8
23660LDR R2,[R7,R3,LSL #2]:SUB R5,R5,R2
23670CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
23680SUB R3,R6,R6,LSR #p6bits:ADD R3,R3,#1<<(bits-p6bits-1):MOV R3,R3,LSR #(bits-p6bits):ORR R0,R0,R3,LSL #16
23690LDR R2,[R7,R3,LSL #2]:SUB R6,R6,R2
23700STRB R0,[R12]:MOV R0,R0,LSR #8:STRB R0,[R12,#1]:MOV R0,R0,LSR #8
23710STRB R0,[R12,#2]
23720]
23730IFm=-8 THEN
23740[OPT Z
23750ADD R12,R12,R1,LSL #2
23760]
23770ELSE
23780[OPT Z
23790ADD R12,R12,R1,LSL #1:ADD R12,R12,R1
23800]
23810ENDIF
23820IFdither% THEN
23830[OPT Z
23840ADD R0,R11,#4
23850ADD R2,R4,R4,LSL #1
23860LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
23870STR R3,[R11,-R8]
23880ADD R2,R4,R4,LSL #2
23890LDR R3,[R11]:ADD R3,R3,R2,ASR #4
23900STR R3,[R11]
23910MOV R3,R4,ASR #4
23920STR R3,[R11,R8]!
23930RSB R2,R4,R4,LSL #3
23940LDR R4,[R10]
23950ADD R4,R4,R2,ASR #4
23960ADD R2,R5,R5,LSL #1
23970LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
23980STR R3,[R0,-R8]
23990MOV R3,R5,ASR #4
24000STR R3,[R0,R8]
24010ADD R2,R5,R5,LSL #2
24020LDR R3,[R0]:ADD R3,R3,R2,ASR #4
24030STR R3,[R0],#4
24040RSB R2,R5,R5,LSL #3
24050LDR R5,[R10,#4]
24060ADD R5,R5,R2,ASR #4
24070ADD R2,R6,R6,LSL #1
24080LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
24090STR R3,[R0,-R8]
24100ADD R2,R6,R6,LSL #2
24110LDR R3,[R0]:ADD R3,R3,R2,ASR #4
24120STR R3,[R0]
24130MOV R3,R6,ASR #4
24140STR R3,[R0,R8]
24150RSB R2,R6,R6,LSL #3
24160LDR R6,[R10,#8]
24170ADD R6,R6,R2,ASR #4
24180]
24190ELSE
24200[OPT Z
24210LDMIA R10,{R4,R5,R6}
24220]
24230ENDIF
24240[OPT Z
24250SUBS R9,R9,#1:BNE fsloop
24260LDMFD SP !,{PC}^
24270]
24280WHEN 2^15-1
24290[OPT Z
24300.div31
24310]
24320FORI%=0TO31
24330[OPT Z
24340EQUD I%/31*F
24350]
24360NEXT
24370[OPT Z
24380.fs%
24390STMFD SP !,{R14}
24400LDR R1,[R9,#5*8]:LDR R1,[R1]
24410LDR R10,[R9,#4*8]
24420LDR R11,[R9,#3*8]
24430LDR R12,[R9,#2*8]:LDR R12,[R12]
24440LDR R8,[R9,#8]:LDR R8,[R8]
24450LDR R9,[R9]:LDR R9,[R9]
24460LDR R4,[R10]
24470LDR R5,[R10,#4]
24480LDR R6,[R10,#8]
24490ADR R7,div31
24500.fsloop
24510ADD R10,R10,R8
24520CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
24530SUB R0,R4,R4,LSR #5:ADD R0,R0,#1<<(bits-6):MOV R0,R0,LSR #(bits-5)
24540LDR R2,[R7,R0,LSL #2]:SUB R4,R4,R2
24550CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
24560SUB R3,R5,R5,LSR #5:ADD R3,R3,#1<<(bits-6):MOV R3,R3,LSR #(bits-5):ORR R0,R0,R3,LSL #5
24570LDR R2,[R7,R3,LSL #2]:SUB R5,R5,R2
24580CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
24590SUB R3,R6,R6,LSR #5:ADD R3,R3,#1<<(bits-6):MOV R3,R3,LSR #(bits-5):ORR R0,R0,R3,LSL #10
24600LDR R2,[R7,R3,LSL #2]:SUB R6,R6,R2
24610STRB R0,[R12]:MOV R0,R0,LSR #8:STRB R0,[R12,#1]:ADD R12,R12,R1,LSL #1
24620]
24630IFdither% THEN
24640[OPT Z
24650ADD R0,R11,#4
24660ADD R2,R4,R4,LSL #1
24670LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
24680STR R3,[R11,-R8]
24690ADD R2,R4,R4,LSL #2
24700LDR R3,[R11]:ADD R3,R3,R2,ASR #4
24710STR R3,[R11]
24720MOV R3,R4,ASR #4
24730STR R3,[R11,R8]!
24740RSB R2,R4,R4,LSL #3
24750LDR R4,[R10]
24760ADD R4,R4,R2,ASR #4
24770ADD R2,R5,R5,LSL #1
24780LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
24790STR R3,[R0,-R8]
24800MOV R3,R5,ASR #4
24810STR R3,[R0,R8]
24820ADD R2,R5,R5,LSL #2
24830LDR R3,[R0]:ADD R3,R3,R2,ASR #4
24840STR R3,[R0],#4
24850RSB R2,R5,R5,LSL #3
24860LDR R5,[R10,#4]
24870ADD R5,R5,R2,ASR #4
24880ADD R2,R6,R6,LSL #1
24890LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
24900STR R3,[R0,-R8]
24910ADD R2,R6,R6,LSL #2
24920LDR R3,[R0]:ADD R3,R3,R2,ASR #4
24930STR R3,[R0]
24940MOV R3,R6,ASR #4
24950STR R3,[R0,R8]
24960RSB R2,R6,R6,LSL #3
24970LDR R6,[R10,#8]
24980ADD R6,R6,R2,ASR #4
24990]
25000ELSE
25010[OPT Z
25020LDMIA R10,{R4,R5,R6}
25030]
25040ENDIF
25050[OPT Z
25060SUBS R9,R9,#1:BNE fsloop
25070LDMFD SP !,{PC}^
25080]
25090WHEN 256
25100[OPT Z
25110.div255
25120]
25130FORI%=0TO255
25140[OPT Z
25150EQUD I%/255*F
25160]
25170NEXT
25180[OPT Z
25200.fs%
25210STMFD SP !,{R14}
25220LDR R10,[R9,#4*8]
25230ADR R7,div255
25240LDR R1,[R9,#5*8]:LDR R1,[R1]
25250LDR R11,[R9,#3*8]
25260LDR R12,[R9,#2*8]:LDR R12,[R12]
25270LDR R8,[R9,#8]:LDR R8,[R8]
25280LDR R9,[R9]:LDR R9,[R9]
25290LDR R4,[R10],R8
25300.fsloop
25310CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
25320SUB R0,R4,R4,LSR #8:ADD R0,R0,#1<<(bits-9):MOV R0,R0,LSR #(bits-8):STRB R0,[R12],R1
25330LDR R2,[R7,R0,LSL #2]
25340]
25350IFdither% THEN
25360[OPT Z
25370SUB R4,R4,R2
25380MOVCS R4,#0
25390ADD R2,R4,R4,LSL #1
25400LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
25410STR R3,[R11,-R8]
25420ADD R2,R4,R4,LSL #2
25430LDR R3,[R11]:ADD R3,R3,R2,ASR #4
25440STR R3,[R11]
25450MOV R3,R4,ASR #4
25460STR R3,[R11,R8]!
25470RSB R2,R4,R4,LSL #3
25480LDR R4,[R10],R8
25490ADD R4,R4,R2,ASR #4
25500]
25510ELSE
25520[OPT Z
25530LDR R4,[R10],R8
25540]
25550ENDIF
25560[OPT Z
25570SUBS R9,R9,#1:BNE fsloop
25580LDMFD SP !,{PC}^
25590]
25600WHEN 63,255
25610div15=P%:FORI%=0TO255*4STEP4
25620[OPT Z
25630EQUD (palette%!I%AND&FF)/255*F
25640EQUD (palette%!I%>>8AND&FF)/255*F
25650EQUD (palette%!I%>>16AND&FF)/255*F
25660]
25670NEXT
25680IFm$="R" THEN
25690[OPT Z
25700.ictloc EQUD ict%
25710]
25720ENDIF
25730[OPT Z
25740EQUD div15
25750.fs%
25760STMFD SP !,{R14}
25770LDR R1,[R9,#5*8]:LDR R1,[R1]
25780LDR R10,[R9,#4*8]
25790LDR R11,[R9,#3*8]
25800LDR R12,[R9,#2*8]:LDR R12,[R12]
25810LDR R8,[R9,#8]:LDR R8,[R8]
25820LDR R9,[R9]:LDR R9,[R9]
25830LDR R4,[R10]
25840LDR R5,[R10,#4]
25850LDR R6,[R10,#8]
25860LDR R7,fs%-4
25870.fsloop
25880ADD R10,R10,R8
25890]
25900CASE m$ OF
25910WHEN"T"
25920[OPT Z
25930CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
25940MOV R0,R4,LSR #(bits-4):CMP R0,#15:MOVCS R0,#15
25950CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
25960MOV R3,R5,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:ORR R0,R0,R3,LSL #4
25970CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
25980MOV R3,R6,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:ORR R0,R0,R3,LSL #8
25990LDR R3,colmatchloc
26000LDRB R0,[R3,R0]
26010ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
26020LDR R2,[R3],#4:SUB R4,R4,R2
26030LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
26040]
26050WHEN"R"
26060PROCsrchdevlist
26070OTHERWISE
26080[OPT Z
26090CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
26100CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
26110CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
26120STMFD SP !,{R7,R8,R9}
26130MVN R2,#0
26140MOV R3,#&30<<23
26150.srch RSB R7,R3,#&20<<23
26160MOV R8,R6,LSR #bits-8
26170SUB R8,R8,R8,LSR #4
26180ADDS R7,R7,R8,LSL #23
26190MOVVSS R7,#&7F000000
26200MOVMI R7,#0
26210AND R7,R7,#&60000000
26220ADD R7,R7,R3
26230ADD R14,R7,R7,LSR #4
26240ADD R7,R14,R14,LSR #8
26250ADD R7,R7,R7,LSR #16
26260SUBS R8,R6,R7,LSR #31-bits
26270RSBLT R8,R8,#0
26280MOV R8,R8,LSR #bits/2
26290MUL R9,R8,R8
26300RSB R7,R3,#&20<<23
26310MOV R8,R5,LSR #bits-8
26320SUB R8,R8,R8,LSR #4
26330ADDS R7,R7,R8,LSL #23
26340MOVVSS R7,#&7F000000
26350MOVMI R7,#0
26360AND R7,R7,#&60000000
26370ADD R7,R3,R7
26380ADD R7,R7,R7,LSR #4
26390ORR R14,R14,R7,LSR #8
26400ADD R7,R7,R7,LSR #8
26410ADD R7,R7,R7,LSR #16
26420SUBS R8,R5,R7,LSR #31-bits
26430RSBLT R8,R8,#0
26440MOV R8,R8,LSR #bits/2
26450MUL R7,R8,R8
26460ADD R7,R7,R7,LSL #2
26470ADD R9,R9,R7,LSL #1
26480RSB R7,R3,#&20<<23
26490MOV R8,R4,LSR #bits-8
26500SUB R8,R8,R8,LSR #4
26510ADDS R7,R7,R8,LSL #23
26520MOVVSS R7,#&7F000000
26530MOVMI R7,#0
26540AND R7,R7,#&60000000
26550ADD R7,R3,R7
26560ADD R7,R7,R7,LSR #4
26570ORR R14,R14,R7,LSR #16
26580ADD R7,R7,R7,LSR #8
26590ADD R7,R7,R7,LSR #16
26600SUBS R8,R4,R7,LSR #31-bits
26610RSBLT R8,R8,#0
26620MOV R8,R8,LSR #bits/2
26630MUL R7,R8,R8
26640ADD R7,R7,R7,LSL #1
26650ADD R9,R9,R7
26660CMP R9,R2
26670MOVLS R2,R9
26680MOVLS R0,R14
26690SUBS R3,R3,#&10<<23
26700BGE srch
26710AND R7,R0,#&40000000
26720MOV R8,R7,LSR #23
26730AND R7,R0,#&600000
26740ORR R8,R8,R7,LSR #16
26750AND R7,R0,#&4000
26760ORR R8,R8,R7,LSR #10
26770AND R7,R0,#&20000000
26780ORR R8,R8,R7,LSR #26
26790AND R7,R0,#&3800
26800ORR R0,R8,R7,LSR #11
26810LDMFD SP !,{R7,R8,R9}
26820ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
26830LDR R2,[R3],#4:SUB R4,R4,R2
26840LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
26850]
26860ENDCASE
26870[OPT Z
26880STRB R0,[R12],R1
26890]
26900IFdither% THEN
26910[OPT Z
26920ADD R0,R11,#4
26930ADD R2,R4,R4,LSL #1
26940LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
26950STR R3,[R11,-R8]
26960ADD R2,R4,R4,LSL #2
26970LDR R3,[R11]:ADD R3,R3,R2,ASR #4
26980STR R3,[R11]
26990MOV R3,R4,ASR #4
27000STR R3,[R11,R8]!
27010RSB R2,R4,R4,LSL #3
27020LDR R4,[R10]
27030ADD R4,R4,R2,ASR #4
27040ADD R2,R5,R5,LSL #1
27050LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
27060STR R3,[R0,-R8]
27070MOV R3,R5,ASR #4
27080STR R3,[R0,R8]
27090ADD R2,R5,R5,LSL #2
27100LDR R3,[R0]:ADD R3,R3,R2,ASR #4
27110STR R3,[R0],#4
27120RSB R2,R5,R5,LSL #3
27130LDR R5,[R10,#4]
27140ADD R5,R5,R2,ASR #4
27150ADD R2,R6,R6,LSL #1
27160LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
27170STR R3,[R0,-R8]
27180ADD R2,R6,R6,LSL #2
27190LDR R3,[R0]:ADD R3,R3,R2,ASR #4
27200STR R3,[R0]
27210MOV R3,R6,ASR #4
27220STR R3,[R0,R8]
27230RSB R2,R6,R6,LSL #3
27240LDR R6,[R10,#8]
27250ADD R6,R6,R2,ASR #4
27260]
27270ELSE
27280[OPT Z
27290LDMIA R10,{R4,R5,R6}
27300]
27310ENDIF
27320[OPT Z
27330SUBS R9,R9,#1:BNE fsloop
27340LDMFD SP !,{PC}^
27350]
27360WHEN 15
27370divtable=P%:CASE m$ OF
27380WHEN "D"
27390WHEN "R"
27400FORI%=0TO15*4STEP4
27410[OPT Z
27420EQUD (palette%!I%>>4AND&F)/bright%*F
27430EQUD (palette%!I%>>12AND&F)/bright%*F
27440EQUD (palette%!I%>>20AND&F)/bright%*F
27450]
27460NEXT
27470[OPT Z
27480.ictloc EQUD ict%
27490]
27500WHEN "T"
27510FORI%=0TO15
27520[OPT Z
27530EQUD I%/bright%*F
27540]
27550NEXT
27560OTHERWISE
27570FORI%=0TO7
27580[OPT Z
27590EQUD I%/(bright%DIV2)*F
27600]
27610NEXT
27620ENDCASE
27630[OPT Z
27640.fs%
27650STMFD SP !,{R14}
27660LDR R1,[R9,#5*8]:LDR R1,[R1]
27670LDR R10,[R9,#4*8]
27680LDR R11,[R9,#3*8]
27690LDR R12,[R9,#2*8]:LDR R12,[R12]
27700LDR R8,[R9,#8]:LDR R8,[R8]
27710LDR R9,[R9]:LDR R9,[R9]
27720]
27730IFm$="D" ORm$="R" THEN
27740[OPT Z
27750LDR R4,[R10]
27760LDR R5,[R10,#4]
27770LDR R6,[R10,#8]
27780]
27790ELSE
27800[OPT Z
27810LDR R4,[R10],R8
27820]
27830ENDIF
27840IFm$<>"D" THEN
27850[OPT Z
27860ADR R7,divtable
27870]
27880ENDIF
27890[OPT Z
27900.fsloop
27910]
27920CASE m$ OF
27930WHEN"R"
27940[OPT Z
27950ADD R10,R10,R8
27960]
27970PROCsrchdevlist
27980[OPT Z
27990MOV r3,r0
28000]
28010WHEN "D"
28020[OPT Z
28030ADD R10,R10,R8
28040MOV R3,#0
28050CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
28060CMP R4,#F>>1
28070SUBCS R4,R4,#F:ORRCS R3,R3,#1
28080CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
28090CMP R5,#F>>1
28100SUBCS R5,R5,#F:ORRCS R3,R3,#2
28110CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
28120CMP R6,#F>>1
28130SUBCS R6,R6,#F:ORRCS R3,R3,#4
28140]
28150WHEN "T"
28160[OPT Z
28170CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
28180RSB R3,R4,R4,LSL #4:ADD R3,R3,#F>>1:MOV R3,R3,LSR #bits
28190LDR R2,[R7,R3,LSL #2]
28200SUB R4,R4,R2
28210]
28220OTHERWISE
28230[OPT Z
28240CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
28250RSB R3,R4,R4,LSL #3:ADD R3,R3,#F>>1:MOV R3,R3,LSR #bits
28260LDR R2,[R7,R3,LSL #2]
28270SUB R4,R4,R2
28280]
28290ENDCASE
28300[OPT Z
28310MOV R2,R12,LSR #1
28320TST R12,#1
28330LDRB R0,[R2]
28340ANDEQ R0,R0,#&F0:ORREQ R0,R0,R3
28350ANDNE R0,R0,#&0F:ORRNE R0,R0,R3,LSL #4
28360STRB R0,[R2]
28370ADD R12,R12,R1
28380]
28390IFm$="D" ORm$="R" THEN
28400IFdither% THEN
28410[OPT Z
28420ADD R0,R11,#4
28430ADD R2,R4,R4,LSL #1
28440LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
28450STR R3,[R11,-R8]
28460ADD R2,R4,R4,LSL #2
28470LDR R3,[R11]:ADD R3,R3,R2,ASR #4
28480STR R3,[R11]
28490MOV R3,R4,ASR #4
28500STR R3,[R11,R8]!
28510RSB R2,R4,R4,LSL #3
28520LDR R4,[R10]
28530ADD R4,R4,R2,ASR #4
28540ADD R2,R5,R5,LSL #1
28550LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
28560STR R3,[R0,-R8]
28570MOV R3,R5,ASR #4
28580STR R3,[R0,R8]
28590ADD R2,R5,R5,LSL #2
28600LDR R3,[R0]:ADD R3,R3,R2,ASR #4
28610STR R3,[R0],#4
28620RSB R2,R5,R5,LSL #3
28630LDR R5,[R10,#4]
28640ADD R5,R5,R2,ASR #4
28650ADD R2,R6,R6,LSL #1
28660LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
28670STR R3,[R0,-R8]
28680ADD R2,R6,R6,LSL #2
28690LDR R3,[R0]:ADD R3,R3,R2,ASR #4
28700STR R3,[R0]
28710MOV R3,R6,ASR #4
28720STR R3,[R0,R8]
28730RSB R2,R6,R6,LSL #3
28740LDR R6,[R10,#8]
28750ADD R6,R6,R2,ASR #4
28760]
28770ELSE
28780[OPT Z
28790LDMIA R10,{R4,R5,R6}
28800]
28810ENDIF
28820ELSE
28830IFdither% THEN
28840[OPT Z
28850ADD R2,R4,R4,LSL #1
28860LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
28870STR R3,[R11,-R8]
28880ADD R2,R4,R4,LSL #2
28890LDR R3,[R11]:ADD R3,R3,R2,ASR #4
28900STR R3,[R11]
28910MOV R3,R4,ASR #4
28920STR R3,[R11,R8]!
28930RSB R2,R4,R4,LSL #3
28940LDR R4,[R10],R8
28950ADD R4,R4,R2,ASR #4
28960]
28970ELSE
28980[OPT Z
28990LDR R4,[R10],R8
29000]
29010ENDIF
29020ENDIF
29030[OPT Z
29040SUBS R9,R9,#1:BNE fsloop
29050LDMFD SP !,{PC}^
29060]
29070WHEN 3
29080divtable=P%:CASE m$ OF
29090WHEN "C"
29100WHEN "R"
29110FORI%=0TO3*4STEP4
29120[OPT Z
29130EQUD (palette%!I%>>4AND&F)/bright%*F
29140EQUD (palette%!I%>>12AND&F)/bright%*F
29150EQUD (palette%!I%>>20AND&F)/bright%*F
29160]
29170NEXT
29180OTHERWISE
29190[OPT Z
29200EQUD 0
29210EQUD 1/(bright%DIV4)*F
29220EQUD 2/(bright%DIV4)*F
29230EQUD F
29240]
29250ENDCASE
29260[OPT Z
29270.fs%
29280STMFD SP !,{R14}
29290LDR R1,[R9,#5*8]:LDR R1,[R1]
29300LDR R10,[R9,#4*8]
29310LDR R11,[R9,#3*8]
29320LDR R12,[R9,#2*8]
29330LDR R12,[R12]
29340LDR R8,[R9,#8]
29350LDR R8,[R8]
29360LDR R9,[R9]
29370LDR R9,[R9]
29380]
29390IFm$="C" ORm$="R" THEN
29400[OPT Z
29410LDR R4,[R10]
29420LDR R5,[R10,#4]
29430LDR R6,[R10,#8]
29440]
29450ELSE
29460[OPT Z
29470LDR R4,[R10],R8
29480]
29490ENDIF
29500[OPT Z
29510.fsloop
29520]
29530IFm$<>"C"THEN
29540[OPT Z
29550ADR R7,divtable
29560]
29570ENDIF
29580CASE m$ OF
29590WHEN"C"
29600[OPT Z
29610ADD R10,R10,R8
29620CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
29630CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
29640CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
29650MOV R3,#0
29660CMP R4,#F>>1:ORRCS R3,R3,#1
29670CMP R5,#F>>1:ORRCS R3,R3,#2
29680CMP R6,#F>>1:ORRCS R3,R3,#4
29690CMP R3,#6:MOVEQ R3,#1:BEQ octcyan
29700BCS octwhite
29710CMP R3,#4:BEQ octblue
29720MOVCS R3,#2:BCS octmagenta
29730CMP R3,#2:BEQ octgreen
29740BCS octyellow
29750CMP R3,#0:BEQ octblack
29760.octred
29770RSB R0,R4,#F
29780CMP R5,R0
29790BLT octred1
29800CMP R5,R6
29810MOVGE R3,#3
29820MOVLT R3,#2
29830B octconvert
29840.octred1
29850CMP R0,R6
29860MOVGE R3,#0
29870MOVLT R3,#2
29880B octconvert
29890.octgreen
29900RSB R0,R5,#F
29910CMP R0,R4
29920BLT octgreen1
29930CMP R0,R6
29940MOVGE R3,#0
29950MOVLT R3,#1
29960B octconvert
29970.octgreen1
29980CMP R4,R6
29990MOVGE R3,#3
30000MOVLT R3,#1
30010B octconvert
30020.octblue
30030RSB R0,R6,#F
30040CMP R0,R4
30050BLT octblue1
30060CMP R0,R5
30070MOVGE R3,#0
30080MOVLT R3,#1
30090B octconvert
30100.octblue1
30110CMP R4,R5
30120MOVGE R3,#2
30130MOVLT R3,#1
30140B octconvert
30150.octwhite
30160CMP R4,R5
30170BLT octwhite1
30180CMP R5,R6
30190MOVGE R3,#3
30200MOVLT R3,#2
30210B octconvert
30220.octwhite1
30230CMP R4,R6
30240MOVGE R3,#3
30250MOVLT R3,#1
30260.octconvert
30270CMP R3,#1
30280.octcyan
30290SUBEQ R5,R5,#F
30300SUBEQ R6,R6,#F
30310.octmagenta
30320CMP R3,#2
30330SUBEQ R4,R4,#F
30340SUBEQ R6,R6,#F
30350.octyellow
30360CMP R3,#3
30370SUBEQ R4,R4,#F
30380SUBEQ R5,R5,#F
30390.octblack
30400MOV R2,R12,LSR #2
30410AND R7,R12,#3:MOV R7,R7,LSL #1
30420MOV R14,#3
30430LDRB R0,[R2]:BIC R0,R0,R14,LSL R7:ORR R0,R0,R3,LSL R7:STRB R0,[R2]
30440ADD R12,R12,R1
30450]
30460WHEN"R"
30470[OPT Z
30480ADD R10,R10,R8
30490CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
30500CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
30510CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
30520STMFD SP !,{R8,R9,R10}
30530MVN R2,#0
30540MOV R3,#3
30550.srch ADD R14,R3,R3,LSL #1
30560ADD R14,R7,R14,LSL #2
30570LDMIA R14,{R8,R9,R10}
30580SUBS R8,R4,R8
30590RSBMI R8,R8,#0
30600SUBS R9,R5,R9
30610RSBMI R9,R9,#0
30620SUBS R10,R6,R10
30630RSBMI R10,R10,#0
30640MOV R14,R8,LSR #bits/2
30650MUL R8,R14,R14
30660MOV R14,R9,LSR #bits/2
30670MUL R9,R14,R14
30680MOV R14,R10,LSR #bits/2
30690MUL R10,R14,R14
30700ADD R9,R9,R9,LSL #2
30710ADD R8,R8,R8,LSL #1
30720ADD R14,R8,R9,LSL #1
30730ADD R14,R14,R10
30740CMP R14,R2
30750MOVCC R2,R14
30760MOVCC R0,R3
30770SUBS R3,R3,#1
30780BPL srch
30790LDMFD SP !,{R8,R9,R10}
30800ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
30810LDR R2,[R3],#4:SUB R4,R4,R2
30820LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
30830MOV R3,R0
30840MOV R2,R12,LSR #2
30850AND R7,R12,#3:MOV R7,R7,LSL #1
30860MOV R14,#3
30870LDRB R0,[R2]:BIC R0,R0,R14,LSL R7:ORR R0,R0,R3,LSL R7:STRB R0,[R2]
30880ADD R12,R12,R1
30890]
30900OTHERWISE
30910[OPT Z
30920CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
30930RSB R3,R4,R4,LSL #2:ADD R3,R3,#F>>1:MOV R3,R3,LSR#bits
30940LDR R2,[R7,R3,LSL #2]
30950SUB R4,R4,R2
30960MOV R2,R12,LSR #2
30970AND R5,R12,#3:MOV R5,R5,LSL #1
30980MOV R6,#3
30990LDRB R0,[R2]:BIC R0,R0,R6,LSL R5:ORR R0,R0,R3,LSL R5:STRB R0,[R2]
31000ADD R12,R12,R1
31010]
31020ENDCASE
31030IFm$="C" ORm$="R" THEN
31040IFdither% THEN
31050[OPT Z
31060ADD R0,R11,#4
31070ADD R2,R4,R4,LSL #1
31080LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
31090STR R3,[R11,-R8]
31100ADD R2,R4,R4,LSL #2
31110LDR R3,[R11]:ADD R3,R3,R2,ASR #4
31120STR R3,[R11]
31130MOV R3,R4,ASR #4
31140STR R3,[R11,R8]!
31150RSB R2,R4,R4,LSL #3
31160LDR R4,[R10]
31170ADD R4,R4,R2,ASR #4
31180ADD R2,R5,R5,LSL #1
31190LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
31200STR R3,[R0,-R8]
31210MOV R3,R5,ASR #4
31220STR R3,[R0,R8]
31230ADD R2,R5,R5,LSL #2
31240LDR R3,[R0]:ADD R3,R3,R2,ASR #4
31250STR R3,[R0],#4
31260RSB R2,R5,R5,LSL #3
31270LDR R5,[R10,#4]
31280ADD R5,R5,R2,ASR #4
31290ADD R2,R6,R6,LSL #1
31300LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
31310STR R3,[R0,-R8]
31320ADD R2,R6,R6,LSL #2
31330LDR R3,[R0]:ADD R3,R3,R2,ASR #4
31340STR R3,[R0]
31350MOV R3,R6,ASR #4
31360STR R3,[R0,R8]
31370RSB R2,R6,R6,LSL #3
31380LDR R6,[R10,#8]
31390ADD R6,R6,R2,ASR #4
31400]
31410ELSE
31420[OPT Z
31430LDMIA R10,{R4,R5,R6}
31440]
31450ENDIF
31460ELSE
31470IFdither% THEN
31480[OPT Z
31490ADD R2,R4,R4,LSL #1
31500LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
31510STR R3,[R11,-R8]
31520ADD R2,R4,R4,LSL #2
31530LDR R3,[R11]:ADD R3,R3,R2,ASR #4
31540STR R3,[R11]
31550MOV R3,R4,ASR #4
31560STR R3,[R11,R8]!
31570RSB R2,R4,R4,LSL #3
31580LDR R4,[R10],R8
31590ADD R4,R4,R2,ASR #4
31600]
31610ELSE
31620[OPT Z
31630LDR R4,[R10],R8
31640]
31650ENDIF
31660ENDIF
31670[OPT Z
31680SUBS R9,R9,#1:BNE fsloop
31690LDMFD SP !,{PC}^
31700]
31710WHEN 1
31720CASE m$ OF
31730WHEN"C"
31740[OPT Z
31750.divtable EQUD 0
31760EQUD (1-black%/256*2)/16*F
31770EQUD (2-black%/256*4)/16*F
31780EQUD (3-black%/256*5)/16*F
31790EQUD (4-black%/256*6)/16*F
31800EQUD (5-black%/256*7)/16*F
31810EQUD (6-black%/256*8)/16*F
31820EQUD (7-black%/256*8)/16*F
31830EQUD (8-black%/256*8)/16*F
31840EQUD (9-black%/256*8)/16*F
31850EQUD (10-black%/256*8)/16*F
31860EQUD (11-black%/256*7)/16*F
31870EQUD (12-black%/256*6)/16*F
31880EQUD (13-black%/256*5)/16*F
31890EQUD (14-black%/256*4)/16*F
31900EQUD (15-black%/256*2)/16*F
31910EQUD F
31920.evenrow_gard DCD even_gard
31930.oddrow_gard DCD odd_gard
31940.rowinc DCD 0
31950.fs%
31960STMFD SP !,{R14}
31970LDR R1,[R9,#5*8]:LDR R1,[R1]
31980LDR R10,[R9,#4*8]
31990LDR R11,[R9,#3*8]
32000LDR R12,[R9,#2*8]
32010LDR R12,[R12]
32020LDR R8,[R9,#8]
32030LDR R8,[R8]
32040LDR R9,[R9]
32050LDR R9,[R9]
32060LDR R4,[R10],R8
32070TEQ R8,#0
32080LDRPL R6,evenrow_gard
32090LDRMI R6,oddrow_gard
32100MOV R1,R1,LSL #1
32110LDR R7,rowinc
32120ADR R14,divtable
32130.fsloop
32140CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
32150ADD R5,R4,#F>>5
32160MOVS R5,R5,LSR #bits-4
32170LDRNE R0,[R14,R5,LSL #2]
32180SUBNE R4,R4,R0
32190]
32200IFdither% THEN
32210[OPT Z
32220ADD R2,R4,R4,LSL #1
32230LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
32240STR R3,[R11,-R8]
32250ADD R2,R4,R4,LSL #2
32260LDR R3,[R11]:ADD R3,R3,R2,ASR #4
32270STR R3,[R11]
32280MOV R3,R4,ASR #4
32290STR R3,[R11,R8]!
32300RSB R2,R4,R4,LSL #3
32310LDR R4,[R10],R8
32320ADDS R4,R4,R2,ASR #4
32330]
32340ELSE
32350[OPT Z
32360LDR R4,[R10],R8
32370]
32380ENDIF
32390[OPT Z
32400CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
32410ADD R3,R4,#F>>5
32420MOVS R3,R3,LSR #bits-4
32430LDRNE R0,[R14,R3,LSL #2]
32440SUBNE R4,R4,R0
32450ORR R5,R5,R3,LSL #5:LDR R3,[R6,R5,LSL #2]
32460MOV R2,R12,LSR #1:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2],R7
32470MOV R3,R3,LSR #8:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2]
32480ADD R12,R12,R1
32490]
32500IFdither% THEN
32510[OPT Z
32520ADD R2,R4,R4,LSL #1
32530LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
32540STR R3,[R11,-R8]
32550ADD R2,R4,R4,LSL #2
32560LDR R3,[R11]:ADD R3,R3,R2,ASR #4
32570STR R3,[R11]
32580MOV R3,R4,ASR #4
32590STR R3,[R11,R8]!
32600RSB R2,R4,R4,LSL #3
32610LDR R4,[R10],R8
32620ADD R4,R4,R2,ASR #4
32630]
32640ELSE
32650[OPT Z
32660LDR R4,[R10],R8
32670]
32680ENDIF
32690[OPT Z
32700SUBS R9,R9,#2:BNE fsloop
32710LDMFD SP !,{PC}^
32720]
32730WHEN"T"
32740[OPT Z
32750.divtable EQUD 0
32760EQUD (1-black%/256*2)/9*F
32770EQUD (2-black%/256*4)/9*F
32780EQUD (3-black%/256*5)/9*F
32790EQUD (4-black%/256*6)/9*F
32800EQUD (5-black%/256*6)/9*F
32810EQUD (6-black%/256*5)/9*F
32820EQUD (7-black%/256*4)/9*F
32830EQUD (8-black%/256*2)/9*F
32840EQUD F
32850.evenrow_gard DCD even_gard
32860.oddrow_gard DCD odd_gard
32870.rowinc DCD 0
32880.fs%
32890STMFD SP !,{R14}
32900LDR R1,[R9,#5*8]:LDR R1,[R1]
32910LDR R10,[R9,#4*8]
32920LDR R11,[R9,#3*8]
32930LDR R12,[R9,#2*8]
32940LDR R12,[R12]
32950LDR R8,[R9,#8]
32960LDR R8,[R8]
32970LDR R9,[R9]
32980LDR R9,[R9]
32990LDR R4,[R10],R8
33000TEQ R8,#0
33010LDRPL R6,evenrow_gard
33020LDRMI R6,oddrow_gard
33030MOV R1,R1,LSL #1
33040LDR R7,rowinc
33050ADR R14,divtable
33060.fsloop
33070CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
33080ADD R5,R4,#F>>4
33090ADD R5,R5,R5,LSL #3
33100MOVS R5,R5,LSR #bits
33110LDRNE R0,[R14,R5,LSL #2]
33120SUBNE R4,R4,R0
33130]
33140IFdither% THEN
33150[OPT Z
33160ADD R2,R4,R4,LSL #1
33170LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
33180STR R3,[R11,-R8]
33190ADD R2,R4,R4,LSL #2
33200LDR R3,[R11]:ADD R3,R3,R2,ASR #4
33210STR R3,[R11]
33220MOV R3,R4,ASR #4
33230STR R3,[R11,R8]!
33240RSB R2,R4,R4,LSL #3
33250LDR R4,[R10],R8
33260ADDS R4,R4,R2,ASR #4
33270]
33280ELSE
33290[OPT Z
33300LDR R4,[R10],R8
33310]
33320ENDIF
33330[OPT Z
33340CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
33350ADD R3,R4,#F>>4
33360ADD R3,R3,R3,LSL #3
33370MOVS R3,R3,LSR #bits
33380LDRNE R0,[R14,R3,LSL #2]
33390SUBNE R4,R4,R0
33400ORR R5,R5,R3,LSL #4:LDR R5,[R6,R5,LSL #2]
33410MOV R2,R12,LSR #1
33420AND R3,R5,#&3F
33430STRB R3,[R2],R7
33440MOV R3,R5,LSR #6:AND R3,R3,#&3F
33450STRB R3,[R2],R7
33460MOV R3,R5,LSR #12:STRB R3,[R2]
33470ADD R12,R12,R1
33480]
33490IFdither% THEN
33500[OPT Z
33510ADD R2,R4,R4,LSL #1
33520LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
33530STR R3,[R11,-R8]
33540ADD R2,R4,R4,LSL #2
33550LDR R3,[R11]:ADD R3,R3,R2,ASR #4
33560STR R3,[R11]
33570MOV R3,R4,ASR #4
33580STR R3,[R11,R8]!
33590RSB R2,R4,R4,LSL #3
33600LDR R4,[R10],R8
33610ADD R4,R4,R2,ASR #4
33620]
33630ELSE
33640[OPT Z
33650LDR R4,[R10],R8
33660]
33670ENDIF
33680[OPT Z
33690SUBS R9,R9,#2:BNE fsloop
33700LDMFD SP !,{PC}^
33710]
33720WHEN"D"
33730[OPT Z
33740.divtable EQUD 0
33750EQUD (1-black%/256*2)/4*F
33760EQUD (2-black%/256*4)/4*F
33770EQUD (3-black%/256*2)/4*F
33780EQUD F
33790.evenrow_gard DCD even_gard
33800.oddrow_gard DCD odd_gard
33810.rowinc DCD 0
33820.fs%
33830STMFD SP !,{R14}
33840LDR R1,[R9,#5*8]:LDR R1,[R1]
33850LDR R10,[R9,#4*8]
33860LDR R11,[R9,#3*8]
33870LDR R12,[R9,#2*8]
33880LDR R12,[R12]
33890LDR R8,[R9,#8]
33900LDR R8,[R8]
33910LDR R9,[R9]
33920LDR R9,[R9]
33930LDR R4,[R10],R8
33940TEQ R8,#0
33950LDRPL R6,evenrow_gard
33960LDRMI R6,oddrow_gard
33970MOV R1,R1,LSL #1
33980LDR R7,rowinc
33990ADR R14,divtable
34000.fsloop
34010CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
34020ADD R5,R4,#F>>3
34030MOVS R5,R5,LSR #bits-2
34040LDRNE R0,[R14,R5,LSL #2]
34050SUBNE R4,R4,R0
34060]
34070IFdither% THEN
34080[OPT Z
34090ADD R2,R4,R4,LSL #1
34100LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
34110STR R3,[R11,-R8]
34120ADD R2,R4,R4,LSL #2
34130LDR R3,[R11]:ADD R3,R3,R2,ASR #4
34140STR R3,[R11]
34150MOV R3,R4,ASR #4
34160STR R3,[R11,R8]!
34170RSB R2,R4,R4,LSL #3
34180LDR R4,[R10],R8
34190ADDS R4,R4,R2,ASR #4
34200]
34210ELSE
34220[OPT Z
34230LDR R4,[R10],R8
34240]
34250ENDIF
34260[OPT Z
34270CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
34280ADD R3,R4,#F>>3
34290MOVS R3,R3,LSR #bits-2
34300LDRNE R0,[R14,R3,LSL #2]
34310SUBNE R4,R4,R0
34320ORR R5,R5,R3,LSL #3:LDRB R5,[R6,R5]
34330MOV R2,R12,LSR #2
34340TST R12,#2
34350AND R3,R5,#&F:LDRB R0,[R2]
34360ANDEQ R0,R0,#&F0:ORREQ R0,R0,R3
34370ANDNE R0,R0,#&0F:ORRNE R0,R0,R3,LSL #4
34380STRB R0,[R2],R7
34390MOV R3,R5,LSR #4:LDRB R0,[R2]
34400ANDEQ R0,R0,#&F0:ORREQ R0,R0,R3
34410ANDNE R0,R0,#&0F:ORRNE R0,R0,R3,LSL #4
34420STRB R0,[R2]
34430ADD R12,R12,R1
34440]
34450IFdither% THEN
34460[OPT Z
34470ADD R2,R4,R4,LSL #1
34480LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
34490STR R3,[R11,-R8]
34500ADD R2,R4,R4,LSL #2
34510LDR R3,[R11]:ADD R3,R3,R2,ASR #4
34520STR R3,[R11]
34530MOV R3,R4,ASR #4
34540STR R3,[R11,R8]!
34550RSB R2,R4,R4,LSL #3
34560LDR R4,[R10],R8
34570ADD R4,R4,R2,ASR #4
34580]
34590ELSE
34600[OPT Z
34610LDR R4,[R10],R8
34620]
34630ENDIF
34640[OPT Z
34650SUBS R9,R9,#2:BNE fsloop
34660LDMFD SP !,{PC}^
34670]
34680OTHERWISE
34690[OPT Z
34700.fs%
34710STMFD SP !,{R14}
34720LDR R1,[R9,#5*8]:LDR R1,[R1]
34730LDR R10,[R9,#4*8]
34740LDR R11,[R9,#3*8]
34750LDR R12,[R9,#2*8]
34760LDR R12,[R12]
34770LDR R8,[R9,#8]
34780LDR R8,[R8]
34790LDR R9,[R9]
34800LDR R9,[R9]
34810LDR R4,[R10],R8
34820MOV R7,#1
34830.fsloop
34840CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
34850]
34860IFblack% THEN
34870[OPT Z
34880MOV R2,R12,LSR #3
34890AND R5,R12,#7:MOV R6,#1
34900LDRB R0,[R2,#-(x%+7>>3)]
34910SUB R3,R4,#F
34920CMP R7,#0
34930ADDNE R4,R4,#black%<<(bits-8)
34940ADDEQ R3,R3,#black%<<(bits-8)
34950TST R0,R6,LSL R5
34960ADDNE R4,R4,#black%<<(bits-8)
34970ADDEQ R3,R3,#black%<<(bits-8)
34980MOVS R0,R3:RSBMI R0,R3,#0
34990CMP R4,R0
35000MOVCC R3,#0
35010MOVCS R4,R3:MOVCS R3,#1
35020MOV R7,R3
35030]
35040ELSE
35050[OPT Z
35060ADD R3,R4,#F>>1:MOV R3,R3,LSR #bits
35070SUB R4,R4,R3,LSL #bits
35080MOV R2,R12,LSR #3
35090AND R5,R12,#7:MOV R6,#1
35100]
35110ENDIF
35120[OPT Z
35130LDRB R0,[R2]:BIC R0,R0,R6,LSL R5:ORR R0,R0,R3,LSL R5
35140STRB R0,[R2]
35150ADD R12,R12,R1
35160]
35170IFdither% THEN
35180[OPT Z
35190ADD R2,R4,R4,LSL #1
35200LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
35210STR R3,[R11,-R8]
35220ADD R2,R4,R4,LSL #2
35230LDR R3,[R11]:ADD R3,R3,R2,ASR #4
35240STR R3,[R11]
35250MOV R3,R4,ASR #4
35260STR R3,[R11,R8]!
35270RSB R2,R4,R4,LSL #3
35280LDR R4,[R10],R8
35290ADD R4,R4,R2,ASR #4
35300]
35310ELSE
35320[OPT Z
35330LDR R4,[R10],R8
35340]
35350ENDIF
35360[OPT Z
35370SUBS R9,R9,#1:BNE fsloop
35380LDMFD SP !,{PC}^
35390]
35400ENDCASE
35410ENDCASE
35420[OPT Z
35430.sxloc DCD sx%
35440]
35450CASE col OF
35460WHEN 0
35470IFinput<=8 THEN
35480[OPT Z
35490.mappix%
35500LDR R0,sxloc
35510LDR R1,[R9]:LDR R1,[R1]
35520LDR R2,[R9,#3*8]
35530LDR R5,[R9,#4*8]
35540MOV R8,#0
35550.mappixlp
35560LDRB R6,[R1],#step24
35570]
35580ENDIF
35590CASE input OF
35600WHEN 8
35610IFham THEN
35620[OPT Z
35630ADR R9,ltable
35640MOVS R7,R6,LSR #4:AND R6,R6,#15
35650LDREQ R10,[R2,R6,LSL #2]:MOVEQ R11,R10:MOVEQ R12,R10
35660CMP R7,#1:LDREQ R12,[R9,R6,LSL #2]
35670CMP R7,#2:LDREQ R10,[R9,R6,LSL #2]
35680CMP R7,#3:LDREQ R11,[R9,R6,LSL #2]
35690ADD R3,R10,R11
35700ADD R3,R3,R12
35710MOV R3,R3,LSR #2
35720STMIA R5!,{R3}
35730SUBS R0,R0,#1:BNE mappixlp
35740MOVS PC,R14
35750.ltable
35760]
35770FORI%=0TO15
35780[OPT Z
35790EQUD I%/15*F
35800]
35810NEXT
35820ELSE
35830IFhpredict%=2 THEN
35840[OPT Z
35850ADD R6,R6,R8
35860AND R6,R6,#255
35870MOV R8,R6
35880]
35890ENDIF
35900[OPT Z
35910LDR R7,[R2,R6,LSL #2]:STR R7,[R5],#4
35920SUBS R0,R0,#1:BNE mappixlp
35930MOVS PC,R14
35940]
35950ENDIF
35960WHEN 4
35970IFbigendianbits THEN
35980[OPT Z
35990MOV R10,R6,LSR #4
36000LDR R7,[R2,R10,LSL #2]
36010AND R10,R6,#&F
36020]
36030ELSE
36040[OPT Z
36050AND R10,R6,#&F
36060LDR R7,[R2,R10,LSL #2]
36070MOV R10,R6,LSR #4
36080]
36090ENDIF
36100[OPT Z
36110LDR R8,[R2,R10,LSL #2]:STMIA R5!,{R7,R8}
36120SUBS R0,R0,#2:BHI mappixlp
36130MOVS PC,R14
36140]
36150WHEN 2
36160IFbigendianbits THEN
36170[OPT Z
36180MOV R10,R6,LSR #6
36190LDR R7,[R2,R10,LSL #2]
36200AND R10,R6,#&30
36210LDR R8,[R2,R10,LSR #2]
36220AND R10,R6,#&C
36230LDR R9,[R2,R10]
36240AND R10,R6,#&3
36250]
36260ELSE
36270[OPT Z
36280AND R10,R6,#&3
36290LDR R7,[R2,R10,LSL #2]
36300AND R10,R6,#&C
36310LDR R8,[R2,R10]
36320AND R10,R6,#&30
36330LDR R9,[R2,R10,LSR #2]
36340MOV R10,R6,LSR #6
36350]
36360ENDIF
36370[OPT Z
36380LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
36390SUBS R0,R0,#4:BHI mappixlp
36400MOVS PC,R14
36410]
36420WHEN 1
36430IFbigendianbits THEN
36440[OPT Z
36450AND R10,R6,#&80
36460LDR R7,[R2,R10,LSR #5]
36470AND R10,R6,#&40
36480LDR R8,[R2,R10,LSR #4]
36490AND R10,R6,#&20
36500LDR R9,[R2,R10,LSR #3]
36510AND R10,R6,#&10
36520LDR R10,[R2,R10,LSR #2]:STMIA R5!,{R7,R8,R9,R10}
36530AND R10,R6,#&8
36540LDR R7,[R2,R10,LSR #1]
36550AND R10,R6,#&4
36560LDR R8,[R2,R10]
36570AND R10,R6,#&2
36580LDR R9,[R2,R10,LSL #1]
36590AND R10,R6,#&1
36600]
36610ELSE
36620[OPT Z
36630AND R10,R6,#&1
36640LDR R7,[R2,R10,LSL #2]
36650AND R10,R6,#&2
36660LDR R8,[R2,R10,LSL #1]
36670AND R10,R6,#&4
36680LDR R9,[R2,R10]
36690AND R10,R6,#&8
36700LDR R10,[R2,R10,LSR #1]:STMIA R5!,{R7,R8,R9,R10}
36710AND R10,R6,#&10
36720LDR R7,[R2,R10,LSR #2]
36730AND R10,R6,#&20
36740LDR R8,[R2,R10,LSR #3]
36750AND R10,R6,#&40
36760LDR R9,[R2,R10,LSR #4]
36770MOV R10,R6,LSR #7
36780]
36790ENDIF
36800[OPT Z
36810LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
36820SUBS R0,R0,#8:BHI mappixlp
36830MOVS PC,R14
36840]
36850WHEN 16
36860[OPT Z
36870.mappix%
36880LDR R0,sxloc
36890LDR R1,[R9]:LDR R1,[R1]
36900LDR R2,[R9,#8]:LDR R2,[R2]
36910LDR R3,[R9,#4*8]
36920LDR R4,[R9,#3*8]
36930LDR R5,[R9,#2*8]
36940LDR R6,[R9,#5*8]
36950LDR R7,[R9,#6*8]
36960LDR R8,[R9,#7*8]
36970CMP R1,R2
36980ADDEQ R2,R2,#1
36990.mappixlp
37000LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
37010LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:ORR R9,R9,R10
37020AND R10,R9,#255:LDR R10,[R3,R10,LSL #2]
37030MOV R11,R9,LSR #8:AND R11,R11,#255:LDR R11,[R4,R11,LSL #2]
37040MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
37050ADD R10,R10,R11:ADD R10,R10,R12:STMIA R8!,{R10}
37060SUBS R0,R0,#1:BNE mappixlp
37070MOVS PC,R14
37080]
37090WHEN 24
37100[OPT Z
37110.mappix%
37120LDR R0,sxloc
37130LDR R1,[R9,#2*8]:LDR R1,[R1]
37140LDR R2,[R9,#8]:LDR R2,[R2]
37150LDR R3,[R9]:LDR R3,[R3]
37160LDR R4,[R9,#5*8]
37170LDR R5,[R9,#4*8]
37180LDR R6,[R9,#3*8]
37190LDR R7,[R9,#6*8]
37200STMFD SP !,{R14}
37210MOV r11,#0:MOV R12,#0:MOV R14,#0
37220.mappixlp
37230LDRB R8,[R1],#step24:LDRB R9,[R2],#step24:LDRB R10,[R3],#step24
37240]
37250IFhpredict%=2 THEN
37260[OPT Z
37270ADD r8,r8,r11
37280AND r8,r8,#255
37290MOV r11,r8
37300ADD r9,r9,r12
37310AND r9,r9,#255
37320MOV r12,r9
37330ADD r10,r10,r14
37340AND r10,r10,#255
37350MOV r14,r10
37360]
37370ENDIF
37380[OPT Z
37390LDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
37400ADD R8,R8,R9:ADD R8,R8,R10:STR R8,[R7],#4
37410SUBS R0,R0,#1:BNE mappixlp
37420LDMFD SP !,{PC}^
37430]
37440WHEN 48
37450[OPT Z
37460.mappix%
37470LDR R0,sxloc
37480LDR R1,[R9,#2*8]:LDR R1,[R1]
37490LDR R2,[R9,#8]:LDR R2,[R2]
37500LDR R3,[R9]:LDR R3,[R3]
37510LDR R4,[R9,#5*8]
37520LDR R5,[R9,#4*8]
37530LDR R6,[R9,#3*8]
37540LDR R7,[R9,#6*8]
37550STMFD SP !,{R14}
37560MOV r11,#colourindex AND 255:ADD r11,r11,#colourindex AND &ff00
37570.mappixlp
37580LDR R8,[R1],#step24:LDR R9,[R2],#step24:LDR R10,[R3],#step24
37590AND r8,r8,r11:AND r9,r9,r11:AND r10,r10,r11
37600LDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
37610ADD R8,R8,R9:ADD R8,R8,R10:STR R8,[R7],#4
37620SUBS R0,R0,#1:BNE mappixlp
37630LDMFD SP !,{PC}^
37640]
37650WHEN 411
37660[OPT Z
37670.mappix%
37680LDR R0,sxloc
37690LDR R1,[R9]:LDR R1,[R1]
37700LDR R4,[R9,#1*8]
37710LDR R7,[R9,#8*8]
37720.mappixlp
37730LDRB R8,[R1],#2
37740LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
37750SUBS R0,R0,#1:BNE mappixlp
37760MOVS PC,R14
37770]
37780WHEN 422
37790[OPT Z
37800.mappix%
37810LDR R0,sxloc
37820LDR R1,[R9]:LDR R1,[R1]
37830ADD R1,R1,#1
37840LDR R4,[R9,#1*8]
37850LDR R7,[R9,#8*8]
37860.mappixlp
37870LDRB R8,[R1],#2
37880LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
37890SUBS R0,R0,#1:BNE mappixlp
37900MOVS PC,R14
37910]
37920WHEN 555
37930[OPT Z
37940.mappix%
37950LDR R0,sxloc
37960LDR R1,[R9]:LDR R1,[R1]
37970ADD R1,R1,#1
37980LDR R4,[R9,#1*8]
37990LDR R7,[R9,#8*8]
38000.mappixlp
38010LDRB R8,[R1],#2
38020AND R8,R8,#ymax%
38030LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
38040SUBS R0,R0,#1:BNE mappixlp
38050MOVS PC,R14
38060]
38070ENDCASE
38080IFxmul%=2 AND xdiv%=1 THEN
38090[OPT Z
38110.xsample%
38120LDR R0,[R9]:LDR R0,[R0]
38130LDR R1,[R9,#8]
38140LDR R2,[R9,#2*8]
38150SUBS R0,R0,#2
38160BEQ xdonediv
38170BMI xdonediv
38180.xsamplelp
38190LDMIA R1,{R5,R6}
38200ADD R6,R6,R5
38210MOV R6,R6,LSR #1
38220STMIA R2!,{R5,R6}
38230ADD R1,R1,#4
38240SUBS R0,R0,#2:BGT xsamplelp
38250.xdonediv
38260LDMIA R1,{R5}
38270MOV R6,R5
38280STMIA R2!,{R5,R6}
38290MOVS PC,R14
38300]
38310ELSE
38320[OPT Z
38340.xsample%
38350LDR R0,[R9]:LDR R0,[R0]
38360LDR R1,[R9,#8]
38370LDR R2,[R9,#2*8]
38380LDR R3,[R9,#3*8]:LDR R3,[R3]
38390LDR R4,[R9,#4*8]:LDR R4,[R4]
38400MOV R11,R4
38410.xsamplelp
38420LDMIA R1,{R5}
38430SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#4
38440SUBS R12,R3,#1
38450BEQ xdonediv
38460.xdivlp
38470CMP R12,R11
38480BCC xdivlp2
38490LDMIA R1!,{R8}:MLA R5,R8,R11,R5
38500SUBS R12,R12,R11:MOV R11,R4
38510BNE xdivlp
38520B xdonediv
38530.xdivlp2
38540LDMIA R1,{R8}
38550SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#4
38560ADD R5,R5,R8
38570SUBS R12,R12,#1:BNE xdivlp
38580.xdonediv
38590STMIA R2!,{R5}
38600SUBS R0,R0,#1:BPL xsamplelp
38610MOVS PC,R14
38620]
38630ENDIF
38640WHEN 2
38650IFinput<=8 THEN
38660[OPT Z
38670.mappix%
38680LDR R0,sxloc
38690LDR R1,[R9]:LDR R1,[R1]
38700LDR R2,[R9,#3*8]
38710LDR R3,[R9,#2*8]
38720LDR R4,[R9,#8]
38730LDR R5,[R9,#4*8]
38740MOV R10,#0
38750.mappixlp
38760LDRB R6,[R1],#step24
38770]
38780ENDIF
38790CASE input OF
38800WHEN 8
38810IFham THEN
38820[OPT Z
38830ADR R9,ltable
38840MOVS R7,R6,LSR #4:AND R6,R6,#15
38850LDREQ R10,[R2,R6,LSL #2]:LDREQ R11,[R3,R6,LSL #2]:LDREQ R12,[R4,R6,LSL #2]
38860CMP R7,#1:LDREQ R12,[R9,R6,LSL #2]
38870CMP R7,#2:LDREQ R10,[R9,R6,LSL #2]
38880CMP R7,#3:LDREQ R11,[R9,R6,LSL #2]
38890STMIA R5!,{R10,R11,R12}
38900SUBS R0,R0,#1:BNE mappixlp
38910MOVS PC,R14
38920.ltable
38930]
38940FORI%=0TO15
38950[OPT Z
38960EQUD I%/15*F
38970]
38980NEXT
38990ELSE
39000IFhpredict%=2 THEN
39010[OPT Z
39020ADD R6,R6,R10
39030AND R6,R6,#255
39040MOV R10,R6
39050]
39060ENDIF
39070[OPT Z
39080LDR R7,[R2,R6,LSL #2]:LDR R8,[R3,R6,LSL #2]:LDR R9,[R4,R6,LSL #2]
39090STMIA R5!,{R7,R8,R9}
39100SUBS R0,R0,#1:BNE mappixlp
39110MOVS PC,R14
39120]
39130ENDIF
39140WHEN 4
39150IFbigendianbits THEN
39160[OPT Z
39170MOV R10,R6,LSR #4
39180LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
39190STMIA R5!,{R7,R8,R9}
39200AND R10,R6,#&F
39210]
39220ELSE
39230[OPT Z
39240AND R10,R6,#&F
39250LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
39260STMIA R5!,{R7,R8,R9}
39270MOV R10,R6,LSR #4
39280]
39290ENDIF
39300[OPT Z
39310LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
39320STMIA R5!,{R7,R8,R9}
39330SUBS R0,R0,#2:BHI mappixlp
39340MOVS PC,R14
39350]
39360WHEN 2
39370IFbigendianbits THEN
39380[OPT Z
39390MOV R10,R6,LSR #6
39400LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
39410STMIA R5!,{R7,R8,R9}
39420AND R10,R6,#&30
39430LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
39440STMIA R5!,{R7,R8,R9}
39450AND R10,R6,#&C
39460LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
39470STMIA R5!,{R7,R8,R9}
39480AND R10,R6,#&3
39490]
39500ELSE
39510[OPT Z
39520AND R10,R6,#&3
39530LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
39540STMIA R5!,{R7,R8,R9}
39550AND R10,R6,#&C
39560LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
39570STMIA R5!,{R7,R8,R9}
39580AND R10,R6,#&30
39590LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
39600STMIA R5!,{R7,R8,R9}
39610MOV R10,R6,LSR #6
39620]
39630ENDIF
39640[OPT Z
39650LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
39660STMIA R5!,{R7,R8,R9}
39670SUBS R0,R0,#4:BHI mappixlp
39680MOVS PC,R14
39690]
39700WHEN 1
39710IFbigendianbits THEN
39720[OPT Z
39730AND R10,R6,#&80
39740LDR R7,[R2,R10,LSR #5]:LDR R8,[R3,R10,LSR #5]:LDR R9,[R4,R10,LSR #5]
39750STMIA R5!,{R7,R8,R9}
39760AND R10,R6,#&40
39770LDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
39780STMIA R5!,{R7,R8,R9}
39790AND R10,R6,#&20
39800LDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
39810STMIA R5!,{R7,R8,R9}
39820AND R10,R6,#&10
39830LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
39840STMIA R5!,{R7,R8,R9}
39850AND R10,R6,#&8
39860LDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
39870STMIA R5!,{R7,R8,R9}
39880AND R10,R6,#&4
39890LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
39900STMIA R5!,{R7,R8,R9}
39910AND R10,R6,#&2
39920LDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
39930STMIA R5!,{R7,R8,R9}
39940AND R10,R6,#&1
39950]
39960ELSE
39970[OPT Z
39980AND R10,R6,#&1
39990LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
40000STMIA R5!,{R7,R8,R9}
40010AND R10,R6,#&2
40020LDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
40030STMIA R5!,{R7,R8,R9}
40040AND R10,R6,#&4
40050LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
40060STMIA R5!,{R7,R8,R9}
40070AND R10,R6,#&8
40080LDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
40090STMIA R5!,{R7,R8,R9}
40100AND R10,R6,#&10
40110LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
40120STMIA R5!,{R7,R8,R9}
40130AND R10,R6,#&20
40140LDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
40150STMIA R5!,{R7,R8,R9}
40160AND R10,R6,#&40
40170LDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
40180STMIA R5!,{R7,R8,R9}
40190MOV R10,R6,LSR #7
40200]
40210ENDIF
40220[OPT Z
40230LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
40240STMIA R5!,{R7,R8,R9}
40250SUBS R0,R0,#8:BHI mappixlp
40260MOVS PC,R14
40270]
40280WHEN 16
40290[OPT Z
40300.mappix%
40310LDR R0,sxloc
40320LDR R1,[R9]:LDR R1,[R1]
40330LDR R2,[R9,#8]:LDR R2,[R2]
40340LDR R3,[R9,#4*8]
40350LDR R4,[R9,#3*8]
40360LDR R5,[R9,#2*8]
40370LDR R6,[R9,#5*8]
40380LDR R7,[R9,#6*8]
40390LDR R8,[R9,#7*8]
40400CMP R1,R2
40410ADDEQ R2,R2,#1
40420.mappixlp
40430LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
40440LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:ORR R9,R9,R10
40450AND R10,R9,#255:LDR R10,[R3,R10,LSL #2]
40460MOV R11,R9,LSR #8:AND R11,R11,#255:LDR R11,[R4,R11,LSL #2]
40470MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
40480STMIA R8!,{R10,R11,R12}
40490SUBS R0,R0,#1:BNE mappixlp
40500MOVS PC,R14
40510]
40520WHEN 24
40530[OPT Z
40540.mappix%
40550LDR R0,sxloc
40560LDR R1,[R9,#2*8]:LDR R1,[R1]
40570LDR R2,[R9,#8]:LDR R2,[R2]
40580LDR R3,[R9]:LDR R3,[R3]
40590LDR R4,[R9,#5*8]
40600LDR R5,[R9,#4*8]
40610LDR R6,[R9,#3*8]
40620LDR R7,[R9,#6*8]
40630STMFD SP !,{R14}
40640MOV r11,#0:MOV R12,#0:MOV R14,#0
40650.mappixlp
40660LDRB R8,[R1],#step24:LDRB R9,[R2],#step24:LDRB R10,[R3],#step24
40670]
40680IFhpredict%=2 THEN
40690[OPT Z
40700ADD r8,r8,r11
40710AND r8,r8,#255
40720MOV r11,r8
40730ADD r9,r9,r12
40740AND r9,r9,#255
40750MOV r12,r9
40760ADD r10,r10,r14
40770AND r10,r10,#255
40780MOV r14,r10
40790]
40800ENDIF
40810[OPT Z
40820LDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
40830STMIA R7!,{R8,R9,R10}
40840SUBS R0,R0,#1:BNE mappixlp
40850LDMFD SP !,{PC}^
40860]
40870WHEN 48
40880[OPT Z
40890.mappix%
40900LDR R0,sxloc
40910LDR R1,[R9,#2*8]:LDR R1,[R1]
40920LDR R2,[R9,#8]:LDR R2,[R2]
40930LDR R3,[R9]:LDR R3,[R3]
40940LDR R4,[R9,#5*8]
40950LDR R5,[R9,#4*8]
40960LDR R6,[R9,#3*8]
40970LDR R7,[R9,#6*8]
40980STMFD SP !,{R14}
40990MOV r11,#colourindex AND 255:ADD r11,r11,#colourindex AND &ff00
41000.mappixlp
41010LDR R8,[R1],#step24:LDR R9,[R2],#step24:LDR R10,[R3],#step24
41020AND r8,r8,r11:AND r9,r9,r11:AND r10,r10,r11
41030LDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
41040STMIA R7!,{R8,R9,R10}
41050SUBS R0,R0,#1:BNE mappixlp
41060LDMFD SP !,{PC}^
41070]
41080WHEN 411
41100[OPT Z
41110.mappix%
41120LDR R0,sxloc
41130LDR R1,[R9]:LDR R1,[R1]
41140LDR R2,[R9,#1*8]
41150LDR R3,[R9,#2*8]
41160LDR R5,[R9,#4*8]
41170LDR R6,[R9,#5*8]
41180LDR R7,[R9,#6*8]
41190LDR R9,[R9,#8*8]
41200STMFD SP !,{R14}
41210.mappixlp
41220LDMIA R1!,{R4,R10}
41230AND R8,R4,#&C000
41240MOV R8,R8,LSR #8
41250AND R14,R4,#&C0000000
41260ORR R8,R8,R14,LSR #16+8+2
41270AND R14,R10,#&C000
41280ORR R8,R8,R14,LSR #8+4
41290ORR R8,R8,R10,LSR #16+8+6
41300AND R11,R4,#&3000
41310MOV R11,R11,LSR #6
41320AND R14,R4,#&30000000
41330ORR R11,R11,R14,LSR #16+6+2
41340AND R14,R10,#&3000
41350ORR R11,R11,R14,LSR #6+4
41360AND R14,R10,#&30000000
41370ORR R11,R11,R14,LSR #16+6+6
41390AND R12,R4,#&FF
41400LDR R12,[R2,R12,LSL #2]
41410LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
41420MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41430LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
41440LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
41450MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41460AND R12,R4,#&FF
41470LDR R12,[R2,R12,LSL #2]
41480LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
41490MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41510MOV R4,R4,LSR #16
41520AND R12,R4,#&FF
41530LDR R12,[R2,R12,LSL #2]
41540LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
41550MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41560LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
41570LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
41580MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41590AND R12,R4,#&FF
41600LDR R12,[R2,R12,LSL #2]
41610LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
41620MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41640AND R12,R10,#&FF
41650LDR R12,[R2,R12,LSL #2]
41660LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
41670MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41680LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
41690LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
41700MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41710AND R12,R10,#&FF
41720LDR R12,[R2,R12,LSL #2]
41730LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
41740MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41760MOV R10,R10,LSR #16
41770AND R12,R10,#&FF
41780LDR R12,[R2,R12,LSL #2]
41790LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
41800MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41810LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
41820LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
41830MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41840AND R12,R10,#&FF
41850LDR R12,[R2,R12,LSL #2]
41860LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
41870MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
41890SUBS R0,R0,#4:BNE mappixlp
41900LDMFD SP !,{PC}^
41910]
41920WHEN 423
41930[OPT Z
41940.mappix%
41950LDR R0,sxloc
41960LDR R1,[R9]:LDR R1,[R1]
41970LDR R2,[R9,#1*8]
41980LDR R3,[R9,#2*8]
41990LDR R4,[R9,#3*8]
42000LDR R5,[R9,#4*8]
42010LDR R6,[R9,#5*8]
42020LDR R7,[R9,#6*8]
42030LDR R8,[R9,#7*8]
42040LDR R9,[R9,#8*8]
42050STMFD SP !,{R14}
42060.mappixlp
42070LDR R10,[R1],#4
42080AND R11,R10,#&FF00
42090LDR R11,[R2,R11,LSR #6]
42100AND R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
42110AND R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
42120MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42130AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
42140AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
42150MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42160AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
42170AND R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
42180MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42190AND R11,R10,#&FF000000
42200LDR R11,[R2,R11,LSR #22]
42210AND R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
42220AND R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
42230MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42240AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
42250AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
42260MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42270AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
42280AND R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
42290MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42300SUBS R0,R0,#2:BNE mappixlp
42310LDMFD SP !,{PC}^
42320]
42330WHEN 422
42340[OPT Z
42350.mappix%
42360LDR R0,sxloc
42370LDR R1,[R9]:LDR R1,[R1]
42380LDR R2,[R9,#1*8]
42390LDR R3,[R9,#2*8]
42400LDR R5,[R9,#4*8]
42410LDR R6,[R9,#5*8]
42420LDR R7,[R9,#6*8]
42430LDR R9,[R9,#8*8]
42440STMFD SP !,{R14}
42450.mappixlp
42460LDR R10,[R1],#4
42470AND R11,R10,#&FF00
42480LDR R11,[R2,R11,LSR #6]
42490AND R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
42500MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42510AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
42520AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
42530MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42540AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
42550MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42560AND R11,R10,#&FF000000
42570LDR R11,[R2,R11,LSR #22]
42580AND R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
42590MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42600AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
42610AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
42620MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42630AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
42640MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42650SUBS R0,R0,#2:BNE mappixlp
42660LDMFD SP !,{PC}^
42670]
42680WHEN 555
42700[OPT Z
42710.mappix%
42720LDR R0,sxloc
42730LDR R1,[R9]:LDR R1,[R1]
42740LDR R2,[R9,#1*8]
42750LDR R3,[R9,#2*8]
42760LDR R5,[R9,#4*8]
42770LDR R6,[R9,#5*8]
42780LDR R7,[R9,#6*8]
42790LDR R9,[R9,#8*8]
42800STMFD SP !,{R14}
42810.mappixlp
42820LDR R10,[R1],#2
42830AND R11,R10,#ymax%
42840LDR R11,[R2,R11,LSL #2]
42850AND R8,R10,#((1<<vbits%)-1)<<(ybits%+ubits%)
42860AND R10,R10,#((1<<ubits%)-1)<<ybits%
42880LDR R12,[R7,R8,LSR #ybits%+ubits%-2]:ADDS R14,R12,R11
42890MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42900LDR R12,[R5,R8,LSR #ybits%+ubits%-2]:ADD R14,R12,R11
42910LDR R12,[R6,R10,LSR #ybits%-2]:ADDS R14,R14,R12
42920MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42930LDR R12,[R3,R10,LSR #ybits%-2]:ADDS R14,R12,R11
42940MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
42950SUBS R0,R0,#1:BNE mappixlp
42960LDMFD SP !,{PC}^
42970]
42980ENDCASE
42990IFxmul%=2 AND xdiv%=1 THEN
43000[OPT Z
43020.xsample%
43030LDR R0,[R9]:LDR R0,[R0]
43040LDR R1,[R9,#8]
43050LDR R2,[R9,#2*8]
43060SUBS R0,R0,#2
43070BEQ xdonediv
43080BMI xdonediv
43090.xsamplelp
43100LDMIA R1,{R5,R6,R7,R8,R9,R10}
43110ADD R8,R8,R5
43120MOV R8,R8,LSR #1
43130ADD R9,R9,R6
43140MOV R9,R9,LSR #1
43150ADD R10,R10,R7
43160MOV R10,R10,LSR #1
43170STMIA R2!,{R5,R6,R7,R8,R9,R10}
43180ADD R1,R1,#12
43190SUBS R0,R0,#2:BGT xsamplelp
43200.xdonediv
43210LDMIA R1,{R5,R6,R7}
43220MOV R8,R5
43230MOV R9,R6
43240MOV R10,R7
43250STMIA R2!,{R5,R6,R7,R8,R9,R10}
43260MOVS PC,R14
43270]
43280ELSE
43290[OPT Z
43310.xsample%
43320LDR R0,[R9]:LDR R0,[R0]
43330LDR R1,[R9,#8]
43340LDR R2,[R9,#2*8]
43350LDR R3,[R9,#3*8]:LDR R3,[R3]
43360LDR R4,[R9,#4*8]:LDR R4,[R4]
43370MOV R11,R4
43380.xsamplelp
43390LDMIA R1,{R5,R6,R7}
43400SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#12
43410SUBS R12,R3,#1
43420BEQ xdonediv
43430.xdivlp
43440CMP R12,R11
43450BCC xdivlp2
43460LDMIA R1!,{R8,R9,R10}:MLA R5,R8,R11,R5:MLA R6,R9,R11,R6:MLA R7,R10,R11,R7
43470SUBS R12,R12,R11:MOV R11,R4
43480BNE xdivlp
43490B xdonediv
43500.xdivlp2
43510LDMIA R1,{R8,R9,R10}
43520SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#12
43530ADD R5,R5,R8:ADD R6,R6,R9:ADD R7,R7,R10
43540SUBS R12,R12,#1:BNE xdivlp
43550.xdonediv
43560STMIA R2!,{R5,R6,R7}
43570SUBS R0,R0,#1:BPL xsamplelp
43580MOVS PC,R14
43590]
43600ENDIF
43610ENDCASE
43620IFcompression=5 THEN
43630[OPT Z
43650.firstcode DCD 0
43660.oldcode DCD 0
43670.codesize DCD setcodes%+1
43680.stack DCD stk%
43690.sp DCD stk%
43700.maxcode DCD clearcode%+2
43710.maxcodesize DCD 2*clearcode%
43720.LZWdecode%
43730LDR R2,firstcode:LDR R3,oldcode:LDR R4,stack:LDR R5,codesize
43740LDR R6,sp:LDR R7,maxcode:LDR R8,maxcodesize
43750LDR R10,[R9]:LDR R10,[R10]
43760LDR R11,[R9,#8]:LDR R11,[R11]
43770LDR R12,[R9,#24]
43780STMFD SP !,{R14}
43790.lzwloop
43800CMP R6,R4
43810BHI lzwunstack
43820.lzwengine
43830BL getcode
43840CMP R0,#clearcode%
43850BEQ lzwclear
43870MOV R1,R0
43880CMP R0,R7
43890STRCSB R2,[R6],#1
43900MOVCS R0,R3
43910CMP R0,#clearcode%
43920BCC lzwdonepush
43930.lzwpushtable
43940LDR R14,[R12,R0,LSL #2]
43950STRB R14,[R6],#1
43960MOV R0,R14,LSR #16
43970CMP R0,#clearcode%
43980BCS lzwpushtable
43990.lzwdonepush
44000LDR R2,[R12,R0,LSL #2]
44010BIC R2,R2,#&FF0000
44020BIC R2,R2,#&FF000000
44030STRB R2,[R6],#1
44040CMP R7,#4096
44050BCS lzwnocode
44060ORR R0,R2,R3,LSL #16
44070STR R0,[R12,R7,LSL #2]
44080ADD R7,R7,#1
44090CMP R7,R8
44100BCC lzwnocode
44110CMP R8,#4096
44120ADDCC R5,R5,#1
44130MOVCC R8,R8,LSL #1
44140]
44150IFflag=1500 THEN
44160[OPT Z
44170ORRCC R8,R8,#1
44180]
44190ENDIF
44200[OPT Z
44210.lzwnocode
44220MOV R3,R1
44230CMP R6,R4
44240BLS lzwengine
44250.lzwunstack
44260LDRB R0,[R6,#-1]!
44270.lzwloopend
44280STRB R0,[R11],#1
44290SUBS R10,R10,#1
44300BNE lzwloop
44310STR R2,firstcode:STR R3,oldcode:STR R5,codesize
44320STR R6,sp:STR R7,maxcode:STR R8,maxcodesize
44330LDMFD SP !,{PC}^
44340.lzwclear
44350MOV R0,#0
44360MOV R3,R12
44370.lzwdefaulttable
44380STR R0,[R3],#4
44390ADD R0,R0,#1:CMP R0,#clearcode%
44400BCC lzwdefaulttable
44410MOV R5,#setcodes%+1
44420MOV R7,#clearcode%
44430MOV R8,R7,LSL #1
44440]
44450IFflag=1500 THEN
44460[OPT Z
44470SUB R8,R8,#1
44480]
44490ENDIF
44500[OPT Z
44510ADD R7,R7,#2
44520BL getcode
44530MOV R2,R0
44540MOV R3,R0
44550MOV R6,R4
44560B lzwloopend
44580.curbit DCD 0
44590.lastbit DCD 0
44600.buf DCD buf%
44610.getcode
44620STMFD SP !,{R6,R7,R8}
44630ADR R6,curbit
44640LDMIA R6,{R6,R7,R8}
44650ADD R1,R5,R6
44660CMP R1,R7
44670BCS needmoredata
44680.simplecode
44690ADD R7,R8,R6,LSR #3
44700BIC R7,R7,#3
44710LDMIA R7,{R0,R7}
44720]
44730IFflag=1500 THEN
44740[OPT Z
44750EOR R1,R0,R0,ROR #16
44760BIC R1,R1,#&FF0000
44770MOV R0,R0,ROR #8
44780EOR R0,R0,R1,LSR #8
44790EOR R1,R7,R7,ROR #16
44800BIC R1,R1,#&FF0000
44810MOV R7,R7,ROR #8
44820EOR R7,R7,R1,LSR #8
44830ANDS R1,R6,#31:MOVNE R0,R0,LSL R1:RSBNE R1,R1,#32:ORRNE R0,R0,R7,LSR R1
44840RSB R1,R5,#32
44850MOV R0,R0,LSR R1
44860]
44870ELSE
44880[OPT Z
44890ANDS R1,R6,#31:MOVNE R0,R0,LSR R1:RSBNE R1,R1,#32:ORRNE R0,R0,R7,LSL R1
44900MVN R1,#0:BIC R0,R0,R1,LSL R5
44910]
44920ENDIF
44930[OPT Z
44940ADD R6,R6,R5
44950STR R6,curbit
44960LDMFD SP !,{R6,R7,R8}
44970MOV PC,R14
44980.needmoredata
44990STMFD SP !,{R2,R3,R4,R14}
45000MOV R3,R7,LSR #3
45010SUB R0,R3,#2
45020LDRB R0,[R8,R0]
45030STRB R0,[R8]
45040SUB R0,R3,#1
45050LDRB R0,[R8,R0]
45060STRB R0,[R8,#1]
45070LDR R1,[R9,#16]
45080LDR R1,[R1]
45090]
45100IFflag=1500 THEN
45110[OPT Z
45120MOV R0,#256
45130MOV R3,#256
45140]
45150ELSE
45160[OPT Z
45170BL bytefromcache%
45180MOVS R3,R0
45190BEQ simplecode1
45200]
45210ENDIF
45220[OPT Z
45230SUB R6,R6,R7
45240ADD R6,R6,#16
45250ADD R0,R0,#2
45260MOV R7,R0,LSL #3
45270STR R7,lastbit
45280ADD R2,R8,#2
45290BL multibytefromcache%
45300.simplecode1
45310LDMFD SP !,{R2,R3,R4,R14}
45320B simplecode
45330]
45340ENDIF
45350IFrange% THEN
45360[OPT Z
45380.maxmin%
45390LDR R0,[R9]:LDR R0,[R0]
45400LDR R1,[R9,#8]
45410LDR R2,min
45420LDR R3,max
45430.maxminlp
45440LDR R4,[R1],#4
45450CMP R4,R3:MOVCS R3,R4
45460CMP R4,R2:MOVCC R2,R4
45470SUBS R0,R0,#1:BNE maxminlp
45480STR R2,min
45490STR R3,max
45500MOVS PC,R14
45510.min DCD F
45520.max DCD 0
45530]
45540ENDIF
45550IFsharpen% THEN
45560sharp=(col+1)*4:IFsharpen%>0 THEN
45570IF sharpen%<>8 sharpmul%=F/(sharpen%-8)
45580ELSE
45590sharpmul%=F/(8-sharpen%)
45600ENDIF
45610[OPT Z
45630.sharp%
45640LDR R0,[R9]:LDR R0,[R0]
45650LDR R1,[R9,#8]
45660LDR R2,[R9,#16]
45670LDR R3,[R9,#24]
45680LDR R4,[R9,#32]
45690]
45700CASE sharpen% OF
45710WHEN -8
45720WHEN 8,9,12,16,24
45730OTHERWISE
45740[OPT Z
45750MOV R8,#sharpmul% AND &FF
45760ORR R8,R8,#sharpmul% AND &FF00
45770MOV R9,#(sharpmul% >> 16) AND &FF
45780ORR R9,R9,#(sharpmul% >> 16) AND &FF00
45790]
45800ENDCASE
45810[OPT Z
45820.sharplp
45830LDR R5,[R1,#-sharp]
45840LDR R6,[R1,#sharp]:ADD R5,R5,R6
45850LDR R6,[R1],#4:ADD R5,R5,R6
45860LDR R6,[R3,#-sharp]:ADD R5,R5,R6
45870LDR R6,[R3,#sharp]:ADD R5,R5,R6
45880LDR R6,[R3],#4:ADD R5,R5,R6
45890LDR R6,[R2,#-sharp]:ADD R5,R5,R6
45900LDR R6,[R2,#sharp]:ADD R5,R5,R6
45910LDR R6,[R2],#4
45920MOV R6,R6,LSR #1
45930MOV R7,#ABSsharpen%
45940MUL R7,R6,R7
45950]
45960IFsharpen%>0 THEN
45970[OPT Z
45980SUBS R5,R7,R5,LSR #1
45990MOVCC R5,#0
46000]
46010ELSE
46020[OPT Z
46030ADD R5,R7,R5,LSR #1
46040]
46050ENDIF
46060CASE sharpen% OF
46070WHEN 8,9
46080[OPT Z
46090MOV R6,R5,LSL #1
46100]
46110WHEN 10
46120[OPT Z
46130MOV R6,R5
46140]
46150WHEN 12
46160[OPT Z
46170MOV R6,R5,LSR #1
46180]
46190WHEN 16
46200[OPT Z
46210MOV R6,R5,LSR #2
46220]
46230WHEN -8,24
46240[OPT Z
46250MOV R6,R5,LSR #3
46260]
46270OTHERWISE
46280[OPT Z
46290MOV R6,R5,LSR #16
46300EOR R5,R5,R6,LSL #16
46310MUL R7,R8,R5
46320MUL R5,R9,R5
46330MUL R10,R6,R8
46340MUL R6,R9,R6
46350ADDS R10,R5,R10
46360ADDCS R6,R6,#&10000
46370ADDS R7,R7,R10,LSL #16
46380ADC R6,R6,R10,LSR #16
46390MOV R6,R6,LSL #(32-27)
46400ORRS R6,R6,R7,LSR #27
46410ADDCS R6,R6,#1
46420]
46430ENDCASE
46440IFsharpen%>0 THEN
46450[OPT Z
46460CMP R6,#F:MOVCS R6,#F
46470]
46480ENDIF
46490[OPT Z
46500STR R6,[R4],#4
46510SUBS R0,R0,#1
46520BNE sharplp
46530MOVS PC,R14
46540]
46550ENDIF
46560IFhist%ORequal% THEN
46570[OPT Z
46590.histo%
46600LDR R0,[R9]:LDR R0,[R0]
46610LDR R1,[R9,#8]
46620LDR R2,[R9,#16]
46630.histlp
46640LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
46650MOV R3,R3,LSR #bits-8
46660]
46670IFcol=2 THEN
46680[OPT Z
46690ADD R3,R3,R3,LSL #1
46700LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
46710LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
46720MOV R3,R3,LSR #bits-8
46730ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
46740LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
46750LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
46760MOV R3,R3,LSR #bits-8
46770ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
46780]
46790ENDIF
46800[OPT Z
46810LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
46820SUBS R0,R0,#1
46830BNE histlp
46840MOVS PC,R14
46850]
46860ENDIF
46870IFequal% THEN
46880[OPT Z
46900.histequal%
46910LDR R0,[R9]:LDR R0,[R0]
46920LDR R1,[R9,#8]
46930LDR R2,[R9,#16]
46940.equallp
46950LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
46960MOV R3,R3,LSR #bits-8
46970]
46980IFcol=2 THEN
46990[OPT Z
47000LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
47010MOV R3,R3,LSR #bits-8
47020ADD R3,R3,R3,LSL #1
47030LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
47040LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
47050MOV R3,R3,LSR #bits-8
47060ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
47070LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
47080LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
47090MOV R3,R3,LSR #bits-8
47100ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
47110]
47120ENDIF
47130[OPT Z
47140LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
47150SUBS R0,R0,#1
47160BNE equallp
47170MOVS PC,R14
47180]
47190ENDIF
47200CASE r$ OF
47210WHEN "FN800","FN801","FN1000","FN1001"
47220[OPT Z
47250.rlexpand%
47260LDR R0,[R9]
47270LDR R1,[R0]
47280LDR R2,[R9,#8]:LDR R2,[R2]
47290LDR R3,[R9,#16]
47300LDR R4,[R3]
47310CMP R4,#1:MOVLTS PC,R14
47320LDR R5,[R9,#24]:LDR R5,[R5]
47330.rle
47340STRB R2,[R1],#1
47350SUB R4,R4,#1
47360CMP R1,R5
47370TEQNE R4,#0
47380BNE rle
47390.rlexit
47400STR R1,[R0]
47410STR R4,[R3]
47420MOVS PC,R14
47430]
47440WHEN "FN902"
47450[OPT Z
47460.unpack%
47470LDR R0,[R9]
47480LDR R0,[R0]
47490LDR R1,plbuff
47500ADD R2,R0,#768
47510.unpackloop
47520LDR R3,[R0],#4
47530MOV R5,#0
47540.bitloop
47550MOV R6,R3,LSR R5
47560AND R6,R6,#15
47570ADD R5,R5,#4
47580MOV R7,R3,LSR R5
47590AND R7,R7,#15
47600ADD R5,R5,#4
47610STRB R7,[R1],#1
47620STRB R6,[R1],#1
47630CMP R5,#32
47640BNE bitloop
47650CMP R2,R0
47660BNE unpackloop
47670MOV PC,R14
47680.plbuff EQUD plbuff%
47690]
47700WHEN "FN1601","FN1501","FN1850","FN1851"
47710[OPT Z
47730.readiff%
47740MOV R1,#c%
47750LDR R8,[R9]:LDR R8,[R8]
47760LDR R7,[R9,#8]:LDR R7,[R7]:ADD R7,R7,R8
47770STMFD SP !,{R14}
47780]
47790IFr$="FN1850" OR r$="FN1851" THEN
47800[OPT Z
47810BL bytefromcache%
47820]
47830IFsy%>250 THEN
47840[OPT Z
47850BL bytefromcache%
47860]
47870ENDIF
47880ENDIF
47890[OPT Z
47900.rle
47910BL bytefromcache%
47920CMP R0,#128
47930BCC rle1
47940RSB R2,R0,#256
47950BL bytefromcache%
47960.rle0 STRB R0,[R8],#1
47970SUBS R2,R2,#1
47980BPL rle0
47990B rle2
48000.rle1
48010ADD R3,R0,#1
48020MOV R2,R8
48030ADD R8,R8,R3
48040BL multibytefromcache%
48050.rle2
48060CMP R8,R7
48070BCC rle
48080LDMFD SP !,{R14}
48090MOVS PC,R14
48100]
48110WHEN "FN1900","FN1100","FN400"
48120[OPT Z
48140.readline%
48150LDR R2,[R9]:LDR R2,[R2]
48160LDR R3,[R9,#8]
48170LDR R0,[R3]
48180LDR R4,[R9,#16]
48190LDR R5,[R4]
48200LDR R6,[R9,#24]:LDR R6,[R6]:ADD R6,R6,R2
48210STMFD SP !,{R14}
48220.rle
48230CMP R5,#1
48240BGE rle1
48250BL bytefromcache%
48260MOV R5,#1
48270]
48280IFflag=1900 THEN
48290[OPT Z
48300CMP R0,#192
48310ANDCS R5,R0,#63:BLCS bytefromcache%
48320]
48330ENDIF
48340IFflag=1100 THEN
48350[OPT Z
48360CMP R0,#128
48370BNE rle1
48380BL bytefromcache%
48390TEQ R0,#0
48400MOVEQ R0,#128
48410BEQ rle1
48420ADD R5,R0,#1
48430BL bytefromcache%
48440]
48450ENDIF
48460IFflag=400 THEN
48470[OPT Z
48480MOV R1,R0
48490BL bytefromcache%
48500ORR R1,R1,R0,LSL #8
48510BL bytefromcache%
48520ORR R1,R1,R0,LSL #16
48530BL bytefromcache%
48540ADD R5,R0,#1
48550MOV R0,R1
48560]
48570ENDIF
48580IFflag=200 THEN
48590[OPT Z
48600ADD R5,R0,#1
48610BL bytefromcache%
48620]
48630ENDIF
48640[OPT Z
48650.rle1
48660STRB R0,[R2],#1
48670]
48680IFflag=400 THEN
48690[OPT Z
48700MOV R1,R0,LSR #8
48710STRB R1,[R2],#1
48720MOV R1,R0,LSR #16
48730STRB R1,[R2],#1
48740]
48750ENDIF
48760[OPT Z
48770SUB R5,R5,#1
48780TEQ R2,R6
48790BNE rle
48800.rlexit
48810STR R0,[R3]:STR R5,[R4]
48820LDMFD SP !,{PC}^
48830]
48840WHEN "FN2401"
48850[OPT Z
48860.bm_rle8
48870MOV R1,#c%
48880LDR R8,[R9]:LDR R8,[R8]
48890LDR R7,[R9,#8]:LDR R7,[R7]:ADD R7,R7,R8
48900STMFD SP !,{R14}
48910.rle
48920BL bytefromcache%
48930TEQ r0,#0
48940BEQ rlecopy
48960MOV r4,r0
48970BL bytefromcache%
48980.rle1
48990STRB r0,[r8],#1
49000SUBS r4,r4,#1
49010BGT rle1
49020B rle
49030.rlecopy
49050BL bytefromcache%
49060CMP r0,#3
49070BLT rlespecial
49080MOV r4,r0
49090.rle2
49110BL bytefromcache%
49120STRB r0,[r8],#1
49130BL bytefromcache%
49140SUBS r4,r4,#1
49150STRGTB r0,[r8],#1
49160SUBGTS r4,r4,#1
49170BGT rle2
49180B rle
49190.rlespecial
49300LDMFD SP !,{R14}
49310MOVS PC,R14
49320]
49330WHEN "FN2402"
49340[OPT Z
49350.bm_rle4
49360MOV R1,#c%
49370LDR R8,[R9]:LDR R8,[R8]
49380LDR R7,[R9,#8]:LDR R7,[R7]:ADD R7,R7,R8
49390STMFD SP !,{R14}
49400MOV r2,#0
49410MOV r3,#0
49420.rle
49430BL bytefromcache%
49440TEQ r0,#0
49450BEQ rlecopy
49470MOV r4,r0
49480BL bytefromcache%
49490.rle1
49500BL bmrle4_insert
49510CMP r3,#8
49520MOVGE r5,r2,LSR#24
49530STRGEB r5,[r8],#1
49540MOVGE r2,r2,LSL#8
49550SUBGE r3,r3,#8
49560CMP r4,#0
49570BGT rle1
49580B rle
49590.rlecopy
49610BL bytefromcache%
49620CMP r0,#3
49630BLT rlespecial
49640MOV r4,r0
49650.rle2
49670BL bytefromcache%
49680BL bmrle4_insert
49690BL bytefromcache%
49700CMP r4,#0
49710BLGT bmrle4_insert
49720B rle4
49730.rle3
49740MOV r5,r2,LSR#24
49750STRB r5,[r8],#1
49760MOV r2,r2,LSL#8
49770SUB r3,r3,#8
49780.rle4
49790CMP r3,#8
49800BGE rle3
49810CMP r4,#0
49820BGT rle2
49830B rle
49840.rlespecial
49940CMP r3,#0
49950MOVGT r5,r2,LSR#24
49960STRGTB r5,[r8],#1
49980LDMFD SP !,{R14}
49990MOVS PC,R14
50000.bmrle4_insert
50010RSB r5,r3,#32
50020MOV r2,r2,LSR r5
50030MOV r2,r2,LSL r5
50040SUB r5,r5,#8
50050ORR r2,r2,r0,LSL r5
50060SUBS r4,r4,#2
50070ADDMI r3,r3,#4
50080ADDPL r3,r3,#8
50090MOVS PC,R14
50100]
50110ENDCASE
50120IFcachebytes% THEN
50130[OPT Z
50140.bytefromcache%
50150STMFD SP !,{R1,R2}
50160LDR R1,incacheptr
50170LDR R2,numlefttogo
50180LDRB R0,[R1],#1
50190SUBS R2,R2,#1
50200STRNE R1,incacheptr
50210STRNE R2,numlefttogo
50220LDMFD SP !,{R1,R2}
50230MOVNE PC,R14
50240STMFD SP !,{R0,R1,R2,R3,R4}
50250LDR R2,valdatacache
50260STR R2,incacheptr
50270LDR R3,valcache
50280STR R3,numlefttogo
50290MOV R0,#4
50300MOV R1,#c%
50310SWI "OS_GBPB"
50320LDMFD SP !,{R0,R1,R2,R3,R4}
50330MOV PC,R14
50340.valdatacache DCD datacache%
50350.valcache DCD cache%
50360.incacheptr DCD datacache%
50370.numlefttogo DCD cache%
50380.multibytefromcache%
50390CMP R3,#0
50400MOVEQ PC,R14
50410STMFD SP !,{R0,R14}
50420.multibytefromcachel
50430BL bytefromcache%
50440STRB R0,[R2],#1
50450SUBS R3,R3,#1
50460BNE multibytefromcachel
50470LDMFD SP !,{R0,R14}
50480MOV PC,R14
50490]
50500ENDIF
50510IFplanar%<0 THEN
50520C%=7:IFflag=2600 C%=15
50530[OPT Z
50540.plancnv%
50550LDR R0,sxloc
50560LDR R1,[R9]:LDR R1,[R1]
50570LDR R3,[R9,#8]:LDR R3,[R3]
50580LDR R4,[R9,#16]:LDR R4,[R4]
50590]
50600IFflag=3500 THEN
50610[OPT Z
50620MOV R9,#0
50630]
50640ELSE
50650[OPT Z
50660MOV R9,#C%
50670]
50680ENDIF
50690[OPT Z
50700.planelp
50710MOV R7,#0
50720MOV R5,R3
50730]
50740FORN%=1TOplanes%
50750[OPT Z
50760LDR R6,[R5],R4
50770]
50780IFflag=2600 THEN
50790[OPT Z
50800MOV R6,R6,LSL #8
50810BIC R6,R6,#&FF000000
50820ORR R6,R6,R6,LSR #16
50830]
50840ENDIF
50850IFflag=3500 THEN
50860[OPT Z
50870MOV R6,R6,LSR R9
50880ANDS R6,R6,#1
50890ORR R7,R7,R6,LSL #(planes%-N%)
50900ORRNE R7,R7,#(planes%-1)
50910]
50920ELSE
50930[OPT Z
50940MOV R6,R6,LSR R9
50950AND R6,R6,#1
50960ORR R7,R7,R6,LSL #(N%-1)
50970]
50980ENDIF
50990NEXT
51000[OPT Z
51010STRB R7,[R1],#1
51020]
51030IFflag=3500 THEN
51040[OPT Z
51050ADD R9,R9,#1
51060CMP R9,#C%+1
51070MOVEQ R9,#0
51080]
51090ELSE
51100[OPT Z
51110SUBS R9,R9,#1:MOVMI R9,#C%
51120]
51130ENDIF
51140CASE flag OF
51150WHEN 2600
51160[OPT Z
51170MOVMI R3,R5
51180]
51190WHEN 3500
51200[OPT Z
51210ADDEQ R3,R3,#1
51220]
51230OTHERWISE
51240[OPT Z
51250ADDMI R3,R3,#1
51260]
51270ENDCASE
51280[OPT Z
51290SUBS R0,R0,#1:BNE planelp
51300MOVS PC,R14
51310]
51320ENDIF
51330NEXT
51340cputime%=TIME
51350IFcache% THEN
51360IFflag=3600 THEN
51370pcdblk%!12=cacherows%:PROCrefillpcd:IFcache%>=filesize% rowstogo%=-1
51380ELSE
51390IFstriprows%>0ANDcompression>1 THEN
51410SYS12,4,c%,datacache%,cache%
51420IFcachebytes% !incacheptr=datacache%:!numlefttogo=cache%
51430ELSE
51440PROCrefill:IFcache%>=filesize% rowstogo%=-1
51450ENDIF
51460ENDIF
51470ENDIF
51480sizeshft%=0:CASE ncol OF
51490WHEN 2^24-1:size%=1
51500WHEN 2^15-1:size%=1
51510WHEN 63,255,256:size%=1
51520WHEN 15:size%=2:sizeshft%=1
51530WHEN 3:size%=4:sizeshft%=2
51540WHEN 1:size%=8:sizeshft%=3:IFm$="C" size%=2:sizeshft%=1
51550IFm$="D" size%=4:sizeshft%=2
51560IFm$="T" size%=2:sizeshft%=1
51570ENDCASE
51590CASE flag OF
51600WHEN 501:IFinfo% PRINT"Reading interlaced GIF"
51610sz%=sx%*sy%:plbuff%=FNdim(sz%+100)
51620FORY%=0TOsy%-1STEP8:X%=plbuff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
51630FORY%=4TOsy%-1STEP8:X%=plbuff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
51640FORY%=2TOsy%-1STEP4:X%=plbuff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
51650FORY%=1TOsy%-1STEP2:X%=plbuff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
51660datacache%=plbuff%:buff%=plbuff%:rowbytes%=sx%:rowstogo%=-1
51670ENDCASE
51680IFgamma<>1 AND gamma<>0 THEN
51690k=1/gamma:FORC%=0TOcolourindex
51700IFr%(C%) r%(C%)=((r%(C%)/F)^k)*F
51710IFg%(C%) g%(C%)=((g%(C%)/F)^k)*F
51720IFb%(C%) b%(C%)=((b%(C%)/F)^k)*F
51730NEXT
51740ENDIF
51750rmax=F:gmax=F:bmax=F
51760IFcol=0 THEN
51770IFinput<9 THEN
51780FORC%=0TO255:r%(C%)=r%(C%)*rwt+g%(C%)*gwt+b%(C%)*bwt:NEXT
51790ELSE
51800IFinput<400 THEN
51810rmax=F*rwt:gmax=F*gwt:bmax=F*bwt
51820FORC%=0TOcolourindex:r%(C%)=r%(C%)*rwt:g%(C%)=g%(C%)*gwt:b%(C%)=b%(C%)*bwt:NEXT
51830ENDIF
51840ENDIF
51850ENDIF
51860IFNOTorder% PROCadjustpalette(1/ydiv%/xdiv%,0)
51880IFrange% THEN
51890IFinfo% PRINT"Scanning data to compute parameters for '-range'"
51900IForder% THEN
51910Y%=0:REPEAT SYShour%,Y%*100DIVsy%
51920W%=EVAL(r$+"(xp%())"):CALLmaxmin%,xp%(1,0),totvals2%:Y%+=1
51930UNTILY%=sy% OR!min<255 AND!max+255>=F
51940ELSE
51950Y%=0:ysamp%=1:REPEAT SYShour%,Y%*100DIVy%
51960PROCscaledpixelrow(cl%()):CALLmaxmin%,cl%(1,0),totvals%:Y%+=1
51970UNTILY%=y% OR !min<255 AND !max+255>=F
51980ENDIF
51990IF!max+255>=F AND!min<255 range%=FALSE:range$="No point in '-range' on this image"
52000IFrange% PROCadjustpalette(F/(!max-!min),!min/ydiv%/xdiv%):range$="Input image maximum "+STR$(!max/F*100)+"% minimum "+STR$(!min/F*100)+"%"
52010PROCrewind:IFinfo% PRINTrange$
52020ENDIF
52030IFhist% ORequal% THEN
52040IFequal% IFinfo% PRINT"Scanning data to compute parameters for '-equal'"
52050IForder% THEN
52060FORyr%=0TOsy%-1:SYShour%,yr%*100DIVsy%
52070W%=EVAL(r$+"(xp%())"):CALLhisto%,xp%(1,0),vals%(0,0),sx%
52080NEXT
52090ELSE
52100ysamp%=1:FORyr%=0TOy%-1:SYShour%,yr%*100DIVy%
52110PROCscaledpixelrow(cl%()):CALLhisto%,cl%(1,0),vals%(0,0),x%
52120NEXT
52130ENDIF
52140IFinfo% PRINT"Done. Now processing the picture"
52150ENDIF
52160IFinput<400 THEN
52170FORC%=0TOcolourindex
52180IFr%(C%)<0 r%(C%)=0
52190IFg%(C%)<0 g%(C%)=0
52200IFb%(C%)<0 b%(C%)=0
52210IFr%(C%)>rmax r%(C%)=rmax
52220IFg%(C%)>gmax g%(C%)=gmax
52230IFb%(C%)>bmax b%(C%)=bmax
52240NEXT
52250ENDIF
52260IFhist% THEN
52270M%=0:ZM%=-1:FORC%=0TOcol
52280FORZ%=0TO256:IFvals%(Z%,C%)>M% M%=vals%(Z%,C%):ZM%=Z%
52290NEXT:NEXT
52300IFZM%=-1 OR okinfo%=0 THEN=100
52310IF col>0 THEN
52320MODE66:ht=500
52330IFMODE<>66 MODE16:ht=400
52340LINE0,6,2000,6
52350ELSE
52360MODE18:ht=400:LINE0,6,1024,6
52370ENDIF
52380M=M%/(ht*2-8):FORC%=0TOcol:CASE C% OF
52390WHEN 0:GCOL1
52400WHEN 1:GCOL2
52410WHEN 2:GCOL4
52420ENDCASE
52430IF col>0 THEN
52440FORZ%=0TO256:IFvals%(Z%,C%) X%=Z%*3+C%<<1:LINEX%,8,X%,vals%(Z%,C%)/M+8
52450NEXT
52460ELSE
52470FORZ%=0TO256:IFvals%(Z%,C%) X%=Z%<<2:RECTANGLE FILLX%,8,2,vals%(Z%,C%)/M
52480NEXT
52490ENDIF
52500NEXT
52510PROCclose:SYS"Hourglass_Off"
52520=100
52530ENDIF
52540IFm>=0 oname$="p"+STR$m+m$ ELSEoname$=m$
52550IFm=-6 ORm=-7 ORm=-8 oname$=pnm$
52560IFrange% oname$+="r"
52570IFequal% oname$+="e"
52580IFsharpen% oname$+="s"+STR$sharpen%
52590IFblack% oname$+="b"+STR$black%
52600IFgamma<>1 A%=@%:@%=&1020100:oname$+="g"+STR$gamma:@%=A%
52610IFbright%=16 oname$+="b"
52620xsp%=x%:ysp%=y%:IFrotate% SWAP xsp%,ysp%
52630IF rotate% OR hflip% OR vflip% IFm=-9 OR m=-10 THENm-=2
52640IFm=-9ORm=-10 THEN
52650DIM jpq%(20)
52660jpq%()=60,75,90,105,120,135,150,160,170,180,190,205,215,235,255,280,320,380,500,750,850
52670ENDIF
52680CASE m OF
52690WHEN -1:xwords%=xsp%:sz%=xwords%*ysp%:Y%=ysp%
52700PROCgetoutput(sz%,0,xwords%,Y%):base%=ram%
52710WHEN -3,-5:xwords%=xsp%*2:sz%=xwords%*ysp%:Y%=ysp%
52720PROCgetoutput(sz%,0,xwords%,Y%):base%=ram%
52730WHEN -4:xwords%=xsp%*3:sz%=xwords%*ysp%:Y%=ysp%
52740PROCgetoutput(sz%,0,xwords%,Y%):base%=ram%
52750WHEN -6:xwords%=xsp%*2+3ANDNOT3:sz%=xwords%*ysp%:Y%=ysp%
52760A%=Y%:PROCgetoutput(sz%,64,xwords%,Y%)
52770ram%!4=0:ram%!8=16:ram%!12=16:SYS&2e,&109,ram%
52780SYS&2e,&10f,ram%,oname$,0,xsp%*2,Y%,28
52790base%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
52800ram%!12=ram%!12-Y%*xwords%+A%*xwords%
52810base%!(10*4)=5<<27 OR nx<<1 OR ny<<14 OR 1:base%+=base%!(8*4)
52820WHEN -7:xwords%=xsp%*3+3ANDNOT3:sz%=xwords%*ysp%:Y%=ysp%
52830A%=Y%:PROCgetoutput(sz%,64,xwords%,Y%)
52840ram%!4=0:ram%!8=16:ram%!12=16:SYS&2e,&109,ram%
52850SYS&2e,&10f,ram%,oname$,0,xsp%*3,Y%,28
52860base%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
52870ram%!12=ram%!12-Y%*xwords%+A%*xwords%
52880base%!(10*4)=panic<<27 OR nx<<1 OR ny<<14 OR 1:base%+=base%!(8*4)
52890no magic number yet for new format 24bpp sprites
52900WHEN -8:xwords%=xsp%*4:sz%=xwords%*ysp%:Y%=ysp%
52910A%=Y%:PROCgetoutput(sz%,64,xwords%,Y%)
52920ram%!4=0:ram%!8=16:ram%!12=16:SYS&2e,&109,ram%
52930SYS&2e,&10f,ram%,oname$,0,xsp%*4,Y%,28
52940base%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
52950ram%!12=ram%!12-Y%*xwords%+A%*xwords%
52960base%!(10*4)=6<<27 OR nx<<1 OR ny<<14 OR 1:base%+=base%!(8*4)
52970WHEN -9:xwords%=xsp%+3ANDNOT3:sz%=(xsp%+7ANDNOT7)*(ysp%+7ANDNOT7):Y%=ysp%
52980sz%=sz%*jpq%(jpegquality%DIV5)/588+1024
52990jpegwrk%=FNdim((xsp%+7ANDNOT7)*9+20000)
53000base%=FNdim(xwords%)
53010PROCgetoutputjp(sz%)
53020!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=1:ram%!16=90:ram%!20=90
53030SYS"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+7ANDNOT7)*9+20000 TO jpegtag%
53040WHEN -10:xwords%=xsp%*3+3ANDNOT3:sz%=(xsp%+15ANDNOT15)*(ysp%+15ANDNOT15)*12/8:Y%=ysp%
53050sz%=sz%*jpq%(jpegquality%DIV5)/588+1024
53060jpegwrk%=FNdim((xsp%+15ANDNOT15)*30+20000)
53070base%=FNdim(xwords%)
53080PROCgetoutputjp(sz%)
53090!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=3:ram%!16=90:ram%!20=90
53100SYS"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+15ANDNOT15)*30+20000 TO jpegtag%
53110WHEN -11:xwords%=xsp%:sz%=xwords%*ysp%+20000:Y%=ysp%
53120jpegwrk%=FNdim((xsp%+7ANDNOT7)*9+20000)
53130PROCgetoutput(sz%,0,xwords%,Y%):base%=ram%+20000
53140WHEN -12:xwords%=xsp%*3:sz%=xwords%*ysp%+20000:Y%=ysp%
53150jpegwrk%=FNdim((xsp%+15ANDNOT15)*30+20000)
53160PROCgetoutput(sz%,0,xwords%,Y%):base%=ram%+20000
53170OTHERWISE:xwords%=xsp%/size%+3.9999ANDNOT3:sz%=xwords%*ysp%:X%=xsp%:Y%=ysp%
53180IFncol=1 THEN
53190CASE m$ OF
53200WHEN"C":!rowinc=xwords%:xwords%=xwords%*4:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*4
53210WHEN"T":!rowinc=xwords%:xwords%=xwords%*3:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*3
53220WHEN"D":!rowinc=xwords%:xwords%=xwords%*2:sz%=xwords%*ysp%:X%=xsp%*2:Y%=ysp%*2
53230ENDCASE
53240ENDIF
53250A%=Y%:PROCgetoutput(sz%,2048+64,xwords%,Y%)
53260ram%!4=0:ram%!8=16:ram%!12=16:SYS&2e,&109,ram%
53270SYS&2e,&10f,ram%,oname$,(ncol<63)AND1,X%,Y%,spm
53280base%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
53290ram%!12=ram%!12-Y%*xwords%+A%*xwords%
53300pal%=base%+11*4:base%+=base%!(8*4)
53310CASE ncol OF
53320WHEN 256
53330!(pal%-8)+=2048:!(pal%-12)+=2048:base%+=2048:!(ram%+12)+=2048:!(pal%-44)+=2048
53340FORZ%=0TO255:B%=Z%ORZ%<<8ORZ%<<16:B%=B%<<8
53350pal%!(Z%*8)=B%:pal%!(Z%*8+4)=B%:NEXT
53360WHEN 255
53370!(pal%-8)+=2048:!(pal%-12)+=2048:base%+=2048:!(ram%+12)+=2048:!(pal%-44)+=2048
53380FORZ%=0TO255:B%=palette%!(Z%<<2)<<8
53390pal%!(Z%*8)=B%:pal%!(Z%*8+4)=B%:NEXT
53400WHEN 15
53410CASE m$ OF
53420WHEN "R"
53430FORZ%=0TO15:PROCcol(Z%,palette%!(Z%<<2)AND&F0F0F0):NEXT
53440WHEN "D"
53450FORZ%=0TO7:A%=0:IFZ%AND1 A%+=&F0
53460IFZ%AND2 A%+=&F000
53470IFZ%AND4 A%+=&F00000
53480PROCcol(Z%,A%):NEXT
53490WHEN "T"
53500FORZ%=0TO15:A%=Z%<<4:PROCcol(Z%,A%ORA%<<8ORA%<<16):NEXT
53510OTHERWISE
53520FORZ%=0TO15:A%=(Z%AND7)/7*15+.2<<4:PROCcol(Z%,A%ORA%<<8ORA%<<16):NEXT
53530ENDCASE
53540WHEN 3
53550CASEm$ OF
53560WHEN "C"
53570PROCcol(0,0):PROCcol(1,&F0F000):PROCcol(2,&F000F0):PROCcol(3,&F0F0)
53580WHEN "R"
53590FORZ%=0TO3:PROCcol(Z%,palette%!(Z%<<2)AND&F0F0F0):NEXT
53600OTHERWISE
53610FORZ%=0TO3:A%=Z%*5<<4:PROCcol(Z%,A%ORA%<<8ORA%<<16):NEXT
53620ENDCASE
53630WHEN 1:PROCcol(0,0):PROCcol(1,&F0F0F0)
53640ENDCASE
53650ENDCASE
53670IFflex% THEN
53690ELSE
53700IFworkspace%<0 THEN
53710P%=END:[OPT 0:STR r13,P%+16:MOVS Pc,r14:]:CALLEND
53720END=END+32*1024+HIMEM-!(END+16)
53730ELSE
53750ENDIF
53760ENDIF
53770IFbase%*size%>2^32 ERROR 42,"base%*size% product too large"
53780LOCAL ERROR
53790ON ERROR LOCAL:RESTORE ERROR:PROCSave:ERROR ERR,REPORT$+" internal ("+STR$ERL+")"
53800SYS"Hourglass_LEDs",3
53810ysamp%=1:nl%()=0:step%=4*(col+1)
53820addr%=base%<<sizeshft%:rowstep%=xwords%*size%:colstep%=1:dist%=xsp%-1
53830IFm=-3ORm=-5ORm=-6 dist%=dist%*2
53840IFm=-4ORm=-7ORm=-10ORm=-12 dist%=dist%*3
53850IFm=-8 dist%=dist%*4
53860IFrotate% THEN
53870odist%=dist%:SWAP colstep%,rowstep%:SWAP hflip%,vflip%
53880IFrotate%=1 THEN
53890addr%+=(ysp%-1)*colstep%:colstep%=-colstep%:dist%=(ysp%-1)*colstep%
53900ELSE
53910addr%+=dist%:rowstep%=-rowstep%:dist%=(ysp%-1)*colstep%
53920ENDIF
53930IFm=-3ORm=-5ORm=-6 colstep%=colstep%/2:rowstep%=rowstep%*2
53940IFm=-4ORm=-7ORm=-10ORm=-12 colstep%=colstep%/3:rowstep%=rowstep%*3
53950IFm=-8 colstep%=colstep%/4:rowstep%=rowstep%*4
53960ENDIF
53970IFhflip% THEN
53980addr%+=dist%:dist%=-dist%:colstep%=-colstep%
53990ENDIF
54000IFvflip% THEN
54010IFrotate% THEN
54020addr%+=odist%*rotate%:rowstep%=-rowstep%
54030ELSE
54040addr%+=(ysp%-1)*rowstep%:rowstep%=-rowstep%
54050ENDIF
54060ENDIF
54070outlim%=((base%+xwords%*Y%)<<sizeshft%)-1:oddcolstep%=-colstep%:oddstep%=-step%
54080IForder% PROCadjustpalette(1/ydiv%/xdiv%,0)
54090IFm=-9ORm=-10 THEN
54100SYS "OS_SWINumberFromString",,"CompressJPEG_WriteLine" TO wl%
54110IFsy%=y% AND sx%=x% AND range%=FALSE AND sharpen%=FALSE AND equal%=FALSE THEN
54120IFdither% THEN
54130FORyr%=0 TO y%-1:SYShour%,yr%*100DIVy%
54140W%=EVAL(r$+"(cl%())"):cl%()=cl%()+nl%():nl%()=0:B%=x%
54150IFyr%AND1 THEN
54160CALLfs%,colstep%,cl%(1,0),nl%(1,0),addr%,step%,B%
54170ELSE
54180A%=addr%+dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
54190ENDIF
54200SYSwl%,jpegtag%,addr%
54210NEXT
54220ELSE
54230I%=step%:FORyr%=0TOy%-1:SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
54240W%=EVAL(r$+"(cl%())"):B%=x%:CALLfs%,colstep%,cl%(1,0),I%,addr%,I%,B%
54250SYSwl%,jpegtag%,addr%
54260NEXT
54270ENDIF
54280ELSE
54290IFequal% THEN
54300PROCrewind:Havg%=SUM(vals%())/256/(col+1):DIM new%(256,col)
54310FORB%=0TOcol:R%=0:Hint%=0:FORZ%=0TO256:L%=R%:Hint%+=vals%(Z%,B%)
54320WHILEHint%>Havg%:Hint%-=Havg%:R%+=1:ENDWHILE
54330new%(Z%,B%)=(L%+R%)/2*F/256
54340NEXT:NEXT
54350ENDIF
54360IFsharpen% THEN
54370IForder% THEN
54380yread%=sy%-1:W%=EVAL(r$+"(rm1%())"):IFequal% PROCfit2(rm1%())
54390FORB%=0TOcol:rm1%(0,B%)=rm1%(1,B%):rm1%(sx%+1,B%)=rm1%(sx%,B%):NEXT
54400ELSE
54410yread%=y%-1:PROCscaledpixelrow(rm1%()):IFequal% PROCfit(rm1%())
54420FORB%=0TOcol:rm1%(0,B%)=rm1%(1,B%):rm1%(x%+1,B%)=rm1%(x%,B%):NEXT
54430ENDIF
54440rm2%()=rm1%()
54450ENDIF
54460IForder% THEN
54470FORyr%=0 TO y%-1
54480SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
54490IFsy%=y% THEN
54500PROCsharppixelrow(cl%())
54510ELSE
54520ysamp%-=1:IFysamp%=0 PROCsharppixelrow(xl%()):ysamp%=ymul%
54530IFydiv%=1 THEN
54540cl%()=xl%()
54550ELSE
54560IFysamp%>=ydiv% THEN
54570ysamp%-=ydiv%:cl%()=xl%()*ydiv%
54580ELSE
54590cl%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
54600REPEAT
54610IFysamp%=0 PROCsharppixelrow(xl%()):ysamp%=ymul%
54620IFysamp%>Y% THEN
54630ysamp%-=Y%:xl2%()=xl%()*Y%:cl%()=cl%()+xl2%():Y%=0
54640ELSE
54650Y%-=ysamp%:xl2%()=xl%()*ysamp%:cl%()=cl%()+xl2%():ysamp%=0
54660ENDIF
54670UNTIL Y%=0
54680ENDIF
54690ysamp%+=1
54700ENDIF
54710ENDIF
54720cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%+dist%
54730IFyr%AND1 THEN
54740CALLfs%,colstep%,cl%(1,0),nl%(1,0),addr%,step%,B%
54750ELSE
54760CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
54770ENDIF
54780SYSwl%,jpegtag%,addr%
54790NEXT
54800ELSE
54810FORyr%=0 TO y%-1
54820SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
54830IFsharpen% THEN
54840IFyread% yread%-=1:PROCscaledpixelrow(rm%()):IFequal% PROCfit(rm%())
54850FORB%=0TOcol:rm%(0,B%)=rm%(1,B%):rm%(x%+1,B%)=rm%(x%,B%):NEXT
54860CALL sharp%,cl%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals%
54870SWAP rm2%(),rm1%():rm1%()=rm%()
54880ELSE
54890PROCscaledpixelrow(cl%()):IFequal% PROCfit(cl%())
54900ENDIF
54910cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%+dist%
54920IFyr%AND1 THEN
54930CALLfs%,colstep%,cl%(1,0),nl%(1,0),addr%,step%,B%
54940ELSE
54950CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
54960ENDIF
54970SYSwl%,jpegtag%,addr%
54980NEXT
54990ENDIF
55000ENDIF
55010SYS"CompressJPEG_Finish",jpegtag% TO jpegsize%
55020ELSE
55030IFsy%=y% AND sx%=x% AND range%=FALSE AND sharpen%=FALSE AND equal%=FALSE THEN
55040IFdither% THEN
55050FORyr%=0 TO y%-1:SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
55060W%=EVAL(r$+"(cl%())"):cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
55070IFyr%AND1 THEN
55080CALLfs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
55090ELSE
55100A%+=dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
55110ENDIF
55120NEXT
55130ELSE
55140I%=step%:FORyr%=0TOy%-1:SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
55150W%=EVAL(r$+"(cl%())"):B%=x%:A%=addr%:addr%+=rowstep%:CALLfs%,colstep%,cl%(1,0),I%,A%,I%,B%
55160NEXT
55170ENDIF
55180ELSE
55190IFequal% THEN
55200PROCrewind:Havg%=SUM(vals%())/256/(col+1):DIM new%(256,col)
55210FORB%=0TOcol:R%=0:Hint%=0:FORZ%=0TO256:L%=R%:Hint%+=vals%(Z%,B%)
55220WHILEHint%>Havg%:Hint%-=Havg%:R%+=1:ENDWHILE
55230new%(Z%,B%)=(L%+R%)/2*F/256
55240NEXT:NEXT
55250ENDIF
55260IFsharpen% THEN
55270IForder% THEN
55280yread%=sy%-1:W%=EVAL(r$+"(rm1%())"):IFequal% PROCfit2(rm1%())
55290FORB%=0TOcol:rm1%(0,B%)=rm1%(1,B%):rm1%(sx%+1,B%)=rm1%(sx%,B%):NEXT
55300ELSE
55310yread%=y%-1:PROCscaledpixelrow(rm1%()):IFequal% PROCfit(rm1%())
55320FORB%=0TOcol:rm1%(0,B%)=rm1%(1,B%):rm1%(x%+1,B%)=rm1%(x%,B%):NEXT
55330ENDIF
55340rm2%()=rm1%()
55350ENDIF
55360IForder% THEN
55370FORyr%=0 TO y%-1
55380SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
55390IFsy%=y% THEN
55400PROCsharppixelrow(cl%())
55410ELSE
55420ysamp%-=1:IFysamp%=0 PROCsharppixelrow(xl%()):ysamp%=ymul%
55430IFydiv%=1 THEN
55440cl%()=xl%()
55450ELSE
55460IFysamp%>=ydiv% THEN
55470ysamp%-=ydiv%:cl%()=xl%()*ydiv%
55480ELSE
55490cl%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
55500REPEAT
55510IFysamp%=0 PROCsharppixelrow(xl%()):ysamp%=ymul%
55520IFysamp%>Y% THEN
55530ysamp%-=Y%:xl2%()=xl%()*Y%:cl%()=cl%()+xl2%():Y%=0
55540ELSE
55550Y%-=ysamp%:xl2%()=xl%()*ysamp%:cl%()=cl%()+xl2%():ysamp%=0
55560ENDIF
55570UNTIL Y%=0
55580ENDIF
55590ysamp%+=1
55600ENDIF
55610ENDIF
55620cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
55630IFyr%AND1 THEN
55640CALLfs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
55650ELSE
55660A%+=dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
55670ENDIF
55680NEXT
55690ELSE
55700FORyr%=0 TO y%-1
55710SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
55720IFsharpen% THEN
55730IFyread% yread%-=1:PROCscaledpixelrow(rm%()):IFequal% PROCfit(rm%())
55740FORB%=0TOcol:rm%(0,B%)=rm%(1,B%):rm%(x%+1,B%)=rm%(x%,B%):NEXT
55750CALL sharp%,cl%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals%
55760SWAP rm2%(),rm1%():rm1%()=rm%()
55770ELSE
55780PROCscaledpixelrow(cl%()):IFequal% PROCfit(cl%())
55790ENDIF
55800cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
55810IFyr%AND1 THEN
55820CALLfs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
55830ELSE
55840A%+=dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
55850ENDIF
55860NEXT
55870ENDIF
55880ENDIF
55890IFm=-11ORm=-12 THEN
55900SYS "OS_SWINumberFromString",,"CompressJPEG_WriteLine" TO wl%
55910IFm=-11 THEN
55920!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=1:ram%!16=90:ram%!20=90
55930SYS"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+7ANDNOT7)*9+20000 TO jpegtag%
55940ELSE
55950!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=3:ram%!16=90:ram%!20=90
55960SYS"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+15ANDNOT15)*30+20000 TO jpegtag%
55970ENDIF
55980addr%=ram%+20000
55990FORyr%=0TOysp%-1
56000SYShour%,yr%*100DIVysp%:SYSwl%,jpegtag%,addr%:addr%+=xwords%
56010NEXT
56020SYS"CompressJPEG_Finish",jpegtag% TO jpegsize%
56030ENDIF
56040ENDIF
56050cputime%=TIME-cputime%
56060PROCSave
56070=0
56080DEF PROCsrchdevlist
56090[OPT Z
56120CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
56130MOV R0,R4,LSR #(bits-k%):CMP R0,#1<<k%:MOVCS R0,#(1<<k%)-1
56140CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
56150MOV R3,R5,LSR #(bits-k%):CMP R3,#1<<k%:MOVCS R3,#(1<<k%)-1:ORR R0,R0,R3,LSL #k%
56160CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
56170MOV R3,R6,LSR #(bits-k%):CMP R3,#1<<k%:MOVCS R3,#(1<<k%)-1:ORR R0,R0,R3,LSL #k%*2
56200STMFD SP !,{R8,R9,R10,R11}
56210LDR r3,ictloc
56220LDR r2,[r3,r0,LSL #2]
56240MOV r14,r2,lsr #24
56250CMP r14,#4
56260ADDCC r2,r3,r0,lsl #2
56270BICCS r2,r2,#&ff000000
56280LDRB r0,[r2],#1
56290SUBS r14,r14,#1
56300BEQ gotit
56320ADD r3,r0,r0,lsl #1
56330ADD r3,r7,r3,lsl #2
56340LDMIA r3,{r8,r9,r10}
56350SUBS r8,r8,r4
56360RSBMI r8,r8,#0
56370MOV r8,r8,lsr #bits/2
56380SUBS r9,r9,r5
56390RSBMI r9,r9,#0
56400MOV r9,r9,lsr #bits/2
56410SUBS r10,r10,r6
56420RSBMI r10,r10,#0
56430MOV r10,r10,lsr #bits/2
56440MUL r3,r8,r8
56450MUL r11,r9,r9
56460ADD r11,r11,r11,LSL #2
56470ADD r3,r3,r3,LSL #1
56480ADD r3,r3,r11,LSL #1
56490MLA r11,r10,r10,r3
56510.srchlist
56520LDRB r3,[r2],#1
56530ADD R8,R3,R3,LSL #1
56540ADD R8,R7,R8,LSL #2
56550LDMIA R8,{R8,R9,R10}
56560SUBS R9,R5,R9
56570RSBMI R9,R9,#0
56580MOV R3,R9,LSR #bits/2
56590MUL R9,R3,R3
56600ADD r9,r9,r9,LSL #2
56610CMP R11,R9,LSL #1
56620BCC srchquick
56630SUBS R8,R4,R8
56640RSBMI R8,R8,#0
56650MOV R3,R8,LSR #bits/2
56660MUL R8,r3,r3
56670ADD r8,r8,r8,LSL #1
56680ADD r8,r8,r9,LSL #1
56690SUBS R10,R6,R10
56700RSBMI R10,R10,#0
56710MOV R3,R10,LSR #bits/2
56720MLA R10,R3,R3,R8
56730CMP R10,R11
56740MOVCC R11,R10
56750LDRCCB R0,[r2,#-1]
56760.srchquick
56770SUBS R14,R14,#1
56780BNE srchlist
56790.gotit
56800ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
56810LDMIA R3,{R8,R9,R10}
56820SUB R4,R4,R8:SUB R5,R5,R9:SUB R6,R6,R10
56830LDMFD r13!,{R8,R9,R10,R11}
56840]
56850ENDPROC
56860DEF PROCgetoutput(A%,E%,B%,RETURN C%)
56870IFA%>max% AND rotate%=FALSE AND vflip%=FALSE THEN
56880C%=max%DIVB%+1:A%=xwords%*C%+E%:first%=TRUE:o%=OPENOUTf$
56890ELSE
56900A%+=E%
56910ENDIF
56920IFspritearea%<0 THEN
56930ram%=FNcreatearea(A%):IFram%=-1 ram%=FNdim(A%)
56940ELSE
56950ram%=spritearea%
56960ENDIF
56970!ram%=A%
56980ENDPROC
57000DEF PROCgetoutputjp(RETURN A%)
57020IFspritearea%<0 THEN
57030ram%=FNcreateareajp(A%):IFram%=-1 ram%=FNdimjp(A%)
57040ELSE
57050ram%=spritearea%
57060ENDIF
57070!ram%=A%
57090ENDPROC
57110DEF FNcreatearea(size%)
57120LOCAL ERROR
57130areanumber%=0
57140ON ERROR LOCAL:=-1
57150SYS &20066,0,-1,size%,-1,%10000000,size%,0,0,"ChangeFSI sprite" TO ,areanumber%,,areabase%;V%
57160IFV%AND1 THENareanumber%=0:=-1
57220SYS "OS_ReadDynamicArea",areanumber% TO ,areasize%
57230IF areasize%<size% PROCremovearea:ERROR 42,"Couldn't create area"
57240=areabase%
57260DEF FNcreateareajp(RETURN size%)
57270LOCAL ERROR
57280areanumber%=0
57290ON ERROR LOCAL:=-1
57300SYS &20066,0,-1,size%,-1,%10000000,size%,0,0,"ChangeFSI JPEG" TO ,areanumber%,,areabase%;V%
57310IFV%AND1 THENareanumber%=0:=-1
57320SYS "OS_ReadDynamicArea",areanumber% TO ,areasize%:size%=areasize%
57330=areabase%
57350DEF PROCremovearea
57360IFareanumber% SYS "OS_DynamicArea",1,areanumber%:areanumber%=0
57370ENDPROC
57390DEF FNcachedim(size%)
57400LOCAL ERROR
57410cacheareanumber%=0
57420ON ERROR LOCAL:=-1
57430SYS &20066,0,-1,size%,-1,%10000000,size%,0,0,"ChangeFSI cache" TO ,cacheareanumber%,,cacheareabase%;V%
57440IFV%AND1 THENcacheareanumber%=0:=-1
57450SYS "OS_ReadDynamicArea",cacheareanumber% TO ,cacheareasize%
57460IF cacheareasize%<size% PROCremovecachearea:ERROR 42,"Couldn't create area"
57470=cacheareabase%
57490DEF PROCremovecachearea
57500IFcacheareanumber% SYS "OS_DynamicArea",1,cacheareanumber%:cacheareanumber%=0
57510ENDPROC
57530DEF PROCflushoutput
57540IFspritearea%<0 ANDoksave% THEN
57550A%=base%:IFfirst% A%=ram%+4:first%=FALSE
57560SYS12,2,o%,A%,addr%DIVsize%-A%
57570ENDIF
57580addr%=base%*size%
57590ENDPROC
57600DEF PROCclose
57610IFc% IFflag=3600 SYS"PhotoCD_Close",pcdh%,1
57620IFc% CLOSE#c%:c%=0:IFscrapf% scrapf%=FALSE:OSCLI"Remove <Wimp$Scrap>"
57630IFcc% CLOSE#cc%:cc%=0
57640IFccc% CLOSE#ccc%:ccc%=0
57650PROCremovecachearea
57660ENDPROC
57670DEF PROCSave
57680PROCclose
57690CASE m OF
57700WHEN -1:IFspritearea%<0 ANDoksave% THEN
57710IFo% PROCflushoutput ELSESYS"OS_File",10,f$,&004,,ram%,ram%+sz%
57720ENDIF
57730WHEN -2:o%=OPENOUTf$:BPUT#o%,pnm$
57740CASE pnm$ OF
57750WHEN "P1"
57760BPUT#o%,"# "+f$+".pbm (options "+oname$+")"
57770BPUT#o%,STR$xsp%+" "+STR$ysp%
57780FORY%=0TOysp%-1:B%=base%+Y%*xwords%
57790FORX%=0TOxsp%-1:IFB%?(X%>>3)AND(1<<(X%AND7)) BPUT#o%,"1"; ELSEBPUT#o%,"0";
57800NEXT
57810BPUT#o%,""
57820NEXT
57830WHEN "P4"
57840BPUT#o%,"# "+f$+".pbm (options "+oname$+") binary encoded"
57850BPUT#o%,STR$xsp%+" "+STR$ysp%
57860FORX%=0TO255:code%?X%=X%<<7 OR X%<<5AND&40 OR X%<<3AND&20 OR X%<<1AND&10 OR X%>>1AND8 OR X%>>3AND4 ORX%>>5AND2 ORX%>>7:NEXT
57870FORY%=0TOysp%-1:B%=base%+Y%*xwords%
57880FORX%=0TOxsp%-1STEP8:BPUT#o%,code%?(B%?(X%>>3)):NEXT
57890NEXT
57900WHEN "P2"
57910BPUT#o%,"# "+f$+".pgm (options "+oname$+")"
57920BPUT#o%,STR$xsp%+" "+STR$ysp%
57930BPUT#o%,"15"
57940FORY%=0TOysp%-1:B%=base%+Y%*xwords%
57950FORX%=0TOxsp%-1:C%=B%?(X%>>1):IFX%AND1 C%=C%>>4 ELSEC%=C%AND15
57960BPUT#o%," "+STR$C%;
57970NEXT
57980BPUT#o%,""
57990NEXT
58000WHEN "P5"
58010BPUT#o%,"# "+f$+".pgm (options "+oname$+") binary encoded"
58020BPUT#o%,STR$xsp%+" "+STR$ysp%
58030BPUT#o%,"15"
58040FORY%=0TOysp%-1:B%=base%+Y%*xwords%
58050FORX%=0TOxsp%-1:C%=B%?(X%>>1):IFX%AND1 C%=C%>>4 ELSEC%=C%AND15
58060BPUT#o%,C%
58070NEXT
58080NEXT
58090ENDCASE
58100CLOSE#o%:o%=0
58110IFpnm$="P2"ORpnm$="P1" OSCLI"Settype "+f$+" &FFF"
58120WHEN -3:o%=OPENOUTf$:BPUT#o%,pnm$
58130BPUT#o%,"# "+f$+".pcm (options "+oname$+") binary encoded 15bpp (5bits r,g,b)"
58140BPUT#o%,STR$xsp%+" "+STR$ysp%
58150BPUT#o%,"31"
58160SYS12,2,o%,ram%,xsp%*ysp%*2
58170CLOSE#o%:o%=0
58180WHEN -4:o%=OPENOUTf$:IFpnm$="IRLAM"THEN
58190BPUT#o%,"Irlam 24: "+STR$xsp%+" "+STR$ysp%
58200FORY%=0TOysp%-1:B%=ram%+Y%*xwords%
58210FORX%=0TOxsp%*3-1STEP3:BPUT#o%,B%?X%:NEXT
58220B%+=1:FORX%=0TOxsp%*3-1STEP3:BPUT#o%,B%?X%:NEXT
58230B%+=1:FORX%=0TOxsp%*3-1STEP3:BPUT#o%,B%?X%:NEXT
58240NEXT
58250ELSE
58260BPUT#o%,pnm$
58270IFpnm$="P6" THEN
58280BPUT#o%,"# "+f$+".ppm (options "+oname$+") binary encoded 24bpp r,g,b"
58290ELSE
58300BPUT#o%,"# "+f$+".ppm (options "+oname$+") "+STR$(p6bits*3)+"bpp r,g,b"
58310ENDIF
58320BPUT#o%,STR$xsp%+" "+STR$ysp%
58330BPUT#o%,STR$(2^p6bits-1)
58340IFpnm$="P6" THEN
58350SYS12,2,o%,ram%,xsp%*ysp%*3
58360ELSE
58370FORY%=0TOysp%-1:B%=ram%+Y%*xwords%
58380FORX%=0TOxsp%-1:C%=B%!(X%*3):BPUT#o%," "+STR$(C%AND255)+" "+STR$((C%>>8)AND&FF)+" "+STR$((C%>>16)AND255);
58390NEXT
58400BPUT#o%,""
58410NEXT
58420ENDIF
58430ENDIF
58440CLOSE#o%:o%=0
58450IFpnm$="P3" OSCLI"Settype "+f$+" &FFF"
58460WHEN -5:o%=OPENOUTf$:BPUT#o%,pnm$
58470BPUT#o%,"# "+f$+".pcm (options "+oname$+") binary encoded 15bpp (5bits y,u,v)"
58480BPUT#o%,STR$xsp%+" "+STR$ysp%
58490BPUT#o%,"31 27 21"
58500SYS12,2,o%,ram%,xsp%*ysp%*2
58510CLOSE#o%:o%=0
58520WHEN -9,-10,-11,-12
58530IFspritearea%<0 ANDoksave% SYS8,10,f$,&c85,,ram%,ram%+jpegsize%
58540OTHERWISE
58550IFncol=1ANDm$="T" THEN
58560FORX%=(xsp%*4-1)DIV8*8+6TO6STEP-8
58570SYS&2e,&12e,ram%,oname$,X%
58580SYS&2e,&12e,ram%,oname$,X%
58590NEXT
58600ENDIF
58610IFspritearea%<0 ANDoksave% THEN
58620IFo% PROCflushoutput ELSESYS&2e,&10c,ram%,f$
58630ENDIF
58640ENDCASE
58650IFo% CLOSE#o%:o%=0:OSCLI"settype "+f$+" &ff9":PROCremovearea
58660SYS"Hourglass_Off"
58670ENDPROC
58680DEFPROCdefpal
58690FORC%=0TO255
58700r%(C%)=(C%AND7 OR (C%AND16)>>1)/15*F
58710g%(C%)=(C%AND3 OR (C%AND&60)>>3)/15*F
58720b%(C%)=(C%AND3 OR (C%AND8)>>1 OR (C%AND128)>>4)/15*F
58730NEXT
58740ENDPROC
58750DEFPROCdefpal2
58760r%(0)=F:g%(0)=F:b%(0)=F
58770ENDPROC
58780DEFPROCdefpal4
58790r%()=15,10,5,0:FORC%=0TO3:r%(C%)=r%(C%)/15*F:NEXT
58800g%()=r%():b%()=r%()
58810ENDPROC
58820DEFPROCdefpal16
58830r%()=15,13,11,9,7,5,3,0,0,14, 0,13,14,5,15, 0
58840g%()=15,13,11,9,7,5,3,0,4,14,12, 0,14,8,11,10
58850b%()=15,13,11,9,7,5,3,0,9, 0, 0, 0,11,0, 0,15
58860FORC%=0TO15:r%(C%)=r%(C%)/15*F:g%(C%)=g%(C%)/15*F:b%(C%)=b%(C%)/15*F:NEXT
58870ENDPROC
58880DEFPROCipal63
58890PTR#c%=&38:DIM rpal%(15),gpal%(15),bpal%(15)
58900FORC%=0TO15:D%=BGET#c%
58910rpal%(C%)=BGET#c%>>4 AND 7
58920gpal%(C%)=BGET#c%>>4 AND 3
58930bpal%(C%)=BGET#c%>>4 AND 7
58940D%=FNW:NEXT
58950FORC%=0TO255
58960r%(C%)=(rpal%(C%AND15)OR(C%AND16)>>1)/15*F
58970g%(C%)=(gpal%(C%AND15)OR(C%AND&60)>>3)/15*F
58980b%(C%)=(bpal%(C%AND15)OR(C%AND128)>>4)/15*F
58990NEXT
59000ENDPROC
59010DEFPROCipal(D%)
59020PTR#c%=&38
59030FORC%=0TOD%-1:D%=BGET#c%
59040r%(C%)=(BGET#c%>>4)/15*F
59050g%(C%)=(BGET#c%>>4)/15*F
59060b%(C%)=(BGET#c%>>4)/15*F
59070D%=FNW:NEXT
59080ENDPROC
59090DEF PROCnewropal(D%)
59100PTR#c%=&38
59110FORC%=0TOD%-1:D%=FNW
59120r%(C%)=(D%AND255)/255*F
59130g%(C%)=(D%>>8AND255)/255*F
59140b%(C%)=(D%>>16AND255)/255*F
59150D%=FNW:NEXT
59160ENDPROC
59170DEF PROCnopal
59180FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%()
59190ENDPROC
59200DEF PROCcol(A%,B%)
59210B%=B%<<8ORB%<<4OR&10:pal%!(A%*8)=B%:pal%!(A%*8+4)=B%
59220ENDPROC
59230DEF FNbits(A%)
59240IFA%=1 THEN="1 bit per pixel" ELSE=STR$A%+" bits per pixel"
59250DEF FNfits
59260LOCALZ%,s$
59270FORZ%=1TO80:s$+=CHR$BGET#c%:NEXT
59280=s$
59290DEF FNuc(a$)
59300LOCALZ%,z$,b$
59310FORZ%=1TOLENa$
59320z$=MID$(a$,Z%,1)
59330IFz$>="a"IFz$<="z" z$=CHR$(ASCz$-32)
59340b$+=z$:NEXT
59350=b$
59360DEF FNdim(A%)
59370LOCAL B%
59380IFflex% THEN
59390B%=nextlocation%:A%=A%+3ANDNOT3:nextlocation%+=A%
59400SYS"Wimp_SlotSize",-1,-1 TO currentslot%
59410IFcurrentslot%+&8000<nextlocation% THEN
59420SYS "Wimp_SlotSize",nextlocation%-&8000,-1 TO currentslot%
59430IFcurrentslot%+&8000<nextlocation% ERROR 42,"Can't get enough memory to process image"
59440ENDIF
59450ELSE
59460IFworkspace%<0 THEN
59470DIM B% A%
59480ELSE
59490B%=workspace%:workspace%+=A%+3ANDNOT3:IFworkspace%>worklimit% ERROR42,"Not enough workspace"
59500ENDIF
59510ENDIF
59520=B%
59530DEF FNdimjp(RETURN A%)
59540LOCAL B%
59550IFflex% THEN
59560B%=nextlocation%:A%=A%+3ANDNOT3:nextlocation%+=A%
59570SYS"Wimp_SlotSize",-1,-1 TO currentslot%
59580IFcurrentslot%+&8000<nextlocation% THEN
59590SYS "Wimp_SlotSize",nextlocation%-&8000,-1 TO currentslot%
59600IFcurrentslot%+&8000<nextlocation% A%=currentslot%+&8000-B%
59610ENDIF
59620ELSE
59630IFworkspace%<0 THEN
59640DIM B% A%
59650ELSE
59660B%=workspace%:workspace%+=A%+3ANDNOT3:IFworkspace%>worklimit% ERROR42,"Not enough workspace"
59670ENDIF
59680ENDIF
59690=B%
59710DEF FNW=FNW1(c%)
59720DEF FNW1(c%)=BGET#c% OR BGET#c%<<8 OR BGET#c%<<16 OR BGET#c%<<24
59740DEF FNHW=BGET#c% OR BGET#c%<<8
59760DEF FNbeHW=BGET#c%<<8 OR BGET#c%
59780DEF FNbeW=BGET#c%<<24 OR BGET#c%<<16 OR BGET#c%<<8 OR BGET#c%
59800DEF FNtiff(T%)
59810CASE T% OF
59820WHEN 1,7:=BGET#c%
59830WHEN 2:LOCALs$,t$:REPEATs$+=t$:t$=CHR$BGET#c%:UNTILt$=CHR$0:=s$
59840WHEN 3:IFbigendian THEN=BGET#c%<<8 OR BGET#c% ELSE=BGET#c% OR BGET#c%<<8
59850WHEN 4,9:IFbigendian THEN=FNbeW ELSE=FNW1(c%)
59860WHEN 6:=(BGET#c%<<24)>>24
59870WHEN 8:=(FNtiff(3)<<16)>>16
59880ENDCASE
59890ERROR 42,"Silly TIFF tag:"+STR$T%
59900DEF PROCnextstrip
59910rowstogo%=striprows%
59920stripptr+=1:PTR#c%=st%(stripptr)
59930IFcompression=5 THEN
59940!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
59950!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
59960ENDIF
59970IFcompression=5 OR compression=32773 THEN
59980!incacheptr=datacache%:!numlefttogo=cache%
59990SYS12,4,c%,datacache%,cache%
60000ENDIF
60010ENDPROC
60020DEF PROCwatford(wtsx%,RETURN rep%,RETURN wt%,X%,c%)
60030CALLrlexpand%,wtsx%,rep%,wt%,X%
60040REPEAT C%=BGET#c%:CASE C%>>6 OF
60050WHEN 0:?X%=C%:X%+=1:wt%=C%
60060WHEN 1:wt%-=1:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60070WHEN 2:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60080WHEN 3:wt%+=1:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60090ENDCASE
60100UNTILX%=wtsx%
60110ENDPROC
60120DEF PROCwatfordcache(wtsx%,RETURN rep%,RETURN wt%,X%)
60130CALLrlexpand%,wtsx%,rep%,wt%,X%
60140REPEAT C%=USRbytefromcache%:CASE C%>>6 OF
60150WHEN 0:?X%=C%:X%+=1:wt%=C%
60160WHEN 1:wt%-=1:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60170WHEN 2:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60180WHEN 3:wt%+=1:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60190ENDCASE
60200UNTILX%=wtsx%
60210ENDPROC
60220DEF PROCreduce(RETURN A%,RETURN B%)
60230LOCAL C%,D%:C%=A%:D%=B%
60240REPEAT IFC%<D% SWAP C%,D%
60250C%=C%MODD%
60260UNTILC%=0
60270A%=A%DIVD%:B%=B%DIVD%
60280ENDPROC
60290DEF PROCreadpixelrow(z%())
60300IFrows% THEN
60310rows%-=1:IFsx%=x% THEN
60320W%=EVAL(r$+"(z%())")
60330ELSE
60340W%=EVAL(r$+"(xp%())"):CALLxsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
60350ENDIF
60360ELSE
60370z%()=0
60380ENDIF
60390ENDPROC
60400DEF PROCsharppixelrow(z%())
60410IFrows% THEN
60420rows%-=1:IFsx%=x% THEN
60430IFsharpen% PROCsharp(z%()) ELSEW%=EVAL(r$+"(z%())"):IFequal% PROCfit2(z%())
60440ELSE
60450IFsharpen% PROCsharp(xp%()) ELSEW%=EVAL(r$+"(xp%())"):IFequal% PROCfit2(xp%())
60460CALLxsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
60470ENDIF
60480ELSE
60490z%()=0
60500ENDIF
60510ENDPROC
60520DEF PROCsharp(z%())
60530yread%-=1:IFyread% W%=EVAL(r$+"(rm%())"):IFequal% PROCfit2(rm%())
60540FORB%=0TOcol:rm%(0,B%)=rm%(1,B%):rm%(sx%+1,B%)=rm%(sx%,B%):NEXT
60550CALL sharp%,z%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals2%
60560SWAP rm2%(),rm1%():rm1%()=rm%()
60570ENDPROC
60580DEF PROCscaledpixelrow(z%())
60590IFsy%=y% THEN
60600PROCreadpixelrow(z%())
60610ELSE
60620ysamp%-=1:IFysamp%=0 PROCreadpixelrow(xl%()):ysamp%=ymul%
60630IFydiv%=1 THEN
60640z%()=xl%()
60650ELSE
60660IFysamp%>=ydiv% THEN
60670ysamp%-=ydiv%:z%()=xl%()*ydiv%
60680ELSE
60690LOCALY%:z%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
60700REPEAT
60710IFysamp%=0 PROCreadpixelrow(xl%()):ysamp%=ymul%
60720IFysamp%>Y% THEN
60730ysamp%-=Y%:xl2%()=xl%()*Y%:z%()=z%()+xl2%():Y%=0
60740ELSE
60750Y%-=ysamp%:xl2%()=xl%()*ysamp%:z%()=z%()+xl2%():ysamp%=0
60760ENDIF
60770UNTIL Y%=0
60780ENDIF
60790ysamp%+=1
60800ENDIF
60810ENDIF
60820ENDPROC
60830DEF PROCfit(z%())
60840CALLhistequal%,z%(1,0),new%(0,0),x%
60850ENDPROC
60860DEF PROCfit2(z%())
60870CALLhistequal%,z%(1,0),new%(0,0),sx%
60880ENDPROC
60890DEF PROCadjustpalette(mul,sub)
60900IFmul=1 AND sub=0 ENDPROC
60910FORC%=0TOcolourindex
60920r%(C%)=(r%(C%)-sub)*mul+1:g%(C%)=(g%(C%)-sub)*mul+1:b%(C%)=(b%(C%)-sub)*mul+1
60930NEXT
60940IFham THEN
60950FORC%=0TO15*4STEP4:ltable!C%=(ltable!C%-sub)*mul+1:NEXT
60960ENDIF
60970IFinput>400 THEN
60980FORC%=0TOcolourindex
60990rpal%(C%)=(rpal%(C%)-sub)*mul+1:gpal%(C%)=(gpal%(C%)-sub)*mul+1
61000bpal%(C%)=(bpal%(C%)-sub)*mul+1:table%(C%)=(table%(C%)-sub)*mul+1
61010NEXT
61020ENDIF
61030ENDPROC
61040DEF PROCcachesize(A%)
61050SYS&20023,"ChangeFSI$Cache",A%,-1 TO,,Z
61060IFZ<>0 THEN
61070SYS35,"ChangeFSI$Cache",A%,20 TO,,Z:A%?Z=13:cache%=VAL$A%
61080IFINSTR($A%,"K")ORINSTR($A%,"k") cache%=cache%*1024
61090ELSE
61100cache%=128*1024
61110ENDIF
61120ENDPROC
61130DEF PROCrefill
61140IFstriprows%>0 PROCnextstrip
61150SYS12,4,c%,datacache%,cache%:rowstogo%=cacherows%:buff%=datacache%
61160IFinput=24ORinput=48 IFrbo%>=0 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
61170ENDPROC
61180DEF PROCrefillpcd
61190IFpcdblk%!4>=sy% ENDPROC
61200IFpcdblk%!12>=sy% pcdblk%!12=sy%
61220SYS"PhotoCD_GetBlock",pcdh%,,pcdblk%,datacache%,pcdindex%,,,pcdcache%,pcdcachesize%
61230rowstogo%=cacherows%:buff%=datacache%:pcdblk%!4+=cacherows%:pcdblk%!12+=cacherows%
61240rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
61250ENDPROC
61270DEF FN8(z%())
61280CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),buff%:buff%+=rowbytes%
61290rowstogo%-=1:IFrowstogo%=0 PROCrefill
61300=TRUE
61320DEF FN16(z%())
61330CALLmappix%,z%(1,0),rpal%(0),gpal%(0),r%(0),g%(0),b%(0),buff%,buff%
61340buff%+=rowbytes%:rowstogo%-=1:IFrowstogo%=0 PROCrefill
61350=TRUE
61370DEF FN24(z%())
61380CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
61390rb%+=rowbytes%:gb%+=rowbytes%:bb%+=rowbytes%
61400rowstogo%-=1:IFrowstogo%=0 PROCrefill
61410=TRUE
61430DEF FN300(z%())
61440SYS12,4,cc%,pbuff%,sx%:CALLmappix%,z%(1,0),rpal%(0),gpal%(0),r%(0),g%(0),b%(0),pbuff%,buff%
61450buff%+=rowbytes%:rowstogo%-=1:IFrowstogo%=0 PROCrefill
61460=TRUE
61480DEF FN400(z%())
61490CALLreadline%,plbytes%,rep%,pix%,plbuff%
61500CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
61510=TRUE
61530DEF FN500(z%())
61540CALL LZWdecode%,table%(0),c%,plbuff%,sx%
61550CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
61560=TRUE
61580DEF FN800(z%())
61590PROCwatfordcache(wtsx%,rep%,wt%,plbuff%)
61600CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
61610=TRUE
61630DEF FN801(z%())
61640PROCwatford(wtsx1%,rep1%,wt1%,buff%,c%)
61650PROCwatford(wtsx2%,rep2%,wt2%,wtsx1%,cc%)
61660PROCwatford(wtsx3%,rep3%,wt3%,wtsx2%,ccc%)
61670CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
61680=TRUE
61700DEF FN901(z%())
61710SYS12,4,c%,rb%,sx%:SYS12,4,cc%,gb%,sx%:SYS12,4,ccc%,bb%,sx%
61720CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
61730=TRUE
61750DEF FN902(z%())
61760CALLunpack%,buff%:CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
61770buff%+=rowbytes%:rowstogo%-=1:IFrowstogo%=0 PROCrefill
61780=TRUE
61800DEF FN1000(z%())
61810X%=buff%:IFrep%>0 C%=?pa%:CALLrlexpand%,pasx%,rep%,C%,X%:pa%+=1
61820IFrep2%>0 C%=?pa%:CALLrlexpand%,pasx%,rep2%,C%,X%:pa%+=1
61830REPEAT C%=BGET#c%:IFC%=0 THEN
61840rep%=BGET#c%:C%=?pa%:CALLrlexpand%,pasx%,rep%,C%,X%:IFrep%=0 pa%+=1
61850ELSE
61860rep2%=C%AND15:rep%=C%>>4:IFrep% C%=?pa%:CALLrlexpand%,pasx%,rep%,C%,X%:IFrep%=0 pa%+=1
61870IFX%<pasx% IFrep2% C%=?pa%:CALLrlexpand%,pasx%,rep2%,C%,X%:IFrep2%=0 pa%+=1
61880ENDIF
61890UNTILX%=pasx%
61900CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),buff%
61910=TRUE
61930DEF FN1001(z%())
61940X%=buff%:IFrep%>0 C%=?pa%:CALLrlexpand%,pasx%,rep%,C%,X%:pa%+=1
61950REPEAT rep%=BGET#c%:C%=?pa%:CALLrlexpand%,pasx%,rep%,C%,X%:IFrep%=0 pa%+=1
61960UNTILX%=pasx%:CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),buff%
61970=TRUE
61990DEF FN1100(z%())
62000CALLreadline%,plbytes%,rep%,pix%,plbuff%
62010CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
62020=TRUE
62040DEF FN1400(z%())
62050IFvrep% THEN
62060vrep%-=1
62070ELSE
62080G%=buff%:FORX%=1TOplanes%:G%+=rowbytes%:F%=G%-rowbytes%
62090REPEAT C%=BGET#c%:IFC%=0 THEN
62100C%=BGET#c%:IFC%=0 THEN
62110C%=BGET#c%:vrep%=BGET#c%-1
62120ELSE
62130D%=F%:SYS12,4,c%,F%,patlen%:F%+=patlen%
62140IFC%>1 FORN%=2TOC%:FORE%=0TOpatlen%-1:F%?E%=D%?E%:NEXT:F%+=patlen%:NEXT
62150ENDIF
62160ELSE
62170IFC%=128 THEN
62180C%=BGET#c%:SYS12,4,c%,F%,C%:F%+=C%
62190ELSE
62200?F%=(C%AND&80)<>0:FORE%=F%+1TOF%+(C%AND&7F):?E%=?F%:NEXT:F%+=C%AND&7F
62210ENDIF
62220ENDIF:UNTILF%>=G%:NEXT
62230CALLplancnv%,rowbytes%,buff%,pbuff%
62240ENDIF
62250CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
62260=TRUE
62280DEF FN1501(z%())
62290CALLreadiff%,rowbytes%,plbuff%:rowstogo%-=1:IFrowstogo%=0 PROCnextstrip
62300CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
62310=TRUE
62330DEF FN1505(z%())
62340CALL LZWdecode%,table%(0),c%,plbuff%,rowbytes%
62350rowstogo%-=1:IFrowstogo%=0 PROCnextstrip
62360CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
62370=TRUE
62390DEF FN1515(z%())
62400CALL LZWdecode%,table%(0),c%,plbuff%,rowbytes%
62410rowstogo%-=1:IFrowstogo%=0 PROCnextstrip
62420CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
62430=TRUE
62450DEF FN1600(z%())
62460CALLplancnv%,realrowbytes%,buff%,pbuff%:buff%+=rowbytes%
62470CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
62480rowstogo%-=1:IFrowstogo%=0 PROCrefill
62490=TRUE
62510DEF FN1601(z%())
62520FORX%=0TOplanes%-1:F%=plbuff%+X%*rowbytes%:CALLreadiff%,rowbytes%,F%:NEXT
62530IFmasking% CALLreadiff%,rowbytes%,pbuff%
62540CALLplancnv%,rowbytes%,plbuff%,pbuff%
62550CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
62560=TRUE
62580DEF FN1850(z%())
62590CALLreadiff%,rowbytes%,plbuff%
62600CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
62610=TRUE
62630DEF FN1851(z%())
62640CALLreadiff%,rowbytes%,plbuff%
62650CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
62660=TRUE
62680DEF FN1900(z%())
62690CALLreadline%,plbytes%,rep%,pix%,plbuff%
62700CALLplancnv%,rowbytes%,plbuff%,pbuff%
62710CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
62720=TRUE
62740DEF FN2000(z%())
62750X%=buff%:REPEAT
62760C%=BGET#c%:IFC%<128 THEN
62770C%+=1:SYS12,4,c%,X%,C%:X%+=C%
62780ELSE
62790F%=X%:?F%=BGET#c%:FORC%=C%TO128STEP-1:?X%=?F%:X%+=1:NEXT
62800ENDIF
62810UNTILX%=buff%+rowbytes%
62820CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),buff%
62830=TRUE
62850DEF FN2001(z%())
62860X%=buff%:REPEAT
62870C%=BGET#c%:IFC%<128 THEN
62880C%=(C%+1)*2:SYS12,4,c%,X%,C%:X%+=C%
62890ELSE
62900F%=X%:SYS12,4,c%,X%,2:FORC%=C%TO128STEP-1:!X%=!F%:X%+=2:NEXT
62910ENDIF
62920UNTILX%=buff%+rowbytes%
62930CALLmappix%,z%(1,0),rpal%(0),gpal%(0),r%(0),g%(0),b%(0),buff%,buff%
62940=TRUE
62960DEF FN2002(z%())
62970X%=buff%:REPEAT
62980C%=BGET#c%:IFC%<128 THEN
62990C%=(C%+1)*step24:SYS12,4,c%,X%,C%:X%+=C%
63000ELSE
63010F%=X%:SYS12,4,c%,X%,step24:FORC%=C%TO128STEP-1:!X%=!F%:X%+=step24:NEXT
63020ENDIF
63030UNTILX%=buff%+rowbytes%
63040CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
63050=TRUE
63070DEF FN2250(z%())
63080CALLmappix%,z%(1,0),rpal%(0),r%(0),gpal%(0),g%(0),bpal%(0),b%(0),table%(0),buff%
63090buff%+=rowbytes%:rowstogo%-=1:IFrowstogo%=0 PROCrefill
63100=TRUE
63120DEF FN2300(z%())
63130IFclrfirst% FORX%=0TOsx%-1:rb%?X%=?back%:gb%?X%=back%?1:bb%?X%=back%?2:NEXT
63140IFvrep% THEN
63150vrep%-=1
63160ELSE
63170LOCAL ERROR
63180ON ERROR LOCAL vrep%=-1:CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:=TRUE
63190E%=FALSE:REPEAT C%=BGET#c%:D%=BGET#c%:IFC%AND&40 D%=FNHW
63200CASE C%AND&3f OF
63210WHEN 1:E%=TRUE:vrep%=D%-1:IFvrep%<0 vrep%=FALSE
63220WHEN 2:ccol%=back%?D%:cbuf%=rb%+sx%*D%:IFD%=255 cbuf%=alpha%
63230WHEN 3:FORX%=0TOD%-1:cbuf%?X%=ccol%:NEXT:cbuf%+=D%
63240WHEN 5:SYS12,4,c%,cbuf%,D%+1:cbuf%+=D%+1:IFD%+1AND1 IFBGET#c%
63250WHEN 6:C%=FNHW:FORX%=0TOD%:cbuf%?X%=C%:NEXT:cbuf%+=D%+1
63260ENDCASE
63270UNTILE%
63280ENDIF
63290CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
63300=TRUE
63320DEF FN2401(z%())
63330CALLbm_rle8,rowbytes%,plbuff%
63340CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
63350=TRUE
63370DEF FN2402(z%())
63380CALLbm_rle4,rowbytes%,plbuff%
63390CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
63400=TRUE
63420DEF FN3000(z%())
63430CALLmappix%,z%(1,0),rpal%(0),r%(0),gpal%(0),g%(0),bpal%(0),b%(0),table%(0),buff%
63440buff%+=rowbytes%:rowstogo%-=1:IFrowstogo%=0 PROCrefill
63450=TRUE
63460DEF FN3500(z%())
63470=TRUE
63480DEF FN3600(z%())
63490CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
63500rb%+=rowbytes%:gb%+=rowbytes%:bb%+=rowbytes%
63510rowstogo%-=1:IFrowstogo%=0 PROCrefillpcd
63520=TRUE
63530DEF FN3708(z%())
63540A%=jpegspace%:jpegy%-=1:B%=jpegy%:rb%=USR(jpeg%+4)
63550CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%
63560=TRUE
63570DEF FN3724(z%())
63580A%=jpegspace%:jpegy%-=1:B%=jpegy%:rb%=USR(jpeg%+4):gb%=rb%+1:bb%=rb%+2
63590CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
63600=TRUE
63610DEF PROCrewind
63620rows%=sy%:CASE flag OF
63630WHEN 0:PTR#c%=st%
63640WHEN 100:PTR#c%=4
63650WHEN 200:PTR#c%=st%:rep%=0
63660WHEN 300:PTR#c%=st%:PTR#cc%=stcc%
63670WHEN 400:PTR#c%=st%:rep%=0
63680WHEN 500:FORI%=0TOclearcode%-1:table%(I%)=I%:NEXT:PTR#c%=st%
63690!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
63700!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
63710WHEN 501:buff%=datacache%
63720WHEN 600:PTR#c%=&380
63730WHEN 700:PTR#c%=st%
63740WHEN 800:PTR#c%=0:rep%=0:wt%=0
63750WHEN 801:PTR#c%=0:PTR#cc%=0:PTR#ccc%=0:rep1%=0:wt1%=0:rep2%=0:wt2%=0:rep3%=0:wt3%=0
63760WHEN 900:PTR#c%=0
63770WHEN 901:PTR#c%=0:PTR#cc%=0:PTR#ccc%=0
63780WHEN 902:PTR#c%=st%
63790WHEN 1000:PTR#c%=st%:pa%=ctable%:rep%=0:rep2%=0
63800WHEN 1100:PTR#c%=st%:rep%=0
63810WHEN 1200:PTR#c%=1600
63820WHEN 1300:PTR#c%=0
63830WHEN 1301:PTR#c%=0:PTR#cc%=0:PTR#ccc%=0
63840WHEN 1400:PTR#c%=st%:vrep%=0
63850WHEN 1500:PTR#c%=st%(0):rowstogo%=striprows%:stripptr=0
63860IFcompression=5 THEN
63870!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
63880!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
63890ENDIF
63900WHEN 1600:PTR#c%=st%
63910WHEN 1700:PTR#c%=16
63920WHEN 1800,1850:PTR#c%=st%
63930WHEN 1900:PTR#c%=128:rep%=-1
63940WHEN 2000:PTR#c%=st%
63950WHEN 2100:PTR#c%=7
63960WHEN 2200:PTR#c%=st%
63970WHEN 2250:PTR#c%=st%
63980WHEN 2300:PTR#c%=st%:vrep%=0
63990WHEN 2400:PTR#c%=st%
64000WHEN 2500:PTR#c%=st%
64010WHEN 2600:PTR#c%=st%
64020WHEN 2700:PTR#c%=st%
64030WHEN 2800:PTR#c%=st%
64040WHEN 2900:PTR#c%=st%
64050WHEN 3000:PTR#c%=0
64060WHEN 3600:pcdblk%!4=0
64070WHEN 3700:jpegy%=sy%
64080WHEN 3900,3905:PTR#c%=st%
64090ENDCASE
64100IFcache% THEN
64110IFflag=3600 THEN
64120pcdblk%!12=cacherows%:PROCrefillpcd:IFcache%>=filesize% rowstogo%=-1
64130ELSE
64140IFcache%<filesize% SYS12,4,c%,datacache%,cache%:rowstogo%=cacherows%
64150ENDIF
64160buff%=datacache%
64170IFcachebytes% !incacheptr=datacache%:!numlefttogo=cache%
64180IFinput=24ORinput=48 IFrbo%>=0 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
64190ENDIF
64200IFflag=1500 IFcompression=5 rowstogo%=striprows%
64210ENDPROC
64230DEF PROCAssemble_Shell
64240FORI%=0TO2STEP2
64250P%=code%
64260[ OPT I%
64270.Shell_Call
64280MOV   R9,R0
64290MOV R0,#0:MOV R1,#0:MOV R2,#0:MOV R3,#2:MOV R4,#0:MOV R5,#0:MOV R6,#0:MOV R7,#0
64300SWI   "OS_SetEnv"
64310STMFD R13!,{R0-R7, R12}
64320MOV   R0,#0:MOV R1,#0:MOV R2,#0:MOV R3,#0
64330SWI   "OS_Control"
64340STMFD R13!,{R0-R3}
64350MOV   R0,#&10:MOV R1,#0:MOV R2,#0
64360SWI   "XOS_ChangeEnvironment"
64370STMFD R13!,{R1,R2}
64380LDR   R3,[R14,#28]
64390LDR   R3,[R8,R3]
64400STMFD R13!,{R3,R9,R14}
64410SUB   R9,R13,#1024
64420MOV   R5,R9
64430ADR   R6,Shell_Job:ADR   R4,Shell_Job_End
64440.Shell_Copy
64450LDR   R2,[R6],#4
64460STR   R2,[R5],#4
64470CMP   R6,R4
64480BCC   Shell_Copy
64490MOV   PC,R9
64500.Shell_Job
64510LDR   R2,[R3,#-4]!
64520STR   R2,[R9,#-4]!
64530CMP   R3,#&8000
64540BHI   Shell_Job
64550STMFD R13!,{R9}
64560ADR   R0,Shell_Exit
64570MOV   R1,R9:MOV R2,#0:MOV R3,#2:MOV R4,#0:MOV R5,#0:MOV R6,#0:MOV R7,#0
64580SWI   "OS_SetEnv"
64590ADR   R0,Shell_Error
64600ADR   R1,Shell_Buffer
64610MOV   R2,#0:MOV R3,#0
64620SWI   "OS_Control"
64630MOV   R0,#&10
64640ADR   R1,Shell_UpCall
64650MVN   R2,#0
64660SWI   "XOS_ChangeEnvironment"
64670STR   R13,Shell_Job_End
64680LDR   R0,[R13,#4*2]
64690ADD   R0,R0,R9
64700SUB   R0,R0,#&8000
64710SWI   "OS_CLI"
64720.Shell_Exit
64730MOV   r0, #0
64740.Shell_Common
64750STR   r0, Shell_ErrorWord
64760LDR   R13,Shell_Job_End
64770LDMFD R13!,{R8,R9,R10,R14}
64780LDMFD R13!,{R1-R2}
64790MOV   R0,#&10
64800SWI   "OS_ChangeEnvironment"
64810LDMFD R13!,{R0-R3}
64820SWI   "OS_Control"
64830LDMFD R13!,{R0-R7, R12}
64840SWI   "OS_SetEnv"
64850MOV   R1,#&8000
64860.Shell_Restore
64870LDR   R2,[R8],#4
64880STR   R2,[R1],#4
64890CMP   R1,R9
64900BCC   Shell_Restore
64910LDR   R0,Shell_ErrorWord
64920TEQ   R0,#0
64930BICEQS PC,R14,#&10000000
64940ORRNES PC,R14,#&10000000
64950.Shell_UpCall
64960MOV   PC,R14
64970.Shell_Error
64980ADR   r0, Shell_Buffer + 4
64990B     Shell_Common
65000.Shell_Buffer
65010EQUD 0
65020EQUD &12345678
65030EQUS STRING$(128,CHR$13)
65040EQUS STRING$(128,CHR$13)
65050.Shell_ErrorWord
65060EQUD 0
65070.Shell_Job_End
65080EQUD 0
65090]
65100NEXT
65110A%=Shell_Job_End+4
65120ENDPROC
65140DEF PROCsubtask(a$)
65150IF task% THEN
65160SYS"Wimp_StartTask",a$
65170ELSE
65190DIM code% 1024
65200PROCAssemble_Shell
65210$A%=a$:CALLShell_Call
65220ENDIF
65230ENDPROC

� > ChangeFSI
�areanumber%=0
�ș"OS_GetEnv" � A$
� task%=�A$," -wimp"):�task% �
�� z%(1),p%(3),s%(3),m$(30)
�"A%=�"<ChangeFSI$Dir>.Messages"
�(B%=-1:� B%+=1:m$(B%)=�#A%:��#A%:�#A%
�startfile%=�A$,6)<>"-wimp "
�� taskid%4:$taskid%="TASK"
�7ș "Wimp_Initialise",200,!taskid%,m$(20) � version%
�� version%>=350 �
�3ș"OS_Memory",8+(2<<8) � ,r1,r2:vramsize%=r1*r2
�"� vramsize%>0 vram%=� �vram%=�
�
vram%=�
�
"Wimp    = (1<<18) + (3<<6)
,HCreateW = Wimp+1:OpenW   = Wimp+5 :CloseW  = Wimp+6:RedrawW = Wimp+8
6IUpdateW = Wimp+9:GetR%   = Wimp+10:GetW    = Wimp+11:SetI   = Wimp+13
@IGetI    = Wimp+14:GetP   = Wimp+15:Drag    = Wimp+16:CrMenu = Wimp+20
JDcMenu  = Wimp+21
T8ș "OS_SWINumberFromString",,"Wimp_PollIdle" � Poll%
^8ș "OS_SWINumberFromString",,"XOS_SpriteOp" � spopx%
h6ș "OS_SWINumberFromString",,"OS_SpriteOp" � spop%
r?ș "OS_SWINumberFromString",,"OS_ReadMonotonicTime" � Time%
|Jș "OS_SWINumberFromString",,"ColourTrans_ReturnColourNumber" � ctran%
�Dș "OS_SWINumberFromString",,"Wimp_SetCaretPosition" � Caretpos%
�Dș "OS_SWINumberFromString",,"Wimp_GetCaretPosition" � Getcaret%
�Sș "XOS_SWINumberFromString",,"DragASprite_Start" � dstart%;f%:�f%� 1 dstart%=0
�Wș "XOS_SWINumberFromString",,"JPEG_PlotScaled" � jpegpaint%;f%:�f%� 1 jpegpaint%=0
�3ș "OS_Byte",161,&1C � ,,f%:�(f%�2)=0 dstart%=0
�nextlocation%=�
�,ș "Wimp_SlotSize",-1,-1 � originalslot%
��locale_initialise
�� version%>=300 �
�Y� q% 255,ifactors% 15,factors% 15,pixtrans% 255,paltemp% 1023,buffer% 255,idata% 1023
��
�a� z% 1699,q% 255,ifactors% 15,factors% 15,pixtrans% 255,paltemp% 1023,buffer% 255,idata% 2399
eidata%=idata%+2400
�
&2scrap%=�:sprite%=�:sar%=�:saved%=�:z$=�12,�13)
:ș "OS_Byte",161,&8C � ,,f%
D
�f% � 1 �
N7ș"Wimp_OpenTemplate",,"<ChangeFSI$Dir>.3dTemplate"
X�
b6ș"Wimp_OpenTemplate",,"<ChangeFSI$Dir>.Templates"
l�
�� �
�6� � ș"Wimp_CloseTemplate":� 0,�$+" (code "+Þ+")"
��version%>=300 �
�name=q%
�$$name="*":here%=0:largest_tem%=0
�;ș "Wimp_LoadTemplate", ,0,,,,name,0 � ,size%,,,,,here%
�ȕ here%
�+� largest_tem%<size% largest_tem%=size%
�
$name="*"
�?ș "Wimp_LoadTemplate", ,0,,,,name,here% � ,size%,,,,,here%
��
� z% largest_tem%
�
 �dotemplate("Info")
*4ș CreateW,,z% � infow%:$!(z%+88+7*32+20)=m$(21)
>�dotemplate("Processing")
Hș CreateW,,z% � proc%
Rap%(0)=!(z%+88+8*32+20):p%(1)=!(z%+88+9*32+20):p%(2)=!(z%+88+10*32+20):p%(3)=!(z%+88+12*32+20)
f�dotemplate("Output")
pkș CreateW,,z% � output%:admode%=!(z%+88+20*32+20):adspcl%=!(z%+88+19*32+20):oldmode%=!(z%+88+34*32+20)
��dotemplate("Scaling")
�6ș CreateW,,z% � scalew%:adscale%=!(z%+88+1*32+20)
�cs%(0)=!(z%+88+10*32+20):s%(1)=!(z%+88+11*32+20):s%(2)=!(z%+88+12*32+20):s%(3)=!(z%+88+13*32+20)
��dotemplate("Save")
�Rș CreateW,,z% � save%:adsave%=!(z%+88+1*32+20):adsavesprite%=!(z%+88+0*32+20)
��dotemplate("Sprite")
�Pș CreateW,,z% � sinfo%:adsname%=!(z%+88+5*32+20):adsbytes%=!(z%+88+8*32+20)
�Hadsx%=!(z%+88+7*32+20):adsy%=!(z%+88+9*32+20):adsm%=!(z%+88+6*32+20)
��dotemplate("Source")
�5ș CreateW,,z% � srcinfo%:adsrc%=!(z%+88+0*32+20)
�dotemplate("Range")
5ș CreateW,,z% � raninfo%:adran%=!(z%+88+0*32+20)
.�dotemplate("Zoom")
8Hș CreateW,,z% � zoom%:z%(0)=!(z%+88+4*32+20):z%(1)=!(z%+88+5*32+20)
L�dotemplate("JPEGOutput")
V5ș CreateW,,z% � jpego%:adjpegq%=!(z%+88+5*32+20)
j�dotemplate("Pic")
t(ș CreateW,,z% � pic%:adtitle%=z%!72
�� �
�ș"Wimp_CloseTemplate"
�@!q%=-1:q%!4=0:q%!8=0:q%!12=68:q%!16=68:q%!20=%11000000000010
�:$(q%+24)="!"+m$(20):ș"Wimp_CreateIcon",,q% � iconbar%
�)A%=�"<ChangeFSI$Dir>.Choices":�A%=0 �
�]fast%=�:dest%=1:statescale%=%10000000100:stateproc%=0:stateoutput%=&4052008:statejpeg%=&2
�N$p%(0)="":$p%(1)="2"+decimal_point$+"2":$p%(2)="24":$p%(3)="4":$adspcl%=""
�=$admode%="28":$s%(0)="1":$s%(1)="4":$s%(2)="1":$s%(3)="4"
�$adjpegq%="75":$oldmode%=""
��
�W�#A%,fast%,dest%,statescale%,stateproc%,stateoutput%,statejpeg%,$adjpegq%,$oldmode%
�6�#A%,$p%(0),$p%(1),$p%(2),$p%(3),$admode%,$adspcl%
5$p%(1)=�locale_convert($p%(1),".",decimal_point$)

$�#A%,$s%(0),$s%(1),$s%(2),$s%(3)
�#A%
�
(q%!12=1<<21
2=!q%=scalew%:�I%=0�9:�statescale%>>I%�1 q%!8=1<<21 �q%!8=0
<q%!4=I%:ș SetI,,q%:�
F3�I%=10�13:�statescale%>>I%�1 q%!8=1<<21 �q%!8=0
Pq%!4=I%+6:ș SetI,,q%:�
Z:!q%=proc%:�I%=0�7:�stateproc%>>I%�1 q%!8=1<<21 �q%!8=0
dq%!4=I%:ș SetI,,q%:�
n?!q%=output%:�I%=0�26:�stateoutput%>>I%�1 q%!8=1<<21 �q%!8=0
xq%!4=I%:ș SetI,,q%:�
�;!q%=jpego%:�I%=0�3:�statejpeg%>>I%�1 q%!8=1<<21 �q%!8=0
�q%!4=I%:ș SetI,,q%:�
�*�stateoutput%>>17�1 q%!8=1<<22 �q%!8=0
�i!q%=output%:q%!12=1<<22:q%!4=7:ș SetI,,q%:q%!4=8:ș SetI,,q%:q%!4=13:ș SetI,,q%:q%!4=14:ș SetI,,q%
�)�showscaletofit:$z%(0)="1":$z%(1)="1"
� ș "OS_UpdateMEMC" � oldmemc
�jpegsave%=�
�>� � ș"OS_UpdateMEMC",oldmemc,&700:�errorbox:ș CrMenu,,-1
�ș Drag,,-1
�1�sprite% ș "Wimp_SlotSize",originalslot%,-1
�BF$="":�startfile% startfile%=�:F$=�A$,�A$,"-wimp")+6):�callFSI
��
�ș Poll%,1,q% � A%
Ȏ A% �
%� 1 :�sprite% �redraw_window(!q%)
B� 2 :�open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
"2� 3 :ș &400c3,,q%:nextlocation%=�:�removearea
,:ș "Wimp_SlotSize",originalslot%,-1:saved%=�:sprite%=�
65� 6 :�checkmouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20)
@F� 7 :ș GetP,,q%:dw%=q%!12:di%=q%!16:�dstart% ș"DragASprite_Stop"
JJq%!12=0:q%!16=1:q%!20=dw%:q%!24=di%:q%!28=!q%:q%!32=q%!4:q%!36=!sar%+3
T&�jpegsave% �q%!40=&c85 �q%!40=&ff9
^.temp$=�ZS(adsave%):foo%=�temp$,"."):ȕfoo%
h)temp$=�temp$,foo%+1):foo%=�temp$,".")
r�
|,$(q%+44)=temp$+�0:!q%=44+(�temp$+1+3��3)
�3ș "Wimp_SendMessage",17,q%,dw%,di%:myref%=q%!8
�� 8 :�key(!q%,q%!4,q%!24)
�� 9 :�menuselect(q%)
�� 17,18:�receive(q%)
��
�� �
��
�Q%=�
��=&4000000
�S� � � � �:�"Set ChangeFSI$ReturnCode "+�$+" (code "+Þ+")":�removearea:�:�=Q%:�
�1foo%=0:A%=�ChangeFSI(A$,-1,-1,0,-1,-1,foo%,�)
�+�removearea:*unset ChangeFSI$ReturnCode
�
�:�=Q%
�
�
&� �dotemplate(a$)
0� A%
:�version%>300 �
D5ș "Wimp_LoadTemplate",,0,,,,a$+z$,0 � ,,indsize%
N� A% indsize%
X7ș"Wimp_LoadTemplate",,z%,A%,A%+indsize%,-1,a$+z$,0
b�
lBș"Wimp_LoadTemplate",,z%,idata%,eidata%,-1,a$+z$,0 � ,,idata%
v�
��
�� �locale_initialise
�� p%
�� �
�� � � decimal_point$=".":�
�(ș "Territory_ReadSymbols",-1,0 � p%
�decimal_point$=�?p%
��
�� �locale_convert(n$,f$,t$)
�� f$=t$ �=n$
�� i%
i%=�n$,f$)
$� i%<>0 �=�n$,i%-1)+t$+�n$,i%+1)
=n$
*� �receive(q%)
4Ȏ q%!16 �
>)� 0:�removearea:ș "Wimp_CloseDown":�
H� 1:�q%!20<>save% �
RA!q%=60:q%!12=q%!8:q%!16=2:q%!36=-1:$(q%+44)="<Wimp$Scrap>"+�0
\/ș"Wimp_SendMessage",17,q%,q%!4:scrap%=q%!8
f�
p� 2:�jpegsave% �
z7ș"OS_File",10,�ZS(q%+44),&c85,,sar%,sar%+jpegsize%
��
� șspop%,&10C,sar%,�ZS(q%+44)
��
�$adsave%=�ZS(q%+44)
�7q%!12=q%!8:q%!16=3:ș "Wimp_SendMessage",18,q%,q%!4
�� q%!36<>-1 saved%=�
�ș CrMenu,,-1
�1� 3:F$=�ZS(q%+44):�scrap% scrap%=scrap%=q%!12
�6q%!12=q%!8:q%!16=4:ș"Wimp_SendMessage",17,q%,q%!4
��callFSI
�� 5:Ȏ q%!40 �
�� &ff0,&c85
�6q%!12=q%!8:q%!16=4:ș"Wimp_SendMessage",17,q%,q%!4
	F$=�ZS(q%+44):�callFSI
	�
	� 8:�saved%��sprite% �
	$-!buffer%=�:$(buffer%+4)=m$(2)+F$+m$(3)+�0
	.4ș"Wimp_ReportError",buffer%,%10111,m$(20) � ,A%
	82q%!12=q%!8:�A%<>1 ș"Wimp_SendMessage",19,q%,0
	BB�9,&400C1:�sprite% �getmodeinfo:ș&400d1,pic%,0,-32767,32767,0
	L�showscaletofit
	VH� 10:ș"XOS_ReadVarVal","ChangeFSI$Dir",paltemp%,256,0,3 �,,bootlen%
	`paltemp%?bootlen%=13
	j�#q%!20,"Run "+$paltemp%
	t�
	~�
	�� �callFSI
	�� �checkvalues ��
	�A$=�deducemode:A%=47
	�jpegsave%=�:�dest%=0 �
	�@jpegsave%=�:A$="JPEG":�geticonstate(jpego%,2) A$="JPEGMONO"
	�A$+=$adjpegq%
	��
	� �geticonstate(output%,15) �
	�A$+=$adspcl%
	��
	� �geticonstate(output%,16) �
?�geticonstate(output%,5)��geticonstate(output%,11) A$+="R"

�
ș53,�A$,3 �,,A%
�A%=63 �
(&�geticonstate(output%,6) A$="27t"
2'�geticonstate(output%,12) A$="12t"
<�
F�A%=255 A$+="d"
P�
Z�
d�
n�
x/A$="garbage "+F$+" <ChangeFSI$Dir>.Foo "+A$
��ChangeFSISuffix
�%info$="":range$=m$(19):cputime%=0
�6�sprite% !q%=pic%:ș &400c3,,q%:saved%=�:sprite%=�
�nextlocation%=�
�3ș "Wimp_SlotSize",originalslot%,-1:�removearea
�1�fast% ș "OS_UpdateMEMC",&300,&700 � oldmemc
�4A%=�ChangeFSI(A$,-1,-1,nextlocation%,0,0,sar%,0)
�*�fast% ș "OS_UpdateMEMC",oldmemc,&700
�%�scrap% scrap%=�:ș"OS_File",6,F$
��A%<2 � sar%<>0 �
�*$adsx%=�xsp%:$adsy%=�ysp%:�jpegsave% �
�"$adsm%="JPEG":$adsname%="JPEG"
�$adsbytes%=�jpegsize%
x=xsp%*2:y=ysp%*2
%ș&35,-1,4 �,,nx:ș&35,-1,5 �,,ny
=!ifactors%=1:ifactors%!4=1:ifactors%!8=nx:ifactors%!12=ny
"$adsavesprite%="file_c85"
,%� �F$,7)="<Wimp$S" F$="JPEGImage"
6�
@'ș spopx%,&10d,sar%,pixtrans%,255,1
J7n$=�ZS(pixtrans%):ș spopx%,&128,sar%,n$ �,,,x,y,,m
T$adsm%=�m:$adsname%=n$
^$adsbytes%=�sar%!12
hș&35,m,4 �,,nx:x=x<<nx
r(ș&35,m,5 �,,ny:y=y<<ny:�getmodeinfo
|$adsavesprite%="file_ff9"
�&� �F$,7)="<Wimp$S" F$="SpriteFile"
��
�/!q%=save%:q%!4=0:q%!8=0:q%!12=0:ș SetI,,q%
�c$adran%=range$:$adsrc%=info$+m$(0)+�(cputime%�100)+decimal_point$+�"0"+�(cputime%�100),2)+m$(1)
�saved%=�:sprite%=�
�'A%=�F$:ȕ�"."+F$,A%,1)<>".":A%-=1:�
�$adsave%=�"."+F$,A%+1)
�pic%=�create_window(x,y,F$)
��popup(pic%,-1)
�
�
&� �checkvalues
0� e,error$,flag%
D � dest%=0 � �$adjpegq%>100 �
N1e=1:error$=m$(22)+m$(25)+m$(23)+m$(27)+m$(24)
X�
l"� �$admode%,1)<"A" � dest%=1 �
vș &35,�$admode%,0 � ;flag%
�� �$admode%=0 flag%=2
�+� �$admode%>127 � �$admode%<256 flag%=2
�� (flag%�2)>0 �
�1e=2:error$=m$(22)+m$(26)+m$(23)+m$(13)+m$(24)
��
��
�	� e �
�1ș Drag,,-1:!buffer%=e:$(buffer%+4)=error$+�0
�2ș "Wimp_ReportError",buffer%,%01,m$(20) � ,A%
�+�A%=2 �removearea:ș "Wimp_CloseDown":�
��
�=e

� �ChangeFSISuffix

safe%=�

 F�geticonstate(scalew%,1) A$+=" "+�tofitx+": "+�tofity+":":safe%=�

*0�geticonstate(scalew%,5) A$+=" 1:2":safe%=�

44�geticonstate(scalew%,4) A$+=" 1:2 1:1":safe%=�

>4�geticonstate(scalew%,3) A$+=" 1:1 1:2":safe%=�

H�geticonstate(scalew%,9) �

Rsafe%=�

\%�$s%(0) A$+=" "+$s%(0) �A$+=" 1"

fA$+=":"+$s%(1)

p%�$s%(2) A$+=" "+$s%(2) �A$+=" 1"

zA$+=":"+$s%(3)

��

�,�geticonstate(scalew%,0) A$+=" -nosize"

�.�geticonstate(scalew%,18) A$+=" -noscale"

�+�geticonstate(scalew%,19) A$+=" -lock"

��geticonstate(scalew%,6) �

�Fsafe%=�:�geticonstate(scalew%,16) A$+=" -rotate" �A$+=" -rotate-"

��

�3�geticonstate(scalew%,7) A$+=" -hflip":safe%=�

�3�geticonstate(scalew%,8) A$+=" -vflip":safe%=�

�1�geticonstate(proc%,0) A$+=" -range":safe%=�

�1�geticonstate(proc%,1) A$+=" -equal":safe%=�

�,�geticonstate(proc%,2) A$+=" -nodither"

�2�geticonstate(proc%,3) A$+=" -invert":safe%=�
,�geticonstate(proc%,4) A$+=" -brighten"
0�geticonstate(proc%,5) A$+=" -black"+$p%(0)
\�geticonstate(proc%,6) A$+=" -gamma"+�locale_convert($p%(1),decimal_point$,"."):safe%=�
$:�geticonstate(proc%,7) A$+=" -sharpen"+$p%(2):safe%=�
.2�geticonstate(proc%,11) A$+=" -smooth"+$p%(3)
8�
L� �checkandfinish
V7�saved% ��sprite% �removearea:ș "Wimp_CloseDown":�
`-!buffer%=�:$(buffer%+4)=m$(2)+F$+m$(3)+�0
j5ș "Wimp_ReportError",buffer%,%10111,m$(20) � ,A%
t+�A%=1 �removearea:ș "Wimp_CloseDown":�
~�
�� �key(handle%,icon%,key%)
��key%=&1b ș CrMenu,,-1:�
�Ȏ handle% �
�� zoom%:Ȏ key% �
�C� 13:�dozoom(icon%-4,0):�icon%=4 ș &400d2,zoom%,5,,,-1,�$z%(0)
��icon%=5 ș CrMenu,,-1
��
�"� &18e,&18f:�dozoom(icon%-4,0)
�0ș &400d2,zoom%,icon%�1,,,-1,�$z%(icon%�5):�
��
�� save%
�key%=13 �savesprite:�


� output%
p� icon%=34 � �geticonstate(output%, 24) �$admode% = $oldmode%:!q%=output%:q%!4=20:q%!8=0:q%!12=0:ș SetI,,q%
�showscaletofit
(�key%=13 ș CrMenu,,-1:�
2�key%=&18e �
<Ȏ icon% �
F� 19:icon%=34:key%=oldmode%
P� 34:icon%=22:key%=adjpegq%
Z� 22:icon%=19:key%=adspcl%
d�
n�
x�key%=&18f �
�Ȏ icon% �
�� 22:icon%=34:key%=oldmode%
�� 34:icon%=19:key%=adspcl%
�� 19:icon%=22:key%=adjpegq%
��
��
�4�key%>1024 ș &400d2,output%,icon%,,,-1,�$key%:�
�� proc%:Ȏ key% �
�A� &18e,13:icon%+=1:�icon%>10 icon%=8:�key%=13 ș CrMenu,,-1:�
�.ș &400d2,proc%,icon%,,,-1,�$p%(icon%-8):�
�%� &18f:icon%-=1:�icon%<8 icon%=10
�.ș &400d2,proc%,icon%,,,-1,�$p%(icon%-8):�
��
� scalew%:Ȏ key% �
B� &18e,13:icon%+=1:�icon%>13 icon%=10:�key%=13 ș CrMenu,,-1:�
1ș &400d2,scalew%,icon%,,,-1,�$s%(icon%-10):�
"&� &18f:icon%-=1:�icon%<10 icon%=13
,1ș &400d2,scalew%,icon%,,,-1,�$s%(icon%-10):�
6�
@�
Jș "Wimp_ProcessKey",key%
T�
h� �savesprite
r� F$=$adsave% �
|1ș Drag,,-1:!buffer%=3:$(buffer%+4)=m$(28)+�0
�2ș "Wimp_ReportError",buffer%,%11,m$(20) � ,A%
��A%=2 �
�ș CrMenu,,-1
��
��
��
��jpegsave% �
�5ș"OS_File",10,$adsave%,&c85,,sar%,sar%+jpegsize%
��
�ș spop%,&10C,sar%,$adsave%
��
�ș CrMenu,,-1
��
7� �checkmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
� moved%:moved%=�
&�b%�2 �
0Ȏ handle% �
:|� pic%:�domenu(pic%,m$(4)+">sinfo%,"+m$(5)+">srcinfo%,"+m$(6)+">raninfo%,"+m$(7)+">zoom%,"+m$(8)+">save%,"+m$(9),m$(20))
D�� -2:�domenu(101,m$(10)+">infow%,"+m$(11)+">scalew%,"+m$(12)+">proc%,"+m$(13)+">output%:dest%,"+m$(27)+">jpego%:1-dest%,"+m$(9)+","+m$(14)+":fast%AND1,"+m$(15)+","+m$(16),m$(20))
N�
Xrmenuhandle%=handle%
b�
l�b%�4 �
vȎ handle% �
�� zoom%:Ȏ icon% �
�� 0:�dozoom(0,1)
�� 1:�dozoom(0,-1)
�� 2:�dozoom(1,1)
�� 3:�dozoom(1,-1)
��
��
��
��b%�1 �
�Ȏ handle% �
�� zoom%:Ȏ icon% �
�� 0:�dozoom(0,-1)
�� 1:�dozoom(0,1)
� 2:�dozoom(1,-1)
� 3:�dozoom(1,1)
�
 �
*�
4�b%�5 �
>Ȏ handle% �
H�� output%:� dest%=0 dest%=1:�domenu(101,m$(10)+">infow%,"+m$(11)+">scalew%,"+m$(12)+">proc%,"+m$(13)+">output%:dest%,"+m$(27)+">jpego%:1-dest%,"+m$(9)+","+m$(14)+":fast%AND1,"+m$(15)+","+m$(16),m$(20)):ș Getcaret%,,q%:moved%=�
RȎ icon% �
\n� 3,4,5,6:�killcurrent(�(22+icon%)):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
fh� 7:�killcurrent("S16,90,90"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
ph� 8:�killcurrent("S32,90,90"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
z`� 9:�killcurrent("0"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
�a� 10:�killcurrent("8"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
�b� 11:�killcurrent("12"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
�b� 12:�killcurrent("15"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
�i� 13:�killcurrent("S16,90,45"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
�i� 14:�killcurrent("S32,90,45"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
��� 15:�killcurrent(�deducemode):ș SetI,,q%:ș Caretpos%,output%,19,,,-1,�($adspcl%):!q%=output%:q%!4=7:q%!8=0:q%!12=1<<22:ș SetI,,q%:q%!4=8:ș SetI,,q%:q%!4=13:ș SetI,,q%:q%!4=14:ș SetI,,q%
��� 16:�killcurrent(�deducemode):!q%=output%:q%!4=7:q%!8=0:q%!12=1<<22:ș SetI,,q%:q%!4=8:ș SetI,,q%:q%!4=13:ș SetI,,q%:q%!4=14:ș SetI,,q%
ʓ� 17:�killcurrent(�deducemode):!q%=output%:q%!4=7:q%!8=1<<22:q%!12=1<<22:ș SetI,,q%:q%!4=8:ș SetI,,q%:q%!4=13:ș SetI,,q%:q%!4=14:ș SetI,,q%
�� �$admode%,1) = "S" �
�� �$admode%,2) = "45" �
�]�killcurrent("15"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
��
�]�killcurrent("28"):!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:q%!4=24:ș SetI,,q%
�
�
;� 18:!q%=output%:q%!4=24:q%!8=0:q%!12=1<<21:ș SetI,,q%
$� 24:!q%=output%:q%!4=18:q%!8=0:q%!12=1<<21:ș SetI,,q%:�killcurrent(�deducemode):ș Caretpos%,output%,34,,,-1,�($oldmode%)
.B� 34:� moved% ș Caretpos%,output%,q%!4,q%!8,q%!12,q%!16,q%!20
8B� 19:� moved% ș Caretpos%,output%,q%!4,q%!8,q%!12,q%!16,q%!20
B�
L3�geticonstate(output%,18) $admode%=�deducemode
V2!q%=output%:q%!4=20:q%!8=0:q%!12=0:ș SetI,,q%
`�showscaletofit
j� save%:Ȏ icon% �
t� 2:�savesprite
~�
�M� -2:�sprite% �getw(pic%):�open_window(pic%,x0%,y0%,x1%,y1%,scx%,scy%,-1)
�� jpego%:� dest%=1 �
�ș Getcaret%,,q%
��dest%=0:�domenu(101,m$(10)+">infow%,"+m$(11)+">scalew%,"+m$(12)+">proc%,"+m$(13)+">output%:dest%,"+m$(27)+">jpego%:1-dest%,"+m$(9)+","+m$(14)+":fast%AND1,"+m$(15)+","+m$(16),m$(20))
�=� icon%=5 ș Caretpos%,jpego%,q%!4,q%!8,q%!12,q%!16,q%!20
��
�Ȏ icon% �
�D� 3:� b%�4 �$adjpegq%=�(�$adjpegq%-1) �$adjpegq%=�(�$adjpegq%+1)
� � �$adjpegq%<0 $adjpegq%="0"
�$� �$adjpegq%>100 $adjpegq%="100"
�0!q%=jpego%:q%!4=5:q%!8=0:q%!12=0:ș SetI,,q%
�)ș Caretpos%,jpego%,5,,,-1,�$adjpegq%
D� 4:� b%�4 �$adjpegq%=�(�$adjpegq%+1) �$adjpegq%=�(�$adjpegq%-1)

 � �$adjpegq%<0 $adjpegq%="0"
$� �$adjpegq%>100 $adjpegq%="100"
0!q%=jpego%:q%!4=5:q%!8=0:q%!12=0:ș SetI,,q%
()ș Caretpos%,jpego%,5,,,-1,�$adjpegq%
2� 5
<�
F�
P�
Z
�b%�&50 �
dȎ handle% �
n� save%:Ȏ icon% �
x� 0:�getw(save%)
� !q%=save%:q%!4=0:ș GetI,,q%
�?!q%=save%:q%!4=5:q%!8+=bx%:q%!12+=by%:q%!16+=bx%:q%!20+=by%
�3q%!24=0:q%!28=0:q%!32=&7FFFFFFF:q%!36=&7FFFFFFF
�*t$="file_ff9":�jpegsave% t$="file_c85"
�H�dstart% ș dstart%,%11000101,1,t$,q%+8,q%+24 �ș "Wimp_DragBox",,q%
��
��
��
��
�� �dozoom(s%,a%)
��s%=0 �
�/$z%(0)=�(�$z%(0)+a%):�$z%(0)="0" $z%(0)="1"
�
/$z%(1)=�(�$z%(1)+a%):�$z%(1)="0" $z%(1)="1"
�
"2!q%=zoom%:q%!4=4+s%:q%!8=0:q%!12=0:ș SetI,,q%
,/!q%=pic%:ș GetW,,q%:f%=q%!28:ș &400c3,,q%
6pic%=�create_window(x,y,F$)
@�popup(pic%,f%)
J�
^'� �domenu(handle%,menu$,menutitle$)
hmenuhandle%=handle%
r%menuptr%=buffer%:indirect%=idata%
|i%=0
�menuptr%!20=44
�$menuptr%=menutitle$
�;menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0
�!menuptr%!16=200:menuptr%!24=0
�menuptr%+=28
�%� i1%=i%+1:i%=�menu$+",",",",i1%)
�8item$=�menu$,i1%,i%-i1%):�menuitem(item$):� item$=""
�#menuptr%!-24=(menuptr%!-24)�&80
�`�handle%=101 ș CrMenu,,buffer%,mousex%-64,96+9*44 �ș CrMenu,,buffer%,mousex%-32,mousey%+16
��
�� �menuitem(text$)
�� text$="" �
*flg%=0:submenu%=-1:I%=�text$,":"):�I%�
)flg%=��text$,I%+1):text$=�text$,I%-1)
�
&I%=�text$,">"):�I%�
0-submenu%=��text$,I%+1):text$=�text$,I%-1)
:�
Dmenuptr%!0=flg%
Nmenuptr%!4=submenu%
XV�(text$=m$(9)�(F$="" � F$="SpriteFile" � F$="JPEGImage")) � (text$=m$(14)�vram%) �
bmenuptr%!8=&07400021
l�
vmenuptr%!8=&07000021
��
�2�text$*16+8>buffer%!16 buffer%!16=�text$*16+8
��text$>12 �
�Bmenuptr%!8=menuptr%!8 � 256:menuptr%!20=�text$+1:menuptr%!16=0
�>menuptr%!12=indirect%:$indirect%=text$:indirect%+=�text$+2
��
�$(menuptr%+12)=text$
��
�menuptr%+=24
��
�� �menuselect(menus%)
�,ș GetP,,paltemp%:adjust%=paltemp%!8 � 1
-ș DcMenu,,buffer%,menus%,�200," ")�,,,a$
� a$="" ��
Ȏ menuhandle% �
 
� pic%
*Ȏ a$ �
4� m$(9):�callFSI
>�
H	� 101
RȎ a$ �
\� m$(14):fast%=�fast%
f� m$(27):dest%=0
p� m$(13):dest%=1
z� m$(9):�callFSI
�� m$(15)
�Fstatescale%=0:�I%=0�9:statescale%+=�geticonstate(scalew%,I%)<<I%:�
�<�I%=10�13:statescale%+=�geticonstate(scalew%,I%+6)<<I%:�
�Bstateproc%=0:�I%=0�7:stateproc%+=�geticonstate(proc%,I%)<<I%:�
�Istateoutput%=0:�I%=0�26:stateoutput%+=�geticonstate(output%,I%)<<I%:�
�Cstatejpeg%=0:�I%=0�3:statejpeg%+=�geticonstate(jpego%,I%)<<I%:�
�!A%=�"<ChangeFSI$Dir>.Choices"
�W�#A%,fast%,dest%,statescale%,stateproc%,stateoutput%,statejpeg%,$adjpegq%,$oldmode%
�Z�#A%,$p%(0),�locale_convert($p%(1),decimal_point$,"."),$p%(2),$p%(3),$admode%,$adspcl%
�$�#A%,$s%(0),$s%(1),$s%(2),$s%(3)
��#A%
�� m$(16):�checkandfinish
��
�
0�adjust% �checkmouse(0,0,2,rmenuhandle%,0,0)
�
. � �create_window(x,y,title$)
8+x=x*�$z%(0)��$z%(1):y=y*�$z%(0)��$z%(1)
B !z%=0:z%!4=-y:z%!8=x:z%!12=0
L$z%!40=0:z%!44=-y:z%!48=x:z%!52=0
V%�x<128 � y<128 z%?35=0 �z%?35=255
`)$adtitle%="":ș CreateW,,z% � handle%
j$adtitle%=title$
t=handle%
�� �popup(handle%,f%)
�1ș "OS_ReadModeVariable",-1,4 � ,,modexshift%
�1ș "OS_ReadModeVariable",-1,5 � ,,modeyshift%
�0ș "OS_ReadModeVariable",-1,11 � ,,rightscr%
�.ș "OS_ReadModeVariable",-1,12 � ,,topscr%
�Arightscr%=rightscr%<<modexshift%:topscr%=topscr%<<modeyshift%
��getw(handle%)
�9xo%=rightscr%/2-(x0%+x1%)/2:yo%=topscr%/2-(y0%+y1%)/2
�F�open_window(handle%,x0%+xo%,y0%+yo%,x1%+xo%,y1%+yo%,scx%,scy%,f%)
��
�>� �open_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%)
�handle%=-1��

q%!0=handle%:q%!28=bhandle%
)q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1%
q%!20=scx%:q%!24=scy%
(ș OpenW,,q%
2�
F� �getw(handle%)
P!q%=handle%:ș GetW,,q%
Z+�info(q%+4):bhandle%=q%!28:flags%=q%!32
d�
x� �info(q%)
�=x0%=!q%:y0%=q%!4:x1%=q%!8:y1%=q%!12:scx%=q%!16:scy%=q%!20
�bx%=x0%-scx%:by%=y1%-scy%
��
�� �redraw_window(handle%)
�� handle%=pic% �
�?!factors%=!ifactors%*�$z%(0):factors%!4=ifactors%!4*�$z%(0)
�Cfactors%!8=ifactors%!8*�$z%(1):factors%!12=ifactors%!12*�$z%(1)
�A�reduce(!factors%,factors%!8):�reduce(factors%!4,factors%!12)
�!q%=handle%
�ș RedrawW,,q% � more%
�,�info(q%+4):by%=by%-�(y*�$z%(0)��$z%(1))
�ȕ more%
�jpegsave% �
Q�jpegpaint% ș jpegpaint%,sar%,bx%,by%,factors%,jpegsize%,1 �;V%:�(V%�1)=0 ��
�
"1ș spopx%,&134,sar%,n$,bx%,by%,,factors%,spx%
,�
6ș GetR%,0,q% � more%
@�
J�
T�
h"� �geticonstate(handle%,icon%)
r&!q%=handle%:q%!4=icon%:ș GetI,,q%
|=q%!24>>21 � 1
�� �getmodeinfo
��jpegsave% �
�%ș&35,-1,4 �,,nx:ș&35,-1,5 �,,ny
�=!ifactors%=1:ifactors%!4=1:ifactors%!8=nx:ifactors%!12=ny
��
��
�>ș"XWimp_ReadPixTrans",&100,sar%,n$,,,,ifactors%,pixtrans%
�$ș spopx%,&118,sar%,n$ � ,,sptr%
�� sptr%!32=44 �
�
palptr%=0
��
�A� grab%=0 � 2048-8 � 8:paltemp%!(grab%>>1)=sptr%!(grab%+44):�
palptr%=paltemp%
�
�Q%=0�255:pixtrans%?Q%=Q%:�
&�sptr%!32=44+2048 �
05�Q%=0�255:șctran%,palptr%!(Q%<<2)�pixtrans%?Q%:�
:�
D:ș "ColourTrans_SelectTable",m,palptr%,-1,-1,pixtrans%
N�
X6spx%=-1:�Q%=0�255:�pixtrans%?Q%<>Q% spx%=pixtrans%
b�
l�
�� �deducemode
�� m,x,y
� �geticonstate(output%,21) �
�3�geticonstate(output%,17) �="JPEG8" �="JPEG24"
��
� �geticonstate(output%,18) �
�ș &6,135 � ,,m
�ș&35,-1,9 �,,m
�
�m>3 �
�#ș&35,-1,4 �,,x:ș&35,-1,5 �,,y
�x=180/(2^x):y=180/(2^y)
�="S"+�(2^m)+","+�x+","+�y
�
=��
�
 �
*!� �geticonstate(output%,24) �
4=$oldmode%
>�
H
=$admode%
R�
\�
f�
z� �showscaletofit
�� m,x,y
�$admode%=�deducemode
�Ȏ ?admode% �
�
� �"S"
�)�$admode%,5)>��$admode%,8) x=6 �x=0
� �$admode%,2)>16 x+=5 �x+=4
�/ș&35,-1,11 �,,tofitx:ș&35,-1,12 �,,tofity
�
� �"J"
�/ș&35,-1,11 �,,tofitx:ș&35,-1,12 �,,tofity
�x=12
�
�m=�$admode%
-ș&35,m,11 �,,tofitx:ș&35,m,12 �,,tofity
/ș&35,m,4 �,,x:ș&35,m,5 �,,y:�y>x x=6 �x=0
ș&35,m,9 �,,y:x+=y
$�
.?tofitx+=1:tofity+=1:$adscale%=m$(17)+�tofitx+m$(18)+�tofity
8=q%!12=1<<21:!q%=output%:�I%=0�11:�I%=x q%!8=1<<21 �q%!8=0
B<q%!4=I%+3:ș SetI,,q%:�:�x=12 q%!8=0:q%!4=24:ș SetI,,q%
L�
`� �killcurrent(m$)
j"q%!12=1<<21:!q%=output%:q%!8=0
tq%!4=20:ș SetI,,q%
~$admode%=m$
��
�+ݤZS(I%)�A$:�A$+=�?I%:I%+=1:�?I%<14:=A$
�� �errorbox
�>ș Drag,,-1:!buffer%=�:$(buffer%+4)=�$+" (code "+Þ+")"+�0
�2ș "Wimp_ReportError",buffer%,%11,m$(20) � ,A%
�+�A%=2 �removearea:ș "Wimp_CloseDown":�
��
�S� �ChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,� ram%,fast%)
�M� A$(),r%(),g%(),b%(),rpal%(),gpal%(),bpal%(),table%(),cl%(),xl%(),xl2%()
�M� xp%(),rm%(),rm1%(),rm2%(),vals%(),nl%(),A%(),B%(),new%(),st%(),jpq%(),m
�$ȕ�A$,1)<>" "��A$<>0 A$=�A$,2):�
�ȕ�A$,1)=" " A$=�A$,2):�
�ȕ�A$,1)=" " A$=�A$):�
�uc(�A$,5))="-QUIT" �
.A$=�A$,7):ȕ�A$,1)<>" "��A$<>0 A$=�A$,2):�
ȕ�A$,1)=" " A$=�A$,2):�
"�
, � A$(100):ARG%=0:B%=�A$," ")
6ȕ B%<>0
@+ARG%+=1:A$(ARG%)=�A$,B%-1):A$=�A$,B%+1)
Jȕ �A$,1)=" ":A$=�A$,2):�
TB%=�A$," ")
^�
h�A$<>"" ARG%+=1:A$(ARG%)=A$
rXinvert%=�:range%=�:sharpen%=�:info%=�:cache%=�:cacheareanumber%=0:dither%=�:black%=�
|Chist%=�:equal%=�:vflip%=�:hflip%=�:scale%=�:scaleo%=�:scrapf%=�
�6gamma=1:rotate%=�:max%=20000000:bright%=15:lock%=�
�rwt=.299:gwt=.587:bwt=.114
�
�ARG%<3 �
�J�"ChangeFSI interactive input (read FSIinfo for command line details)"
�?�"Source file: "s$,"Destination file: "f$,"Output mode: "m$
�/�"(X)Scale (e.g. 2:1): "xs$:�"Y Scale: "ys$
�8�"Info on input picture?"a$:�uc(�a$,1))="Y" info%=�
�;�"Invert picture colours?"a$:�uc(�a$,1))="Y" invert%=�
�=�"Compute histogram of input?"a$:�uc(�a$,1))="Y" hist%=�
�@�"Apply histogram equalisation?"a$:�uc(�a$,1))="Y" equal%=�
�G�"Expand input dynamic range?"a$:�uc(�a$,1))="Y" range%=�:equal%=�
�=�"Sharpen picture by (e.g. 12 for harsh, 24 for soft) "a$
��a$<>"" sharpen%=�a$
 +�"Rotate?"a$:�uc(�a$,1))="Y" rotate%=1
 scale%=�:scaleo%=�:fast%=�
 �
 &
� A%=ARG%
 06�uc(A$(ARG%))="-INFO" info%=�:A$(ARG%)="":ARG%-=1
 :6�uc(A$(ARG%))="-HIST" hist%=�:A$(ARG%)="":ARG%-=1
 D6�uc(A$(ARG%))="-LOCK" lock%=�:A$(ARG%)="":ARG%-=1
 NA�uc(A$(ARG%))="-EQUAL" equal%=�:range%=�:A$(ARG%)="":ARG%-=1
 XA�uc(A$(ARG%))="-RANGE" range%=�:equal%=�:A$(ARG%)="":ARG%-=1
 b:�uc(A$(ARG%))="-INVERT" invert%=�:A$(ARG%)="":ARG%-=1
 lD�uc(A$(ARG%))="-NOSCALE" scale%=�:scaleo%=�:A$(ARG%)="":ARG%-=1
 v9�uc(A$(ARG%))="-NOSIZE" scale%=�:A$(ARG%)="":ARG%-=1
 �<�uc(A$(ARG%))="-NODITHER" dither%=�:A$(ARG%)="":ARG%-=1
 �=�uc(A$(ARG%))="-BRIGHTEN" bright%=16:A$(ARG%)="":ARG%-=1
 �:�uc(A$(ARG%))="-ROTATE" rotate%=1:A$(ARG%)="":ARG%-=1
 �<�uc(A$(ARG%))="-ROTATE-" rotate%=-1:A$(ARG%)="":ARG%-=1
 �8�uc(A$(ARG%))="-VFLIP" vflip%=�:A$(ARG%)="":ARG%-=1
 �8�uc(A$(ARG%))="-HFLIP" hflip%=�:A$(ARG%)="":ARG%-=1
 �8�uc(A$(ARG%))="-NOMODE" fast%=�:A$(ARG%)="":ARG%-=1
 �!�uc(�A$(ARG%),6))="-BLACK" �
 �Fblack%=32:�A$(ARG%)>6 black%=��A$(ARG%),7):�black%>128 black%=128
 �A$(ARG%)="":ARG%-=1
 ��
 �!�uc(�A$(ARG%),6))="-GAMMA" �
 �.gamma=2.2:�A$(ARG%)>6 gamma=��A$(ARG%),7)
!A$(ARG%)="":ARG%-=1
!�
!#�uc(�A$(ARG%),8))="-SHARPEN" �
! 3sharpen%=24:�A$(ARG%)>8 sharpen%=��A$(ARG%),9)
!*A$(ARG%)="":ARG%-=1
!4�
!>"�uc(�A$(ARG%),7))="-SMOOTH" �
!H4sharpen%=-1:�A$(ARG%)>7 sharpen%=-��A$(ARG%),8)
!R2A$(ARG%)="":ARG%-=1:�sharpen%<-23 sharpen%=-23
!\�
!fC�uc(�A$(ARG%),4))="-RED" rwt=��A$(ARG%),5):A$(ARG%)="":ARG%-=1
!pE�uc(�A$(ARG%),6))="-GREEN" gwt=��A$(ARG%),7):A$(ARG%)="":ARG%-=1
!zD�uc(�A$(ARG%),5))="-BLUE" bwt=��A$(ARG%),6):A$(ARG%)="":ARG%-=1
!��uc(�A$(ARG%),4))="-MAX" �
!�Dmax%=��A$(ARG%),5):�A$(ARG%),"K")��A$(ARG%),"k") max%=max%*1024
!�A$(ARG%)="":ARG%-=1
!��
!��A%=ARG%
!�2s$=A$(1):f$=A$(2):m$=A$(3):xs$=A$(4):ys$=A$(5)
!��
!��okinfo% �info%=�
!��workspace%>=0 �
!�flex%=�
!��
!�<�worklimit%=0 �flex%=� �flex%=�:nextlocation%=worklimit%
!��
""pnm$=�uc(m$):Ȏ �pnm$+",",3) �
"�"AIM":m=-1:m$=""
""�"P1,","P4,":m=-2:m$="":spm=18
"$#�"P2,","P5,":m=-2:m$="T":spm=20
".=�"P3,","P6,":m=-4:pnm$=�pnm$,2):p6bits=8:I%=��m$,4):m$=""
"8�I%>0�I%<8 p6bits=I%
"B�"P15":m=-3:m$=""
"L�"C15":m=-5:m$=""
"V�"IRL":m=-4:m$="":p6bits=8
"`�"S16":m=-6:m$=""
"j�"S24":m=-7:m$="":p6bits=8
"t�"S32":m=-8:m$="":p6bits=8
"~h�"JPE":m$="":p6bits=8:�pnm$,8)="JPEGMONO" m=-9:jpegquality%=��pnm$,9) �m=-10:jpegquality%=��pnm$,5)
"�5:m=�m$:spm=m:m$=�uc(�m$,1)):�"CDRT",m$)=0 m$=""
"��
"��xs$="" � �xs$,1)="-" �
"�#xmul%=1:xdiv%=1:ymul%=1:ydiv%=1
"��
"��ys$="" ys$=xs$
"�'xmul%=�xs$:xdiv%=��xs$,�xs$,":")+1)
"�'ymul%=�ys$:ydiv%=��ys$,�ys$,":")+1)
"��
"�&flag=-1:ș8,5,s$ � r0,,r2:dir=r0=2
"�
�dir �
"�Cpanic=�:ș8,5,s$+".raw" � r0,,r2:�r0=1 s$+=".raw":dir=�:panic=�
#1�panic ș8,5,s$+".red" � r0,,r2:�r0=1 panic=�
#
!�panic � 42,"Directory given"
#�
#>ftype=r2>>8 � &FFF:bits=28:F=2^bits:c%=0:cc%=0:ccc%=0:o%=0
#(
�dir �
#2>c%=�(s$+".red"):�c%=0 � 42,"Red file "+s$+".red not found"
#<Ecc%=�(s$+".green"):�cc%=0 �42,"Green file "+s$+".green not found"
#FDccc%=�(s$+".blue"):�ccc%=0 �42,"Blue file "+s$+".blue not found"
#P�
#Z-c%=�s$:�c%=0 � 42,"File "+s$+" not found"
#d�
#n� �
#x� � � � �:� �:�close:� �,�$
#�colourindex=255
#�ș&66f4d �;pcd%
#�Ȏ ftype �
#�� &FF9:flag=0
#�.�"."+�uc(s$),".HIP.")���uc(s$),":HIP.") �
#� flag=300:I%=��uc(s$),"HIP.")
#�?�s$,I%)="LOP.":cc%=�s$:�cc%=0 �42,"Can't find Lop file "+s$
#��
#�+� &FF0:�#c%=0:S$="":�I%=1�4:S$+=��#c%:�
#�&�S$="II*"+�0 flag=1500:bigendian=�
#�)�S$="MM"+�0+"*" flag=1500:bigendian=�
$!� &DFA:flag=800:�dir flag=801
$� &DE2:flag=1000
$� &CBE:flag=3800
$" � &BE8:�(pcd%�1)=0 flag=3600
$,� &7A0:flag=1200
$6� &69d:flag=2000
$@� &699:flag=700
$J� &698:flag=100
$T� &697:flag=1900
$^� &691:flag=2600
$h� &690:flag=2500
$r� &666:flag=666
$|� &601:flag=3000
$�� &371:flag=3100
$�#� &300:flag=1300:�dir flag=1301
$�� 4:flag=900:�dir flag=901
$�� 6:flag=950
$��
$��flag=-1 �
$�%�#c%=0:S$="":�I%=1�22:S$+=��#c%:�
$��S$,7)="FSIfile" flag=2100
$�)�flag=-1 �S$,8)="SIMPLE  " flag=2800
$�C�flag=-1 �uc(�S$,8))="MERCSOFT"��uc(�S$,8))="SNAPSHOT"flag=902
$�-�flag=-1 �uc(�S$,8))="MERCSOF1" flag=903
$�4�flag=-1 �uc(�S$,13))="IRLAM YUV 411" flag=2250
$�&�flag=-1 �S$,5)="Irlam" flag=2200
%.�flag=-1 �S$,2)="BM" flag=2400:riffoff%=0
%X�flag=-1 �S$,4)="RIFF" � �S$,9,8)="RDIBdata" � �S$,21,2)="BM" flag=2400:riffoff%=20
%$�flag=-1 �S$,4)="GIF8" flag=500
%&%�flag=-1 �S$,5)="AV_VO" flag=600
%02�flag=-1 �S$,4)=�&59+�&A6+�&6A+�&95 flag=1100
%:*�flag=-1 �S$,4)=�0+�1+�0+�8 flag=1400
%D*�flag=-1 �S$,4)=�0+�1+�0+�1 flag=2900
%N%�flag=-1 �S$,4)="RIX3" flag=2700
%X3�flag=-1 �S$,4)="II*"+�0 flag=1500:bigendian=�
%b6�flag=-1 �S$,4)="MM"+�0+"*" flag=1500:bigendian=�
%l(�flag=-1 �S$,2)=�&52+�&CC flag=2300
%vD�flag=-1 �S$,2)="P4"��S$,2)="P5"��S$,2)="P6" flag=3300:info$=""
%�$�flag=-1 �S$,3)="P15" flag=3400
%�$�flag=-1 �S$,3)="PIC" flag=3500
%�$�flag=-1 �S$,3)="T-I" flag=3800
%�)�flag=-1 �uc(�S$,3))="P13" flag=3450
%�6�flag=-1 �S$,4)="FORM" �S$,9,4)="ILBM" flag=1600
%�:�flag=-1 �S$,8)="ALPIAR12" flag=3900:colourindex=4095
%�;�flag=-1 �S$,8)="ALPIAR16" flag=3905:colourindex=65535
%��flag=-1 �
%�#�S$,7,4)="JFIF" � ftype=&C85 �
%�*jpegblk%=�dim(20):�cachesize(jpegblk%)
%��cache%<�#c% �
%��#c%:c%=0:X%=�"Run:djpeg"
%�	�X% �
&.�#X%:�subtask("djpeg "+s$+" <Wimp$Scrap>")
&�
&0ș"XOS_CLI","djpeg "+s$+" <Wimp$Scrap>" � ;V
& �V �1 �
&*9�subtask("<ChangeFSI$Dir>.djpeg "+s$+" <Wimp$Scrap>")
&4�
&>�
&H"c%=�"<Wimp$Scrap>":�c%=0 �=100
&R>scrapf%=�:flag=3300:info$="JPEG (JFIF) file converted to "
&\�
&f
flag=3700
&p�
&z�
&��
&��flag=-1 �
&��S$,5)="btpc " �
&�B�#c%:c%=0:�subtask("<ChangeFSI$Dir>.btpc "+s$+" <Wimp$Scrap>")
&�"c%=�"<Wimp$Scrap>":�c%=0 �=100
&�7scrapf%=�:flag=3300:info$="BTPC file converted to "
&��
&��
&��flag=-1 �
&�&�#c%=&10:S$="":�I%=1�9:S$+=��#c%:�
&��S$="MILLIPEDE" flag=200
&��
&��flag=-1 �
'&�#c%=&41:S$="":�I%=1�8:S$+=��#c%:�
'%�S$,4)="PNTG" flag=1800:st%=&280
'�
'$�flag=-1 �
'.&�#c%=196:S$="":�I%=1�8:S$+=��#c%:�
'8%�S$,4)="PNTG" flag=1800:st%=&2e2
'B�
'L�flag=-1 �
'V&�#c%=522:S$="":�I%=1�8:S$+=��#c%:�
'`2�S$=�0+�&11+�2+�&ff+�&c+�0+�&ff+�&fe flag=1850
'j�
't�flag=-1 �
'~�#c%=0:�#c%=10 �
'�+C%=�#c%:�C%<6 � C%<>1 ��#c%=1 flag=1900
'��
'��
'�M�flag=-1 �"."+�uc(s$),".PCX.")���uc(s$),":PCX.")��s$,4)="/PCX" flag=1900
'�B�flag=-1 �"."+�uc(s$),".IMAGE.")���uc(s$),":IMAGE.") flag=400
'�)�flag=-1 �uc(�s$,4))=".RAW" flag=100
'�)�flag=-1 �uc(�s$,3))="TGA" flag=2000
'�)�flag=-1 �uc(�s$,3))="VDA" flag=2000
'�>�flag=-1 �"."+�uc(s$),".PIC.")���uc(s$),":PIC.") flag=700
'�M�flag=-1 �"."+�uc(s$),".IMG.")���uc(s$),":IMG.")��s$,4)="/IMG" flag=1400
'�M�flag=-1 �"."+�uc(s$),".DSP.")���uc(s$),":DSP.")��s$,4)="/DSP" flag=1700
'�*�flag=-1 �uc(�s$,4))="/RGB" flag=3200
(<�flag=-1 �(�uc(�s$,4))="/PCD"�ftype=&be8)�((pcd%�1)=1) �
(
k�#c%:c%=0:�subtask("<ChangeFSI$Dir>.hpcdtoppm -3 -a "+s$+" <Wimp$Scrap> { > <ChangeFSI$Dir>.pcdtemp }")
(Mc%=�"<Wimp$Scrap>":scrapf%=�:flag=3300:info$="PhotoCD file converted to "
(�
((�
(2c�flag=-1 �close:� 42,"Sorry: format not recognised - please try again or contact your supplier"
(<Bstep24=1:input=8:ham=0:planar%=0:bigendianbits=�:r$="FN"+�flag
(F9compression=0:hpredict%=1:striprows%=-1:cachebytes%=�
(P�xdiv%=0 � ydiv%=0 scale%=�
(Z� r%(colourindex)
(d%� g%(colourindex),b%(colourindex)
(n
Ȏ flag �
(x� 0
(�@quant%=4:�#c%=4:F%=�W+&1C:�#c%=F%:st%=�W+F%-&20:K%=�W+F%-&20
(�sm=�W:�sm<256 �
(�ș53,sm,3 � ,,I%
(�Ȏ I% �
(�%� 1:�st%=F%+12 �defpal2 ��ipal(2)
(�5�#c%=F%-16:sx%=(�W+1)*32:rowbytes%=sx%>>3:input=1
(�sy%=�W+1:I%=�W:sx%-=31-�W
(�%� 3:�st%=F%+12 �defpal4 ��ipal(4)
(�5�#c%=F%-16:sx%=(�W+1)*16:rowbytes%=sx%>>2:input=2
(�!sy%=�W+1:I%=�W:sx%-=(31-�W)�2
(�(� 15:�st%=F%+12 �defpal16 ��ipal(16)
(�4�#c%=F%-16:sx%=(�W+1)*8:rowbytes%=sx%>>1:input=4
(�!sy%=�W+1:I%=�W:sx%-=(31-�W)�4
)� 63,255:�st%=F%+12 �
)�defpal
)�
)"�K%>st% K%=st%
),�K%-12-F%=2048 �I%=255 �
)6�#c%=&38
)@�C%=0�255:D%=�#c%
)J9r%(C%)=�#c%/255*F:g%(C%)=�#c%/255*F:b%(C%)=�#c%/255*F
)TD%=�W:�
)^�
)h�ipal63
)r�
)|�
)�G�#c%=F%-16:sx%=(�W+1)*4:rowbytes%=sx%:sy%=�W+1:I%=�W:sx%-=(31-�W)�8
)�) �42,"Not understood RISC OS sprite"
)��
)�@r$="FN8":ș53,sm,4 � ,,nx:ș53,sm,5 � ,,ny:nx=1<<nx:ny=1<<ny
)�-�scale% xmul%=xmul%*nx/2:ymul%=ymul%*ny/2
)�Sinfo$="RISC OS sprite, mode "+�sm+" "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
)��
)�bpp%=sm>>>27:Ȏbpp% �
)�9� 1:bpp%=1:r$="FN8":�st%=F%+12 �defpal2 ��newropal(2)
)�9� 2:bpp%=2:r$="FN8":�st%=F%+12 �defpal4 ��newropal(4)
)�;� 3:bpp%=4:r$="FN8":�st%=F%+12 �defpal16 ��newropal(16)
)�:� 4:bpp%=8:r$="FN8":�st%=F%+12 �defpal ��newropal(256)
)�&� 5:bpp%=16:r$="FN16":�st%=F%+12 �
*$� rpal%(255),gpal%(255):step24=2
*
�C%=0�255
*"gpal%(C%)=(C%>>5)<<8 � (C%�31)
*&+rpal%(C%)=((C%>>2)�31)<<16 � (C%�3)<<11
*0�
*:1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
*D-� 6:bpp%=32:r$="FN24":�st%=F%+12 �nopal �
*N!rbo%=0:gbo%=1:bbo%=2:step24=4
*X-� 8:bpp%=24:r$="FN24":�st%=F%+12 �nopal �
*brbo%=0:gbo%=1:bbo%=2
*l8 �42,"Not understood new format RISC OS sprite bpp"
*v�
*�(nx=(sm>>1) �&1fff:ny=(sm>>14) �&1fff
*�G�scale% xdiv%=xdiv%*nx:ydiv%=ydiv%*ny:xmul%=xmul%*90:ymul%=ymul%*90
*�Z�#c%=F%-16:rowbytes%=(�W+1)*4:sy%=�W+1:I%=�W:sx%=(rowbytes%*8-(31-�W))/bpp%:input=bpp%
*�Jinfo$="New RISC OS sprite, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
*��bpp%=32 input=24
*��
*��#c%=st%:cache%=�
*�	� 100
*�Equant%=8:�#c%=0:sx%=�HW:sy%=�HW:�nopal:input=24:rowbytes%=sx%*3+2
*�5rbo%=2:gbo%=2+sx%:bbo%=2+2*sx%:r$="FN24":cache%=�
*�Jinfo$="QRT .raw image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
*�	� 200
*�Gquant%=8:�#c%=5:sx%=�HW:sy%=�HW:sx%=(�HW-sx%+2)/2:sy%=(�HW-sy%+2)/2
+$�#c%=&1a:cadsoft%=�#c%:�#c%=&200
+?�C%=0�255:r%(C%)=�#c%/255*F:�:�C%=0�255:g%(C%)=�#c%/255*F:�
+!�C%=0�255:b%(C%)=�#c%/255*F:�
+ -�#c%=&600:st%=&600:cache%=�:�cadsoft%=2 �
+*Crep%=0:r$="FN1100":plbuff%=�dim(sx%):plbytes%=sx%:cachebytes%=�
+4�
+>r$="FN8":rowbytes%=sx%
+H�
+R[info$="Cadsoft type "+�cadsoft%+" image, "+�sx%+" by "+�sy%+" pixels, 8 bits per pixel"
+\	� 300
+fIquant%=5:�#c%=&2c:st%=�W+(&38-&2c):�#cc%=&2c:stcc%=�W1(cc%)+(&38-&2c)
+p7�#c%=&1c:sx%=(�W+1)*4:sy%=�W+1:�#c%=st%:�#cc%=stcc%
+z;� rpal%(255),gpal%(255):input=16:cache%=�:rowbytes%=sx%
+�
�C%=0�255
+�.rpal%(C%)=C%�7 � (C%�64)<<2 � (C%�&38)<<13
+�Sgpal%(C%)=(C%�4)<<1�C%�16 � ((C%�3)<<1�(C%�&60)>>2)<<8 � (C%�8�(C%�128)>>3)<<16
+��
+�1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
+�*pbuff%=�dim(sx%):�scale% ymul%=ymul%*2
+�Ginfo$="ArVis image, "+�sx%+" by "+�sy%+" pixels, 15 bits per pixel"
+�	� 400
+�Equant%=8:�#c%=0:sx%=�beHW:sy%=�beHW:X%=�beHW:st%=�#c%+X%:�#c%=st%
+�Vplbuff%=�dim(sx%*3):plbytes%=sx%*3:rb%=plbuff%:gb%=plbuff%+1:bb%=plbuff%+2:rbo%=-1
+�:�nopal:input=24:rep%=0:cachebytes%=�:cache%=�:step24=3
+�^info$="RT image. run length encoded image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
+�	� 500
,,compression=5:�#c%=6:GIFsx=�HW:GIFsy=�HW
,8GIF=�#c%:GIFback=�#c%:GIFext=�#c%:quant%=(GIF � 7)+1
,�GIF � &80 �
,$�C%=0�(1<<quant%)-1
,.9r%(C%)=�#c%/255*F:g%(C%)=�#c%/255*F:b%(C%)=�#c%/255*F
,8�
,B�
,LI%=�#c%:ȕ I%=�"!"
,`
� �#c%
,j�
,t$GIFgcesz=�#c%:�#c%=�#c%+GIFgcesz
,�� GIFgcesz=0:I%=�#c%
,��
,�6�I%<>�"," � 42,"GIF file without , in right place"
,��GIFext<>0 � GIFext<>49 �
,��GIFext>49 �
,�*xdiv%=xdiv%*64:xmul%=xmul%*(GIFext+15)
,��
,�*ydiv%=ydiv%*(GIFext+15):ymul%=ymul%*64
,��
-�
-
,GIFleft=�HW:GIFright=�HW:sx%=�HW:sy%=�HW
-�GIFsx<sx% � GIFsy<sy% �
-�info% �
-()�"GIF file with bigger image inside:"
-2;�"Screen ";GIFsx"x by "GIFsy"y; image "sx%"x by "sy%"y"
-</�"Continue with monitor's size [Y or y]?"A$
-F&�A$="Y"�A$="y" sx%=GIFsx:sy%=GIFsy
-P(�"Continuing with ";sx%"x by "sy%"y"
-Z�
-d�
-n)GIF=�#c%:�GIF � &40 flag=501:r$="FN8"
-xJsetcodes%=�#c%:clearcode%=1<<setcodes%:st%=�#c%:cache%=�:cachebytes%=�
-�E� table%(1<<12):stk%=�dim(1<<13):buf%=�dim(280):plbuff%=�dim(sx%)
-�&�I%=0�clearcode%-1:table%(I%)=I%:�
-�Ainfo$="GIF file, "+�sx%+" by "+�sy%+" pixels, "+�bits(quant%)
-�	� 600
-�quant%=8:�#c%=&5c:�C%=0�255
-�9r%(C%)=�#c%/255*F:g%(C%)=�#c%/255*F:b%(C%)=�#c%/255*F
-��
-��#c%=&36e:sy%=�HW:sx%=�HW
-�5st%=&380:�#c%=st%:rowbytes%=sx%:r$="FN8":cache%=�
-�Einfo$=".PIC image, "+�sx%+" by "+�sy%+" pixels, 8 bits per pixel"
-�	� 700
-�$quant%=8:�#c%=0:a$=�#c%:st%=�#c%
-� sx%=�a$:sy%=�(�a$,�a$," ")))
.6�nopal:input=24:step24=3:rowbytes%=sx%*3:r$="FN24"
.!rbo%=0:gbo%=1:bbo%=2:cache%=�
.Jinfo$="MTV .pic image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
."	� 800
.,)sx%=512:sy%=256:�scale% ymul%=ymul%*2
.64plbuff%=�dim(sx%):rep%=0:wt%=0:wtsx%=plbuff%+sx%
.@cache%=�:cachebytes%=�
.J@�C%=0�255:r%(C%)=(C%�63)/63*F:�:g%()=r%():b%()=r%():quant%=6
.TJinfo$="Watford digitiser picture, 512 by 256 pixels, 6 bits per pixel"
.^	� 801
.h;sx%=512:sy%=256:input=24:quant%=6:�scale% ymul%=ymul%*2
.r0rep1%=0:wt1%=0:rep2%=0:wt2%=0:rep3%=0:wt3%=0
.|=buff%=�dim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+2*sx%
.�:wtsx1%=buff%+sx%:wtsx2%=buff%+2*sx%:wtsx3%=buff%+3*sx%
.�7�C%=0�255:r%(C%)=(C%�63)/63*F:�:g%()=r%():b%()=r%()
.�Rinfo$="Triple Watford digitiser picture, 512 by 256 pixels, 18 bits per pixel"
.�	� 900
.�'quant%=8:st%=0:�#c%=0:�#c%=65536 �
.�7sx%=256:sy%=256:�scale% ymul%=ymul%*2:xmul%=xmul%*2
.��
.�sx%=512:sy%=512
.��
.�S�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%():rowbytes%=sx%:r$="FN8":cache%=�
.�?info$="AIM .raw image, 256 by 256 pixels, 8 bits per pixel"
.�	� 901
.�quant%=4:�#c%=65536 �
/7sx%=256:sy%=256:�scale% ymul%=ymul%*2:xmul%=xmul%*2
/�
/sx%=512:sy%=512
/&�
/0=buff%=�dim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2
/:3�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%()
/DOinput=24:info$="Hawk V9 Triple image, 256 by 256 pixels, 24 bits per pixel"
/N	� 902
/XBquant%=4:�#c%=8:sx%=�W:rowbytes%=sx%*3/2:sy%=�W:st%=20:�#c%=20
/b�scale% ymul%=ymul%*2
/lMplbuff%=�dim(sx%*3):rb%=plbuff%:gb%=plbuff%+sx%:bb%=plbuff%+sx%*2:rbo%=-1
/v@�C%=0�255:r%(C%)=(C%�&F)/&F*F:�:g%()=r%():b%()=r%():cache%=�
/�binput=24:info$="Hawk V9/Snapshot Colour image, "+�sx%+" by "+�sy%+" pixels, 12 bits per pixel"
/�	� 903
/�\quant%=5:�#c%=8:sx%=�W:rowbytes%=sx%*2:sy%=�W:st%=20:�#c%=20:cache%=�:r$="FN16":flag=700
/�-� rpal%(255),gpal%(255):input=16:step24=2
/�
�C%=0�255
/�"gpal%(C%)=(C%>>5)<<8 � (C%�31)
/�+rpal%(C%)=((C%>>2)�31)<<16 � (C%�3)<<11
/��
/�1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
/�_input=16:info$="Hawk V9 mk II Colour image, "+�sx%+" by "+�sy%+" pixels, 16 bits per pixel"
/�	� 950
/�@quant%=8:�#c%=0:sx%=512:rowbytes%=512:sy%=512:st%=0:flag=900
/�E�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%():r$="FN8":cache%=�
0Finfo$="Wild Vision V12 image, 512 by 512 pixels, 8 bits per pixel"
0
� 1000
0Tquant%=4:sx%=640:sy%=256:�defpal:st%=�W:r$="FN"+�(1000+�W):�scale% ymul%=ymul%*2
0*%buff%=�dim(sx%):ctable%=�dim(st%)
04"ș12,4,c%,ctable%,st%:st%=�#c%
0>.pa%=ctable%:rep%=0:rep2%=0:pasx%=buff%+sx%
0HAinfo$="ProArtisan image, 640 by 256 pixels, 8 bits per pixel"
0R
� 1100
0\@quant%=1:�#c%=4:sx%=�beW:sy%=�beW:input=�beW:bigendianbits=�
0fS%=�beW:S%=�beW
0pIcache%=�:�S%=2 cachebytes%=�:info$="Byte Encoded " �info$="":r$="FN8"
0zC%=�beW
0�D%=�beW
0�Ȏ C% �
0�	� 1,2
0�$�I%=0�D%/3-1:r%(I%)=�#c%/255*F:�
0�$�I%=0�D%/3-1:g%(I%)=�#c%/255*F:�
0�$�I%=0�D%/3-1:b%(I%)=�#c%/255*F:�
0�
0�Ȏ input �
0�� 1:r%(0)=F:g%(0)=F:b%(0)=F
0�� 4,8:�nopal
0�� 24:�nopal
0��
0��
1Ȏ input �
1 � 1:rowbytes%=(sx%+15>>4)<<1
1� 4:rowbytes%=(sx%+3>>2)<<1
1$� 8:rowbytes%=(sx%+1>>1)<<1
1.J� 24:rowbytes%=(3*sx%+1>>1)<<1:r$="FN24":rbo%=0:gbo%=1:bbo%=2:step24=3
18�S%=1 bbo%=0:rbo%=2
1B&:� 42,"Can't do this Sun pixrect"
1L�
1VMst%=D%+&20:rep%=0:�cachebytes% plbuff%=�dim(rowbytes%):plbytes%=rowbytes%
1`Binfo$+="Sun image, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
1j
� 1200
1t>quant%=8:sx%=800:sy%=800:st%=1600:�#c%=st%:vflip%=� vflip%
1~*�nopal:r$="FN8":rowbytes%=sx%:cache%=�
1�Iinfo$="TimeStep satellite image, 800 by 800 pixels, 8 bits per pixel"
1�
� 1300
1�?quant%=8:sx%=128:sy%=256:st%=0:�#c%=0:�scale% xmul%=xmul%*2
1�*�nopal:r$="FN8":rowbytes%=sx%:cache%=�
1�@info$="satellite image, 128 by 256 pixels, 8 bits per pixel"
1�
� 1301
1�;input=24:quant%=8:sx%=128:sy%=256:�scale% xmul%=xmul%*2
1�Obuff%=�dim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+2*sx%:�nopal:r$="FN901"
1�Hinfo$="Triple satellite image, 128 by 256 pixels, 24 bits per pixel"
1�
� 1400
1�%planar%=�:�#c%=0:Z%=�HW:�Z%>255 �
1�+st%=�beHW*2:planes%=�beHW:patlen%=�beHW
2+pw%=�beHW:ph%=�beHW:sx%=�beHW:sy%=�beHW
2
�
2Cst%=�HW*2:input=�HW:patlen%=�HW:pw%=�HW:ph%=�HW:sx%=�HW:sy%=�HW
2�
2(
�scale% �
22#xmul%=xmul%*pw%:xdiv%=xdiv%*282
2<#ymul%=ymul%*ph%:ydiv%=ydiv%*282
2F�
2PWrowbytes%=sx%+7>>3:pbuff%=�dim(sx%):plbytes%=rowbytes%*planes%:buff%=�dim(plbytes%)
2Z�#c%=st%:vrep%=0
2dM�C%=0�(1<<planes%)-1:r%(C%)=F-C%/((1<<planes%)-1)*F:�:g%()=r%():b%()=r%()
2nBinfo$="IMG file, "+�sx%+" by "+�sy%+" pixels, "+�bits(planes%)
2x
� 1500
2�"�#c%=4:dir%=�tiff(4):�#c%=dir%
2�6rgb=�:greyunit=100:planar%=1:fillorder=1:resunit=2
2�)xnum%=90:xdenom%=1:ynum%=90:ydenom%=1
2�E%=�tiff(3):�Z%=1�E%
2�'T%=�tiff(3):D%=�tiff(3):C%=�tiff(4)
2�a�C%>1 V%=�tiff(4) ��D%=2 �#c%=dir%+2+Z%*12 ��D%<4 V%=�tiff(D%):�#c%=dir%+2+Z%*12 �V%=�tiff(4)
2�?�"Read tag ";T%" datatype "D%" count "C%" value/pointer "V%
2�Ȏ T% �
2�� 256:sx%=V%
2�� 257:sy%=V%
2�� 258:�C%>1 �
2��D%*C%>6 �
2��#c%=V%:quant%=�tiff(D%)
3(input=quant%:�I%=1�C%-1:V%=�tiff(D%)
3P�V%<>quant% �42,"Can't do RGB TIFF with different numbers of bits per pixel"
3
input+=V%
3"�:�nopal
3,�
36 quant%=V% � &FF:input=quant%
3@5�I%=0�(1<<quant%)-1:r%(I%)=I%/((1<<quant%)-1)*F:�
3Jg%()=r%():b%()=r%()
3T�
3^�#c%=dir%+2+Z%*12
3h�
3rquant%=V%:input=quant%
3|5�I%=0�(1<<quant%)-1:r%(I%)=I%/((1<<quant%)-1)*F:�
3�g%()=r%():b%()=r%()
3��
3�� 259:compression=V%
3�/� 262:photometric=V%:�V%=0 invert%=�invert%
3�� 266:fillorder=V%
3�!� 273:stc%=C%:stv%=V%:std%=D%
3�1� 277:sampperpix%=V%:input=quant%*V%:rgb=V%=3
3�� 278:striprows%=V%
3�-� 279:stcbyte%=C%:stvbyte%=V%:stdbyte%=D%
3�1� 282:�#c%=V%:xnum%=�tiff(4):xdenom%=�tiff(4)
3��#c%=dir%+2+Z%*12
3�1� 283:�#c%=V%:ynum%=�tiff(4):ydenom%=�tiff(4)
3��#c%=dir%+2+Z%*12
4,� 284:planar%=V%:�planar%=2 input=quant%
4� 290:greyunit=10^V%
4<� 291:�#c%=V%:�I%=0�C%-1:r%(I%)=�tiff(D%)/greyunit/2*F:�
4&g%()=r%():b%()=r%()
40�#c%=dir%+2+Z%*12
4:� 296:resunit=V%
4D� 317:hpredict%=V%
4N8� 320:�#c%=V%:�I%=0�C%/3-1:r%(I%)=�tiff(3)/65535*F:�
4X*�I%=0�C%/3-1:g%(I%)=�tiff(3)/65535*F:�
4b*�I%=0�C%/3-1:b%(I%)=�tiff(3)/65535*F:�
4l�#c%=dir%+2+Z%*12
4v
4�J�info% �"Ignoring tag ";T%" datatype "D%" count "C%" value/pointer "V%
4��
4��
4�� st%(stc%):�stc%>1 �
4�0�#c%=stv%:�I%=0�stc%-1:st%(I%)=�tiff(std%):�
4��
4�st%(0)=stv%
4��
4�Ȏ compression �
4�� 0,1:info$=""
4�)� 2:info$="CCITT Group 3 compressed "
4�+� 5:info$="LZW compressed ":r$="FN1505"
5n�hpredict%=2 �info$+="horizontal differenced " ��hpredict%>2 info$+=" unknown predictor ("+�hpredict%+") "
5'setcodes%=8:clearcode%=1<<setcodes%
53� table%(1<<12):stk%=�dim(1<<13):buf%=�dim(280)
5 &�I%=0�clearcode%-1:table%(I%)=I%:�
5*4� 32773:info$="PackBits compressed ":r$="FN1501"
54 � 6:info$="JPEG compressed "
5>2 info$="Compress "+�compression+" - unknown "
5H�
5RBinfo$+="TIFF file, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
5\Sbigendianbits=fillorder=1:�#c%=st%(0):stripptr=0:�striprows%>=sy% striprows%=-1
5fȎ input �
5p� 1:rowbytes%=sx%+7>>3
5z� 2:rowbytes%=sx%+3>>2
5�� 4:rowbytes%=sx%+1>>1
5�� 8:rowbytes%=sx%
5�� 24:rowbytes%=3*sx%
5�H� 32:rowbytes%=4*sx%:�photometric<>5 � 42,"32 bpp TIFF but not CMYK"
5�+ � 42,"Can't do "+�bits(input)+" TIFF"
5��
5�.�planar%=2 rowbytes%=rowbytes%*sampperpix%
5�I�planar%<>1 � rgb<>0 �42,"Can't do this style of TIFF yet" �planar%=�
5�� compression<2 �
5�Scache%=�:stripptr=-1:r$="FN8":�input=24 rbo%=0:gbo%=1:bbo%=2:step24=3:r$="FN24"
5�b�input=32 rbo%=0:gbo%=1:bbo%=2:step24=4:r$="FN24":r%()=F-r%():g%()=F-g%():b%()=F-b%():input=24
5��
5�'�compression=5 �compression=32773 �
6-cache%=�:cachebytes%=rowbytes%*striprows%
60plbuff%=�dim(rowbytes%):rowstogo%=striprows%
6\�input=24 rb%=plbuff%:gb%=plbuff%+1:bb%=plbuff%+2:r$="FN"+�(��r$,3)+10):step24=3:rbo%=-1
6$�
6..buff%=�dim(rowbytes%):rowstogo%=striprows%
68N�input=24 rb%=buff%:gb%=buff%+1:bb%=buff%+2:r$="FN"+�(��r$,3)+10):step24=3
6B�
6L�
6V
�scale% �
6`S%=resunit:�S%=2 S%=90
6j�S%=3 S%=35
6t,xdiv%=xdiv%*xnum%:xmul%=xmul%*xdenom%*S%
6~,ydiv%=ydiv%*ynum%:ymul%=ymul%*ydenom%*S%
6��
6��r$="FN1500" r$="FN8"
6�
� 1600
6��#c%=12:camg=0:planar%=�:�
6�&S$=��#c%+��#c%+��#c%+��#c%:S%=�beW
6�Ȏ S$ �
6�C� "BMHD":sx%=�beHW:sy%=�beHW:S%=�W:planes%=�#c%:masking%=�#c%=1
6�6compression=�#c%:S%=�#c%+�HW:U%=�#c%:V%=�#c%:S%=�W
6�)�scale% ymul%=ymul%*V%:ydiv%=ydiv%*U%
6�K�I%=0�(1<<planes%)-1:r%(I%)=I%/((1<<planes%)-1)*F:�:g%()=r%():b%()=r%()
6�B� "CMAP":S%=�#c%+S%:�I%=0�(1<<planes%)-1:r%(I%)=(�#c%>>4)/15*F
6�1g%(I%)=(�#c%>>4)/15*F:b%(I%)=(�#c%>>4)/15*F:�
7G�#c%=S%:�info% �"Warning: truncated IFF CMAP information to 4 bits"
7
;� "CAMG":camg=�beW:�info% �"Amiga viewport mode ";~camg
7� "BODY":st%=�#c%
74 � info% �"Ignoring IFF property "S$" size ";S%
7(�#c%=�#c%+S%
72�
7<9�S$="BODY":�compression info$="Compressed " �info$=""
7P+ham=(camg � &800)<>0:�ham info$+="HAM "
7Z4half=(camg � &80)<>0:�half info$+="half-bright "
7dn�half half%=1<<planes%-1:�I%=0�half%-1:r%(I%+half%)=r%(I%)/2:g%(I%+half%)=g%(I%)/2:b%(I%+half%)=b%(I%)/2:�
7nCinfo$+="IFF file, "+�sx%+" by "+�sy%+" pixels, "+�bits(planes%)
7x+�masking% info$+=" with mask (ignored)"
7�7rowbytes%=(sx%+15>>4)<<1:plbytes%=rowbytes%*planes%
7�9pbuff%=�dim(sx%):r$="FN"+�(1600+compression):cache%=�
7��compression �
7�(cachebytes%=�:plbuff%=�dim(plbytes%)
7��
7�Qrealrowbytes%=rowbytes%:rowbytes%=plbytes%:�masking% rowbytes%+=realrowbytes%
7��
7��#c%=st%
7�
� 1700
7�Bsx%=640:rowbytes%=80:sy%=350:planes%=4:plbytes%=4*80:planar%=�
7�3buff%=�dim(80*4):pbuff%=�dim(640):G=F/3:H=F*2/3
7�(r%()=0,0,0,0,F,F,F,H,G,G,G,G,F,F,F,F
7�(g%()=0,0,F,F,0,0,F,H,G,G,F,F,G,G,F,F
8(b%()=0,F,0,F,0,F,0,H,G,F,G,F,G,F,G,F
8Vmasking%=�:r$="FN1600":st%=16:�#c%=16:cache%=�:realrowbytes%=80:rowbytes%=plbytes%
8Sinfo$="PC EGA '.dsp' file, 640 by 350 pixels, 4 bits per pixel (fixed palette)"
8"
� 1800
8,?sx%=72*8:sy%=720:quant%=1:input=1:�#c%=st%:plbuff%=�dim(72)
86cache%=�:cachebytes%=�
8@Qr%(0)=F:g%(0)=F:b%(0)=F:bigendianbits=�:rowbytes%=72:r$="FN1501":rowstogo%=-1
8JG�scale% xmul%=xmul%*90:xdiv%=xdiv%*72:ymul%=ymul%*90:ydiv%=ydiv%*72
8T>info$="MacPaint file, 576 by 720 bits, creator id "+�S$,4)
8^
� 1850
8h�#c%=552
8rdone%=�
8|�
8�code%=�beHW:Ȏ code% �
8�� &01:�#c%=�#c%+�beHW
8�	� &1E
8�	� &98
8�Crowbytes%=�beHW:�(rowbytes% �&8000)=0 �42,"PICT without Pixmap"
8�3sy%=�beHW:sx%=�beHW:sy%=�beHW-sy%:sx%=�beHW-sx%
8�<junk%=�HW:packtype%=�beHW:junk%=�W:resx%=�beW:resy%=�beW
8�F�beHW<>0 �#c%:�42,"ChangeFSI expected Mac PICT2 pixeltype=Chunky"
8�&bpp%=�beHW:junk%=�beHW:junk%=�beHW
8�$junk%=�beW:junk%=�beW:junk%=�beW
8�junk%=�beW:junk%=�beHW
8�_C%=�beHW:�I%=0�C%:J%=�beHW:r%(J%)=�beHW/65535*F:g%(J%)=�beHW/65535*F:b%(J%)=�beHW/65535*F:�
8�done%=�
9R� &9A:junk%=�W:rowbytes%=�beHW:�(rowbytes% �&8000)=0 �42,"PICT without Pixmap"
93sy%=�beHW:sx%=�beHW:sy%=�beHW-sy%:sx%=�beHW-sx%
9<junk%=�HW:packtype%=�beHW:junk%=�W:resx%=�beW:resy%=�beW
9&J�beHW<>16 �#c%:�42,"ChangeFSI expected Mac PICT2 pixeltype=RGBDirect"
90'bpp%=�beHW:comps%=�beHW:junk%=�beHW
9:junk%=�beW:junk%=�beW
9Djunk%=�beHW:junk%=�beHW
9NV�bpp%>16 �nopal �J%=2^(bpp%�3):�I%=0�J%-1:r%(I%)=I%/(J%-1)*F:�:g%()=r%():b%()=r%()
9X/�bpp%=32 � comps%=3 bpp%=24:rowbytes%=3*sx%
9bdone%=�
9lC:�#c%:�42,"ChangeFSI can't understand Mac PICT2 code "+�~code%
9v�
9�� done%
9�3junk%=�beHW:junk%=�beHW:junk%=�beHW:junk%=�beHW
9�3junk%=�beHW:junk%=�beHW:junk%=�beHW:junk%=�beHW
9�junk%=�beHW
9�Ncache%=�:cachebytes%=�:bigendianbits=�:st%=�#c%:rowbytes%=rowbytes%��&8000
9�Y�scale% xmul%=xmul%*90*65536:xdiv%=xdiv%*resx%:ymul%=ymul%*90*65536:ydiv%=ydiv%*resy%
9�@info$="Mac PICT2, "+�sx%+" by "+�sy%+" pixels, "+�bits(bpp%)
9�%plbuff%=�dim(rowbytes%):�bpp%>8 �
9�Trbo%=-1:rb%=plbuff%+sx%:gb%=plbuff%+sx%*2:bb%=plbuff%+sx%*3:r$="FN1851":input=24
9�;�comps%=3 rb%=plbuff%:gb%=plbuff%+sx%:bb%=plbuff%+sx%*2
9��
9�
� 1900
9��#c%=1:C%=�#c%
:?E%=�#c%:�E%<>1 � 42,"ZSoft .PCX file with unknown encoding"
:7E%=�#c%:sx%=�HW:sy%=�HW:sx%=�HW+1-sx%:sy%=�HW+1-sy%
:N�scale% xmul%=xmul%*90:xdiv%=xdiv%*�HW:ymul%=ymul%*90:ydiv%=ydiv%*�HW ��W
: H�#c%=65:planes%=�#c%:planar%=planes%>1:rowbytes%=�HW:bpp%=E%*planes%
:*pcxpal=16:�bpp%>4 � C%=5 �
:4*�#c%=�#c%-769:�#c%=12 pcxpal=�#c%-768
:>�
:H5�#c%=pcxpal:E%=0:�C%=0�(1<<bpp%)*3-1:E%=E%��#c%:�
:R3�info% �".PCX palette mask established at ";~E%
:\�E%=0 �
:fE�C%=0�(1<<bpp%)-1:r%(C%)=C%/((1<<bpp%)-1)*F:�:g%()=r%():b%()=r%()
:p�
:z!�#c%=pcxpal:�C%=0�(1<<bpp%)-1
:�Er%(C%)=(�#c%�E%)/E%*F:g%(C%)=(�#c%�E%)/E%*F:b%(C%)=(�#c%�E%)/E%*F
:��
:��
:��rewind
:�Lplbytes%=rowbytes%*planes%:plbuff%=�dim(plbytes%):cache%=�:cachebytes%=�
:�E�planar% pbuff%=�dim(sx%) �input=bpp%:bigendianbits=�:r$="FN1100"
:�Finfo$="ZSoft .PCX file, "+�sx%+" by "+�sy%+" pixels, "+�bits(bpp%)
:�
� 2000
:�8�#c%=0:L%=�#c%:C%=�#c%:I%=�#c%:J%=�HW:K%=�HW:M%=�#c%
:�Csx%=�W:sx%=�HW:sy%=�HW:B%=�#c%:ID%=�#c%:�ID%�&10 hflip%=�hflip%
:� �(ID% �&20)=0 vflip%=�vflip%
:��#c%=�#c%+L%:Ȏ C% �
:�� 1:�M%=&18 �
;�C%=J%�K%-1
;9b%(C%)=�#c%/255*F:g%(C%)=�#c%/255*F:r%(C%)=�#c%/255*F
;�
;$�
;.�
;8 �nopal
;B�
;Lst%=�#c%
;VȎ I% �
;`� 1,2,3:cache%=�:�B%>8 �
;j�B%>16 �
;tLinput=24:bbo%=0:gbo%=1:rbo%=2:step24=B%�8:r$="FN24":rowbytes%=step24*sx%
;~�
;�rowbytes%=sx%*2
;�7� rpal%(255),gpal%(255):input=16:step24=2:r$="FN16"
;�
�C%=0�255
;�&gpal%(C%)=(C%>>5)<<8 � (C%�31)<<16
;�%rpal%(C%)=(C%>>2)�31 � (C%�3)<<11
;��
;�1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
;��
;��
;�r$="FN8":rowbytes%=sx%
;��
;�Iinfo$="Truevision TGA image, "+�sx%+" by "+�sy%+" pixels, "+�bits(B%)
<D� 9,10,11:step24=B%�8:rowbytes%=step24*sx%:buff%=�dim(rowbytes%)
<
�B%>8 �
<�B%>16 �
<:input=24:bb%=buff%:gb%=buff%+1:rb%=buff%+2:r$="FN2002"
<(�
<29� rpal%(255),gpal%(255):input=16:step24=2:r$="FN2001"
<<
�C%=0�255
<F&gpal%(C%)=(C%>>5)<<8 � (C%�31)<<16
<P%rpal%(C%)=(C%>>2)�31 � (C%�3)<<11
<Z�
<d1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
<n�
<x�
<�Minfo$="Truevision TGA RLE image, "+�sx%+" by "+�sy%+" pixels, "+�bits(B%)
<��
<�
� 2100
<�?quant%=6:sx%=512:rowbytes%=2*sx%:sy%=256:cache%=�:r$="FN16"
<�-� rpal%(255),gpal%(255):input=16:step24=2
<�
�C%=0�255
<� gpal%(C%)=C%>>3 � (C%�7)<<11
<�%rpal%(C%)=(C%�7)<<8 � (C%>>3)<<16
<��
<�'�C%=0�31:r%(C%)=C%/31*F:�:b%()=r%()
<��C%=0�63:g%(C%)=C%/63*F:�
<��scale% ymul%=ymul%*2
<�Hinfo$="Pineapple image, 512 by 256 pixels, 16 bits per pixel":�#c%=7
=
� 2200
=9quant%=8:step24=1:�#c%=0:s$=�#c%:E%=�s$,":"):st%=�#c%
=7sx%=��s$,E%+1):sy%=��s$,E%+2+��sx%):�nopal:input=24
="Arowbytes%=sx%*3:rbo%=0:gbo%=sx%:bbo%=2*sx%:cache%=�:r$="FN24"
=,Ginfo$="Irlam image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
=6
� 2250
=@H�#c%=16:sx%=�W:sy%=�W:� rpal%(255),gpal%(255),bpal%(255),table%(255)
=J�C%=0�255:D%=C%�1
=Ttable%(C%)=(D%-16)/219*F
=^�D%�128 D%-=256
=h)r%(C%)=�(D%/160*F):b%(C%)=�(D%/126*F)
=r>g%(C%)=�(-D%/160*rwt/gwt*F):gpal%(C%)=�(-D%/126*bwt/gwt*F)
=|�
=�,table%()=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
=�5st%=32:�#c%=32:cache%=�:rowbytes%=2*sx%:input=411
=�<info$="Irlam YUV 4:1:1 file "+�sx%+" by "+�sy%+" pixels"
=�
� 2300
=�9�#c%=6:sx%=�HW:sy%=�HW:D%=�#c%:ncolors%=�#c%:input=24
=�;vflip%=�vflip%:quant%=�#c%:ncmap%=�#c%:cmaplen%=1<<�#c%
=�!�nopal:back%=�dim(4):!back%=0
=�clrfirst%=D%�1
=��(D%�2)=0 �
=�$�I%=0�ncolors%-1:back%?I%=�#c%:�
=��(ncolors%�1)=0 �#c%
=��
=��D%�4 alpha%=�dim(sx%)
>�ncmap%>0 �
>)�I%=0�cmaplen%-1:r%(I%)=�HW/&FF00*F:�
>)�I%=0�cmaplen%-1:g%(I%)=�HW/&FF00*F:�
>&)�I%=0�cmaplen%-1:b%(I%)=�HW/&FF00*F:�
>0�
>:�D%�8 �
>D%�#c%=�HW+�#c%:�#c%�1 �#c%=�#c%+1
>N�
>XHst%=�#c%:buff%=�dim(sx%*3):rb%=buff%:gb%=buff%+1*sx%:bb%=buff%+2*sx%
>b�rewind
>lPinfo$="Utah rle image, "+�sx%+" by "+�sy%+" pixels, "+�bits(ncolors%*quant%)
>v
� 2400
>�2�#c%=riffoff%+&0a:st%=�W:pal%=�W:sx%=�W:sy%=�W
>�
Ȏ pal% �
>�� 12
>�-�#c%=riffoff%+&18:input=�HW:compression=0
>�� 40
>�.�#c%=riffoff%+&1c:input=�HW:compression=�W
>�%�#c%=riffoff%+&26:xppm=�W:yppm=�W
>�%� xppm<>0 � yppm<>0 � scale%<>0 �
>�%xdiv%=xdiv%*xppm:xmul%=xmul%*3543
>�%ydiv%=ydiv%*yppm:ymul%=ymul%*3543
>��
>�
>�+� 42,"Unknown .BMP variant ("+�pal%+")"
?�
?"bigendianbits=�:vflip%=�vflip%
?Ȏ input �
? � 1:rowbytes%=sx%+7>>3
?*� 4:rowbytes%=sx%+1>>1
?4� 8:rowbytes%=sx%
?>+� 16:rowbytes%=sx%*2:r$="FN16":step24=2
?H� rpal%(255),gpal%(255)
?R%rmask%=&7c00:gmask%=42:bmask%=-42
?\T�compression=3 �#c%=riffoff%+14+pal%:rmask%=�W:gmask%=�W:bmask%=�W:compression=0
?f�rmask%=&7c00 �
?p
�C%=0�255
?z&gpal%(C%)=(C%>>5)<<8 � (C%�31)<<16
?�%rpal%(C%)=(C%>>2)�31 � (C%�3)<<11
?��
?�1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
?��
?��rmask%=&f800 �
?�
�C%=0�255
?�&gpal%(C%)=(C%>>5)<<8 � (C%�31)<<16
?�%rpal%(C%)=(C%>>3)�31 � (C%�7)<<11
?��
?�'�C%=0�31:r%(C%)=C%/31*F:�:b%()=r%()
?��C%=0�63:g%(C%)=C%/63*F:�
?��
?�� 24,32
@"rbo%=2:gbo%=1:bbo%=0:r$="FN24"
@3�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%()
@1r$="FN24":step24=input/8:rowbytes%=sx%*step24
@$"rmask%=-1:gmask%=42:bmask%=-42
@.T�compression=3 �#c%=riffoff%+14+pal%:rmask%=�W:gmask%=�W:bmask%=�W:compression=0
@8%�rmask%=&FF �rbo%=0:gbo%=1:bbo%=2
@B%�gmask%=&FF �gbo%=0:bbo%=1:rbo%=2
@L%�bmask%=&FF �bbo%=0:gbo%=1:rbo%=2
@Vinput=24
@`4 � 42,".BMP file of unusual depth ("+�input+")"
@j�
@t�input<=8 �
@~"�#c%=riffoff%+14+pal%:r$="FN8"
@��C%=0�2^input-1
@�?b%(C%)=�#c%/255*F:g%(C%)=�#c%/255*F:r%(C%)=�#c%/255*F:�#c%
@��
@��
@�Ȏ compression �
@�� 0:info$="Uncompressed "
@�,� 1:info$="RLE8 compressed ":r$="FN2401"
@�,� 2:info$="RLE4 compressed ":r$="FN2402"
@�C � 42,".BMP compression type not supported ("+�compression+")"
@��
@�rowbytes%=rowbytes%+3��3
@�:� compression<>0 cachebytes%=�:plbuff%=�dim(rowbytes%)
Acache%=�:�#c%=riffoff%+st%
A
Oinfo$+="Windows 3.0 .BMP image, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
A
� 2500
A2�#c%=0:s$="":C%=�#c%:ȕC%<>0 s$+=�C%:C%=�#c%:�
A(7s$+=" version "+äW:sx%=�W:sy%=�W:input=�W:cache%=�
A2_info$="!Translator Clear format made by "+s$+", "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
A<�input>8 �
AFK�nopal:input=24:step24=3:rowbytes%=3*sx%:rbo%=0:gbo%=1:bbo%=2:r$="FN24"
AP�
AZ�C%=0�2^input-1
Ad9r%(C%)=�#c%/255*F:g%(C%)=�#c%/255*F:b%(C%)=�#c%/255*F
An�
Ax"input=8:r$="FN8":rowbytes%=sx%
A��
A�st%=�#c%
A�
� 2600
A��#c%=0:C%=�#c%
A�D%=�#c%:Ȏ D% �
A�!� 0:sx%=320:sy%=200:planes%=4
A�!� 1:sx%=640:sy%=200:planes%=2
A�!� 2:sx%=640:sy%=400:planes%=1
A�? �42,"ChangeFSI knows nothing of "+�C%+" type Degas files"
A��
A�]�I%=0�(1<<input)-1:D%=�beHW:r%(I%)=(D%>>8�7)/7*F:g%(I%)=(D%>>4�7)/7*F:b%(I%)=(D%�7)/7*F:�
A�<cache%=�:planar%=�:masking%=�:st%=34:�#c%=34:r$="FN1600"
A�Hrowbytes%=(sx%+15>>4)<<1:plbytes%=rowbytes%*planes%:pbuff%=�dim(sx%)
Bj�C%�128 r$="FN1601":flag=1600:cachebytes%=�:plbuff%=�dim(plbytes%) �realrowbytes%=2:rowbytes%=plbytes%
BCinfo$="Degas file "+�sx%+" by "+�sy%+" pixels, "+�bits(planes%)
B
� 2700
B"�#c%=4:sx%=�HW:sy%=�HW
B,Ȏ �HW �
B62� &AF:rowbytes%=sx%:cache%=�:r$="FN8":st%=&30A
B@R �#c%:� 42,"Panic in ColoRIX reading - ChangeFSI largely ignorant of format!"
BJ�
BT�C%=0�2^input-1
B^6r%(C%)=�#c%/63*F:g%(C%)=�#c%/63*F:b%(C%)=�#c%/63*F
Bh�
Br�#c%=st%
B|Cinfo$="ColoRIX file "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
B�
� 2800
B�!�#c%=0:� s$=�fits:Ȏ �s$,8) �
B�Q� "SIMPLE  ":�s$,30,1)<>"T" �42,"ChangeFSI can only read Simple FITS format"
B�� "BITPIX  ":input=��s$,10)
B�J� "NAXIS   ":�s$,10)<>2 �42,"ChangeFSI can only read 2d FITS images"
B�� "NAXIS1  ":sx%=��s$,10)
B�� "NAXIS2  ":sy%=��s$,10)
B�� "END     "
B�' �info% �"Ignoring FITS record "s$
B��
B���s$,8)="END     "
B�.st%=(�#c%�2880 + 1)*2880:cache%=�:�#c%=st%
B�Ȏ input �
C%� 8:r$="FN8":rowbytes%=sx%:�nopal
CC� 16:rowbytes%=2*sx%:� rpal%(255),gpal%(255):step24=2:r$="FN16"
C
�C%=0�255
C&gpal%(C%)=C%<<8
C0rpal%(C%)=C%
C: �:cheat%=0:�invert% cheat%=F
CDe�C%=0�255:r%(C%)=cheat%+C%/65535*F:g%(C%)=((C%�&80)<<8)/65535*F:b%(C%)=cheat%:�:rwt=1:gwt=1:bwt=1
CNQ � 42,"ChangeFSI can't read a FITS image with this number of bits per pixel"
CX�
Cb@info$="FITS file "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
Cl
� 2900
Cv<�#c%=4:sx%=�beHW:sy%=�beHW:�#c%=&42:input=�beHW:C%=�beHW
C�=rowbytes%=�beHW:C%=�beW:st%=�beW:�#c%=st%:r$="FN8":�nopal
C�#� rpal%(15),gpal%(15),bpal%(15)
C�Irpal%()=&e6,&23,&e6,&7f,&17,&00,&a1,&45,&e6,&4a,&e6,&73,&6e,&47,&8a,0
C�Igpal%()=&e6,&78,&00,&23,&a1,&73,&2e,&2e,&c8,&a6,&75,&40,&b8,&78,&55,0
C�Ibpal%()=&b8,&e6,&00,&a1,&17,&2e,&0c,&2e,&00,&c6,&00,&e6,&00,&00,&00,0
C�k�C%=&80�&8F:r%(C%)=rpal%(C%-&80)/255*F:g%(C%)=gpal%(C%-&80)/255*F:b%(C%)=bpal%(C%-&80)/255*F:�:cache%=�
C�Finfo$="Apollo GPR file "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
C�
� 3000
C�Hsx%=720:sy%=�#c%/1440:� rpal%(255),gpal%(255),bpal%(255),table%(255)
C�� �
C�
�C%=0�255
C�table%(C%)=(C%-16)/219*F
D>r%(C%)=(C%-128)/186*0.624*F:rpal%(C%)=(C%-128)/160*0.952*F
D?g%(C%)=-(C%-128)/186*0.64*F:gpal%(C%)=-(C%-128)/160*0.277*F
D=b%(C%)=(C%-128)/186*1.73*F:bpal%(C%)=-(C%-128)/160*1.11*F
D �
D*�
D>
�C%=0�255
DHtable%(C%)=(C%-16)/219*F
DR5r%(C%)=�((C%-128)/160*F):b%(C%)=�((C%-128)/126*F)
D\Jg%(C%)=�(-(C%-128)/160*rwt/gwt*F):gpal%(C%)=�(-(C%-128)/126*bwt/gwt*F)
Df�
Dp�
Dz<table%()=-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
D�:st%=0:�#c%=0:cache%=�:rowbytes%=1440:input=422:gamma=1
D��scale% ymul%=ymul%*2
D�:info$="CCIR601 4:2:2 file "+�sx%+" by "+�sy%+" pixels"
D�
� 3100
D�$quant%=8:�#c%=0:a$=�#c%:st%=�#c%
D� sx%=�a$:sy%=�(�a$,�a$," ")))
D�,�nopal:input=24:step24=3:rowbytes%=sx%*3
D�4rbo%=0:gbo%=1:bbo%=2:cache%=�:flag=700:r$="FN24"
D�Qinfo$="!RayShade 'RGB' image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
D�
� 3200
D�quant%=8:�#c%=0:st%=0
D�sx%=��s$,�s$,"_")+1,1)
D�Ȏ sx% �
E� 5:sx%=768:sy%=512
E� 2:sx%=3072:sy%=2048
E� 1:sx%=1536:sy%=1024
E$�
E.,�nopal:input=24:step24=3:rowbytes%=sx%*3
E84rbo%=0:gbo%=1:bbo%=2:cache%=�:flag=700:r$="FN24"
EBLinfo$="Kodak /RGB image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
EL
� 3300
EV�#c%=0:input=���GET,2)
E`7s$=�GET:sx%=�s$:sy%=��s$,�s$," ")):�sy%=0 sy%=��GET
Ejcache%=�:Ȏ input �
EtD� 4:input=1:r$="FN8":r%(0)=F:g%()=r%():b%()=r%():bigendianbits=�
E~rowbytes%=(sx%+7)�8
E�!� 5:input=8:r$="FN8":E%=��GET
E�1�C%=0�E%:r%(C%)=C%/E%*F:�:g%()=r%():b%()=r%()
E�rowbytes%=sx%
E�A� 6:input=24:r$="FN24":E%=��GET:step24=3:rbo%=0:gbo%=1:bbo%=2
E�1�C%=0�E%:r%(C%)=C%/E%*F:�:g%()=r%():b%()=r%()
E�rowbytes%=sx%*3
E��
E�st%=�#c%:flag=700
E�Binfo$+="pbm image, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
E�$� �GET �s$=�#c%:��s$,1)<>"#":=s$
E�
� 3400
E�$�#c%=0:s$=�GET:input=16:quant%=5
F.s$=�GET:sx%=�s$:sy%=��s$,�s$," ")):s$=�GET
F
-� rpal%(255),gpal%(255):input=16:step24=2
F
�C%=0�255
F"gpal%(C%)=(C%>>5)<<8 � (C%�31)
F(+rpal%(C%)=((C%>>2)�31)<<16 � (C%�3)<<11
F2�
F<cache%=�:r$="FN16"
FF1�C%=0�31:r%(C%)=C%/31*F:�:g%()=r%():b%()=r%()
FP%rowbytes%=sx%*2:st%=�#c%:flag=700
FZAinfo$="p15 image, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
Fd
� 3450
Fn�#c%=0:info$=�GET
Fx3ybits%=��info$,�info$," ")):ymax%=(1<<ybits%)-1
F�:ubits%=��info$,�info$,"Y ")+1):umax%=(1<<(ubits%-1))-1
F�:vbits%=��info$,�info$,"U ")+1):vmax%=(1<<(vbits%-1))-1
F�&s$=�GET:sx%=�s$:sy%=��s$,�s$," "))
F�2� rpal%(255),gpal%(255),bpal%(255),table%(255)
F�'�C%=0�ymax%:table%(C%)=C%/ymax%*F:�
F�D%=(1<<ubits%)-1
F�-�C%=0�D%:d=C%/umax%:�d>1 d=-(D%-C%)/umax%
F�;b%(C%)=�(d*(1-bwt)*F):gpal%(C%)=�(-d*(1-bwt)*bwt/gwt*F)
F��
F�D%=(1<<vbits%)-1
F�-�C%=0�D%:d=C%/vmax%:�d>1 d=-(D%-C%)/vmax%
F�8r%(C%)=�(d*(1-rwt)*F):g%(C%)=�(-d*(1-rwt)*rwt/gwt*F)
F��
G;rowbytes%=sx%*2:st%=�#c%:cache%=�:r$="FN2250":input=555
G*info$+=", "+�sx%+" by "+�sy%+" pixels"
G
� 3500
G"Aquant%=1:�#c%=6:E%=�HW:sx%=�HW:sx%=�HW:sy%=�HW:st%=�HW:st%=�W
G,4rowbytes%=sx%/8+1��1:cache%=�:st%+=�#c%:�#c%=st%
G6Ȏ E% �
G@� 1
GJ,r$="FN8":input=1:r%(0)=F:g%(0)=F:b%(0)=F
GTKinfo$="Pocketbook bitmap, "+�sx%+" by "+�sy%+" pixels, 1 bit per pixel"
G^� 2
Gh9planar%=�:planes%=2:r$="FN1600":input=8:cachebytes%=�
Gr?r%(0)=F:r%(1)=(F/3)*2:r%(2)=F/3:r%(3)=0:g%()=r%():b%()=r%()
G|Hplbytes%=rowbytes%*planes%:buff%=�dim(plbytes%*sy%):pbuff%=�dim(sx%)
G�realrowbytes%=rowbytes%*sy%
G�Ninfo$="PocketbookII bitmap, "+�sx%+" by "+�sy%+" pixels, 2 bits per pixel"
G�
G�(� 42,"Unknown Pocketbook PIC format"
G��
G�
� 3600
G�Bpcdblk%=�dim(40):ș&20023,"ChangeFSI$PCDindex",pcdblk%,20 �,,Z
G�5�Z �pcdblk%?Z=13:pcdindex%=�$pcdblk% �pcdindex%=3
G�Bș"PhotoCD_Open",1,c%,1 � pcdh%:ș"PhotoCD_GetCount",pcdh% �,Z
G�?�(Z>>pcdindex%)=0 �#c%:�42,"Desired resolution unavailable"
G�+ș"PhotoCD_GetRotation",pcdh% �,,pcdtr%
G�5ș"PhotoCD_GetSize",pcdh%,,pcdindex% �,,,,sx%,sy%
G�)pcdblk%!0=0:pcdblk%!8=sx%:pcdblk%!4=0
H7pcdblk%!16=0:pcdblk%!20=2:pcdblk%!24=1:pcdblk%!28=3
HȎ pcdtr% �
H&� 0
H0� &80000000:hflip%=�hflip%
H:� 90
HDȎ rotate% �
HN� 0:rotate%=1
HX� -1:rotate%=0
Hb/� 1:rotate%=0:vflip%=�vflip%:hflip%=�hflip%
Hl�
Hv� &8000005A
H�Ȏ rotate% �
H� � 0:rotate%=1:vflip%=�vflip%
H�!� -1:rotate%=0:vflip%=�vflip%
H� � 1:rotate%=0:hflip%=�hflip%
H��
H�'� 180:hflip%=�hflip%:vflip%=�vflip%
H�� &800000B4:vflip%=�vflip%
H�	� 270
H�Ȏ rotate% �
H�� 0:rotate%=-1
H�� 1:rotate%=0
H�0� -1:rotate%=0:vflip%=�vflip%:hflip%=�hflip%
H��
I� &8000010E
IȎ rotate% �
I!� 0:rotate%=-1:vflip%=�vflip%
I  � 1:rotate%=0:vflip%=�vflip%
I*!� -1:rotate%=0:hflip%=�hflip%
I4�
I> PANIC
IH�
I\@input=24:step24=3:rbo%=0:gbo%=1:bbo%=2:pcdcachesize%=32*1024
IfArowbytes%=sx%*3:�nopal:cache%=�:pcdcache%=�dim(pcdcachesize%)
IpIinfo$="PhotoCD image, "+�sx%+" by "+�sy%+" pixels, 24 bits per pixel"
Iz
� 3700
I�3A%=�"<ChangeFSI$Dir>.CFSIjpeg":jpeg%=�dim(�#A%)
I�ș12,4,A%,jpeg%,�#A%:�#A%
I�Cdatacache%=�cachedim(�#c%):�datacache%=-1 datacache%=�dim(�#c%)
I�$�#c%=0:ș12,4,c%,datacache%,�#c%
I�QA%=datacache%:B%=jpegblk%:C%=jpegblk%+4:D%=jpegblk%+8:E%=jpegblk%+12:�jpeg%+8
I�&B%=jpegblk%!12:jpegspace%=�dim(B%)
I�'C%=datacache%:A%=jpegspace%:D%=�#c%
I�5�jpeg%:cache%=�:�!A% �42,"JPEG code error: "+�!A%
I�5sx%=A%!20:sy%=A%!24:input=8*A%?28:�nopal:step24=4
I�Binfo$="JFIF image, "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
I�%jpegy%=sy%:r$="FN"+è(3700+input)
I�
� 3800
I��#c%=24:sx%=�W:sy%=�W
J�scale% ymul%=ymul%*2
J2� rpal%(255),gpal%(255),bpal%(255),table%(255)
J
�C%=0�255
J$�C%<128 table%(C%)=C%/127*F
J.D%=C%:�D%�128 D%-=256
J8)r%(C%)=�(D%/160*F):b%(C%)=�(D%/126*F)
JB>g%(C%)=�(-D%/160*rwt/gwt*F):gpal%(C%)=�(-D%/126*bwt/gwt*F)
JL�
J`=�#c%=52:st%=�W:�#c%=64:cache%=�:rowbytes%=2*sx%:input=411
JjFinfo$="Uncompressed Techno-I YUV file "+�sx%+" by "+�sy%+" pixels"
Jt
� 3900
J~2�#c%=8:sx%=�W:sy%=�W:st%=16:quant%=12:step24=6
J�5�C%=0�4095:r%(C%)=C%/4095*F:�:g%()=r%():b%()=r%()
J�Dinput=48:rowbytes%=sx%*6:cache%=�:r$="FN24":rbo%=0:gbo%=2:bbo%=4
J�Pinfo$="Ronald Alpiar format, "+�sx%+" by "+�sy%+" pixels, 36 bits per pixel"
J�
� 3905
J�2�#c%=8:sx%=�W:sy%=�W:st%=16:quant%=16:step24=6
J�7�C%=0�65535:r%(C%)=C%/65535*F:�:g%()=r%():b%()=r%()
J�Dinput=48:rowbytes%=sx%*6:cache%=�:r$="FN24":rbo%=0:gbo%=2:bbo%=4
J�Pinfo$="Ronald Alpiar format, "+�sx%+" by "+�sy%+" pixels, 48 bits per pixel"
J�	� 666
KF?st%=0:�#c%=0:sx%=160:sy%=128:input=8:cache%=�:rowbytes%=sx%
KP<�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%():r$="FN8"
KZMinfo$="The number of the beast, 160 by "+�sy%+" pixels, 8 bits per pixel"
Kd�
Kn�info% �info$
Kx#ș"Hourglass_On",1:hour%=&406c4
K��m=-9 � m=-10 �
K�Hș"XOS_CLI","rmensure CompressJPEG 0 rmload System:Modules.jcompmod"
K�mș"XOS_CLI","rmensure CompressJPEG 0 IF ""<ChangeFSI$Dir>"" <> """" THEN rmload <ChangeFSI$Dir>.jcompmod"
K�B*rmensure CompressJPEG 0 ERROR Can't find CompressJPEG module.
K��
K�0�invert% r%()=F-r%():g%()=F-g%():b%()=F-b%()
K��xdiv% �reduce(xmul%,xdiv%)
K��ydiv% �reduce(ymul%,ydiv%)
K�
Ȏ m �
K�D� -1:x%=256:y%=256:ncol=256:�scaleo% xdiv%=xdiv%*2:ydiv%=ydiv%*2
K�.� -2:x%=sx%:y%=sy%:�spm=18 ncol=1 �ncol=15
K�(� -3,-5,-6:x%=sx%:y%=sy%:ncol=2^15-1
K�(� -4,-7,-8:x%=sx%:y%=sy%:ncol=2^24-1
L5� -9,-10:x%=sx%:y%=sy%:ncol=2^24-1:�m=-9 ncol=256
L
L5ș53,m,4 � ,,nx:ș53,m,5 � ,,ny:nx=1<<nx:ny=1<<ny
L"1ș53,m,11 � ,,x%:ș53,m,12 � ,,y%:x%+=1:y%+=1
L, ș53,m,3 � ,,ncol:�scaleo% �
L6�rotate% �
L@!xdiv%=xdiv%*ny:ydiv%=ydiv%*nx
LJ�xdiv% ymul%=ymul%*2
LT�ydiv% xmul%=xmul%*2
L^�
Lh!xdiv%=xdiv%*nx:ydiv%=ydiv%*ny
Lr�xdiv% xmul%=xmul%*2
L|�ydiv% ymul%=ymul%*2
L��
L��
L�!ș&62A51,m � r0;V:�(V �1)=0 �
L��r0=1 �
L�ncol=255:�m$<>"D" m$="R"
L��
L��
L��
L��m=-6 � m=-7 � m=-8 �
L�*nx=��pnm$,5):ny=��pnm$,�pnm$,",",5)+1)
L��scaleo% �
L��rotate% �
M�xdiv% ymul%=ymul%*nx
M�ydiv% xmul%=xmul%*ny
M�
M&�xdiv% xmul%=xmul%*nx
M0�ydiv% ymul%=ymul%*ny
M:�
MD!xdiv%=xdiv%*90:ydiv%=ydiv%*90
MN�
MX�
Mb�rotate% Ȕ x%,y%
Mv�xdiv%=0 xdiv%=sx%
M��ydiv%=0 ydiv%=sy%
M��xs$="=" xmul%=x%:xdiv%=sx%
M��ys$="=" ymul%=y%:ydiv%=sy%
M��lock% �
M�M�xmul%/xdiv%>ymul%/ydiv% xmul%=ymul%:xdiv%=ydiv% �ymul%=xmul%:ydiv%=xdiv%
M��
M�
�ncol=1 �
M�Ȏ m$ �
M�$�"C":xdiv%=xdiv%*4:ydiv%=ydiv%*4
M�� A%(16),B%(16)
M�A%()=0,&00000001,&08000001,&08000101,&08080101,&08080103,&0C080103,&0C080303,&0C0C0303,&0C0E0303,&0C0E0703,&0E0E0703,&0E0E0707,&0E0F0707,&0E0F0F07,&0F0F0F07,&0F0F0F0F
M�B%()=0,&00000008,&01000008,&01000808,&01010808,&0101080C,&0301080C,&03010C0C,&03030C0C,&03070C0C,&03070E0C,&07070E0C,&07070E0E,&070F0E0E,&070F0F0E,&0F0F0F0E,&0F0F0F0F
M�2even_gard=�dim(17*32*4):odd_gard=�dim(17*32*4)
NC�I%=0�16:�J%=0�16:even_gard!(J%*32*4+I%*4)=A%(I%)�B%(J%)<<4:�:�
NB�I%=0�16:�J%=0�16:odd_gard!(I%*32*4+J%*4)=B%(I%)�A%(J%)<<4:�:�
N$�"T":xdiv%=xdiv%*3:ydiv%=ydiv%*3
N � A%(9),B%(9)
N*@A%()=0,&0001,&4001,&4041,&4043,&40C3,&60C3,&61C3,&71C3,&71C7
N4@B%()=0,&0004,&1004,&1104,&1106,&1186,&3186,&31C6,&71C6,&71C7
N>2even_gard=�dim(10*16*4):odd_gard=�dim(10*16*4)
NHA�I%=0�9:�J%=0�9:even_gard!(J%*16*4+I%*4)=A%(I%)�B%(J%)<<3:�:�
NR@�I%=0�9:�J%=0�9:odd_gard!(I%*16*4+J%*4)=B%(I%)�A%(J%)<<3:�:�
N\$�"D":xdiv%=xdiv%*2:ydiv%=ydiv%*2
Nf� A%(4),B%(4)
NpA%()=0,&1,&21,&31,&33
NzB%()=0,&2,&12,&32,&33
N�*even_gard=�dim(5*8):odd_gard=�dim(5*8)
N�<�I%=0�4:�J%=0�4:even_gard?(J%*8+I%)=A%(I%)�B%(J%)<<2:�:�
N�;�I%=0�4:�J%=0�4:odd_gard?(I%*8+J%)=B%(I%)�A%(J%)<<2:�:�
N��
N��
N��
N�-�reduce(xmul%,xdiv%):�reduce(ymul%,ydiv%)
N�U�xdiv%*ydiv%*255>2^32 xdiv%=xdiv%��1:ydiv%=ydiv%��1:xmul%=xmul%��1:ymul%=ymul%��1
N��xdiv%*ydiv%*255<2^32
N�@�info% �"Size ratios are x ";xmul%":"xdiv%" y "ymul%":"ydiv%
N�?x%=sx%*xmul%/xdiv%+.9999:y%=sy%*ymul%/ydiv%+.9999:rows%=sy%
N�order%=x%*y%>sx%*sy%
N�code%=�dim(8192):SP=13
O
�cache% �
O�cachesize(code%)
O�cachebytes% �
O$:filesize%=�#c%-�#c%:�cache%>filesize% cache%=filesize%
O.9�cachebytes%>0 �cache%>cachebytes% cache%=cachebytes%
O8cacherows%=cache%
OB�
OL>filesize%=sy%*rowbytes%:�cache%<rowbytes% cache%=rowbytes%
OV&�cache%>filesize% cache%=filesize%
O`Ccacherows%=striprows%:�cacherows%<1 cacherows%=cache%�rowbytes%
Ojcache%=cacherows%*rowbytes%
Ot�
O~Gdatacache%=�cachedim(cache%):�datacache%=-1 datacache%=�dim(cache%)
O��
O��ncol=255 �m$<>"D" m$="R"
O��m$="R" �(ncol=63 �m$="") �
O�+ș53,-1,3 �,,J%:�ncol=255 � �=m J%=ncol
O�$�ncol=63 �(m$=""�m$="R") J%=ncol
O�P�J%<>ncol �close:�42,"You must be in a "+�(ncol+1)+" colour mode to do this"
O�J%=ncol:�J%=63 J%=255
O�palette%=�dim((J%+1)*4)
O��ncol=255 �
O�4ș"ColourTrans_ReadPalette",-1,-1,palette%,256*4
O�5�I%=0�255:palette%!(I%<<2)=palette%!(I%<<2)>>>8:�
O��
P�ncol=63 �
P

�I%=0�255
P+palette%!(I%<<2)=(I%�7 � (I%�16)>>1)*17
P/palette%?(I%<<2 �1)=(I%�3 � (I%�&60)>>3)*17
P(;palette%?(I%<<2 �2)=(I%�3 � (I%�8)>>1 � (I%�128)>>4)*17
P2�
P<�
PFH�I%=0�ncol:ș"OS_ReadPalette",I%,16 � ,,i%:palette%!(I%<<2)=i%>>>8:�
PP�
PZ�
Pd%t%=�:k%=palette%+1:nk%=palette%+2
Pn�I%=0�ncol*4�4
Px2�palette%?I%<>k%?I% � palette%?I%<>nk%?I% t%=�
P��
P��ncol>16 �t% m$="D"
P��ncol=15 �t% m$="T"
P�
�m$="R" �
P�7� sx%*xmul%/xdiv%*sy%*ymul%/ydiv%<200000 k%=3 �k%=4
P�nk%=8-k%
P�
t%=1<<nk%
P�mask%=t%-1
P�td2%=1<<nk%-1
P�step%=1<<(8-k%)
P�$ncol%=ncol+1:�ncol%=64 ncol%=256
P�ict%=�dim(2^(k%*3)*4-1)
P�a�cache%<8192*6 scratch%=�dim(8192*6):scratchsz%=8192*6 �scratch%=datacache%:scratchsz%=cache%
Q>�info% �"Begin table generation with ";scratchsz%" bytes."
Q
�Z%=0�2�2
QP%=code%
Q"[OPT Z%
Q,
.make%
Q6STMFD r13!,{r14}
Q@LDR r4,ict
QJMOV r2,#step%/2
QT
.blueloop
Q^MOV r1,#step%/2
Qh.greenloop
QrMOV r0,#step%/2
Q|.redloop
Q�MOV r3,r0,LSR #nk%
Q�MOV r14,r1,LSR #nk%
Q�MOV r5,r2,LSR #nk%
Q��R r3,r3,r14,LSL #k%
Q��R r3,r3,r5,LSL #k%*2
Q�BL devious
Q�ADD r0,r0,#step%*2
Q�CMP r0,#256
Q�BCC redloop
Q�ADD r1,r1,#step%
Q�CMP r1,#256
Q�BCC greenloop
RADD r2,r2,#step%
RCMP r2,#256
RBCC blueloop
R&LDMFD r13!,{pc}^
R0.ct DCD palette%
R:.min DCD code%+8192-256*2*4
RD.ict DCD ict%
RN.fsaad DCD scratch%
RX#.fsalim DCD scratch%+scratchsz%
Rb.devious
Rl&STMFD r13!,{r0,r1,r2,r3,r4,r8,r14}
RvBIC r0,r0,#(mask%<<1)+1
R�BIC r1,r1,#mask%
R�BIC r2,r2,#mask%
R�
MOV r5,#0
R�
LDR r6,ct
R�MOV r9,#&ff0000
R�MOV r14,#&ff0000
R�LDR r12,min
R�.devloop
R�LDR r7,[r6,r5,LSL #2]
R�MOV r8,r7,lsr #16
R�BIC r10,r8,#mask%
SADD r11,r2,#t%
SCMP r10,r2
SBEQ blueequal
S SUBCC r10,r2,r8
S*SUBCC r11,r11,r8
S4SUBCS r10,r8,r11
S>SUBCS r11,r8,r2
SHMUL r3,r10,r10
SR
.doneblue
S\MUL r4,r11,r11
SfMOV r8,r7,lsr #8
Sp� r8,r8,#255
SzBIC r10,r8,#mask%
S�ADD r11,r1,#t%
S�CMP r10,r1
S�BEQ greenequal
S�SUBCC r10,r1,r8
S�SUBCC r11,r11,r8
S�SUBCS r10,r8,r11
S�SUBCS r11,r8,r1
S�MUL r8,r10,r10
S�ADD r8,r8,r8,LSL #2
S�ADD r3,r3,r8,LSL #1
S�.donegreen
S�MUL r8,r11,r11
TADD r8,r8,r8,LSL #2
TADD r4,r4,r8,LSL #1
T$� r8,r7,#255
T8BIC r10,r8,#mask%
TBADD r11,r0,#t%
TLCMP r10,r0
TVBEQ redequal0
T`SUBCC r10,r0,r8
TjSUBCC r11,r11,r8
TtSUBCS r10,r8,r11
T~SUBCS r11,r8,r0
T�MUL r7,r10,r10
T�ADD r7,r7,r7,LSL #1
T�ADD r7,r3,r7
T�STR r7,[r12,r5,LSL #2]
T�
.donered0
T�MUL r7,r11,r11
T�ADD r7,r7,r7,LSL #1
T�ADD r7,r4,r7
T�
CMP r7,r9
T�MOVCC r9,r7
U
ADD r7,r0,#t%
UBIC r10,r8,#mask%
UADD r11,r7,#t%
U(CMP r10,r7
U2BEQ redequal1
U<SUBCC r10,r7,r8
UFSUBCC r11,r11,r8
UPSUBCS r10,r8,r11
UZSUBCS r11,r8,r7
UdMUL r7,r10,r10
UnADD r7,r7,r7,LSL #1
UxADD r3,r3,r7
U�
.donered1
U�ADD r7,r5,#ncol%
U�STR r3,[r12,r7,LSL #2]
U�MUL r7,r11,r11
U�ADD r7,r7,r7,LSL #1
U�ADD r7,r4,r7
U�CMP r7,r14
U�MOVCC r14,r7
U�ADD r5,r5,#1
U�CMP r5,#ncol%
U�BCC devloop
VLDMFD r13!,{r0,r1,r2,r3,r4}
VLDR r5,fsaad
V"
MOV r7,r5
V,MOV r10,#0
V6
.calcnum0
V@LDMIA r12!,{r8,r11}
VJ
CMP r8,r9
VTSTRLEB r10,[r7],#1
V^ADD r10,r10,#1
VhCMP r11,r9
VrSTRLEB r10,[r7],#1
V|ADD r10,r10,#1
V�LDMIA r12!,{r8,r11}
V�
CMP r8,r9
V�STRLEB r10,[r7],#1
V�ADD r10,r10,#1
V�CMP r11,r9
V�STRLEB r10,[r7],#1
V�ADD r10,r10,#1
V�CMP r10,#ncol%
V�BCC calcnum0
V�SUBS r10,r7,r5
V�SWIEQ 256+�"A"
V�CMP r10,#4 ;if<4 then
V�#MOVCC r7,r5 ;reset list pointer
W"LDRCCB r5,[r7] ;first possible
W&LDRCCB r8,[r7,#1] ;second possible
W�RCC r5,r5,r8,lsl #8
W&%LDRCCB r8,[r7,#2] ;third possible
W0�RCC r5,r5,r8,lsl #16
W:ADD r5,r5,r10,lsl #24
WDBIC r10,r3,#1
WNSTR r5,[r4,r10,LSL #2]
WX
MOV r5,r7
WbMOV r10,#0
Wl
.calcnum1
WvLDMIA r12!,{r8,r11}
W�CMP r8,r14
W�STRLEB r10,[r7],#1
W�ADD r10,r10,#1
W�CMP r11,r14
W�STRLEB r10,[r7],#1
W�ADD r10,r10,#1
W�LDMIA r12!,{r8,r11}
W�CMP r8,r14
W�STRLEB r10,[r7],#1
W�ADD r10,r10,#1
W�CMP r11,r14
W�STRLEB r10,[r7],#1
W�ADD r10,r10,#1
XCMP r10,#ncol%
XBCC calcnum1
XSUBS r10,r7,r5
X SWIEQ 256+�"B"
X*CMP r10,#4 ;if<4 then
X4MOVCC r7,r5
X>LDRCCB r5,[r7]
XHLDRCCB r8,[r7,#1]
XR�RCC r5,r5,r8,lsl #8
X\LDRCCB r8,[r7,#2]
Xf�RCC r5,r5,r8,lsl #16
XpADD r5,r5,r10,lsl #24
Xz�R r10,r3,#1
X�STR r5,[r4,r10,LSL #2]
X�STR r7,fsaad
X�LDR r8,fsalim
X�
CMP r7,r8
X�SWICS 256+�"!"
X�LDMFD r13!,{r8,pc}^
X�.redequal0
X�STR r3,[r12,r5,LSL #2]
X�TST r8,#td2%
X�SUBNE r11,r8,r0
X�SUBEQ r11,r11,r8
X�B donered0
X�.redequal1
YTST r8,#td2%
YSUBNE r11,r8,r7
YSUBEQ r11,r11,r8
Y$B donered1
Y..greenequal
Y8TST r8,#td2%
YBSUBNE r11,r8,r1
YLSUBEQ r11,r11,r8
YVB donegreen
Y`.blueequal
Yj
MOV r3,#0
YtTST r8,#td2%
Y~SUBNE r11,r8,r2
Y�SUBEQ r11,r11,r8
Y�B doneblue
Y�]
Y��
Y�I%=�:�make%
Y�m�info% �"Generated 'r'";k%" tables for ";ncol%" colours using ";!fsaad-scratch%" bytes, taking "�-I%" cS"
Y�%safesubict%=�dim(!fsaad-scratch%)
Y�:�I%=0�!fsaad-scratch%+4�4:safesubict%!I%=scratch%!I%:�
Y�O�I%=0�2^(k%*3)*4-1�4:�(ict%!I%>>>24)>3 ict%!I%=ict%!I%-scratch%+safesubict%
Y��
Y��
Y��
Z�fast% ��<>0 �0
Z
Ȏ m �
Z� -1,-9:col=0
Z(!� -3,-4,-5,-6,-7,-8,-10:col=2
Z2
Z<�m$="D" �ncol=3 m$=""
ZF0col=0:�ncol>15 �m$="C" �m$="D" �m$="R" col=2
ZP.�ncol=63 � ncol=255 �m$="D" col=0:ncol=256
ZZ�
Zd
�ncol=1 �
ZnȎ m$ �
Zx�"C":col=0:x%=x%+1��1
Z��"D":col=0:x%=x%+3��3
Z��"T":col=0:x%=x%+1��1
Z��
Z��
Z�� cl%(x%+7,col)
Z�"� xl%(x%+7,col),xp%(sx%+7,col)
Z�� xl2%(x%+7,col)
Z��sharpen% �
Z�
�order% �
Z�4� rm%(sx%+7,col),rm1%(sx%+7,col),rm2%(sx%+7,col)
Z��
Z�1� rm%(x%+7,col),rm1%(x%+7,col),rm2%(x%+7,col)
Z��
[�
["�hist%�equal% � vals%(256,col)
[� nl%(x%+7,col)
["totvals%=x%*(col+1)
[,totvals2%=sx%*(col+1)
[6�Z=0�2�2:P%=code%
[@
Ȏ ncol �
[J� 2^24-1
[T
[OPT Z
[^.div255
[h]
[r�I%=0�2^p6bits-1
[|
[OPT Z
[�EQUD I%/(2^p6bits-1)*F
[�]
[��
[�
[OPT Z
[�.fs%
[�STMFD SP !,{R14}
[� LDR R1,[R9,#5*8]:LDR R1,[R1]
[�LDR R10,[R9,#4*8]
[�LDR R11,[R9,#3*8]
[�#LDR R12,[R9,#2*8]:LDR R12,[R12]
[�LDR R8,[R9,#8]:LDR R8,[R8]
[�LDR R9,[R9]:LDR R9,[R9]
[�LDR R4,[R10]
\LDR R5,[R10,#4]
\LDR R6,[R10,#8]
\ADR R7,div255
\&.fsloop
\0ADD R10,R10,R8
\:%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
\DWSUB R0,R4,R4,LSR #p6bits:ADD R0,R0,#1<<(bits-p6bits-1):MOV R0,R0,LSR #(bits-p6bits)
\N&LDR R2,[R7,R0,LSL #2]:SUB R4,R4,R2
\X%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
\bjSUB R3,R5,R5,LSR #p6bits:ADD R3,R3,#1<<(bits-p6bits-1):MOV R3,R3,LSR #(bits-p6bits):�R R0,R0,R3,LSL #8
\l&LDR R2,[R7,R3,LSL #2]:SUB R5,R5,R2
\v%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
\�kSUB R3,R6,R6,LSR #p6bits:ADD R3,R3,#1<<(bits-p6bits-1):MOV R3,R3,LSR #(bits-p6bits):�R R0,R0,R3,LSL #16
\�&LDR R2,[R7,R3,LSL #2]:SUB R6,R6,R2
\�DSTRB R0,[R12]:MOV R0,R0,LSR #8:STRB R0,[R12,#1]:MOV R0,R0,LSR #8
\�STRB R0,[R12,#2]
\�]
\��m=-8 �
\�
[OPT Z
\�ADD R12,R12,R1,LSL #2
\�]
\��
\�
[OPT Z
\�(ADD R12,R12,R1,LSL #1:ADD R12,R12,R1
\�]
]�
]�dither% �
]
[OPT Z
] ADD R0,R11,#4
]*ADD R2,R4,R4,LSL #1
]4(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
]>STR R3,[R11,-R8]
]HADD R2,R4,R4,LSL #2
]R$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
]\STR R3,[R11]
]fMOV R3,R4,ASR #4
]pSTR R3,[R11,R8]!
]zRSB R2,R4,R4,LSL #3
]�LDR R4,[R10]
]�ADD R4,R4,R2,ASR #4
]�ADD R2,R5,R5,LSL #1
]�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
]�STR R3,[R0,-R8]
]�MOV R3,R5,ASR #4
]�STR R3,[R0,R8]
]�ADD R2,R5,R5,LSL #2
]�#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
]�STR R3,[R0],#4
]�RSB R2,R5,R5,LSL #3
]�LDR R5,[R10,#4]
]�ADD R5,R5,R2,ASR #4
^ADD R2,R6,R6,LSL #1
^'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
^STR R3,[R0,-R8]
^$ADD R2,R6,R6,LSL #2
^.#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
^8STR R3,[R0]
^BMOV R3,R6,ASR #4
^LSTR R3,[R0,R8]
^VRSB R2,R6,R6,LSL #3
^`LDR R6,[R10,#8]
^jADD R6,R6,R2,ASR #4
^t]
^~�
^�
[OPT Z
^�LDMIA R10,{R4,R5,R6}
^�]
^��
^�
[OPT Z
^�SUBS R9,R9,#1:BNE fsloop
^�LDMFD SP !,{PC}^
^�]
^�� 2^15-1
^�
[OPT Z
^�
.div31
^�]
_�I%=0�31
_

[OPT Z
_EQUD I%/31*F
_]
_(�
_2
[OPT Z
_<.fs%
_FSTMFD SP !,{R14}
_P LDR R1,[R9,#5*8]:LDR R1,[R1]
_ZLDR R10,[R9,#4*8]
_dLDR R11,[R9,#3*8]
_n#LDR R12,[R9,#2*8]:LDR R12,[R12]
_xLDR R8,[R9,#8]:LDR R8,[R8]
_�LDR R9,[R9]:LDR R9,[R9]
_�LDR R4,[R10]
_�LDR R5,[R10,#4]
_�LDR R6,[R10,#8]
_�ADR R7,div31
_�.fsloop
_�ADD R10,R10,R8
_�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
_�FSUB R0,R4,R4,LSR #5:ADD R0,R0,#1<<(bits-6):MOV R0,R0,LSR #(bits-5)
_�&LDR R2,[R7,R0,LSL #2]:SUB R4,R4,R2
_�%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
_�YSUB R3,R5,R5,LSR #5:ADD R3,R3,#1<<(bits-6):MOV R3,R3,LSR #(bits-5):�R R0,R0,R3,LSL #5
_�&LDR R2,[R7,R3,LSL #2]:SUB R5,R5,R2
`%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
`ZSUB R3,R6,R6,LSR #5:ADD R3,R3,#1<<(bits-6):MOV R3,R3,LSR #(bits-5):�R R0,R0,R3,LSL #10
`&LDR R2,[R7,R3,LSL #2]:SUB R6,R6,R2
`"ISTRB R0,[R12]:MOV R0,R0,LSR #8:STRB R0,[R12,#1]:ADD R12,R12,R1,LSL #1
`,]
`6�dither% �
`@
[OPT Z
`JADD R0,R11,#4
`TADD R2,R4,R4,LSL #1
`^(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
`hSTR R3,[R11,-R8]
`rADD R2,R4,R4,LSL #2
`|$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
`�STR R3,[R11]
`�MOV R3,R4,ASR #4
`�STR R3,[R11,R8]!
`�RSB R2,R4,R4,LSL #3
`�LDR R4,[R10]
`�ADD R4,R4,R2,ASR #4
`�ADD R2,R5,R5,LSL #1
`�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
`�STR R3,[R0,-R8]
`�MOV R3,R5,ASR #4
`�STR R3,[R0,R8]
`�ADD R2,R5,R5,LSL #2
`�#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
aSTR R3,[R0],#4
aRSB R2,R5,R5,LSL #3
aLDR R5,[R10,#4]
a&ADD R5,R5,R2,ASR #4
a0ADD R2,R6,R6,LSL #1
a:'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
aDSTR R3,[R0,-R8]
aNADD R2,R6,R6,LSL #2
aX#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
abSTR R3,[R0]
alMOV R3,R6,ASR #4
avSTR R3,[R0,R8]
a�RSB R2,R6,R6,LSL #3
a�LDR R6,[R10,#8]
a�ADD R6,R6,R2,ASR #4
a�]
a��
a�
[OPT Z
a�LDMIA R10,{R4,R5,R6}
a�]
a��
a�
[OPT Z
a�SUBS R9,R9,#1:BNE fsloop
a�LDMFD SP !,{PC}^
a�]
b	� 256
b
[OPT Z
b.div255
b ]
b*
�I%=0�255
b4
[OPT Z
b>EQUD I%/255*F
bH]
bR�
b\
[OPT Z
bp.fs%
bzSTMFD SP !,{R14}
b�LDR R10,[R9,#4*8]
b�ADR R7,div255
b� LDR R1,[R9,#5*8]:LDR R1,[R1]
b�LDR R11,[R9,#3*8]
b�#LDR R12,[R9,#2*8]:LDR R12,[R12]
b�LDR R8,[R9,#8]:LDR R8,[R8]
b�LDR R9,[R9]:LDR R9,[R9]
b�LDR R4,[R10],R8
b�.fsloop
b�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
b�WSUB R0,R4,R4,LSR #8:ADD R0,R0,#1<<(bits-9):MOV R0,R0,LSR #(bits-8):STRB R0,[R12],R1
b�LDR R2,[R7,R0,LSL #2]
b�]
c�dither% �
c
[OPT Z
cSUB R4,R4,R2
c$MOVCS R4,#0
c.ADD R2,R4,R4,LSL #1
c8(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
cBSTR R3,[R11,-R8]
cLADD R2,R4,R4,LSL #2
cV$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
c`STR R3,[R11]
cjMOV R3,R4,ASR #4
ctSTR R3,[R11,R8]!
c~RSB R2,R4,R4,LSL #3
c�LDR R4,[R10],R8
c�ADD R4,R4,R2,ASR #4
c�]
c��
c�
[OPT Z
c�LDR R4,[R10],R8
c�]
c��
c�
[OPT Z
c�SUBS R9,R9,#1:BNE fsloop
c�LDMFD SP !,{PC}^
c�]
d� 63,255
d
div15=P%:�I%=0�255*4�4
d
[OPT Z
d EQUD (palette%!I%�&FF)/255*F
d(#EQUD (palette%!I%>>8�&FF)/255*F
d2$EQUD (palette%!I%>>16�&FF)/255*F
d<]
dF�
dP
�m$="R" �
dZ
[OPT Z
dd.ictloc EQUD ict%
dn]
dx�
d�
[OPT Z
d�EQUD div15
d�.fs%
d�STMFD SP !,{R14}
d� LDR R1,[R9,#5*8]:LDR R1,[R1]
d�LDR R10,[R9,#4*8]
d�LDR R11,[R9,#3*8]
d�#LDR R12,[R9,#2*8]:LDR R12,[R12]
d�LDR R8,[R9,#8]:LDR R8,[R8]
d�LDR R9,[R9]:LDR R9,[R9]
d�LDR R4,[R10]
d�LDR R5,[R10,#4]
d�LDR R6,[R10,#8]
eLDR R7,fs%-4
e.fsloop
eADD R10,R10,R8
e"]
e,Ȏ m$ �
e6�"T"
e@
[OPT Z
eJ%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
eT3MOV R0,R4,LSR #(bits-4):CMP R0,#15:MOVCS R0,#15
e^%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
ehFMOV R3,R5,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:�R R0,R0,R3,LSL #4
er%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
e|FMOV R3,R6,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:�R R0,R0,R3,LSL #8
e�LDR R3,colmatchloc
e�LDRB R0,[R3,R0]
e�+ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
e�LDR R2,[R3],#4:SUB R4,R4,R2
e�.LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
e�]
e��"R"
e��srchdevlist
e�
e�
[OPT Z
e�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
e�%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
e�%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
fSTMFD SP !,{R7,R8,R9}
f
MVN R2,#0
fMOV R3,#&30<<23
f&.srch RSB R7,R3,#&20<<23
f0MOV R8,R6,LSR #bits-8
f:SUB R8,R8,R8,LSR #4
fDADDS R7,R7,R8,LSL #23
fNMOVVSS R7,#&7F000000
fXMOVMI R7,#0
fb� R7,R7,#&60000000
flADD R7,R7,R3
fvADD R14,R7,R7,LSR #4
f�ADD R7,R14,R14,LSR #8
f�ADD R7,R7,R7,LSR #16
f�SUBS R8,R6,R7,LSR #31-bits
f�RSBLT R8,R8,#0
f�MOV R8,R8,LSR #bits/2
f�MUL R9,R8,R8
f�RSB R7,R3,#&20<<23
f�MOV R8,R5,LSR #bits-8
f�SUB R8,R8,R8,LSR #4
f�ADDS R7,R7,R8,LSL #23
f�MOVVSS R7,#&7F000000
f�MOVMI R7,#0
f�� R7,R7,#&60000000
gADD R7,R3,R7
gADD R7,R7,R7,LSR #4
g�R R14,R14,R7,LSR #8
g ADD R7,R7,R7,LSR #8
g*ADD R7,R7,R7,LSR #16
g4SUBS R8,R5,R7,LSR #31-bits
g>RSBLT R8,R8,#0
gHMOV R8,R8,LSR #bits/2
gRMUL R7,R8,R8
g\ADD R7,R7,R7,LSL #2
gfADD R9,R9,R7,LSL #1
gpRSB R7,R3,#&20<<23
gzMOV R8,R4,LSR #bits-8
g�SUB R8,R8,R8,LSR #4
g�ADDS R7,R7,R8,LSL #23
g�MOVVSS R7,#&7F000000
g�MOVMI R7,#0
g�� R7,R7,#&60000000
g�ADD R7,R3,R7
g�ADD R7,R7,R7,LSR #4
g��R R14,R14,R7,LSR #16
g�ADD R7,R7,R7,LSR #8
g�ADD R7,R7,R7,LSR #16
g�SUBS R8,R4,R7,LSR #31-bits
g�RSBLT R8,R8,#0
g�MOV R8,R8,LSR #bits/2
hMUL R7,R8,R8
hADD R7,R7,R7,LSL #1
hADD R9,R9,R7
h$
CMP R9,R2
h.MOVLS R2,R9
h8MOVLS R0,R14
hBSUBS R3,R3,#&10<<23
hLBGE srch
hV� R7,R0,#&40000000
h`MOV R8,R7,LSR #23
hj� R7,R0,#&600000
ht�R R8,R8,R7,LSR #16
h~� R7,R0,#&4000
h��R R8,R8,R7,LSR #10
h�� R7,R0,#&20000000
h��R R8,R8,R7,LSR #26
h�� R7,R0,#&3800
h��R R0,R8,R7,LSR #11
h�LDMFD SP !,{R7,R8,R9}
h�+ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
h�LDR R2,[R3],#4:SUB R4,R4,R2
h�.LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
h�]
h��
h�
[OPT Z
iSTRB R0,[R12],R1
i
]
i�dither% �
i
[OPT Z
i(ADD R0,R11,#4
i2ADD R2,R4,R4,LSL #1
i<(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
iFSTR R3,[R11,-R8]
iPADD R2,R4,R4,LSL #2
iZ$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
idSTR R3,[R11]
inMOV R3,R4,ASR #4
ixSTR R3,[R11,R8]!
i�RSB R2,R4,R4,LSL #3
i�LDR R4,[R10]
i�ADD R4,R4,R2,ASR #4
i�ADD R2,R5,R5,LSL #1
i�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
i�STR R3,[R0,-R8]
i�MOV R3,R5,ASR #4
i�STR R3,[R0,R8]
i�ADD R2,R5,R5,LSL #2
i�#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
i�STR R3,[R0],#4
i�RSB R2,R5,R5,LSL #3
i�LDR R5,[R10,#4]
jADD R5,R5,R2,ASR #4
jADD R2,R6,R6,LSL #1
j'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
j"STR R3,[R0,-R8]
j,ADD R2,R6,R6,LSL #2
j6#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
j@STR R3,[R0]
jJMOV R3,R6,ASR #4
jTSTR R3,[R0,R8]
j^RSB R2,R6,R6,LSL #3
jhLDR R6,[R10,#8]
jrADD R6,R6,R2,ASR #4
j|]
j��
j�
[OPT Z
j�LDMIA R10,{R4,R5,R6}
j�]
j��
j�
[OPT Z
j�SUBS R9,R9,#1:BNE fsloop
j�LDMFD SP !,{PC}^
j�]
j�� 15
j�divtable=P%:Ȏ m$ �
j�	� "D"
j�	� "R"
k�I%=0�15*4�4
k
[OPT Z
k&EQUD (palette%!I%>>4�&F)/bright%*F
k&'EQUD (palette%!I%>>12�&F)/bright%*F
k0'EQUD (palette%!I%>>20�&F)/bright%*F
k:]
kD�
kN
[OPT Z
kX.ictloc EQUD ict%
kb]
kl	� "T"
kv�I%=0�15
k�
[OPT Z
k�EQUD I%/bright%*F
k�]
k��
k�
k��I%=0�7
k�
[OPT Z
k�EQUD I%/(bright%�2)*F
k�]
k��
k��
k�
[OPT Z
k�.fs%
lSTMFD SP !,{R14}
l LDR R1,[R9,#5*8]:LDR R1,[R1]
lLDR R10,[R9,#4*8]
l LDR R11,[R9,#3*8]
l*#LDR R12,[R9,#2*8]:LDR R12,[R12]
l4LDR R8,[R9,#8]:LDR R8,[R8]
l>LDR R9,[R9]:LDR R9,[R9]
lH]
lR�m$="D" �m$="R" �
l\
[OPT Z
lfLDR R4,[R10]
lpLDR R5,[R10,#4]
lzLDR R6,[R10,#8]
l�]
l��
l�
[OPT Z
l�LDR R4,[R10],R8
l�]
l��
l��m$<>"D" �
l�
[OPT Z
l�ADR R7,divtable
l�]
l��
l�
[OPT Z
l�.fsloop
m]
mȎ m$ �
m�"R"
m$
[OPT Z
m.ADD R10,R10,R8
m8]
mB�srchdevlist
mL
[OPT Z
mV
MOV r3,r0
m`]
mj	� "D"
mt
[OPT Z
m~ADD R10,R10,R8
m�
MOV R3,#0
m�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
m�CMP R4,#F>>1
m� SUBCS R4,R4,#F:�RCS R3,R3,#1
m�%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
m�CMP R5,#F>>1
m� SUBCS R5,R5,#F:�RCS R3,R3,#2
m�%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
m�CMP R6,#F>>1
m� SUBCS R6,R6,#F:�RCS R3,R3,#4
m�]
m�	� "T"
n
[OPT Z
n
%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
n;RSB R3,R4,R4,LSL #4:ADD R3,R3,#F>>1:MOV R3,R3,LSR #bits
nLDR R2,[R7,R3,LSL #2]
n(SUB R4,R4,R2
n2]
n<
nF
[OPT Z
nP%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
nZ;RSB R3,R4,R4,LSL #3:ADD R3,R3,#F>>1:MOV R3,R3,LSR #bits
ndLDR R2,[R7,R3,LSL #2]
nnSUB R4,R4,R2
nx]
n��
n�
[OPT Z
n�MOV R2,R12,LSR #1
n�TST R12,#1
n�LDRB R0,[R2]
n� �EQ R0,R0,#&F0:�REQ R0,R0,R3
n�'�NE R0,R0,#&0F:�RNE R0,R0,R3,LSL #4
n�STRB R0,[R2]
n�ADD R12,R12,R1
n�]
n��m$="D" �m$="R" �
n��dither% �
n�
[OPT Z
oADD R0,R11,#4
oADD R2,R4,R4,LSL #1
o(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
o"STR R3,[R11,-R8]
o,ADD R2,R4,R4,LSL #2
o6$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
o@STR R3,[R11]
oJMOV R3,R4,ASR #4
oTSTR R3,[R11,R8]!
o^RSB R2,R4,R4,LSL #3
ohLDR R4,[R10]
orADD R4,R4,R2,ASR #4
o|ADD R2,R5,R5,LSL #1
o�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
o�STR R3,[R0,-R8]
o�MOV R3,R5,ASR #4
o�STR R3,[R0,R8]
o�ADD R2,R5,R5,LSL #2
o�#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
o�STR R3,[R0],#4
o�RSB R2,R5,R5,LSL #3
o�LDR R5,[R10,#4]
o�ADD R5,R5,R2,ASR #4
o�ADD R2,R6,R6,LSL #1
o�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
o�STR R3,[R0,-R8]
pADD R2,R6,R6,LSL #2
p#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
pSTR R3,[R0]
p&MOV R3,R6,ASR #4
p0STR R3,[R0,R8]
p:RSB R2,R6,R6,LSL #3
pDLDR R6,[R10,#8]
pNADD R6,R6,R2,ASR #4
pX]
pb�
pl
[OPT Z
pvLDMIA R10,{R4,R5,R6}
p�]
p��
p��
p��dither% �
p�
[OPT Z
p�ADD R2,R4,R4,LSL #1
p�(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
p�STR R3,[R11,-R8]
p�ADD R2,R4,R4,LSL #2
p�$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
p�STR R3,[R11]
p�MOV R3,R4,ASR #4
p�STR R3,[R11,R8]!
qRSB R2,R4,R4,LSL #3
qLDR R4,[R10],R8
qADD R4,R4,R2,ASR #4
q ]
q*�
q4
[OPT Z
q>LDR R4,[R10],R8
qH]
qR�
q\�
qf
[OPT Z
qpSUBS R9,R9,#1:BNE fsloop
qzLDMFD SP !,{PC}^
q�]
q�� 3
q�divtable=P%:Ȏ m$ �
q�	� "C"
q�	� "R"
q��I%=0�3*4�4
q�
[OPT Z
q�&EQUD (palette%!I%>>4�&F)/bright%*F
q�'EQUD (palette%!I%>>12�&F)/bright%*F
q�'EQUD (palette%!I%>>20�&F)/bright%*F
q�]
q��
q�
r
[OPT Z
r
EQUD 0
rEQUD 1/(bright%�4)*F
r$EQUD 2/(bright%�4)*F
r.
EQUD F
r8]
rB�
rL
[OPT Z
rV.fs%
r`STMFD SP !,{R14}
rj LDR R1,[R9,#5*8]:LDR R1,[R1]
rtLDR R10,[R9,#4*8]
r~LDR R11,[R9,#3*8]
r�LDR R12,[R9,#2*8]
r�LDR R12,[R12]
r�LDR R8,[R9,#8]
r�LDR R8,[R8]
r�LDR R9,[R9]
r�LDR R9,[R9]
r�]
r��m$="C" �m$="R" �
r�
[OPT Z
r�LDR R4,[R10]
r�LDR R5,[R10,#4]
r�LDR R6,[R10,#8]
s]
s
�
s
[OPT Z
sLDR R4,[R10],R8
s(]
s2�
s<
[OPT Z
sF.fsloop
sP]
sZ
�m$<>"C"�
sd
[OPT Z
snADR R7,divtable
sx]
s��
s�Ȏ m$ �
s��"C"
s�
[OPT Z
s�ADD R10,R10,R8
s�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
s�%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
s�%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
s�
MOV R3,#0
s�CMP R4,#F>>1:�RCS R3,R3,#1
s�CMP R5,#F>>1:�RCS R3,R3,#2
s�CMP R6,#F>>1:�RCS R3,R3,#4
s�"CMP R3,#6:�Q R3,#1:BEQ octcyan
tBCS octwhite
tCMP R3,#4:BEQ octblue
tMOVCS R3,#2:BCS octmagenta
t"CMP R3,#2:BEQ octgreen
t,BCS octyellow
t6CMP R3,#0:BEQ octblack
t@.octred
tJRSB R0,R4,#F
tT
CMP R5,R0
t^BLT octred1
th
CMP R5,R6
trMOVGE R3,#3
t|MOVLT R3,#2
t�B octconvert
t�.octred1
t�
CMP R0,R6
t�MOVGE R3,#0
t�MOVLT R3,#2
t�B octconvert
t�
.octgreen
t�RSB R0,R5,#F
t�
CMP R0,R4
t�BLT octgreen1
t�
CMP R0,R6
t�MOVGE R3,#0
t�MOVLT R3,#1
uB octconvert
u.octgreen1
u
CMP R4,R6
u&MOVGE R3,#3
u0MOVLT R3,#1
u:B octconvert
uD.octblue
uNRSB R0,R6,#F
uX
CMP R0,R4
ubBLT octblue1
ul
CMP R0,R5
uvMOVGE R3,#0
u�MOVLT R3,#1
u�B octconvert
u�
.octblue1
u�
CMP R4,R5
u�MOVGE R3,#2
u�MOVLT R3,#1
u�B octconvert
u�
.octwhite
u�
CMP R4,R5
u�BLT octwhite1
u�
CMP R5,R6
u�MOVGE R3,#3
u�MOVLT R3,#2
vB octconvert
v.octwhite1
v
CMP R4,R6
v MOVGE R3,#3
v*MOVLT R3,#1
v4.octconvert
v>
CMP R3,#1
vH.octcyan
vRSUBEQ R5,R5,#F
v\SUBEQ R6,R6,#F
vf.octmagenta
vp
CMP R3,#2
vzSUBEQ R4,R4,#F
v�SUBEQ R6,R6,#F
v�.octyellow
v�
CMP R3,#3
v�SUBEQ R4,R4,#F
v�SUBEQ R5,R5,#F
v�
.octblack
v�MOV R2,R12,LSR #2
v� � R7,R12,#3:MOV R7,R7,LSL #1
v�MOV R14,#3
v�ELDRB R0,[R2]:BIC R0,R0,R14,LSL R7:�R R0,R0,R3,LSL R7:STRB R0,[R2]
v�ADD R12,R12,R1
v�]
v��"R"
w
[OPT Z
wADD R10,R10,R8
w%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
w$%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
w.%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
w8STMFD SP !,{R8,R9,R10}
wB
MVN R2,#0
wL
MOV R3,#3
wV.srch ADD R14,R3,R3,LSL #1
w`ADD R14,R7,R14,LSL #2
wjLDMIA R14,{R8,R9,R10}
wtSUBS R8,R4,R8
w~RSBMI R8,R8,#0
w�SUBS R9,R5,R9
w�RSBMI R9,R9,#0
w�SUBS R10,R6,R10
w�RSBMI R10,R10,#0
w�MOV R14,R8,LSR #bits/2
w�MUL R8,R14,R14
w�MOV R14,R9,LSR #bits/2
w�MUL R9,R14,R14
w�MOV R14,R10,LSR #bits/2
w�MUL R10,R14,R14
w�ADD R9,R9,R9,LSL #2
w�ADD R8,R8,R8,LSL #1
xADD R14,R8,R9,LSL #1
x
ADD R14,R14,R10
xCMP R14,R2
xMOVCC R2,R14
x(MOVCC R0,R3
x2SUBS R3,R3,#1
x<BPL srch
xFLDMFD SP !,{R8,R9,R10}
xP+ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
xZLDR R2,[R3],#4:SUB R4,R4,R2
xd.LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
xn
MOV R3,R0
xxMOV R2,R12,LSR #2
x� � R7,R12,#3:MOV R7,R7,LSL #1
x�MOV R14,#3
x�ELDRB R0,[R2]:BIC R0,R0,R14,LSL R7:�R R0,R0,R3,LSL R7:STRB R0,[R2]
x�ADD R12,R12,R1
x�]
x�
x�
[OPT Z
x�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
x�:RSB R3,R4,R4,LSL #2:ADD R3,R3,#F>>1:MOV R3,R3,LSR#bits
x�LDR R2,[R7,R3,LSL #2]
x�SUB R4,R4,R2
x�MOV R2,R12,LSR #2
x� � R5,R12,#3:MOV R5,R5,LSL #1
y
MOV R6,#3
yDLDRB R0,[R2]:BIC R0,R0,R6,LSL R5:�R R0,R0,R3,LSL R5:STRB R0,[R2]
yADD R12,R12,R1
y"]
y,�
y6�m$="C" �m$="R" �
y@�dither% �
yJ
[OPT Z
yTADD R0,R11,#4
y^ADD R2,R4,R4,LSL #1
yh(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
yrSTR R3,[R11,-R8]
y|ADD R2,R4,R4,LSL #2
y�$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
y�STR R3,[R11]
y�MOV R3,R4,ASR #4
y�STR R3,[R11,R8]!
y�RSB R2,R4,R4,LSL #3
y�LDR R4,[R10]
y�ADD R4,R4,R2,ASR #4
y�ADD R2,R5,R5,LSL #1
y�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
y�STR R3,[R0,-R8]
y�MOV R3,R5,ASR #4
y�STR R3,[R0,R8]
y�ADD R2,R5,R5,LSL #2
z#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
zSTR R3,[R0],#4
zRSB R2,R5,R5,LSL #3
z&LDR R5,[R10,#4]
z0ADD R5,R5,R2,ASR #4
z:ADD R2,R6,R6,LSL #1
zD'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
zNSTR R3,[R0,-R8]
zXADD R2,R6,R6,LSL #2
zb#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
zlSTR R3,[R0]
zvMOV R3,R6,ASR #4
z�STR R3,[R0,R8]
z�RSB R2,R6,R6,LSL #3
z�LDR R6,[R10,#8]
z�ADD R6,R6,R2,ASR #4
z�]
z��
z�
[OPT Z
z�LDMIA R10,{R4,R5,R6}
z�]
z��
z��
z��dither% �
z�
[OPT Z
{ADD R2,R4,R4,LSL #1
{(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
{STR R3,[R11,-R8]
{ ADD R2,R4,R4,LSL #2
{*$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
{4STR R3,[R11]
{>MOV R3,R4,ASR #4
{HSTR R3,[R11,R8]!
{RRSB R2,R4,R4,LSL #3
{\LDR R4,[R10],R8
{fADD R4,R4,R2,ASR #4
{p]
{z�
{�
[OPT Z
{�LDR R4,[R10],R8
{�]
{��
{��
{�
[OPT Z
{�SUBS R9,R9,#1:BNE fsloop
{�LDMFD SP !,{PC}^
{�]
{�� 1
{�Ȏ m$ �
{��"C"
{�
[OPT Z
|.divtable EQUD 0
|EQUD (1-black%/256*2)/16*F
|EQUD (2-black%/256*4)/16*F
|$EQUD (3-black%/256*5)/16*F
|.EQUD (4-black%/256*6)/16*F
|8EQUD (5-black%/256*7)/16*F
|BEQUD (6-black%/256*8)/16*F
|LEQUD (7-black%/256*8)/16*F
|VEQUD (8-black%/256*8)/16*F
|`EQUD (9-black%/256*8)/16*F
|jEQUD (10-black%/256*8)/16*F
|tEQUD (11-black%/256*7)/16*F
|~EQUD (12-black%/256*6)/16*F
|�EQUD (13-black%/256*5)/16*F
|�EQUD (14-black%/256*4)/16*F
|�EQUD (15-black%/256*2)/16*F
|�
EQUD F
|�.evenrow_gard DCD even_gard
|�.oddrow_gard DCD odd_gard
|�.rowinc DCD 0
|�.fs%
|�STMFD SP !,{R14}
|� LDR R1,[R9,#5*8]:LDR R1,[R1]
|�LDR R10,[R9,#4*8]
|�LDR R11,[R9,#3*8]
}LDR R12,[R9,#2*8]
}
LDR R12,[R12]
}LDR R8,[R9,#8]
}LDR R8,[R8]
}(LDR R9,[R9]
}2LDR R9,[R9]
}<LDR R4,[R10],R8
}F
TEQ R8,#0
}PLDRPL R6,evenrow_gard
}ZLDRMI R6,oddrow_gard
}dMOV R1,R1,LSL #1
}nLDR R7,rowinc
}xADR R14,divtable
}�.fsloop
}�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
}�ADD R5,R4,#F>>5
}�MOVS R5,R5,LSR #bits-4
}�LDRNE R0,[R14,R5,LSL #2]
}�SUBNE R4,R4,R0
}�]
}��dither% �
}�
[OPT Z
}�ADD R2,R4,R4,LSL #1
}�(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
}�STR R3,[R11,-R8]
}�ADD R2,R4,R4,LSL #2
~$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
~STR R3,[R11]
~MOV R3,R4,ASR #4
~"STR R3,[R11,R8]!
~,RSB R2,R4,R4,LSL #3
~6LDR R4,[R10],R8
~@ADDS R4,R4,R2,ASR #4
~J]
~T�
~^
[OPT Z
~hLDR R4,[R10],R8
~r]
~|�
~�
[OPT Z
~�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
~�ADD R3,R4,#F>>5
~�MOVS R3,R3,LSR #bits-4
~�LDRNE R0,[R14,R3,LSL #2]
~�SUBNE R4,R4,R0
~�,�R R5,R5,R3,LSL #5:LDR R3,[R6,R5,LSL #2]
~�FMOV R2,R12,LSR #1:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2],R7
~�BMOV R3,R3,LSR #8:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2]
~�ADD R12,R12,R1
~�]
~��dither% �
~�
[OPT Z
ADD R2,R4,R4,LSL #1
(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
STR R3,[R11,-R8]
&ADD R2,R4,R4,LSL #2
0$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
:STR R3,[R11]
DMOV R3,R4,ASR #4
NSTR R3,[R11,R8]!
XRSB R2,R4,R4,LSL #3
bLDR R4,[R10],R8
lADD R4,R4,R2,ASR #4
v]
��
�
[OPT Z
�LDR R4,[R10],R8
�]
��
�
[OPT Z
�SUBS R9,R9,#2:BNE fsloop
�LDMFD SP !,{PC}^
�]
��"T"
�
[OPT Z
�.divtable EQUD 0
�EQUD (1-black%/256*2)/9*F
�EQUD (2-black%/256*4)/9*F
�EQUD (3-black%/256*5)/9*F
�EQUD (4-black%/256*6)/9*F
� EQUD (5-black%/256*6)/9*F
�*EQUD (6-black%/256*5)/9*F
�4EQUD (7-black%/256*4)/9*F
�>EQUD (8-black%/256*2)/9*F
�H
EQUD F
�R.evenrow_gard DCD even_gard
�\.oddrow_gard DCD odd_gard
�f.rowinc DCD 0
�p.fs%
�zSTMFD SP !,{R14}
�� LDR R1,[R9,#5*8]:LDR R1,[R1]
��LDR R10,[R9,#4*8]
��LDR R11,[R9,#3*8]
��LDR R12,[R9,#2*8]
��LDR R12,[R12]
��LDR R8,[R9,#8]
��LDR R8,[R8]
��LDR R9,[R9]
��LDR R9,[R9]
��LDR R4,[R10],R8
��
TEQ R8,#0
��LDRPL R6,evenrow_gard
��LDRMI R6,oddrow_gard
�MOV R1,R1,LSL #1
�LDR R7,rowinc
�ADR R14,divtable
�$.fsloop
�.%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
�8ADD R5,R4,#F>>4
�BADD R5,R5,R5,LSL #3
�LMOVS R5,R5,LSR #bits
�VLDRNE R0,[R14,R5,LSL #2]
�`SUBNE R4,R4,R0
�j]
�t�dither% �
�~
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
��ADDS R4,R4,R2,ASR #4
��]
��
�

[OPT Z
�LDR R4,[R10],R8
�]
�(�
�2
[OPT Z
�<%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
�FADD R3,R4,#F>>4
�PADD R3,R3,R3,LSL #3
�ZMOVS R3,R3,LSR #bits
�dLDRNE R0,[R14,R3,LSL #2]
�nSUBNE R4,R4,R0
�x,�R R5,R5,R3,LSL #4:LDR R5,[R6,R5,LSL #2]
��MOV R2,R12,LSR #1
��� R3,R5,#&3F
��STRB R3,[R2],R7
��!MOV R3,R5,LSR #6:� R3,R3,#&3F
��STRB R3,[R2],R7
��"MOV R3,R5,LSR #12:STRB R3,[R2]
��ADD R12,R12,R1
��]
���dither% �
��
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
�ADD R2,R4,R4,LSL #2
�$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�STR R3,[R11]
�"MOV R3,R4,ASR #4
�,STR R3,[R11,R8]!
�6RSB R2,R4,R4,LSL #3
�@LDR R4,[R10],R8
�JADD R4,R4,R2,ASR #4
�T]
�^�
�h
[OPT Z
�rLDR R4,[R10],R8
�|]
���
��
[OPT Z
��SUBS R9,R9,#2:BNE fsloop
��LDMFD SP !,{PC}^
��]
���"D"
��
[OPT Z
��.divtable EQUD 0
��EQUD (1-black%/256*2)/4*F
��EQUD (2-black%/256*4)/4*F
��EQUD (3-black%/256*2)/4*F
��
EQUD F
��.evenrow_gard DCD even_gard
�.oddrow_gard DCD odd_gard
�.rowinc DCD 0
�.fs%
�&STMFD SP !,{R14}
�0 LDR R1,[R9,#5*8]:LDR R1,[R1]
�:LDR R10,[R9,#4*8]
�DLDR R11,[R9,#3*8]
�NLDR R12,[R9,#2*8]
�XLDR R12,[R12]
�bLDR R8,[R9,#8]
�lLDR R8,[R8]
�vLDR R9,[R9]
��LDR R9,[R9]
��LDR R4,[R10],R8
��
TEQ R8,#0
��LDRPL R6,evenrow_gard
��LDRMI R6,oddrow_gard
��MOV R1,R1,LSL #1
��LDR R7,rowinc
��ADR R14,divtable
��.fsloop
��%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
��ADD R5,R4,#F>>3
��MOVS R5,R5,LSR #bits-2
��LDRNE R0,[R14,R5,LSL #2]
�SUBNE R4,R4,R0
�]
��dither% �
� 
[OPT Z
�*ADD R2,R4,R4,LSL #1
�4(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�>STR R3,[R11,-R8]
�HADD R2,R4,R4,LSL #2
�R$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�\STR R3,[R11]
�fMOV R3,R4,ASR #4
�pSTR R3,[R11,R8]!
�zRSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
��ADDS R4,R4,R2,ASR #4
��]
���
��
[OPT Z
��LDR R4,[R10],R8
��]
���
��
[OPT Z
��%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
��ADD R3,R4,#F>>3
��MOVS R3,R3,LSR #bits-2
��LDRNE R0,[R14,R3,LSL #2]
�SUBNE R4,R4,R0
�&�R R5,R5,R3,LSL #3:LDRB R5,[R6,R5]
�MOV R2,R12,LSR #2
�$TST R12,#2
�.� R3,R5,#&F:LDRB R0,[R2]
�8 �EQ R0,R0,#&F0:�REQ R0,R0,R3
�B'�NE R0,R0,#&0F:�RNE R0,R0,R3,LSL #4
�LSTRB R0,[R2],R7
�V!MOV R3,R5,LSR #4:LDRB R0,[R2]
�` �EQ R0,R0,#&F0:�REQ R0,R0,R3
�j'�NE R0,R0,#&0F:�RNE R0,R0,R3,LSL #4
�tSTRB R0,[R2]
�~ADD R12,R12,R1
��]
���dither% �
��
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
�LDR R4,[R10],R8
�
ADD R4,R4,R2,ASR #4
�]
��
�(
[OPT Z
�2LDR R4,[R10],R8
�<]
�F�
�P
[OPT Z
�ZSUBS R9,R9,#2:BNE fsloop
�dLDMFD SP !,{PC}^
�n]
�x
��
[OPT Z
��.fs%
��STMFD SP !,{R14}
�� LDR R1,[R9,#5*8]:LDR R1,[R1]
��LDR R10,[R9,#4*8]
��LDR R11,[R9,#3*8]
��LDR R12,[R9,#2*8]
��LDR R12,[R12]
��LDR R8,[R9,#8]
��LDR R8,[R8]
��LDR R9,[R9]
��LDR R9,[R9]
��LDR R4,[R10],R8
�
MOV R7,#1
�.fsloop
�%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
�"]
�,
�black% �
�6
[OPT Z
�@MOV R2,R12,LSR #3
�J� R5,R12,#7:MOV R6,#1
�TLDRB R0,[R2,#-(x%+7>>3)]
�^SUB R3,R4,#F
�h
CMP R7,#0
�r!ADDNE R4,R4,#black%<<(bits-8)
�|!ADDEQ R3,R3,#black%<<(bits-8)
��TST R0,R6,LSL R5
��!ADDNE R4,R4,#black%<<(bits-8)
��!ADDEQ R3,R3,#black%<<(bits-8)
��MOVS R0,R3:RSBMI R0,R3,#0
��
CMP R4,R0
��MOVCC R3,#0
��MOVCS R4,R3:MOVCS R3,#1
��
MOV R7,R3
��]
���
��
[OPT Z
��'ADD R3,R4,#F>>1:MOV R3,R3,LSR #bits
��SUB R4,R4,R3,LSL #bits
�MOV R2,R12,LSR #3
�� R5,R12,#7:MOV R6,#1
�]
�&�
�0
[OPT Z
�:7LDRB R0,[R2]:BIC R0,R0,R6,LSL R5:�R R0,R0,R3,LSL R5
�DSTRB R0,[R2]
�NADD R12,R12,R1
�X]
�b�dither% �
�l
[OPT Z
�vADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
��ADD R4,R4,R2,ASR #4
��]
���
��
[OPT Z
�LDR R4,[R10],R8
�]
��
� 
[OPT Z
�*SUBS R9,R9,#1:BNE fsloop
�4LDMFD SP !,{PC}^
�>]
�H�
�R�
�\
[OPT Z
�f.sxloc DCD sx%
�p]
�zȎ col �
��� 0
���input<=8 �
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#3*8]
��LDR R5,[R9,#4*8]
��
MOV R8,#0
��
.mappixlp
��LDRB R6,[R1],#step24
��]
���
�Ȏ input �
�� 8
�
�ham �
�$
[OPT Z
�.ADR R9,ltable
�8!MOVS R7,R6,LSR #4:� R6,R6,#15
�B2LDREQ R10,[R2,R6,LSL #2]:�Q R11,R10:�Q R12,R10
�L&CMP R7,#1:LDREQ R12,[R9,R6,LSL #2]
�V&CMP R7,#2:LDREQ R10,[R9,R6,LSL #2]
�`&CMP R7,#3:LDREQ R11,[R9,R6,LSL #2]
�jADD R3,R10,R11
�tADD R3,R3,R12
�~MOV R3,R3,LSR #2
��STMIA R5!,{R3}
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��.ltable
��]
���I%=0�15
��
[OPT Z
��EQUD I%/15*F
��]
���
���
���hpredict%=2 �
�
[OPT Z
�
ADD R6,R6,R8
�� R6,R6,#255
�
MOV R8,R6
�(]
�2�
�<
[OPT Z
�F(LDR R7,[R2,R6,LSL #2]:STR R7,[R5],#4
�PSUBS R0,R0,#1:BNE mappixlp
�ZMOVS PC,R14
�d]
�n�
�x� 4
���bigendianbits �
��
[OPT Z
��MOV R10,R6,LSR #4
��LDR R7,[R2,R10,LSL #2]
��� R10,R6,#&F
��]
���
��
[OPT Z
��� R10,R6,#&F
��LDR R7,[R2,R10,LSL #2]
��MOV R10,R6,LSR #4
��]
���
�
[OPT Z
�,LDR R8,[R2,R10,LSL #2]:STMIA R5!,{R7,R8}
�SUBS R0,R0,#2:BHI mappixlp
�"MOVS PC,R14
�,]
�6� 2
�@�bigendianbits �
�J
[OPT Z
�TMOV R10,R6,LSR #6
�^LDR R7,[R2,R10,LSL #2]
�h� R10,R6,#&30
�rLDR R8,[R2,R10,LSR #2]
�|� R10,R6,#&C
��LDR R9,[R2,R10]
��� R10,R6,#&3
��]
���
��
[OPT Z
��� R10,R6,#&3
��LDR R7,[R2,R10,LSL #2]
��� R10,R6,#&C
��LDR R8,[R2,R10]
��� R10,R6,#&30
��LDR R9,[R2,R10,LSR #2]
��MOV R10,R6,LSR #6
��]
��
�
[OPT Z
�4LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
�&SUBS R0,R0,#4:BHI mappixlp
�0MOVS PC,R14
�:]
�D� 1
�N�bigendianbits �
�X
[OPT Z
�b� R10,R6,#&80
�lLDR R7,[R2,R10,LSR #5]
�v� R10,R6,#&40
��LDR R8,[R2,R10,LSR #4]
��� R10,R6,#&20
��LDR R9,[R2,R10,LSR #3]
��� R10,R6,#&10
��4LDR R10,[R2,R10,LSR #2]:STMIA R5!,{R7,R8,R9,R10}
��� R10,R6,#&8
��LDR R7,[R2,R10,LSR #1]
��� R10,R6,#&4
��LDR R8,[R2,R10]
��� R10,R6,#&2
��LDR R9,[R2,R10,LSL #1]
��� R10,R6,#&1
��]
��
�
[OPT Z
�� R10,R6,#&1
� LDR R7,[R2,R10,LSL #2]
�*� R10,R6,#&2
�4LDR R8,[R2,R10,LSL #1]
�>� R10,R6,#&4
�HLDR R9,[R2,R10]
�R� R10,R6,#&8
�\4LDR R10,[R2,R10,LSR #1]:STMIA R5!,{R7,R8,R9,R10}
�f� R10,R6,#&10
�pLDR R7,[R2,R10,LSR #2]
�z� R10,R6,#&20
��LDR R8,[R2,R10,LSR #3]
��� R10,R6,#&40
��LDR R9,[R2,R10,LSR #4]
��MOV R10,R6,LSR #7
��]
���
��
[OPT Z
��4LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
��SUBS R0,R0,#8:BHI mappixlp
��MOVS PC,R14
��]
��� 16
��
[OPT Z
�.mappix%
�LDR R0,sxloc
�LDR R1,[R9]:LDR R1,[R1]
�$LDR R2,[R9,#8]:LDR R2,[R2]
�.LDR R3,[R9,#4*8]
�8LDR R4,[R9,#3*8]
�BLDR R5,[R9,#2*8]
�LLDR R6,[R9,#5*8]
�VLDR R7,[R9,#6*8]
�`LDR R8,[R9,#7*8]
�j
CMP R1,R2
�tADDEQ R2,R2,#1
�~
.mappixlp
��.LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
��>LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:�R R9,R9,R10
��)� R10,R9,#255:LDR R10,[R3,R10,LSL #2]
��<MOV R11,R9,LSR #8:� R11,R11,#255:LDR R11,[R4,R11,LSL #2]
��.MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
��3ADD R10,R10,R11:ADD R10,R10,R12:STMIA R8!,{R10}
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��]
��� 24
��
[OPT Z
��.mappix%
�LDR R0,sxloc
�
 LDR R1,[R9,#2*8]:LDR R1,[R1]
�LDR R2,[R9,#8]:LDR R2,[R2]
�LDR R3,[R9]:LDR R3,[R3]
�(LDR R4,[R9,#5*8]
�2LDR R5,[R9,#4*8]
�<LDR R6,[R9,#3*8]
�FLDR R7,[R9,#6*8]
�PSTMFD SP !,{R14}
�Z$MOV r11,#0:MOV R12,#0:MOV R14,#0
�d
.mappixlp
�nCLDRB R8,[R1],#step24:LDRB R9,[R2],#step24:LDRB R10,[R3],#step24
�x]
���hpredict%=2 �
��
[OPT Z
��ADD r8,r8,r11
��� r8,r8,#255
��MOV r11,r8
��ADD r9,r9,r12
��� r9,r9,#255
��MOV r12,r9
��ADD r10,r10,r14
��� r10,r10,#255
��MOV r14,r10
��]
���
�
[OPT Z
�GLDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
�-ADD R8,R8,R9:ADD R8,R8,R10:STR R8,[R7],#4
�"SUBS R0,R0,#1:BNE mappixlp
�,LDMFD SP !,{PC}^
�6]
�@� 48
�J
[OPT Z
�T.mappix%
�^LDR R0,sxloc
�h LDR R1,[R9,#2*8]:LDR R1,[R1]
�rLDR R2,[R9,#8]:LDR R2,[R2]
�|LDR R3,[R9]:LDR R3,[R3]
��LDR R4,[R9,#5*8]
��LDR R5,[R9,#4*8]
��LDR R6,[R9,#3*8]
��LDR R7,[R9,#6*8]
��STMFD SP !,{R14}
��?MOV r11,#colourindex � 255:ADD r11,r11,#colourindex � &ff00
��
.mappixlp
��@LDR R8,[R1],#step24:LDR R9,[R2],#step24:LDR R10,[R3],#step24
��)� r8,r8,r11:� r9,r9,r11:� r10,r10,r11
��GLDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
��-ADD R8,R8,R9:ADD R8,R8,R10:STR R8,[R7],#4
��SUBS R0,R0,#1:BNE mappixlp
��LDMFD SP !,{PC}^
�]
�	� 411
�
[OPT Z
�&.mappix%
�0LDR R0,sxloc
�:LDR R1,[R9]:LDR R1,[R1]
�DLDR R4,[R9,#1*8]
�NLDR R7,[R9,#8*8]
�X
.mappixlp
�bLDRB R8,[R1],#2
�l>LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
�vSUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��]
��	� 422
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��ADD R1,R1,#1
��LDR R4,[R9,#1*8]
��LDR R7,[R9,#8*8]
��
.mappixlp
��LDRB R8,[R1],#2
��>LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
�SUBS R0,R0,#1:BNE mappixlp
�MOVS PC,R14
�]
� 	� 555
�*
[OPT Z
�4.mappix%
�>LDR R0,sxloc
�HLDR R1,[R9]:LDR R1,[R1]
�RADD R1,R1,#1
�\LDR R4,[R9,#1*8]
�fLDR R7,[R9,#8*8]
�p
.mappixlp
�zLDRB R8,[R1],#2
��� R8,R8,#ymax%
��>LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��]
���
���xmul%=2 � xdiv%=1 �
��
[OPT Z
��
.xsample%
��LDR R0,[R9]:LDR R0,[R0]
��LDR R1,[R9,#8]
��LDR R2,[R9,#2*8]
�SUBS R0,R0,#2
�BEQ xdonediv
�BMI xdonediv
�$.xsamplelp
�.LDMIA R1,{R5,R6}
�8ADD R6,R6,R5
�BMOV R6,R6,LSR #1
�LSTMIA R2!,{R5,R6}
�VADD R1,R1,#4
�`SUBS R0,R0,#2:BGT xsamplelp
�j
.xdonediv
�tLDMIA R1,{R5}
�~
MOV R6,R5
��STMIA R2!,{R5,R6}
��MOVS PC,R14
��]
���
��
[OPT Z
��
.xsample%
��LDR R0,[R9]:LDR R0,[R0]
��LDR R1,[R9,#8]
��LDR R2,[R9,#2*8]
�� LDR R3,[R9,#3*8]:LDR R3,[R3]
�� LDR R4,[R9,#4*8]:LDR R4,[R4]
�MOV R11,R4
�
.xsamplelp
�LDMIA R1,{R5}
�,SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#4
�(SUBS R12,R3,#1
�2BEQ xdonediv
�<.xdivlp
�FCMP R12,R11
�PBCC xdivlp2
�Z#LDMIA R1!,{R8}:MLA R5,R8,R11,R5
�dSUBS R12,R12,R11:MOV R11,R4
�nBNE xdivlp
�xB xdonediv
��.xdivlp2
��LDMIA R1,{R8}
��,SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#4
��ADD R5,R5,R8
��SUBS R12,R12,#1:BNE xdivlp
��
.xdonediv
��STMIA R2!,{R5}
��SUBS R0,R0,#1:BPL xsamplelp
��MOVS PC,R14
��]
���
��� 2
���input<=8 �
�
[OPT Z
�.mappix%
�LDR R0,sxloc
�"LDR R1,[R9]:LDR R1,[R1]
�,LDR R2,[R9,#3*8]
�6LDR R3,[R9,#2*8]
�@LDR R4,[R9,#8]
�JLDR R5,[R9,#4*8]
�TMOV R10,#0
�^
.mappixlp
�hLDRB R6,[R1],#step24
�r]
�|�
��Ȏ input �
��� 8
��
�ham �
��
[OPT Z
��ADR R9,ltable
��!MOVS R7,R6,LSR #4:� R6,R6,#15
��NLDREQ R10,[R2,R6,LSL #2]:LDREQ R11,[R3,R6,LSL #2]:LDREQ R12,[R4,R6,LSL #2]
��&CMP R7,#1:LDREQ R12,[R9,R6,LSL #2]
��&CMP R7,#2:LDREQ R10,[R9,R6,LSL #2]
��&CMP R7,#3:LDREQ R11,[R9,R6,LSL #2]
��STMIA R5!,{R10,R11,R12}
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
�.ltable
�]
��I%=0�15
�&
[OPT Z
�0EQUD I%/15*F
�:]
�D�
�N�
�X�hpredict%=2 �
�b
[OPT Z
�lADD R6,R6,R10
�v� R6,R6,#255
��MOV R10,R6
��]
���
��
[OPT Z
��ELDR R7,[R2,R6,LSL #2]:LDR R8,[R3,R6,LSL #2]:LDR R9,[R4,R6,LSL #2]
��STMIA R5!,{R7,R8,R9}
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��]
���
��� 4
���bigendianbits �
��
[OPT Z
�MOV R10,R6,LSR #4
�HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�STMIA R5!,{R7,R8,R9}
� � R10,R6,#&F
�*]
�4�
�>
[OPT Z
�H� R10,R6,#&F
�RHLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�\STMIA R5!,{R7,R8,R9}
�fMOV R10,R6,LSR #4
�p]
�z�
��
[OPT Z
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��SUBS R0,R0,#2:BHI mappixlp
��MOVS PC,R14
��]
��� 2
���bigendianbits �
��
[OPT Z
��MOV R10,R6,LSR #6
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&30
�HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
�STMIA R5!,{R7,R8,R9}
�� R10,R6,#&C
�$3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
�.STMIA R5!,{R7,R8,R9}
�8� R10,R6,#&3
�B]
�L�
�V
[OPT Z
�`� R10,R6,#&3
�jHLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�tSTMIA R5!,{R7,R8,R9}
�~� R10,R6,#&C
��3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&30
��HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
��STMIA R5!,{R7,R8,R9}
��MOV R10,R6,LSR #6
��]
���
��
[OPT Z
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��SUBS R0,R0,#4:BHI mappixlp
�MOVS PC,R14
�
]
�� 1
��bigendianbits �
�(
[OPT Z
�2� R10,R6,#&80
�<HLDR R7,[R2,R10,LSR #5]:LDR R8,[R3,R10,LSR #5]:LDR R9,[R4,R10,LSR #5]
�FSTMIA R5!,{R7,R8,R9}
�P� R10,R6,#&40
�ZHLDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
�dSTMIA R5!,{R7,R8,R9}
�n� R10,R6,#&20
�xHLDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&10
��HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&8
��HLDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&4
��3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&2
��HLDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
��STMIA R5!,{R7,R8,R9}
�� R10,R6,#&1
�]
��
�"
[OPT Z
�,� R10,R6,#&1
�6HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�@STMIA R5!,{R7,R8,R9}
�J� R10,R6,#&2
�THLDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
�^STMIA R5!,{R7,R8,R9}
�h� R10,R6,#&4
�r3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
�|STMIA R5!,{R7,R8,R9}
��� R10,R6,#&8
��HLDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&10
��HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&20
��HLDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&40
��HLDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
��STMIA R5!,{R7,R8,R9}
��MOV R10,R6,LSR #7
�]
��
�
[OPT Z
�&HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�0STMIA R5!,{R7,R8,R9}
�:SUBS R0,R0,#8:BHI mappixlp
�DMOVS PC,R14
�N]
�X� 16
�b
[OPT Z
�l.mappix%
�vLDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#8]:LDR R2,[R2]
��LDR R3,[R9,#4*8]
��LDR R4,[R9,#3*8]
��LDR R5,[R9,#2*8]
��LDR R6,[R9,#5*8]
��LDR R7,[R9,#6*8]
��LDR R8,[R9,#7*8]
��
CMP R1,R2
��ADDEQ R2,R2,#1
��
.mappixlp
��.LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
��>LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:�R R9,R9,R10
�)� R10,R9,#255:LDR R10,[R3,R10,LSL #2]
�<MOV R11,R9,LSR #8:� R11,R11,#255:LDR R11,[R4,R11,LSL #2]
�.MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
� STMIA R8!,{R10,R11,R12}
�*SUBS R0,R0,#1:BNE mappixlp
�4MOVS PC,R14
�>]
�H� 24
�R
[OPT Z
�\.mappix%
�fLDR R0,sxloc
�p LDR R1,[R9,#2*8]:LDR R1,[R1]
�zLDR R2,[R9,#8]:LDR R2,[R2]
��LDR R3,[R9]:LDR R3,[R3]
��LDR R4,[R9,#5*8]
��LDR R5,[R9,#4*8]
��LDR R6,[R9,#3*8]
��LDR R7,[R9,#6*8]
��STMFD SP !,{R14}
��$MOV r11,#0:MOV R12,#0:MOV R14,#0
��
.mappixlp
��CLDRB R8,[R1],#step24:LDRB R9,[R2],#step24:LDRB R10,[R3],#step24
��]
���hpredict%=2 �
��
[OPT Z
��ADD r8,r8,r11
�� r8,r8,#255
�MOV r11,r8
�ADD r9,r9,r12
�$� r9,r9,#255
�.MOV r12,r9
�8ADD r10,r10,r14
�B� r10,r10,#255
�LMOV r14,r10
�V]
�`�
�j
[OPT Z
�tGLDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
�~STMIA R7!,{R8,R9,R10}
��SUBS R0,R0,#1:BNE mappixlp
��LDMFD SP !,{PC}^
��]
��� 48
��
[OPT Z
��.mappix%
��LDR R0,sxloc
�� LDR R1,[R9,#2*8]:LDR R1,[R1]
��LDR R2,[R9,#8]:LDR R2,[R2]
��LDR R3,[R9]:LDR R3,[R3]
��LDR R4,[R9,#5*8]
��LDR R5,[R9,#4*8]
�LDR R6,[R9,#3*8]
�
LDR R7,[R9,#6*8]
�STMFD SP !,{R14}
�?MOV r11,#colourindex � 255:ADD r11,r11,#colourindex � &ff00
�(
.mappixlp
�2@LDR R8,[R1],#step24:LDR R9,[R2],#step24:LDR R10,[R3],#step24
�<)� r8,r8,r11:� r9,r9,r11:� r10,r10,r11
�FGLDR R8,[R4,R8,LSL #2]:LDR R9,[R5,R9,LSL #2]:LDR R10,[R6,R10,LSL #2]
�PSTMIA R7!,{R8,R9,R10}
�ZSUBS R0,R0,#1:BNE mappixlp
�dLDMFD SP !,{PC}^
�n]
�x	� 411
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#1*8]
��LDR R3,[R9,#2*8]
��LDR R5,[R9,#4*8]
��LDR R6,[R9,#5*8]
��LDR R7,[R9,#6*8]
��LDR R9,[R9,#8*8]
��STMFD SP !,{R14}
��
.mappixlp
�LDMIA R1!,{R4,R10}
�� R8,R4,#&C000
�MOV R8,R8,LSR #8
�"� R14,R4,#&C0000000
�,�R R8,R8,R14,LSR #16+8+2
�6� R14,R10,#&C000
�@�R R8,R8,R14,LSR #8+4
�J�R R8,R8,R10,LSR #16+8+6
�T� R11,R4,#&3000
�^MOV R11,R11,LSR #6
�h� R14,R4,#&30000000
�r�R R11,R11,R14,LSR #16+6+2
�|� R14,R10,#&3000
���R R11,R11,R14,LSR #6+4
��� R14,R10,#&30000000
���R R11,R11,R14,LSR #16+6+6
��� R12,R4,#&FF
��LDR R12,[R2,R12,LSL #2]
��,LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��*LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
��,LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��� R12,R4,#&FF
��LDR R12,[R2,R12,LSL #2]
�+LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
�8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�&MOV R4,R4,LSR #16
�0� R12,R4,#&FF
�:LDR R12,[R2,R12,LSL #2]
�D,LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
�N8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�X*LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
�b,LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
�l8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�v� R12,R4,#&FF
��LDR R12,[R2,R12,LSL #2]
��+LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��� R12,R10,#&FF
��LDR R12,[R2,R12,LSL #2]
��,LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��*LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
��,LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��� R12,R10,#&FF
��LDR R12,[R2,R12,LSL #2]
�+LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
�8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
� MOV R10,R10,LSR #16
�*� R12,R10,#&FF
�4LDR R12,[R2,R12,LSL #2]
�>,LDR R14,[R7,R11,LSL #2]:ADDS R14,R14,R12
�H8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�R*LDR R14,[R6,R8,LSL #2]:ADD R14,R14,R12
�\,LDR R12,[R5,R11,LSL #2]:ADDS R14,R14,R12
�f8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�p� R12,R10,#&FF
�zLDR R12,[R2,R12,LSL #2]
��+LDR R14,[R3,R8,LSL #2]:ADDS R14,R12,R14
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��SUBS R0,R0,#4:BNE mappixlp
��LDMFD SP !,{PC}^
��]
��	� 423
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#1*8]
��LDR R3,[R9,#2*8]
�LDR R4,[R9,#3*8]
�LDR R5,[R9,#4*8]
�LDR R6,[R9,#5*8]
�$LDR R7,[R9,#6*8]
�.LDR R8,[R9,#7*8]
�8LDR R9,[R9,#8*8]
�BSTMFD SP !,{R14}
�L
.mappixlp
�VLDR R10,[R1],#4
�`� R11,R10,#&FF00
�jLDR R11,[R2,R11,LSR #6]
�t:� R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
�~@� R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
��@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��:� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
��@� R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��� R11,R10,#&FF000000
��LDR R11,[R2,R11,LSR #22]
��:� R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
��@� R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
�
@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
�8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�:� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
�(@� R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
�28MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�<SUBS R0,R0,#2:BNE mappixlp
�FLDMFD SP !,{PC}^
�P]
�Z	� 422
�d
[OPT Z
�n.mappix%
�xLDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#1*8]
��LDR R3,[R9,#2*8]
��LDR R5,[R9,#4*8]
��LDR R6,[R9,#5*8]
��LDR R7,[R9,#6*8]
��LDR R9,[R9,#8*8]
��STMFD SP !,{R14}
��
.mappixlp
��LDR R10,[R1],#4
��� R11,R10,#&FF00
��LDR R11,[R2,R11,LSR #6]
��@� R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
�8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
�@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
�"8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�,;� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
�68MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�@� R11,R10,#&FF000000
�JLDR R11,[R2,R11,LSR #22]
�T@� R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
�^8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�h:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
�r@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
�|8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��;� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��SUBS R0,R0,#2:BNE mappixlp
��LDMFD SP !,{PC}^
��]
��	� 555
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#1*8]
��LDR R3,[R9,#2*8]
�LDR R5,[R9,#4*8]
�LDR R6,[R9,#5*8]
�LDR R7,[R9,#6*8]
�&LDR R9,[R9,#8*8]
�0STMFD SP !,{R14}
�:
.mappixlp
�DLDR R10,[R1],#2
�N� R11,R10,#ymax%
�XLDR R11,[R2,R11,LSL #2]
�b.� R8,R10,#((1<<vbits%)-1)<<(ybits%+ubits%)
�l&� R10,R10,#((1<<ubits%)-1)<<ybits%
��9LDR R12,[R7,R8,LSR #ybits%+ubits%-2]:ADDS R14,R12,R11
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��8LDR R12,[R5,R8,LSR #ybits%+ubits%-2]:ADD R14,R12,R11
��3LDR R12,[R6,R10,LSR #ybits%-2]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��3LDR R12,[R3,R10,LSR #ybits%-2]:ADDS R14,R12,R11
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��SUBS R0,R0,#1:BNE mappixlp
��LDMFD SP !,{PC}^
��]
���
���xmul%=2 � xdiv%=1 �
��
[OPT Z
�
.xsample%
�LDR R0,[R9]:LDR R0,[R0]
� LDR R1,[R9,#8]
�*LDR R2,[R9,#2*8]
�4SUBS R0,R0,#2
�>BEQ xdonediv
�HBMI xdonediv
�R.xsamplelp
�\!LDMIA R1,{R5,R6,R7,R8,R9,R10}
�fADD R8,R8,R5
�pMOV R8,R8,LSR #1
�zADD R9,R9,R6
��MOV R9,R9,LSR #1
��ADD R10,R10,R7
��MOV R10,R10,LSR #1
��"STMIA R2!,{R5,R6,R7,R8,R9,R10}
��ADD R1,R1,#12
��SUBS R0,R0,#2:BGT xsamplelp
��
.xdonediv
��LDMIA R1,{R5,R6,R7}
��
MOV R8,R5
��
MOV R9,R6
��MOV R10,R7
��"STMIA R2!,{R5,R6,R7,R8,R9,R10}
��MOVS PC,R14
�]
��
�
[OPT Z
�.
.xsample%
�8LDR R0,[R9]:LDR R0,[R0]
�BLDR R1,[R9,#8]
�LLDR R2,[R9,#2*8]
�V LDR R3,[R9,#3*8]:LDR R3,[R3]
�` LDR R4,[R9,#4*8]:LDR R4,[R4]
�jMOV R11,R4
�t.xsamplelp
�~LDMIA R1,{R5,R6,R7}
��-SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#12
��SUBS R12,R3,#1
��BEQ xdonediv
��.xdivlp
��CMP R12,R11
��BCC xdivlp2
��MLDMIA R1!,{R8,R9,R10}:MLA R5,R8,R11,R5:MLA R6,R9,R11,R6:MLA R7,R10,R11,R7
��SUBS R12,R12,R11:MOV R11,R4
��BNE xdivlp
��B xdonediv
��.xdivlp2
��LDMIA R1,{R8,R9,R10}
�-SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#12
�
+ADD R5,R5,R8:ADD R6,R6,R9:ADD R7,R7,R10
�SUBS R12,R12,#1:BNE xdivlp
�
.xdonediv
�(STMIA R2!,{R5,R6,R7}
�2SUBS R0,R0,#1:BPL xsamplelp
�<MOVS PC,R14
�F]
�P�
�Z�
�d�compression=5 �
�n
[OPT Z
��.firstcode DCD 0
��.oldcode DCD 0
��.codesize DCD setcodes%+1
��.stack DCD stk%
��.sp DCD stk%
��.maxcode DCD clearcode%+2
��!.maxcodesize DCD 2*clearcode%
��.LZWdecode%
��@LDR R2,firstcode:LDR R3,oldcode:LDR R4,stack:LDR R5,codesize
��/LDR R6,sp:LDR R7,maxcode:LDR R8,maxcodesize
��LDR R10,[R9]:LDR R10,[R10]
��!LDR R11,[R9,#8]:LDR R11,[R11]
��LDR R12,[R9,#24]
�STMFD SP !,{R14}
�.lzwloop
�
CMP R6,R4
�"BHI lzwunstack
�,.lzwengine
�6BL getcode
�@CMP R0,#clearcode%
�JBEQ lzwclear
�^
MOV R1,R0
�h
CMP R0,R7
�rSTRCSB R2,[R6],#1
�|MOVCS R0,R3
��CMP R0,#clearcode%
��BCC lzwdonepush
��.lzwpushtable
��LDR R14,[R12,R0,LSL #2]
��STRB R14,[R6],#1
��MOV R0,R14,LSR #16
��CMP R0,#clearcode%
��BCS lzwpushtable
��.lzwdonepush
��LDR R2,[R12,R0,LSL #2]
��BIC R2,R2,#&FF0000
��BIC R2,R2,#&FF000000
��STRB R2,[R6],#1
�CMP R7,#4096
�BCS lzwnocode
��R R0,R2,R3,LSL #16
�&STR R0,[R12,R7,LSL #2]
�0ADD R7,R7,#1
�:
CMP R7,R8
�DBCC lzwnocode
�NCMP R8,#4096
�XADDCC R5,R5,#1
�bMOVCC R8,R8,LSL #1
�l]
�v�flag=1500 �
��
[OPT Z
���RCC R8,R8,#1
��]
���
��
[OPT Z
��.lzwnocode
��
MOV R3,R1
��
CMP R6,R4
��BLS lzwengine
��.lzwunstack
��LDRB R0,[R6,#-1]!
��.lzwloopend
��STRB R0,[R11],#1
�SUBS R10,R10,#1
�BNE lzwloop
�3STR R2,firstcode:STR R3,oldcode:STR R5,codesize
� /STR R6,sp:STR R7,maxcode:STR R8,maxcodesize
�*LDMFD SP !,{PC}^
�4
.lzwclear
�>
MOV R0,#0
�HMOV R3,R12
�R.lzwdefaulttable
�\STR R0,[R3],#4
�f#ADD R0,R0,#1:CMP R0,#clearcode%
�pBCC lzwdefaulttable
�zMOV R5,#setcodes%+1
��MOV R7,#clearcode%
��MOV R8,R7,LSL #1
��]
���flag=1500 �
��
[OPT Z
��SUB R8,R8,#1
��]
���
��
[OPT Z
��ADD R7,R7,#2
��BL getcode
��
MOV R2,R0
��
MOV R3,R0
�
MOV R6,R4
�B lzwloopend
�$.curbit DCD 0
�..lastbit DCD 0
�8.buf DCD buf%
�B.getcode
�LSTMFD SP !,{R6,R7,R8}
�VADR R6,curbit
�`LDMIA R6,{R6,R7,R8}
�jADD R1,R5,R6
�t
CMP R1,R7
�~BCS needmoredata
��.simplecode
��ADD R7,R8,R6,LSR #3
��BIC R7,R7,#3
��LDMIA R7,{R0,R7}
��]
���flag=1500 �
��
[OPT Z
��� R1,R0,R0,ROR #16
��BIC R1,R1,#&FF0000
��MOV R0,R0,ROR #8
��� R0,R0,R1,LSR #8
��� R1,R7,R7,ROR #16
�BIC R1,R1,#&FF0000
�
MOV R7,R7,ROR #8
�� R7,R7,R1,LSR #8
�H�S R1,R6,#31:MOVNE R0,R0,LSL R1:RSBNE R1,R1,#32:�RNE R0,R0,R7,LSR R1
�(RSB R1,R5,#32
�2MOV R0,R0,LSR R1
�<]
�F�
�P
[OPT Z
�ZH�S R1,R6,#31:MOVNE R0,R0,LSR R1:RSBNE R1,R1,#32:�RNE R0,R0,R7,LSL R1
�d!MVN R1,#0:BIC R0,R0,R1,LSL R5
�n]
�x�
��
[OPT Z
��ADD R6,R6,R5
��STR R6,curbit
��LDMFD SP !,{R6,R7,R8}
��MOV PC,R14
��.needmoredata
��STMFD SP !,{R2,R3,R4,R14}
��MOV R3,R7,LSR #3
��SUB R0,R3,#2
��LDRB R0,[R8,R0]
��STRB R0,[R8]
��SUB R0,R3,#1
��LDRB R0,[R8,R0]
�STRB R0,[R8,#1]
�LDR R1,[R9,#16]
�LDR R1,[R1]
�"]
�,�flag=1500 �
�6
[OPT Z
�@MOV R0,#256
�JMOV R3,#256
�T]
�^�
�h
[OPT Z
�rBL bytefromcache%
�|MOVS R3,R0
��BEQ simplecode1
��]
���
��
[OPT Z
��SUB R6,R6,R7
��ADD R6,R6,#16
��ADD R0,R0,#2
��MOV R7,R0,LSL #3
��STR R7,lastbit
��ADD R2,R8,#2
��BL multibytefromcache%
��.simplecode1
��LDMFD SP !,{R2,R3,R4,R14}
�B simplecode
�]
��
�&
�range% �
�0
[OPT Z
�D.maxmin%
�NLDR R0,[R9]:LDR R0,[R0]
�XLDR R1,[R9,#8]
�bLDR R2,min
�lLDR R3,max
�v
.maxminlp
��LDR R4,[R1],#4
��CMP R4,R3:MOVCS R3,R4
��CMP R4,R2:MOVCC R2,R4
��SUBS R0,R0,#1:BNE maxminlp
��STR R2,min
��STR R3,max
��MOVS PC,R14
��.min DCD F
��.max DCD 0
��]
���
���sharpen% �
��!sharp=(col+1)*4:�sharpen%>0 �
�*� sharpen%<>8 sharpmul%=F/(sharpen%-8)
��
�sharpmul%=F/(8-sharpen%)
� �
�*
[OPT Z
�>.sharp%
�HLDR R0,[R9]:LDR R0,[R0]
�RLDR R1,[R9,#8]
�\LDR R2,[R9,#16]
�fLDR R3,[R9,#24]
�pLDR R4,[R9,#32]
�z]
��Ȏ sharpen% �
��� -8
��� 8,9,12,16,24
��
��
[OPT Z
��MOV R8,#sharpmul% � &FF
���R R8,R8,#sharpmul% � &FF00
��#MOV R9,#(sharpmul% >> 16) � &FF
��'�R R9,R9,#(sharpmul% >> 16) � &FF00
��]
���
��
[OPT Z
��.sharplp
�LDR R5,[R1,#-sharp]
�#LDR R6,[R1,#sharp]:ADD R5,R5,R6
�LDR R6,[R1],#4:ADD R5,R5,R6
�$$LDR R6,[R3,#-sharp]:ADD R5,R5,R6
�.#LDR R6,[R3,#sharp]:ADD R5,R5,R6
�8LDR R6,[R3],#4:ADD R5,R5,R6
�B$LDR R6,[R2,#-sharp]:ADD R5,R5,R6
�L#LDR R6,[R2,#sharp]:ADD R5,R5,R6
�VLDR R6,[R2],#4
�`MOV R6,R6,LSR #1
�jMOV R7,#�sharpen%
�tMUL R7,R6,R7
�~]
���sharpen%>0 �
��
[OPT Z
��SUBS R5,R7,R5,LSR #1
��MOVCC R5,#0
��]
���
��
[OPT Z
��ADD R5,R7,R5,LSR #1
��]
���
��Ȏ sharpen% �
��	� 8,9
�
[OPT Z
�
MOV R6,R5,LSL #1
�]
�� 10
�(
[OPT Z
�2
MOV R6,R5
�<]
�F� 12
�P
[OPT Z
�ZMOV R6,R5,LSR #1
�d]
�n� 16
�x
[OPT Z
��MOV R6,R5,LSR #2
��]
��� -8,24
��
[OPT Z
��MOV R6,R5,LSR #3
��]
��
��
[OPT Z
��MOV R6,R5,LSR #16
��� R5,R5,R6,LSL #16
��MUL R7,R8,R5
��MUL R5,R9,R5
��MUL R10,R6,R8
�MUL R6,R9,R6
�ADDS R10,R5,R10
�ADDCS R6,R6,#&10000
�"ADDS R7,R7,R10,LSL #16
�,ADC R6,R6,R10,LSR #16
�6MOV R6,R6,LSL #(32-27)
�@�RS R6,R6,R7,LSR #27
�JADDCS R6,R6,#1
�T]
�^�
�h�sharpen%>0 �
�r
[OPT Z
�|CMP R6,#F:MOVCS R6,#F
��]
���
��
[OPT Z
��STR R6,[R4],#4
��SUBS R0,R0,#1
��BNE sharplp
��MOVS PC,R14
��]
���
���hist%�equal% �
��
[OPT Z
��.histo%
�LDR R0,[R9]:LDR R0,[R0]
�LDR R1,[R9,#8]
�LDR R2,[R9,#16]
�&.histlp
�0(LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
�:MOV R3,R3,LSR #bits-8
�D]
�N�col=2 �
�X
[OPT Z
�bADD R3,R3,R3,LSL #1
�l<LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
�v(LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
��MOV R3,R3,LSR #bits-8
��$ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
��<LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
��(LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
��MOV R3,R3,LSR #bits-8
��$ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
��]
���
��
[OPT Z
��<LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
��SUBS R0,R0,#1
��BNE histlp
��MOVS PC,R14
�]
��
�
�equal% �
� 
[OPT Z
�4.histequal%
�>LDR R0,[R9]:LDR R0,[R0]
�HLDR R1,[R9,#8]
�RLDR R2,[R9,#16]
�\.equallp
�f%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
�pMOV R3,R3,LSR #bits-8
�z]
���col=2 �
��
[OPT Z
��%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
��MOV R3,R3,LSR #bits-8
��ADD R3,R3,R3,LSL #1
��(LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
��%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
��MOV R3,R3,LSR #bits-8
��$ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
��(LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
��%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
��MOV R3,R3,LSR #bits-8
��$ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
�]
��
�
[OPT Z
�$(LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
�.SUBS R0,R0,#1
�8BNE equallp
�BMOVS PC,R14
�L]
�V�
�`Ȏ r$ �
�j'� "FN800","FN801","FN1000","FN1001"
�t
[OPT Z
��.rlexpand%
��LDR R0,[R9]
��LDR R1,[R0]
��LDR R2,[R9,#8]:LDR R2,[R2]
��LDR R3,[R9,#16]
��LDR R4,[R3]
��CMP R4,#1:MOVLTS PC,R14
��LDR R5,[R9,#24]:LDR R5,[R5]
��.rle
��STRB R2,[R1],#1
��SUB R4,R4,#1
�
CMP R1,R5
�
TEQNE R4,#0
�BNE rle
�.rlexit
�(STR R1,[R0]
�2STR R4,[R3]
�<MOVS PC,R14
�F]
�P
� "FN902"
�Z
[OPT Z
�d.unpack%
�nLDR R0,[R9]
�xLDR R0,[R0]
��LDR R1,plbuff
��ADD R2,R0,#768
��.unpackloop
��LDR R3,[R0],#4
��
MOV R5,#0
��.bitloop
��MOV R6,R3,LSR R5
��� R6,R6,#15
��ADD R5,R5,#4
��MOV R7,R3,LSR R5
��� R7,R7,#15
��ADD R5,R5,#4
��STRB R7,[R1],#1
�STRB R6,[R1],#1
�CMP R5,#32
�BNE bitloop
�"
CMP R2,R0
�,BNE unpackloop
�6MOV PC,R14
�@.plbuff EQUD plbuff%
�J]
�T)� "FN1601","FN1501","FN1850","FN1851"
�^
[OPT Z
�r
.readiff%
�|MOV R1,#c%
��LDR R8,[R9]:LDR R8,[R8]
��+LDR R7,[R9,#8]:LDR R7,[R7]:ADD R7,R7,R8
��STMFD SP !,{R14}
��]
�� �r$="FN1850" � r$="FN1851" �
��
[OPT Z
��BL bytefromcache%
��]
���sy%>250 �
��
[OPT Z
��BL bytefromcache%
��]
���
��
�
[OPT Z
�.rle
�&BL bytefromcache%
�0CMP R0,#128
�:BCC rle1
�DRSB R2,R0,#256
�NBL bytefromcache%
�X.rle0 STRB R0,[R8],#1
�bSUBS R2,R2,#1
�lBPL rle0
�v
B rle2
��	.rle1
��ADD R3,R0,#1
��
MOV R2,R8
��ADD R8,R8,R3
��BL multibytefromcache%
��	.rle2
��
CMP R8,R7
��BCC rle
��LDMFD SP !,{R14}
��MOVS PC,R14
��]
��� "FN1900","FN1100","FN400"
��
[OPT Z
�.readline%
�LDR R2,[R9]:LDR R2,[R2]
� LDR R3,[R9,#8]
�*LDR R0,[R3]
�4LDR R4,[R9,#16]
�>LDR R5,[R4]
�H,LDR R6,[R9,#24]:LDR R6,[R6]:ADD R6,R6,R2
�RSTMFD SP !,{R14}
�\.rle
�f
CMP R5,#1
�pBGE rle1
�zBL bytefromcache%
��
MOV R5,#1
��]
���flag=1900 �
��
[OPT Z
��CMP R0,#192
��%�CS R5,R0,#63:BLCS bytefromcache%
��]
���
���flag=1100 �
��
[OPT Z
��CMP R0,#128
��BNE rle1
��BL bytefromcache%
�
TEQ R0,#0
��Q R0,#128
�BEQ rle1
�$ADD R5,R0,#1
�.BL bytefromcache%
�8]
�B�
�L�flag=400 �
�V
[OPT Z
�`
MOV R1,R0
�jBL bytefromcache%
�t�R R1,R1,R0,LSL #8
�~BL bytefromcache%
���R R1,R1,R0,LSL #16
��BL bytefromcache%
��ADD R5,R0,#1
��
MOV R0,R1
��]
���
���flag=200 �
��
[OPT Z
��ADD R5,R0,#1
��BL bytefromcache%
��]
���
�
[OPT Z
�
	.rle1
�STRB R0,[R2],#1
�]
�(�flag=400 �
�2
[OPT Z
�<MOV R1,R0,LSR #8
�FSTRB R1,[R2],#1
�PMOV R1,R0,LSR #16
�ZSTRB R1,[R2],#1
�d]
�n�
�x
[OPT Z
��SUB R5,R5,#1
��
TEQ R2,R6
��BNE rle
��.rlexit
��STR R0,[R3]:STR R5,[R4]
��LDMFD SP !,{PC}^
��]
��� "FN2401"
��
[OPT Z
��.bm_rle8
��MOV R1,#c%
��LDR R8,[R9]:LDR R8,[R8]
��+LDR R7,[R9,#8]:LDR R7,[R7]:ADD R7,R7,R8
�STMFD SP !,{R14}
�.rle
�BL bytefromcache%
�"
TEQ r0,#0
�,BEQ rlecopy
�@
MOV r4,r0
�JBL bytefromcache%
�T	.rle1
�^STRB r0,[r8],#1
�hSUBS r4,r4,#1
�rBGT rle1
�|	B rle
��.rlecopy
��BL bytefromcache%
��
CMP r0,#3
��BLT rlespecial
��
MOV r4,r0
��	.rle2
��BL bytefromcache%
��STRB r0,[r8],#1
��BL bytefromcache%
��SUBS r4,r4,#1
��STRGTB r0,[r8],#1
�SUBGTS r4,r4,#1
�BGT rle2
�	B rle
�&.rlespecial
��LDMFD SP !,{R14}
��MOVS PC,R14
��]
��� "FN2402"
��
[OPT Z
��.bm_rle4
��MOV R1,#c%
��LDR R8,[R9]:LDR R8,[R8]
��+LDR R7,[R9,#8]:LDR R7,[R7]:ADD R7,R7,R8
��STMFD SP !,{R14}
��
MOV r2,#0
�
MOV r3,#0
�.rle
�BL bytefromcache%
� 
TEQ r0,#0
�*BEQ rlecopy
�>
MOV r4,r0
�HBL bytefromcache%
�R	.rle1
�\BL bmrle4_insert
�f
CMP r3,#8
�pMOVGE r5,r2,LSR#24
�zSTRGEB r5,[r8],#1
��MOVGE r2,r2,LSL#8
��SUBGE r3,r3,#8
��
CMP r4,#0
��BGT rle1
��	B rle
��.rlecopy
��BL bytefromcache%
��
CMP r0,#3
��BLT rlespecial
��
MOV r4,r0
��	.rle2
�BL bytefromcache%
�BL bmrle4_insert
�BL bytefromcache%
�$
CMP r4,#0
�.BLGT bmrle4_insert
�8
B rle4
�B	.rle3
�LMOV r5,r2,LSR#24
�VSTRB r5,[r8],#1
�`MOV r2,r2,LSL#8
�jSUB r3,r3,#8
�t	.rle4
�~
CMP r3,#8
ˆBGE rle3
’
CMP r4,#0
œBGT rle2
¦	B rle
°.rlespecial
�
CMP r3,#0
�MOVGT r5,r2,LSR#24
�(STRGTB r5,[r8],#1
�<LDMFD SP !,{R14}
�FMOVS PC,R14
�P.bmrle4_insert
�ZRSB r5,r3,#32
�dMOV r2,r2,LSR r5
�nMOV r2,r2,LSL r5
�xSUB r5,r5,#8
�R r2,r2,r0,LSL r5
ÌSUBS r4,r4,#2
ÖADDMI r3,r3,#4
àADDPL r3,r3,#8
êMOVS PC,R14
ô]
þ�
���cachebytes% �
��
[OPT Z
��.bytefromcache%
��STMFD SP !,{R1,R2}
��LDR R1,incacheptr
�LDR R2,numlefttogo
�LDRB R0,[R1],#1
�SUBS R2,R2,#1
�STRNE R1,incacheptr
�"STRNE R2,numlefttogo
�,LDMFD SP !,{R1,R2}
�6MOVNE PC,R14
�@STMFD SP !,{R0,R1,R2,R3,R4}
�JLDR R2,valdatacache
�TSTR R2,incacheptr
�^LDR R3,valcache
�hSTR R3,numlefttogo
�r
MOV R0,#4
�|MOV R1,#c%
ĆSWI "OS_GBPB"
ĐLDMFD SP !,{R0,R1,R2,R3,R4}
ĚMOV PC,R14
Ĥ .valdatacache DCD datacache%
Į.valcache DCD cache%
ĸ.incacheptr DCD datacache%
��.numlefttogo DCD cache%
��.multibytefromcache%
��
CMP R3,#0
��
�Q PC,R14
��STMFD SP !,{R0,R14}
��.multibytefromcachel
�BL bytefromcache%
�STRB R0,[R2],#1
�SUBS R3,R3,#1
�BNE multibytefromcachel
�&LDMFD SP !,{R0,R14}
�0MOV PC,R14
�:]
�D�
�N�planar%<0 �
�XC%=7:�flag=2600 C%=15
�b
[OPT Z
�l
.plancnv%
�vLDR R0,sxloc
ŀLDR R1,[R9]:LDR R1,[R1]
ŊLDR R3,[R9,#8]:LDR R3,[R3]
ŔLDR R4,[R9,#16]:LDR R4,[R4]
Ş]
Ũ�flag=3500 �
Ų
[OPT Z
ż
MOV R9,#0
��]
���
��
[OPT Z
��MOV R9,#C%
��]
��
�
[OPT Z
�.planelp
�
MOV R7,#0
� 
MOV R5,R3
�*]
�4�N%=1�planes%
�>
[OPT Z
�HLDR R6,[R5],R4
�R]
�\�flag=2600 �
�f
[OPT Z
�pMOV R6,R6,LSL #8
�zBIC R6,R6,#&FF000000
Ƅ�R R6,R6,R6,LSR #16
Ǝ]
Ƙ�
Ƣ�flag=3500 �
Ƭ
[OPT Z
ƶMOV R6,R6,LSR R9
��S R6,R6,#1
��!�R R7,R7,R6,LSL #(planes%-N%)
���RNE R7,R7,#(planes%-1)
��]
���
��
[OPT Z
�MOV R6,R6,LSR R9
�� R6,R6,#1
��R R7,R7,R6,LSL #(N%-1)
�]
�$�
�.�
�8
[OPT Z
�BSTRB R7,[R1],#1
�L]
�V�flag=3500 �
�`
[OPT Z
�jADD R9,R9,#1
�tCMP R9,#C%+1
�~�Q R9,#0
Lj]
ǒ�
ǜ
[OPT Z
ǦSUBS R9,R9,#1:MOVMI R9,#C%
ǰ]
Ǻ�
��
Ȏ flag �
��
� 2600
��
[OPT Z
��MOVMI R3,R5
��]
�
� 3500
�
[OPT Z
�
ADDEQ R3,R3,#1
�]
�
�(
[OPT Z
�2ADDMI R3,R3,#1
�<]
�F�
�P
[OPT Z
�ZSUBS R0,R0,#1:BNE planelp
�dMOVS PC,R14
�n]
�x�
Ȃ�
Ȍcputime%=�
Ȗ
�cache% �
Ƞ�flag=3600 �
ȪDpcdblk%!12=cacherows%:�refillpcd:�cache%>=filesize% rowstogo%=-1
ȴ�
Ⱦ!�striprows%>0�compression>1 �
��ș12,4,c%,datacache%,cache%
��;�cachebytes% !incacheptr=datacache%:!numlefttogo=cache%
���
��+�refill:�cache%>=filesize% rowstogo%=-1
��
��
��
�sizeshft%=0:Ȏ ncol �
�"� 2^24-1:size%=1
�,� 2^15-1:size%=1
�6� 63,255,256:size%=1
�@� 15:size%=2:sizeshft%=1
�J� 3:size%=4:sizeshft%=2
�T7� 1:size%=8:sizeshft%=3:�m$="C" size%=2:sizeshft%=1
�^�m$="D" size%=4:sizeshft%=2
�h�m$="T" size%=2:sizeshft%=1
�r�
Ɇ
Ȏ flag �
ɐ*� 501:�info% �"Reading interlaced GIF"
ɚ%sz%=sx%*sy%:plbuff%=�dim(sz%+100)
ɤF�Y%=0�sy%-1�8:X%=plbuff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
ɮF�Y%=4�sy%-1�8:X%=plbuff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
ɸF�Y%=2�sy%-1�4:X%=plbuff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
��F�Y%=1�sy%-1�2:X%=plbuff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
��?datacache%=plbuff%:buff%=plbuff%:rowbytes%=sx%:rowstogo%=-1
���
���gamma<>1 � gamma<>0 �
��k=1/gamma:�C%=0�colourindex
��#�r%(C%) r%(C%)=((r%(C%)/F)^k)*F
�#�g%(C%) g%(C%)=((g%(C%)/F)^k)*F
�#�b%(C%) b%(C%)=((b%(C%)/F)^k)*F
��
��
�&rmax=F:gmax=F:bmax=F
�0�col=0 �
�:�input<9 �
�D7�C%=0�255:r%(C%)=r%(C%)*rwt+g%(C%)*gwt+b%(C%)*bwt:�
�N�
�X�input<400 �
�b$rmax=F*rwt:gmax=F*gwt:bmax=F*bwt
�lM�C%=0�colourindex:r%(C%)=r%(C%)*rwt:g%(C%)=g%(C%)*gwt:b%(C%)=b%(C%)*bwt:�
�v�
ʀ�
ʊ�
ʔ,�order% �adjustpalette(1/ydiv%/xdiv%,0)
ʨ
�range% �
ʲ>�info% �"Scanning data to compute parameters for '-range'"
ʼ
�order% �
��Y%=0:� șhour%,Y%*100�sy%
��8W%=�(r$+"(xp%())"):�maxmin%,xp%(1,0),totvals2%:Y%+=1
��"�Y%=sy% �!min<255 �!max+255>=F
���
��%Y%=0:ysamp%=1:� șhour%,Y%*100�y%
�;�scaledpixelrow(cl%()):�maxmin%,cl%(1,0),totvals%:Y%+=1
�#�Y%=y% � !min<255 � !max+255>=F
��
�O�!max+255>=F �!min<255 range%=�:range$="No point in '-range' on this image"
� ��range% �adjustpalette(F/(!max-!min),!min/ydiv%/xdiv%):range$="Input image maximum "+�(!max/F*100)+"% minimum "+�(!min/F*100)+"%"
�*�rewind:�info% �range$
�4�
�>�hist% �equal% �
�HF�equal% �info% �"Scanning data to compute parameters for '-equal'"
�R
�order% �
�\$�yr%=0�sy%-1:șhour%,yr%*100�sy%
�f6W%=�(r$+"(xp%())"):�histo%,xp%(1,0),vals%(0,0),sx%
�p�
�z�
˄+ysamp%=1:�yr%=0�y%-1:șhour%,yr%*100�y%
ˎ9�scaledpixelrow(cl%()):�histo%,cl%(1,0),vals%(0,0),x%
˘�
ˢ�
ˬ.�info% �"Done. Now processing the picture"
˶�
��input<400 �
���C%=0�colourindex
���r%(C%)<0 r%(C%)=0
���g%(C%)<0 g%(C%)=0
���b%(C%)<0 b%(C%)=0
���r%(C%)>rmax r%(C%)=rmax
��g%(C%)>gmax g%(C%)=gmax
��b%(C%)>bmax b%(C%)=bmax
��
��
�$�hist% �
�.M%=0:ZM%=-1:�C%=0�col
�85�Z%=0�256:�vals%(Z%,C%)>M% M%=vals%(Z%,C%):ZM%=Z%
�B�:�
�L�ZM%=-1 � okinfo%=0 �=100
�V
� col>0 �
�`�66:ht=500
�j��<>66 �16:ht=400
�t�0,6,2000,6
�~�
̈�18:ht=400:�0,6,1024,6
̒�
̜#M=M%/(ht*2-8):�C%=0�col:Ȏ C% �
̦
� 0:�1
̰
� 1:�2
̺
� 2:�4
���
��
� col>0 �
��C�Z%=0�256:�vals%(Z%,C%) X%=Z%*3+C%<<1:�X%,8,X%,vals%(Z%,C%)/M+8
���
���
�?�Z%=0�256:�vals%(Z%,C%) X%=Z%<<2:ȓ ȐX%,8,2,vals%(Z%,C%)/M
��
�
�
��
��close:ș"Hourglass_Off"
�(=100
�2�
�<%�m>=0 oname$="p"+�m+m$ �oname$=m$
�F!�m=-6 �m=-7 �m=-8 oname$=pnm$
�P�range% oname$+="r"
�Z�equal% oname$+="e"
�d#�sharpen% oname$+="s"+�sharpen%
�n�black% oname$+="b"+�black%
�x8�gamma<>1 A%=@%:@%=&1020100:oname$+="g"+�gamma:@%=A%
͂�bright%=16 oname$+="b"
͌)xsp%=x%:ysp%=y%:�rotate% Ȕ xsp%,ysp%
͖3� rotate% � hflip% � vflip% �m=-9 � m=-10 �m-=2
͠�m=-9�m=-10 �
ͪ� jpq%(20)
ʹ[jpq%()=60,75,90,105,120,135,150,160,170,180,190,205,215,235,255,280,320,380,500,750,850
;�
��
Ȏ m �
��.� -1:xwords%=xsp%:sz%=xwords%*ysp%:Y%=ysp%
��+�getoutput(sz%,0,xwords%,Y%):base%=ram%
��3� -3,-5:xwords%=xsp%*2:sz%=xwords%*ysp%:Y%=ysp%
��+�getoutput(sz%,0,xwords%,Y%):base%=ram%
�0� -4:xwords%=xsp%*3:sz%=xwords%*ysp%:Y%=ysp%
�+�getoutput(sz%,0,xwords%,Y%):base%=ram%
�5� -6:xwords%=xsp%*2+3��3:sz%=xwords%*ysp%:Y%=ysp%
�'A%=Y%:�getoutput(sz%,64,xwords%,Y%)
�"1ram%!4=0:ram%!8=16:ram%!12=16:ș&2e,&109,ram%
�,)ș&2e,&10f,ram%,oname$,0,xsp%*2,Y%,28
�6Jbase%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
�@)ram%!12=ram%!12-Y%*xwords%+A%*xwords%
�J>base%!(10*4)=5<<27 � nx<<1 � ny<<14 � 1:base%+=base%!(8*4)
�T5� -7:xwords%=xsp%*3+3��3:sz%=xwords%*ysp%:Y%=ysp%
�^'A%=Y%:�getoutput(sz%,64,xwords%,Y%)
�h1ram%!4=0:ram%!8=16:ram%!12=16:ș&2e,&109,ram%
�r)ș&2e,&10f,ram%,oname$,0,xsp%*3,Y%,28
�|Jbase%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
Ά)ram%!12=ram%!12-Y%*xwords%+A%*xwords%
ΐBbase%!(10*4)=panic<<27 � nx<<1 � ny<<14 � 1:base%+=base%!(8*4)
Κ4no magic number yet for new format 24bpp sprites
Τ0� -8:xwords%=xsp%*4:sz%=xwords%*ysp%:Y%=ysp%
ή'A%=Y%:�getoutput(sz%,64,xwords%,Y%)
θ1ram%!4=0:ram%!8=16:ram%!12=16:ș&2e,&109,ram%
��)ș&2e,&10f,ram%,oname$,0,xsp%*4,Y%,28
��Jbase%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
��)ram%!12=ram%!12-Y%*xwords%+A%*xwords%
��>base%!(10*4)=6<<27 � nx<<1 � ny<<14 � 1:base%+=base%!(8*4)
��>� -9:xwords%=xsp%+3��3:sz%=(xsp%+7��7)*(ysp%+7��7):Y%=ysp%
��)sz%=sz%*jpq%(jpegquality%�5)/588+1024
�&jpegwrk%=�dim((xsp%+7��7)*9+20000)
�base%=�dim(xwords%)
��getoutputjp(sz%)
�N!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=1:ram%!16=90:ram%!20=90
�&Pș"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+7��7)*9+20000 � jpegtag%
�0J� -10:xwords%=xsp%*3+3��3:sz%=(xsp%+15��15)*(ysp%+15��15)*12/8:Y%=ysp%
�:)sz%=sz%*jpq%(jpegquality%�5)/588+1024
�D)jpegwrk%=�dim((xsp%+15��15)*30+20000)
�Nbase%=�dim(xwords%)
�X�getoutputjp(sz%)
�bN!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=3:ram%!16=90:ram%!20=90
�lSș"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+15��15)*30+20000 � jpegtag%
�v5� -11:xwords%=xsp%:sz%=xwords%*ysp%+20000:Y%=ysp%
π&jpegwrk%=�dim((xsp%+7��7)*9+20000)
ϊ1�getoutput(sz%,0,xwords%,Y%):base%=ram%+20000
ϔ7� -12:xwords%=xsp%*3:sz%=xwords%*ysp%+20000:Y%=ysp%
Ϟ)jpegwrk%=�dim((xsp%+15��15)*30+20000)
Ϩ1�getoutput(sz%,0,xwords%,Y%):base%=ram%+20000
ϲC:xwords%=xsp%/size%+3.9999��3:sz%=xwords%*ysp%:X%=xsp%:Y%=ysp%
ϼ
�ncol=1 �
��Ȏ m$ �
��O�"C":!rowinc=xwords%:xwords%=xwords%*4:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*4
��O�"T":!rowinc=xwords%:xwords%=xwords%*3:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*3
��O�"D":!rowinc=xwords%:xwords%=xwords%*2:sz%=xwords%*ysp%:X%=xsp%*2:Y%=ysp%*2
���
��
�,A%=Y%:�getoutput(sz%,2048+64,xwords%,Y%)
�1ram%!4=0:ram%!8=16:ram%!12=16:ș&2e,&109,ram%
�0ș&2e,&10f,ram%,oname$,(ncol<63)�1,X%,Y%,spm
� Jbase%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
�*)ram%!12=ram%!12-Y%*xwords%+A%*xwords%
�4&pal%=base%+11*4:base%+=base%!(8*4)
�>
Ȏ ncol �
�H	� 256
�RR!(pal%-8)+=2048:!(pal%-12)+=2048:base%+=2048:!(ram%+12)+=2048:!(pal%-44)+=2048
�\)�Z%=0�255:B%=Z%�Z%<<8�Z%<<16:B%=B%<<8
�f%pal%!(Z%*8)=B%:pal%!(Z%*8+4)=B%:�
�p	� 255
�zR!(pal%-8)+=2048:!(pal%-12)+=2048:base%+=2048:!(ram%+12)+=2048:!(pal%-44)+=2048
Є$�Z%=0�255:B%=palette%!(Z%<<2)<<8
Ў%pal%!(Z%*8)=B%:pal%!(Z%*8+4)=B%:�
И� 15
ТȎ m$ �
Ь	� "R"
ж0�Z%=0�15:�col(Z%,palette%!(Z%<<2)�&F0F0F0):�
�	� "D"
���Z%=0�7:A%=0:�Z%�1 A%+=&F0
���Z%�2 A%+=&F000
���Z%�4 A%+=&F00000
���col(Z%,A%):�
��	� "T"
�0�Z%=0�15:A%=Z%<<4:�col(Z%,A%�A%<<8�A%<<16):�
�
�<�Z%=0�15:A%=(Z%�7)/7*15+.2<<4:�col(Z%,A%�A%<<8�A%<<16):�
��
�$� 3
�.
Ȏm$ �
�8	� "C"
�B;�col(0,0):�col(1,&F0F000):�col(2,&F000F0):�col(3,&F0F0)
�L	� "R"
�V/�Z%=0�3:�col(Z%,palette%!(Z%<<2)�&F0F0F0):�
�`
�j1�Z%=0�3:A%=Z%*5<<4:�col(Z%,A%�A%<<8�A%<<16):�
�t�
�~!� 1:�col(0,0):�col(1,&F0F0F0)
ш�
ђ�
Ѧ�flex% �
Ѻ�
���workspace%<0 �
��.P%=�:[OPT 0:STR r13,P%+16:MOVS Pc,r14:]:��
���=�+32*1024+�-!(�+16)
���
��
��
�
:�base%*size%>2^32 � 42,"base%*size% product too large"
�� �
�/� � �:� �:�Save:� �,�$+" internal ("+Þ+")"
�(ș"Hourglass_LEDs",3
�2$ysamp%=1:nl%()=0:step%=4*(col+1)
�<Iaddr%=base%<<sizeshft%:rowstep%=xwords%*size%:colstep%=1:dist%=xsp%-1
�F!�m=-3�m=-5�m=-6 dist%=dist%*2
�P(�m=-4�m=-7�m=-10�m=-12 dist%=dist%*3
�Z�m=-8 dist%=dist%*4
�d�rotate% �
�n6odist%=dist%:Ȕ colstep%,rowstep%:Ȕ hflip%,vflip%
�x�rotate%=1 �
҂Gaddr%+=(ysp%-1)*colstep%:colstep%=-colstep%:dist%=(ysp%-1)*colstep%
Ҍ�
Җ;addr%+=dist%:rowstep%=-rowstep%:dist%=(ysp%-1)*colstep%
Ҡ�
Ҫ;�m=-3�m=-5�m=-6 colstep%=colstep%/2:rowstep%=rowstep%*2
ҴB�m=-4�m=-7�m=-10�m=-12 colstep%=colstep%/3:rowstep%=rowstep%*3
Ҿ1�m=-8 colstep%=colstep%/4:rowstep%=rowstep%*4
���
��
�hflip% �
��0addr%+=dist%:dist%=-dist%:colstep%=-colstep%
���
��
�vflip% �
��rotate% �
�,addr%+=odist%*rotate%:rowstep%=-rowstep%
��
�/addr%+=(ysp%-1)*rowstep%:rowstep%=-rowstep%
�"�
�,�
�6Soutlim%=((base%+xwords%*Y%)<<sizeshft%)-1:oddcolstep%=-colstep%:oddstep%=-step%
�@+�order% �adjustpalette(1/ydiv%/xdiv%,0)
�J�m=-9�m=-10 �
�T?ș "OS_SWINumberFromString",,"CompressJPEG_WriteLine" � wl%
�^9�sy%=y% � sx%=x% � range%=� � sharpen%=� � equal%=� �
�h�dither% �
�r$�yr%=0 � y%-1:șhour%,yr%*100�y%
�|6W%=�(r$+"(cl%())"):cl%()=cl%()+nl%():nl%()=0:B%=x%
ӆ�yr%�1 �
Ӑ2�fs%,colstep%,cl%(1,0),nl%(1,0),addr%,step%,B%
Ӛ�
ӤFA%=addr%+dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
Ӯ�
Ӹșwl%,jpegtag%,addr%
���
���
��GI%=step%:�yr%=0�y%-1:șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
��BW%=�(r$+"(cl%())"):B%=x%:�fs%,colstep%,cl%(1,0),I%,addr%,I%,B%
��șwl%,jpegtag%,addr%
���
��
��
�
�equal% �
�9�rewind:Havg%=Ǝ(vals%())/256/(col+1):� new%(256,col)
�&>�B%=0�col:R%=0:Hint%=0:�Z%=0�256:L%=R%:Hint%+=vals%(Z%,B%)
�0&ȕHint%>Havg%:Hint%-=Havg%:R%+=1:�
�:new%(Z%,B%)=(L%+R%)/2*F/256
�D�:�
�N�
�X�sharpen% �
�b
�order% �
�l:yread%=sy%-1:W%=�(r$+"(rm1%())"):�equal% �fit2(rm1%())
�vA�B%=0�col:rm1%(0,B%)=rm1%(1,B%):rm1%(sx%+1,B%)=rm1%(sx%,B%):�
Ԁ�
Ԋ<yread%=y%-1:�scaledpixelrow(rm1%()):�equal% �fit(rm1%())
Ԕ?�B%=0�col:rm1%(0,B%)=rm1%(1,B%):rm1%(x%+1,B%)=rm1%(x%,B%):�
Ԟ�
Ԩrm2%()=rm1%()
Բ�
Լ
�order% �
���yr%=0 � y%-1
��2șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
��
�sy%=y% �
���sharppixelrow(cl%())
���
�:ysamp%-=1:�ysamp%=0 �sharppixelrow(xl%()):ysamp%=ymul%
��ydiv%=1 �
�cl%()=xl%()
��
� �ysamp%>=ydiv% �
�*#ysamp%-=ydiv%:cl%()=xl%()*ydiv%
�4�
�>/cl%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
�H�
�R0�ysamp%=0 �sharppixelrow(xl%()):ysamp%=ymul%
�\�ysamp%>Y% �
�f6ysamp%-=Y%:xl2%()=xl%()*Y%:cl%()=cl%()+xl2%():Y%=0
�p�
�z>Y%-=ysamp%:xl2%()=xl%()*ysamp%:cl%()=cl%()+xl2%():ysamp%=0
Մ�
Վ
� Y%=0
՘�
բ
ysamp%+=1
լ�
ն�
�2cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%+dist%
���yr%�1 �
��2�fs%,colstep%,cl%(1,0),nl%(1,0),addr%,step%,B%
���
��7�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
���
�șwl%,jpegtag%,addr%
��
��
��yr%=0 � y%-1
�$2șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�.�sharpen% �
�8@�yread% yread%-=1:�scaledpixelrow(rm%()):�equal% �fit(rm%())
�B;�B%=0�col:rm%(0,B%)=rm%(1,B%):rm%(x%+1,B%)=rm%(x%,B%):�
�L;� sharp%,cl%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals%
�V!Ȕ rm2%(),rm1%():rm1%()=rm%()
�`�
�j.�scaledpixelrow(cl%()):�equal% �fit(cl%())
�t�
�~2cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%+dist%
ֈ�yr%�1 �
֒2�fs%,colstep%,cl%(1,0),nl%(1,0),addr%,step%,B%
֜�
֦7�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
ְ�
ֺșwl%,jpegtag%,addr%
���
���
���
��0ș"CompressJPEG_Finish",jpegtag% � jpegsize%
���
�9�sy%=y% � sx%=x% � range%=� � sharpen%=� � equal%=� �
��dither% �
�
@�yr%=0 � y%-1:șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�OW%=�(r$+"(cl%())"):cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
��yr%�1 �
�(/�fs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
�2�
�<AA%+=dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
�F�
�P�
�Z�
�dGI%=step%:�yr%=0�y%-1:șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�nXW%=�(r$+"(cl%())"):B%=x%:A%=addr%:addr%+=rowstep%:�fs%,colstep%,cl%(1,0),I%,A%,I%,B%
�x�
ׂ�
׌�
ז
�equal% �
נ9�rewind:Havg%=Ǝ(vals%())/256/(col+1):� new%(256,col)
ת>�B%=0�col:R%=0:Hint%=0:�Z%=0�256:L%=R%:Hint%+=vals%(Z%,B%)
״&ȕHint%>Havg%:Hint%-=Havg%:R%+=1:�
׾new%(Z%,B%)=(L%+R%)/2*F/256
���:�
���
���sharpen% �
��
�order% �
��:yread%=sy%-1:W%=�(r$+"(rm1%())"):�equal% �fit2(rm1%())
�A�B%=0�col:rm1%(0,B%)=rm1%(1,B%):rm1%(sx%+1,B%)=rm1%(sx%,B%):�
��
�<yread%=y%-1:�scaledpixelrow(rm1%()):�equal% �fit(rm1%())
�?�B%=0�col:rm1%(0,B%)=rm1%(1,B%):rm1%(x%+1,B%)=rm1%(x%,B%):�
�"�
�,rm2%()=rm1%()
�6�
�@
�order% �
�J�yr%=0 � y%-1
�T2șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�^
�sy%=y% �
�h�sharppixelrow(cl%())
�r�
�|:ysamp%-=1:�ysamp%=0 �sharppixelrow(xl%()):ysamp%=ymul%
؆�ydiv%=1 �
ؐcl%()=xl%()
ؚ�
ؤ�ysamp%>=ydiv% �
خ#ysamp%-=ydiv%:cl%()=xl%()*ydiv%
ظ�
��/cl%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
���
��0�ysamp%=0 �sharppixelrow(xl%()):ysamp%=ymul%
���ysamp%>Y% �
��6ysamp%-=Y%:xl2%()=xl%()*Y%:cl%()=cl%()+xl2%():Y%=0
���
�>Y%-=ysamp%:xl2%()=xl%()*ysamp%:cl%()=cl%()+xl2%():ysamp%=0
��
�
� Y%=0
��
�&
ysamp%+=1
�0�
�:�
�D<cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
�N�yr%�1 �
�X/�fs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
�b�
�lAA%+=dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
�v�
ـ�
ي�
ٔ�yr%=0 � y%-1
ٞ2șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
٨�sharpen% �
ٲ@�yread% yread%-=1:�scaledpixelrow(rm%()):�equal% �fit(rm%())
ټ;�B%=0�col:rm%(0,B%)=rm%(1,B%):rm%(x%+1,B%)=rm%(x%,B%):�
��;� sharp%,cl%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals%
��!Ȕ rm2%(),rm1%():rm1%()=rm%()
���
��.�scaledpixelrow(cl%()):�equal% �fit(cl%())
���
�<cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
��yr%�1 �
�/�fs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
��
� AA%+=dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
�*�
�4�
�>�
�H�
�R�m=-11�m=-12 �
�\?ș "OS_SWINumberFromString",,"CompressJPEG_WriteLine" � wl%
�f�m=-11 �
�pN!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=1:ram%!16=90:ram%!20=90
�zPș"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+7��7)*9+20000 � jpegtag%
ڄ�
ڎN!ram%=xsp%:ram%!4=ysp%:ram%!8=jpegquality%:ram%!12=3:ram%!16=90:ram%!20=90
ژSș"CompressJPEG_Start",ram%,sz%,ram%,jpegwrk%,(xsp%+15��15)*30+20000 � jpegtag%
ڢ�
ڬaddr%=ram%+20000
ڶ�yr%=0�ysp%-1
�<șhour%,yr%*100�ysp%:șwl%,jpegtag%,addr%:addr%+=xwords%
���
��0ș"CompressJPEG_Finish",jpegtag% � jpegsize%
���
���
��cputime%=�-cputime%
�	�Save
�=0
�� �srchdevlist
�
[OPT Z
�8%CMP R4,#F:MOVCS R4,#0:MOVGE R4,#F
�B>MOV R0,R4,LSR #(bits-k%):CMP R0,#1<<k%:MOVCS R0,#(1<<k%)-1
�L%CMP R5,#F:MOVCS R5,#0:MOVGE R5,#F
�VRMOV R3,R5,LSR #(bits-k%):CMP R3,#1<<k%:MOVCS R3,#(1<<k%)-1:�R R0,R0,R3,LSL #k%
�`%CMP R6,#F:MOVCS R6,#0:MOVGE R6,#F
�jTMOV R3,R6,LSR #(bits-k%):CMP R3,#1<<k%:MOVCS R3,#(1<<k%)-1:�R R0,R0,R3,LSL #k%*2
ۈSTMFD SP !,{R8,R9,R10,R11}
ےLDR r3,ictloc
ۜLDR r2,[r3,r0,LSL #2]
۰MOV r14,r2,lsr #24
ۺCMP r14,#4
��ADDCC r2,r3,r0,lsl #2
��BICCS r2,r2,#&ff000000
��LDRB r0,[r2],#1
��SUBS r14,r14,#1
��
BEQ gotit
�ADD r3,r0,r0,lsl #1
�
ADD r3,r7,r3,lsl #2
�LDMIA r3,{r8,r9,r10}
�SUBS r8,r8,r4
�(RSBMI r8,r8,#0
�2MOV r8,r8,lsr #bits/2
�<SUBS r9,r9,r5
�FRSBMI r9,r9,#0
�PMOV r9,r9,lsr #bits/2
�ZSUBS r10,r10,r6
�dRSBMI r10,r10,#0
�nMOV r10,r10,lsr #bits/2
�xMUL r3,r8,r8
܂MUL r11,r9,r9
܌ADD r11,r11,r11,LSL #2
ܖADD r3,r3,r3,LSL #1
ܠADD r3,r3,r11,LSL #1
ܪMLA r11,r10,r10,r3
ܾ
.srchlist
��LDRB r3,[r2],#1
��ADD R8,R3,R3,LSL #1
��ADD R8,R7,R8,LSL #2
��LDMIA R8,{R8,R9,R10}
��SUBS R9,R5,R9
�RSBMI R9,R9,#0
�MOV R3,R9,LSR #bits/2
�MUL R9,R3,R3
�ADD r9,r9,r9,LSL #2
�"CMP R11,R9,LSL #1
�,BCC srchquick
�6SUBS R8,R4,R8
�@RSBMI R8,R8,#0
�JMOV R3,R8,LSR #bits/2
�TMUL R8,r3,r3
�^ADD r8,r8,r8,LSL #1
�hADD r8,r8,r9,LSL #1
�rSUBS R10,R6,R10
�|RSBMI R10,R10,#0
݆MOV R3,R10,LSR #bits/2
ݐMLA R10,R3,R3,R8
ݚCMP R10,R11
ݤMOVCC R11,R10
ݮLDRCCB R0,[r2,#-1]
ݸ.srchquick
��SUBS R14,R14,#1
��BNE srchlist
��
.gotit
��+ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
��LDMIA R3,{R8,R9,R10}
��+SUB R4,R4,R8:SUB R5,R5,R9:SUB R6,R6,R10
�LDMFD r13!,{R8,R9,R10,R11}
�]
��
�� �getoutput(A%,E%,B%,� C%)
�&%�A%>max% � rotate%=� � vflip%=� �
�01C%=max%�B%+1:A%=xwords%*C%+E%:first%=�:o%=�f$
�:�
�D
A%+=E%
�N�
�X�spritearea%<0 �
�b/ram%=�createarea(A%):�ram%=-1 ram%=�dim(A%)
�l�
�vram%=spritearea%
ހ�
ފ!ram%=A%
ޔ�
ި� �getoutputjp(� A%)
޼�spritearea%<0 �
��3ram%=�createareajp(A%):�ram%=-1 ram%=�dimjp(A%)
���
��ram%=spritearea%
���
��!ram%=A%
��
�� �createarea(size%)
� � �
�*areanumber%=0
�4
� � �:=-1
�>_ș &20066,0,-1,size%,-1,%10000000,size%,0,0,"ChangeFSI sprite" � ,areanumber%,,areabase%;V%
�H�V%�1 �areanumber%=0:=-1
߄4ș "OS_ReadDynamicArea",areanumber% � ,areasize%
ߎ=� areasize%<size% �removearea:� 42,"Couldn't create area"
ߘ=areabase%
߬� �createareajp(� size%)
߶� �
�areanumber%=0
��
� � �:=-1
��]ș &20066,0,-1,size%,-1,%10000000,size%,0,0,"ChangeFSI JPEG" � ,areanumber%,,areabase%;V%
���V%�1 �areanumber%=0:=-1
��Dș "OS_ReadDynamicArea",areanumber% � ,areasize%:size%=areasize%
��=areabase%
�� �removearea
�@�areanumber% ș "OS_DynamicArea",1,areanumber%:areanumber%=0
��
�.� �cachedim(size%)
�8� �
�Bcacheareanumber%=0
�L
� � �:=-1
�Vhș &20066,0,-1,size%,-1,%10000000,size%,0,0,"ChangeFSI cache" � ,cacheareanumber%,,cacheareabase%;V%
�`!�V%�1 �cacheareanumber%=0:=-1
�j>ș "OS_ReadDynamicArea",cacheareanumber% � ,cacheareasize%
�tG� cacheareasize%<size% �removecachearea:� 42,"Couldn't create area"
�~=cacheareabase%
�� �removecachearea
�O�cacheareanumber% ș "OS_DynamicArea",1,cacheareanumber%:cacheareanumber%=0
��
�� �flushoutput
���spritearea%<0 �oksave% �
��'A%=base%:�first% A%=ram%+4:first%=�
��ș12,2,o%,A%,addr%�size%-A%
���
��addr%=base%*size%
��
�� �close
�
,�c% �flag=3600 ș"PhotoCD_Close",pcdh%,1
�;�c% �#c%:c%=0:�scrapf% scrapf%=�:�"Remove <Wimp$Scrap>"
��cc% �#cc%:cc%=0
�(�ccc% �#ccc%:ccc%=0
�2�removecachearea
�<�
�F� �Save
�P
�close
�Z
Ȏ m �
�d"� -1:�spritearea%<0 �oksave% �
�n;�o% �flushoutput �ș"OS_File",10,f$,&004,,ram%,ram%+sz%
�x�
�� -2:o%=�f$:�#o%,pnm$
�
Ȏ pnm$ �
�
� "P1"
�,�#o%,"# "+f$+".pbm (options "+oname$+")"
��#o%,�xsp%+" "+�ysp%
�$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
�=�X%=0�xsp%-1:�B%?(X%>>3)�(1<<(X%�7)) �#o%,"1"; ��#o%,"0";
���
���#o%,""
���
��
� "P4"
��;�#o%,"# "+f$+".pbm (options "+oname$+") binary encoded"
��#o%,�xsp%+" "+�ysp%
�f�X%=0�255:code%?X%=X%<<7 � X%<<5�&40 � X%<<3�&20 � X%<<1�&10 � X%>>1�8 � X%>>3�4 �X%>>5�2 �X%>>7:�
�$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
�,�X%=0�xsp%-1�8:�#o%,code%?(B%?(X%>>3)):�
�"�
�,
� "P2"
�6,�#o%,"# "+f$+".pgm (options "+oname$+")"
�@�#o%,�xsp%+" "+�ysp%
�J
�#o%,"15"
�T$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
�^7�X%=0�xsp%-1:C%=B%?(X%>>1):�X%�1 C%=C%>>4 �C%=C%�15
�h�#o%," "+�C%;
�r�
�|�#o%,""
��
�
� "P5"
�;�#o%,"# "+f$+".pgm (options "+oname$+") binary encoded"
��#o%,�xsp%+" "+�ysp%
�
�#o%,"15"
�$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
��7�X%=0�xsp%-1:C%=B%?(X%>>1):�X%�1 C%=C%>>4 �C%=C%�15
���#o%,C%
���
���
���
��
�#o%:o%=0
�/�pnm$="P2"�pnm$="P1" �"Settype "+f$+" &FFF"
�� -3:o%=�f$:�#o%,pnm$
�O�#o%,"# "+f$+".pcm (options "+oname$+") binary encoded 15bpp (5bits r,g,b)"
��#o%,�xsp%+" "+�ysp%
�&
�#o%,"31"
�0ș12,2,o%,ram%,xsp%*ysp%*2
�:
�#o%:o%=0
�D� -4:o%=�f$:�pnm$="IRLAM"�
�N%�#o%,"Irlam 24: "+�xsp%+" "+�ysp%
�X#�Y%=0�ysp%-1:B%=ram%+Y%*xwords%
�b!�X%=0�xsp%*3-1�3:�#o%,B%?X%:�
�l'B%+=1:�X%=0�xsp%*3-1�3:�#o%,B%?X%:�
�v'B%+=1:�X%=0�xsp%*3-1�3:�#o%,B%?X%:�
��
��
�
�#o%,pnm$
��pnm$="P6" �
�G�#o%,"# "+f$+".ppm (options "+oname$+") binary encoded 24bpp r,g,b"
��
�E�#o%,"# "+f$+".ppm (options "+oname$+") "+�(p6bits*3)+"bpp r,g,b"
���
���#o%,�xsp%+" "+�ysp%
���#o%,�(2^p6bits-1)
���pnm$="P6" �
��ș12,2,o%,ram%,xsp%*ysp%*3
��
�#�Y%=0�ysp%-1:B%=ram%+Y%*xwords%
�X�X%=0�xsp%-1:C%=B%!(X%*3):�#o%," "+�(C%�255)+" "+�((C%>>8)�&FF)+" "+�((C%>>16)�255);
��
� �#o%,""
�*�
�4�
�>�
�H
�#o%:o%=0
�R%�pnm$="P3" �"Settype "+f$+" &FFF"
�\� -5:o%=�f$:�#o%,pnm$
�fO�#o%,"# "+f$+".pcm (options "+oname$+") binary encoded 15bpp (5bits y,u,v)"
�p�#o%,�xsp%+" "+�ysp%
�z�#o%,"31 27 21"
�ș12,2,o%,ram%,xsp%*ysp%*2
�
�#o%:o%=0
�� -9,-10,-11,-12
�?�spritearea%<0 �oksave% ș8,10,f$,&c85,,ram%,ram%+jpegsize%
�
��ncol=1�m$="T" �
��X%=(xsp%*4-1)�8*8+6�6�-8
��ș&2e,&12e,ram%,oname$,X%
��ș&2e,&12e,ram%,oname$,X%
���
���
���spritearea%<0 �oksave% �
�(�o% �flushoutput �ș&2e,&10c,ram%,f$
��
��
�4�o% �#o%:o%=0:�"settype "+f$+" &ff9":�removearea
�$ș"Hourglass_Off"
�.�
�8��defpal
�B
�C%=0�255
�L#r%(C%)=(C%�7 � (C%�16)>>1)/15*F
�V$g%(C%)=(C%�3 � (C%�&60)>>3)/15*F
�`0b%(C%)=(C%�3 � (C%�8)>>1 � (C%�128)>>4)/15*F
�j�
�t�
�~
��defpal2
�r%(0)=F:g%(0)=F:b%(0)=F
��
�
��defpal4
�/r%()=15,10,5,0:�C%=0�3:r%(C%)=r%(C%)/15*F:�
�g%()=r%():b%()=r%()
��
����defpal16
��1r%()=15,13,11,9,7,5,3,0,0,14, 0,13,14,5,15, 0
��1g%()=15,13,11,9,7,5,3,0,4,14,12, 0,14,8,11,10
��1b%()=15,13,11,9,7,5,3,0,9, 0, 0, 0,11,0, 0,15
��G�C%=0�15:r%(C%)=r%(C%)/15*F:g%(C%)=g%(C%)/15*F:b%(C%)=b%(C%)/15*F:�
��
���ipal63
�
,�#c%=&38:� rpal%(15),gpal%(15),bpal%(15)
��C%=0�15:D%=�#c%
�rpal%(C%)=�#c%>>4 � 7
�(gpal%(C%)=�#c%>>4 � 3
�2bpal%(C%)=�#c%>>4 � 7
�<D%=�W:�
�F
�C%=0�255
�P)r%(C%)=(rpal%(C%�15)�(C%�16)>>1)/15*F
�Z*g%(C%)=(gpal%(C%�15)�(C%�&60)>>3)/15*F
�d*b%(C%)=(bpal%(C%�15)�(C%�128)>>4)/15*F
�n�
�x�
���ipal(D%)
��#c%=&38
��C%=0�D%-1:D%=�#c%
�r%(C%)=(�#c%>>4)/15*F
�g%(C%)=(�#c%>>4)/15*F
�b%(C%)=(�#c%>>4)/15*F
�D%=�W:�
���
��� �newropal(D%)
���#c%=&38
���C%=0�D%-1:D%=�W
��r%(C%)=(D%�255)/255*F
�g%(C%)=(D%>>8�255)/255*F
�b%(C%)=(D%>>16�255)/255*F
�D%=�W:�
��
�"� �nopal
�,3�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%()
�6�
�@� �col(A%,B%)
�J6B%=B%<<8�B%<<4�&10:pal%!(A%*8)=B%:pal%!(A%*8+4)=B%
�T�
�^� �bits(A%)
�h5�A%=1 �="1 bit per pixel" �=�A%+" bits per pixel"
�r� �fits
�|
�Z%,s$
��Z%=1�80:s$+=��#c%:�
�=s$
�
� �uc(a$)
�
�Z%,z$,b$
�
�Z%=1��a$
�z$=�a$,Z%,1)
��!�z$>="a"�z$<="z" z$=�(�z$-32)
��b$+=z$:�
��=b$
��� �dim(A%)
��� B%
���flex% �
�1B%=nextlocation%:A%=A%+3��3:nextlocation%+=A%
�*ș"Wimp_SlotSize",-1,-1 � currentslot%
�'�currentslot%+&8000<nextlocation% �
�<ș "Wimp_SlotSize",nextlocation%-&8000,-1 � currentslot%
�&U�currentslot%+&8000<nextlocation% � 42,"Can't get enough memory to process image"
�0�
�:�
�D�workspace%<0 �
�N� B% A%
�X�
�bWB%=workspace%:workspace%+=A%+3��3:�workspace%>worklimit% �42,"Not enough workspace"
�l�
�v�
�=B%
�� �dimjp(� A%)
�� B%
��flex% �
�1B%=nextlocation%:A%=A%+3��3:nextlocation%+=A%
�*ș"Wimp_SlotSize",-1,-1 � currentslot%
�'�currentslot%+&8000<nextlocation% �
��<ș "Wimp_SlotSize",nextlocation%-&8000,-1 � currentslot%
��>�currentslot%+&8000<nextlocation% A%=currentslot%+&8000-B%
���
���
���workspace%<0 �
�� B% A%
��
�WB%=workspace%:workspace%+=A%+3��3:�workspace%>worklimit% �42,"Not enough workspace"
��
� �
�*=B%
�>� �W=�W1(c%)
�H2� �W1(c%)=�#c% � �#c%<<8 � �#c%<<16 � �#c%<<24
�\� �HW=�#c% � �#c%<<8
�p� �beHW=�#c%<<8 � �#c%
�/� �beW=�#c%<<24 � �#c%<<16 � �#c%<<8 � �#c%
�� �tiff(T%)
�Ȏ T% �
�� 1,7:=�#c%
�*� 2:�s$,t$:�s$+=t$:t$=��#c%:�t$=�0:=s$
�4� 3:�bigendian �=�#c%<<8 � �#c% �=�#c% � �#c%<<8
��%� 4,9:�bigendian �=�beW �=�W1(c%)
��� 6:=(�#c%<<24)>>24
��� 8:=(�tiff(3)<<16)>>16
���
��� 42,"Silly TIFF tag:"+�T%
�� �nextstrip
�rowstogo%=striprows%
�"stripptr+=1:�#c%=st%(stripptr)
��compression=5 �
�$F!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
�.H!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
�8�
�B(�compression=5 � compression=32773 �
�L.!incacheptr=datacache%:!numlefttogo=cache%
�Vș12,4,c%,datacache%,cache%
�`�
�j�
�t(� �watford(wtsx%,� rep%,� wt%,X%,c%)
�~ �rlexpand%,wtsx%,rep%,wt%,X%
�� C%=�#c%:Ȏ C%>>6 �
�� 0:?X%=C%:X%+=1:wt%=C%
�6� 1:wt%-=1:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
�/� 2:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
�6� 3:wt%+=1:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
��
��
�X%=wtsx%
���
��*� �watfordcache(wtsx%,� rep%,� wt%,X%)
�� �rlexpand%,wtsx%,rep%,wt%,X%
��#� C%=�bytefromcache%:Ȏ C%>>6 �
�� 0:?X%=C%:X%+=1:wt%=C%
�6� 1:wt%-=1:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
�
/� 2:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
�6� 3:wt%+=1:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
��
�(
�X%=wtsx%
�2�
�<� �reduce(� A%,� B%)
�F� C%,D%:C%=A%:D%=B%
�P� �C%<D% Ȕ C%,D%
�ZC%=C%�D%
�d	�C%=0
�nA%=A%�D%:B%=B%�D%
�x�
�� �readpixelrow(z%())
��rows% �
�rows%-=1:�sx%=x% �
�W%=�(r$+"(z%())")
��
�@W%=�(r$+"(xp%())"):�xsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
��
���
��
z%()=0
���
���
��� �sharppixelrow(z%())
��rows% �
�rows%-=1:�sx%=x% �
�A�sharpen% �sharp(z%()) �W%=�(r$+"(z%())"):�equal% �fit2(z%())
��
�"D�sharpen% �sharp(xp%()) �W%=�(r$+"(xp%())"):�equal% �fit2(xp%())
�,-�xsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
�6�
�@�
�J
z%()=0
�T�
�^�
�h� �sharp(z%())
�r=yread%-=1:�yread% W%=�(r$+"(rm%())"):�equal% �fit2(rm%())
�|=�B%=0�col:rm%(0,B%)=rm%(1,B%):rm%(sx%+1,B%)=rm%(sx%,B%):�
�;� sharp%,z%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals2%
�!Ȕ rm2%(),rm1%():rm1%()=rm%()
��
�� �scaledpixelrow(z%())
�
�sy%=y% �
��readpixelrow(z%())
���
��9ysamp%-=1:�ysamp%=0 �readpixelrow(xl%()):ysamp%=ymul%
���ydiv%=1 �
��z%()=xl%()
���
���ysamp%>=ydiv% �
�"ysamp%-=ydiv%:z%()=xl%()*ydiv%
��
�2�Y%:z%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
��
�&/�ysamp%=0 �readpixelrow(xl%()):ysamp%=ymul%
�0�ysamp%>Y% �
�:4ysamp%-=Y%:xl2%()=xl%()*Y%:z%()=z%()+xl2%():Y%=0
�D�
�N<Y%-=ysamp%:xl2%()=xl%()*ysamp%:z%()=z%()+xl2%():ysamp%=0
�X�
�b
� Y%=0
�l�
�v
ysamp%+=1
��
��
��
�� �fit(z%())
�$�histequal%,z%(1,0),new%(0,0),x%
��
�� �fit2(z%())
��%�histequal%,z%(1,0),new%(0,0),sx%
���
��� �adjustpalette(mul,sub)
���mul=1 � sub=0 �
���C%=0�colourindex
�Qr%(C%)=(r%(C%)-sub)*mul+1:g%(C%)=(g%(C%)-sub)*mul+1:b%(C%)=(b%(C%)-sub)*mul+1
��
�
�ham �
�2�C%=0�15*4�4:ltable!C%=(ltable!C%-sub)*mul+1:�
� �
�*�input>400 �
�4�C%=0�colourindex
�>Crpal%(C%)=(rpal%(C%)-sub)*mul+1:gpal%(C%)=(gpal%(C%)-sub)*mul+1
�HEbpal%(C%)=(bpal%(C%)-sub)*mul+1:table%(C%)=(table%(C%)-sub)*mul+1
�R�
�\�
�f�
�p� �cachesize(A%)
�z)ș&20023,"ChangeFSI$Cache",A%,-1 �,,Z
��Z<>0 �
�9ș35,"ChangeFSI$Cache",A%,20 �,,Z:A%?Z=13:cache%=�$A%
�+�$A%,"K")��$A%,"k") cache%=cache%*1024
��
�cache%=128*1024
��
��
��
� �refill
���striprows%>0 �nextstrip
��Eș12,4,c%,datacache%,cache%:rowstogo%=cacherows%:buff%=datacache%
��L�input=24�input=48 �rbo%>=0 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
���
�� �refillpcd
��pcdblk%!4>=sy% �
�#�pcdblk%!12>=sy% pcdblk%!12=sy%
�$Vș"PhotoCD_GetBlock",pcdh%,,pcdblk%,datacache%,pcdindex%,,,pcdcache%,pcdcachesize%
�.Vrowstogo%=cacherows%:buff%=datacache%:pcdblk%!4+=cacherows%:pcdblk%!12+=cacherows%
�80rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
�B�
�V� �8(z%())
�`=�mappix%,z%(1,0),r%(0),g%(0),b%(0),buff%:buff%+=rowbytes%
�j%rowstogo%-=1:�rowstogo%=0 �refill
�t=�
�� �16(z%())
�D�mappix%,z%(1,0),rpal%(0),gpal%(0),r%(0),g%(0),b%(0),buff%,buff%
�6buff%+=rowbytes%:rowstogo%-=1:�rowstogo%=0 �refill
�=�
�� �24(z%())
��2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
��0rb%+=rowbytes%:gb%+=rowbytes%:bb%+=rowbytes%
��%rowstogo%-=1:�rowstogo%=0 �refill
��=�
�� �300(z%())
�[ș12,4,cc%,pbuff%,sx%:�mappix%,z%(1,0),rpal%(0),gpal%(0),r%(0),g%(0),b%(0),pbuff%,buff%
�
6buff%+=rowbytes%:rowstogo%-=1:�rowstogo%=0 �refill
�=�
�(� �400(z%())
�2)�readline%,plbytes%,rep%,pix%,plbuff%
�<2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�F=�
�Z� �500(z%())
�d)� LZWdecode%,table%(0),c%,plbuff%,sx%
�n.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�x=�
�� �800(z%())
�)�watfordcache(wtsx%,rep%,wt%,plbuff%)
�.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�=�
�� �801(z%())
��(�watford(wtsx1%,rep1%,wt1%,buff%,c%)
��*�watford(wtsx2%,rep2%,wt2%,wtsx1%,cc%)
��+�watford(wtsx3%,rep3%,wt3%,wtsx2%,ccc%)
��2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
��=�
�� �901(z%())
�<ș12,4,c%,rb%,sx%:ș12,4,cc%,gb%,sx%:ș12,4,ccc%,bb%,sx%
�2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�"=�
�6� �902(z%())
�@A�unpack%,buff%:�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�J6buff%+=rowbytes%:rowstogo%-=1:�rowstogo%=0 �refill
�T=�
�h� �1000(z%())
�r?X%=buff%:�rep%>0 C%=?pa%:�rlexpand%,pasx%,rep%,C%,X%:pa%+=1
�|8�rep2%>0 C%=?pa%:�rlexpand%,pasx%,rep2%,C%,X%:pa%+=1
�� C%=�#c%:�C%=0 �
�@rep%=�#c%:C%=?pa%:�rlexpand%,pasx%,rep%,C%,X%:�rep%=0 pa%+=1
��
�Srep2%=C%�15:rep%=C%>>4:�rep% C%=?pa%:�rlexpand%,pasx%,rep%,C%,X%:�rep%=0 pa%+=1
�I�X%<pasx% �rep2% C%=?pa%:�rlexpand%,pasx%,rep2%,C%,X%:�rep2%=0 pa%+=1
��
��
�X%=pasx%
��,�mappix%,z%(1,0),r%(0),g%(0),b%(0),buff%
��=�
��� �1001(z%())
��?X%=buff%:�rep%>0 C%=?pa%:�rlexpand%,pasx%,rep%,C%,X%:pa%+=1
�B� rep%=�#c%:C%=?pa%:�rlexpand%,pasx%,rep%,C%,X%:�rep%=0 pa%+=1
�6�X%=pasx%:�mappix%,z%(1,0),r%(0),g%(0),b%(0),buff%
�=�
�&� �1100(z%())
�0)�readline%,plbytes%,rep%,pix%,plbuff%
�:.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�D=�
�X� �1400(z%())
�b�vrep% �
�lvrep%-=1
�v�
�8G%=buff%:�X%=1�planes%:G%+=rowbytes%:F%=G%-rowbytes%
�� C%=�#c%:�C%=0 �
�C%=�#c%:�C%=0 �
�C%=�#c%:vrep%=�#c%-1
��
�*D%=F%:ș12,4,c%,F%,patlen%:F%+=patlen%
�>�C%>1 �N%=2�C%:�E%=0�patlen%-1:F%?E%=D%?E%:�:F%+=patlen%:�
���
���
��
�C%=128 �
��"C%=�#c%:ș12,4,c%,F%,C%:F%+=C%
���
�=?F%=(C%�&80)<>0:�E%=F%+1�F%+(C%�&7F):?E%=?F%:�:F%+=C%�&7F
��
��:�F%>=G%:�
�$�plancnv%,rowbytes%,buff%,pbuff%
� �
�*-�mappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
�4=�
�H� �1501(z%())
�RD�readiff%,rowbytes%,plbuff%:rowstogo%-=1:�rowstogo%=0 �nextstrip
�\.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�f=�
�z� �1505(z%())
�/� LZWdecode%,table%(0),c%,plbuff%,rowbytes%
�(rowstogo%-=1:�rowstogo%=0 �nextstrip
�.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�=�
�� �1515(z%())
�/� LZWdecode%,table%(0),c%,plbuff%,rowbytes%
��(rowstogo%-=1:�rowstogo%=0 �nextstrip
��2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
��=�
��� �1600(z%())
�9�plancnv%,realrowbytes%,buff%,pbuff%:buff%+=rowbytes%
�-�mappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
�%rowstogo%-=1:�rowstogo%=0 �refill
�=�
�.� �1601(z%())
�8D�X%=0�planes%-1:F%=plbuff%+X%*rowbytes%:�readiff%,rowbytes%,F%:�
�B(�masking% �readiff%,rowbytes%,pbuff%
�L&�plancnv%,rowbytes%,plbuff%,pbuff%
�V-�mappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
�`=�
�t� �1850(z%())
�~�readiff%,rowbytes%,plbuff%
�.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�=�
�� �1851(z%())
��readiff%,rowbytes%,plbuff%
�2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
��=�
��� �1900(z%())
��)�readline%,plbytes%,rep%,pix%,plbuff%
��&�plancnv%,rowbytes%,plbuff%,pbuff%
�-�mappix%,z%(1,0),r%(0),g%(0),b%(0),pbuff%
�=�
�� �2000(z%())
�X%=buff%:�
�(C%=�#c%:�C%<128 �
�2 C%+=1:ș12,4,c%,X%,C%:X%+=C%
�<�
�F0F%=X%:?F%=�#c%:�C%=C%�128�-1:?X%=?F%:X%+=1:�
�P�
�Z�X%=buff%+rowbytes%
�d,�mappix%,z%(1,0),r%(0),g%(0),b%(0),buff%
�n=�
��� �2001(z%())
��X%=buff%:�
��C%=�#c%:�C%<128 �
��&C%=(C%+1)*2:ș12,4,c%,X%,C%:X%+=C%
���
��6F%=X%:ș12,4,c%,X%,2:�C%=C%�128�-1:!X%=!F%:X%+=2:�
���
���X%=buff%+rowbytes%
��D�mappix%,z%(1,0),rpal%(0),gpal%(0),r%(0),g%(0),b%(0),buff%,buff%
��=�
��� �2002(z%())
��X%=buff%:�
�C%=�#c%:�C%<128 �
�+C%=(C%+1)*step24:ș12,4,c%,X%,C%:X%+=C%
��
�"@F%=X%:ș12,4,c%,X%,step24:�C%=C%�128�-1:!X%=!F%:X%+=step24:�
�,�
�6�X%=buff%+rowbytes%
�@2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�J=�
�^� �2250(z%())
�hQ�mappix%,z%(1,0),rpal%(0),r%(0),gpal%(0),g%(0),bpal%(0),b%(0),table%(0),buff%
�r6buff%+=rowbytes%:rowstogo%-=1:�rowstogo%=0 �refill
�|=�
��� �2300(z%())
��H�clrfirst% �X%=0�sx%-1:rb%?X%=?back%:gb%?X%=back%?1:bb%?X%=back%?2:�
���vrep% �
��vrep%-=1
���
��� �
��D� � � vrep%=-1:�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:=�
��)E%=�:� C%=�#c%:D%=�#c%:�C%�&40 D%=�HW
��Ȏ C%�&3f �
��(� 1:E%=�:vrep%=D%-1:�vrep%<0 vrep%=�
��<� 2:ccol%=back%?D%:cbuf%=rb%+sx%*D%:�D%=255 cbuf%=alpha%
��-� 3:�X%=0�D%-1:cbuf%?X%=ccol%:�:cbuf%+=D%
�6� 5:ș12,4,c%,cbuf%,D%+1:cbuf%+=D%+1:�D%+1�1 �#c%
�1� 6:C%=�HW:�X%=0�D%:cbuf%?X%=C%:�:cbuf%+=D%+1
��
�&�E%
�0�
�:2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�D=�
�X� �2401(z%())
�b�bm_rle8,rowbytes%,plbuff%
�l.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
�v=�
��� �2402(z%())
���bm_rle4,rowbytes%,plbuff%
��.�mappix%,z%(1,0),r%(0),g%(0),b%(0),plbuff%
��=�
��� �3000(z%())
��Q�mappix%,z%(1,0),rpal%(0),r%(0),gpal%(0),g%(0),bpal%(0),b%(0),table%(0),buff%
��6buff%+=rowbytes%:rowstogo%-=1:�rowstogo%=0 �refill
��=�
��� �3500(z%())
��=�
��� �3600(z%())
�2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�0rb%+=rowbytes%:gb%+=rowbytes%:bb%+=rowbytes%
�(rowstogo%-=1:�rowstogo%=0 �refillpcd
� =�
�*� �3708(z%())
�44A%=jpegspace%:jpegy%-=1:B%=jpegy%:rb%=�(jpeg%+4)
�>*�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%
�H=�
�R� �3724(z%())
�\HA%=jpegspace%:jpegy%-=1:B%=jpegy%:rb%=�(jpeg%+4):gb%=rb%+1:bb%=rb%+2
�f2�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%
�p=�
�z
� �rewind
��rows%=sy%:Ȏ flag �
��� 0:�#c%=st%
��� 100:�#c%=4
��� 200:�#c%=st%:rep%=0
��� 300:�#c%=st%:�#cc%=stcc%
��� 400:�#c%=st%:rep%=0
��5� 500:�I%=0�clearcode%-1:table%(I%)=I%:�:�#c%=st%
��F!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
��H!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
��� 501:buff%=datacache%
��� 600:�#c%=&380
��� 700:�#c%=st%
��� 800:�#c%=0:rep%=0:wt%=0
�N� 801:�#c%=0:�#cc%=0:�#ccc%=0:rep1%=0:wt1%=0:rep2%=0:wt2%=0:rep3%=0:wt3%=0
�� 900:�#c%=0
�!� 901:�#c%=0:�#cc%=0:�#ccc%=0
�$� 902:�#c%=st%
�..� 1000:�#c%=st%:pa%=ctable%:rep%=0:rep2%=0
�8� 1100:�#c%=st%:rep%=0
�B� 1200:�#c%=1600
�L� 1300:�#c%=0
�V"� 1301:�#c%=0:�#cc%=0:�#ccc%=0
�`� 1400:�#c%=st%:vrep%=0
�j6� 1500:�#c%=st%(0):rowstogo%=striprows%:stripptr=0
�t�compression=5 �
�~F!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
��H!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
���
��� 1600:�#c%=st%
��� 1700:�#c%=16
��� 1800,1850:�#c%=st%
��� 1900:�#c%=128:rep%=-1
��� 2000:�#c%=st%
��� 2100:�#c%=7
��� 2200:�#c%=st%
��� 2250:�#c%=st%
��� 2300:�#c%=st%:vrep%=0
��� 2400:�#c%=st%
�� 2500:�#c%=st%
�
� 2600:�#c%=st%
�� 2700:�#c%=st%
�� 2800:�#c%=st%
�(� 2900:�#c%=st%
�2� 3000:�#c%=0
�<� 3600:pcdblk%!4=0
�F� 3700:jpegy%=sy%
�P� 3900,3905:�#c%=st%
�Z�
�d
�cache% �
�n�flag=3600 �
�xDpcdblk%!12=cacherows%:�refillpcd:�cache%>=filesize% rowstogo%=-1
���
��F�cache%<filesize% ș12,4,c%,datacache%,cache%:rowstogo%=cacherows%
���
��buff%=datacache%
��;�cachebytes% !incacheptr=datacache%:!numlefttogo=cache%
��L�input=24�input=48 �rbo%>=0 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
���
��2�flag=1500 �compression=5 rowstogo%=striprows%
���
��� �Assemble_Shell
��
�I%=0�2�2
��P%=code%
�[ OPT I%
�.Shell_Call
�MOV   R9,R0
�"SMOV R0,#0:MOV R1,#0:MOV R2,#0:MOV R3,#2:MOV R4,#0:MOV R5,#0:MOV R6,#0:MOV R7,#0
�,SWI   "OS_SetEnv"
�6STMFD R13!,{R0-R7, R12}
�@-MOV   R0,#0:MOV R1,#0:MOV R2,#0:MOV R3,#0
�JSWI   "OS_Control"
�TSTMFD R13!,{R0-R3}
�^%MOV   R0,#&10:MOV R1,#0:MOV R2,#0
�h!SWI   "XOS_ChangeEnvironment"
�rSTMFD R13!,{R1,R2}
�|LDR   R3,[R14,#28]
��LDR   R3,[R8,R3]
��STMFD R13!,{R3,R9,R14}
��SUB   R9,R13,#1024
��MOV   R5,R9
��-ADR   R6,Shell_Job:ADR   R4,Shell_Job_End
��.Shell_Copy
��LDR   R2,[R6],#4
��STR   R2,[R5],#4
��CMP   R6,R4
��BCC   Shell_Copy
��MOV   PC,R9
��.Shell_Job
��LDR   R2,[R3,#-4]!
�STR   R2,[R9,#-4]!
�CMP   R3,#&8000
�BHI   Shell_Job
�&STMFD R13!,{R9}
�0ADR   R0,Shell_Exit
�:KMOV   R1,R9:MOV R2,#0:MOV R3,#2:MOV R4,#0:MOV R5,#0:MOV R6,#0:MOV R7,#0
�DSWI   "OS_SetEnv"
�NADR   R0,Shell_Error
�XADR   R1,Shell_Buffer
�bMOV   R2,#0:MOV R3,#0
�lSWI   "OS_Control"
�vMOV   R0,#&10
��ADR   R1,Shell_UpCall
��MVN   R2,#0
��!SWI   "XOS_ChangeEnvironment"
��STR   R13,Shell_Job_End
��LDR   R0,[R13,#4*2]
��ADD   R0,R0,R9
��SUB   R0,R0,#&8000
��SWI   "OS_CLI"
��.Shell_Exit
��MOV   r0, #0
��.Shell_Common
��STR   r0, Shell_ErrorWord
��LDR   R13,Shell_Job_End
�LDMFD R13!,{R8,R9,R10,R14}
�LDMFD R13!,{R1-R2}
�MOV   R0,#&10
�  SWI   "OS_ChangeEnvironment"
�*LDMFD R13!,{R0-R3}
�4SWI   "OS_Control"
�>LDMFD R13!,{R0-R7, R12}
�HSWI   "OS_SetEnv"
�RMOV   R1,#&8000
�\.Shell_Restore
�fLDR   R2,[R8],#4
�pSTR   R2,[R1],#4
�zCMP   R1,R9
��BCC   Shell_Restore
��LDR   R0,Shell_ErrorWord
��TEQ   R0,#0
��BICEQS PC,R14,#&10000000
���RNES PC,R14,#&10000000
��.Shell_UpCall
��MOV   PC,R14
��.Shell_Error
��ADR   r0, Shell_Buffer + 4
��B     Shell_Common
��.Shell_Buffer
��
EQUD 0
��EQUD &12345678
�EQUS �128,�13)
�EQUS �128,�13)
�.Shell_ErrorWord
�$
EQUD 0
�..Shell_Job_End
�8
EQUD 0
�B]
�L�
�VA%=Shell_Job_End+4
�`�
�t� �subtask(a$)
�~
� task% �
��ș"Wimp_StartTask",a$
���
��� code% 1024
���Assemble_Shell
��$A%=a$:�Shell_Call
���
���
�
00000000  0d 00 0a 11 f4 20 3e 20  43 68 61 6e 67 65 46 53  |..... > ChangeFS|
00000010  49 0d 00 8c 11 61 72 65  61 6e 75 6d 62 65 72 25  |I....areanumber%|
00000020  3d 30 0d 00 96 16 c8 99  22 4f 53 5f 47 65 74 45  |=0......"OS_GetE|
00000030  6e 76 22 20 b8 20 41 24  0d 00 a0 20 74 61 73 6b  |nv" . A$... task|
00000040  25 3d a7 41 24 2c 22 20  2d 77 69 6d 70 22 29 3a  |%=.A$," -wimp"):|
00000050  e7 74 61 73 6b 25 20 8c  0d 00 aa 1e de 20 7a 25  |.task% ...... z%|
00000060  28 31 29 2c 70 25 28 33  29 2c 73 25 28 33 29 2c  |(1),p%(3),s%(3),|
00000070  6d 24 28 33 30 29 0d 00  b4 22 41 25 3d 8e 22 3c  |m$(30)..."A%=."<|
00000080  43 68 61 6e 67 65 46 53  49 24 44 69 72 3e 2e 4d  |ChangeFSI$Dir>.M|
00000090  65 73 73 61 67 65 73 22  0d 00 be 28 42 25 3d 2d  |essages"...(B%=-|
000000a0  31 3a f5 20 42 25 2b 3d  31 3a 6d 24 28 42 25 29  |1:. B%+=1:m$(B%)|
000000b0  3d be 23 41 25 3a fd c5  23 41 25 3a d9 23 41 25  |=.#A%:..#A%:.#A%|
000000c0  0d 00 c8 1f 73 74 61 72  74 66 69 6c 65 25 3d c2  |....startfile%=.|
000000d0  41 24 2c 36 29 3c 3e 22  2d 77 69 6d 70 20 22 0d  |A$,6)<>"-wimp ".|
000000e0  00 d2 1e de 20 74 61 73  6b 69 64 25 34 3a 24 74  |.... taskid%4:$t|
000000f0  61 73 6b 69 64 25 3d 22  54 41 53 4b 22 0d 00 dc  |askid%="TASK"...|
00000100  37 c8 99 20 22 57 69 6d  70 5f 49 6e 69 74 69 61  |7.. "Wimp_Initia|
00000110  6c 69 73 65 22 2c 32 30  30 2c 21 74 61 73 6b 69  |lise",200,!taski|
00000120  64 25 2c 6d 24 28 32 30  29 20 b8 20 76 65 72 73  |d%,m$(20) . vers|
00000130  69 6f 6e 25 0d 00 e6 15  e7 20 76 65 72 73 69 6f  |ion%..... versio|
00000140  6e 25 3e 3d 33 35 30 20  8c 0d 00 f0 33 c8 99 22  |n%>=350 ....3.."|
00000150  4f 53 5f 4d 65 6d 6f 72  79 22 2c 38 2b 28 32 3c  |OS_Memory",8+(2<|
00000160  3c 38 29 20 b8 20 2c 72  31 2c 72 32 3a 76 72 61  |<8) . ,r1,r2:vra|
00000170  6d 73 69 7a 65 25 3d 72  31 2a 72 32 0d 00 fa 22  |msize%=r1*r2..."|
00000180  e7 20 76 72 61 6d 73 69  7a 65 25 3e 30 20 76 72  |. vramsize%>0 vr|
00000190  61 6d 25 3d b9 20 8b 76  72 61 6d 25 3d a3 0d 01  |am%=. .vram%=...|
000001a0  04 05 cc 0d 01 0e 0b 76  72 61 6d 25 3d a3 0d 01  |.......vram%=...|
000001b0  18 05 cd 0d 01 22 1e 57  69 6d 70 20 20 20 20 3d  |.....".Wimp    =|
000001c0  20 28 31 3c 3c 31 38 29  20 2b 20 28 33 3c 3c 36  | (1<<18) + (3<<6|
000001d0  29 0d 01 2c 48 43 72 65  61 74 65 57 20 3d 20 57  |)..,HCreateW = W|
000001e0  69 6d 70 2b 31 3a 4f 70  65 6e 57 20 20 20 3d 20  |imp+1:OpenW   = |
000001f0  57 69 6d 70 2b 35 20 3a  43 6c 6f 73 65 57 20 20  |Wimp+5 :CloseW  |
00000200  3d 20 57 69 6d 70 2b 36  3a 52 65 64 72 61 77 57  |= Wimp+6:RedrawW|
00000210  20 3d 20 57 69 6d 70 2b  38 0d 01 36 49 55 70 64  | = Wimp+8..6IUpd|
00000220  61 74 65 57 20 3d 20 57  69 6d 70 2b 39 3a 47 65  |ateW = Wimp+9:Ge|
00000230  74 52 25 20 20 20 3d 20  57 69 6d 70 2b 31 30 3a  |tR%   = Wimp+10:|
00000240  47 65 74 57 20 20 20 20  3d 20 57 69 6d 70 2b 31  |GetW    = Wimp+1|
00000250  31 3a 53 65 74 49 20 20  20 3d 20 57 69 6d 70 2b  |1:SetI   = Wimp+|
00000260  31 33 0d 01 40 49 47 65  74 49 20 20 20 20 3d 20  |13..@IGetI    = |
00000270  57 69 6d 70 2b 31 34 3a  47 65 74 50 20 20 20 3d  |Wimp+14:GetP   =|
00000280  20 57 69 6d 70 2b 31 35  3a 44 72 61 67 20 20 20  | Wimp+15:Drag   |
00000290  20 3d 20 57 69 6d 70 2b  31 36 3a 43 72 4d 65 6e  | = Wimp+16:CrMen|
000002a0  75 20 3d 20 57 69 6d 70  2b 32 30 0d 01 4a 15 44  |u = Wimp+20..J.D|
000002b0  63 4d 65 6e 75 20 20 3d  20 57 69 6d 70 2b 32 31  |cMenu  = Wimp+21|
000002c0  0d 01 54 38 c8 99 20 22  4f 53 5f 53 57 49 4e 75  |..T8.. "OS_SWINu|
000002d0  6d 62 65 72 46 72 6f 6d  53 74 72 69 6e 67 22 2c  |mberFromString",|
000002e0  2c 22 57 69 6d 70 5f 50  6f 6c 6c 49 64 6c 65 22  |,"Wimp_PollIdle"|
000002f0  20 b8 20 50 6f 6c 6c 25  0d 01 5e 38 c8 99 20 22  | . Poll%..^8.. "|
00000300  4f 53 5f 53 57 49 4e 75  6d 62 65 72 46 72 6f 6d  |OS_SWINumberFrom|
00000310  53 74 72 69 6e 67 22 2c  2c 22 58 4f 53 5f 53 70  |String",,"XOS_Sp|
00000320  72 69 74 65 4f 70 22 20  b8 20 73 70 6f 70 78 25  |riteOp" . spopx%|
00000330  0d 01 68 36 c8 99 20 22  4f 53 5f 53 57 49 4e 75  |..h6.. "OS_SWINu|
00000340  6d 62 65 72 46 72 6f 6d  53 74 72 69 6e 67 22 2c  |mberFromString",|
00000350  2c 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 20 b8  |,"OS_SpriteOp" .|
00000360  20 73 70 6f 70 25 0d 01  72 3f c8 99 20 22 4f 53  | spop%..r?.. "OS|
00000370  5f 53 57 49 4e 75 6d 62  65 72 46 72 6f 6d 53 74  |_SWINumberFromSt|
00000380  72 69 6e 67 22 2c 2c 22  4f 53 5f 52 65 61 64 4d  |ring",,"OS_ReadM|
00000390  6f 6e 6f 74 6f 6e 69 63  54 69 6d 65 22 20 b8 20  |onotonicTime" . |
000003a0  54 69 6d 65 25 0d 01 7c  4a c8 99 20 22 4f 53 5f  |Time%..|J.. "OS_|
000003b0  53 57 49 4e 75 6d 62 65  72 46 72 6f 6d 53 74 72  |SWINumberFromStr|
000003c0  69 6e 67 22 2c 2c 22 43  6f 6c 6f 75 72 54 72 61  |ing",,"ColourTra|
000003d0  6e 73 5f 52 65 74 75 72  6e 43 6f 6c 6f 75 72 4e  |ns_ReturnColourN|
000003e0  75 6d 62 65 72 22 20 b8  20 63 74 72 61 6e 25 0d  |umber" . ctran%.|
000003f0  01 86 44 c8 99 20 22 4f  53 5f 53 57 49 4e 75 6d  |..D.. "OS_SWINum|
00000400  62 65 72 46 72 6f 6d 53  74 72 69 6e 67 22 2c 2c  |berFromString",,|
00000410  22 57 69 6d 70 5f 53 65  74 43 61 72 65 74 50 6f  |"Wimp_SetCaretPo|
00000420  73 69 74 69 6f 6e 22 20  b8 20 43 61 72 65 74 70  |sition" . Caretp|
00000430  6f 73 25 0d 01 90 44 c8  99 20 22 4f 53 5f 53 57  |os%...D.. "OS_SW|
00000440  49 4e 75 6d 62 65 72 46  72 6f 6d 53 74 72 69 6e  |INumberFromStrin|
00000450  67 22 2c 2c 22 57 69 6d  70 5f 47 65 74 43 61 72  |g",,"Wimp_GetCar|
00000460  65 74 50 6f 73 69 74 69  6f 6e 22 20 b8 20 47 65  |etPosition" . Ge|
00000470  74 63 61 72 65 74 25 0d  01 9a 53 c8 99 20 22 58  |tcaret%...S.. "X|
00000480  4f 53 5f 53 57 49 4e 75  6d 62 65 72 46 72 6f 6d  |OS_SWINumberFrom|
00000490  53 74 72 69 6e 67 22 2c  2c 22 44 72 61 67 41 53  |String",,"DragAS|
000004a0  70 72 69 74 65 5f 53 74  61 72 74 22 20 b8 20 64  |prite_Start" . d|
000004b0  73 74 61 72 74 25 3b 66  25 3a e7 66 25 80 20 31  |start%;f%:.f%. 1|
000004c0  20 64 73 74 61 72 74 25  3d 30 0d 01 a4 57 c8 99  | dstart%=0...W..|
000004d0  20 22 58 4f 53 5f 53 57  49 4e 75 6d 62 65 72 46  | "XOS_SWINumberF|
000004e0  72 6f 6d 53 74 72 69 6e  67 22 2c 2c 22 4a 50 45  |romString",,"JPE|
000004f0  47 5f 50 6c 6f 74 53 63  61 6c 65 64 22 20 b8 20  |G_PlotScaled" . |
00000500  6a 70 65 67 70 61 69 6e  74 25 3b 66 25 3a e7 66  |jpegpaint%;f%:.f|
00000510  25 80 20 31 20 6a 70 65  67 70 61 69 6e 74 25 3d  |%. 1 jpegpaint%=|
00000520  30 0d 01 ae 33 c8 99 20  22 4f 53 5f 42 79 74 65  |0...3.. "OS_Byte|
00000530  22 2c 31 36 31 2c 26 31  43 20 b8 20 2c 2c 66 25  |",161,&1C . ,,f%|
00000540  3a e7 28 66 25 80 32 29  3d 30 20 64 73 74 61 72  |:.(f%.2)=0 dstar|
00000550  74 25 3d 30 0d 01 b8 13  6e 65 78 74 6c 6f 63 61  |t%=0....nextloca|
00000560  74 69 6f 6e 25 3d 93 0d  01 c2 2c c8 99 20 22 57  |tion%=....,.. "W|
00000570  69 6d 70 5f 53 6c 6f 74  53 69 7a 65 22 2c 2d 31  |imp_SlotSize",-1|
00000580  2c 2d 31 20 b8 20 6f 72  69 67 69 6e 61 6c 73 6c  |,-1 . originalsl|
00000590  6f 74 25 0d 01 cc 16 f2  6c 6f 63 61 6c 65 5f 69  |ot%.....locale_i|
000005a0  6e 69 74 69 61 6c 69 73  65 0d 01 e0 15 e7 20 76  |nitialise..... v|
000005b0  65 72 73 69 6f 6e 25 3e  3d 33 30 30 20 8c 0d 01  |ersion%>=300 ...|
000005c0  ea 59 de 20 71 25 20 32  35 35 2c 69 66 61 63 74  |.Y. q% 255,ifact|
000005d0  6f 72 73 25 20 31 35 2c  66 61 63 74 6f 72 73 25  |ors% 15,factors%|
000005e0  20 31 35 2c 70 69 78 74  72 61 6e 73 25 20 32 35  | 15,pixtrans% 25|
000005f0  35 2c 70 61 6c 74 65 6d  70 25 20 31 30 32 33 2c  |5,paltemp% 1023,|
00000600  62 75 66 66 65 72 25 20  32 35 35 2c 69 64 61 74  |buffer% 255,idat|
00000610  61 25 20 31 30 32 33 0d  01 f4 05 cc 0d 01 fe 61  |a% 1023........a|
00000620  de 20 7a 25 20 31 36 39  39 2c 71 25 20 32 35 35  |. z% 1699,q% 255|
00000630  2c 69 66 61 63 74 6f 72  73 25 20 31 35 2c 66 61  |,ifactors% 15,fa|
00000640  63 74 6f 72 73 25 20 31  35 2c 70 69 78 74 72 61  |ctors% 15,pixtra|
00000650  6e 73 25 20 32 35 35 2c  70 61 6c 74 65 6d 70 25  |ns% 255,paltemp%|
00000660  20 31 30 32 33 2c 62 75  66 66 65 72 25 20 32 35  | 1023,buffer% 25|
00000670  35 2c 69 64 61 74 61 25  20 32 33 39 39 0d 02 08  |5,idata% 2399...|
00000680  17 65 69 64 61 74 61 25  3d 69 64 61 74 61 25 2b  |.eidata%=idata%+|
00000690  32 34 30 30 0d 02 12 05  cd 0d 02 26 32 73 63 72  |2400.......&2scr|
000006a0  61 70 25 3d a3 3a 73 70  72 69 74 65 25 3d a3 3a  |ap%=.:sprite%=.:|
000006b0  73 61 72 25 3d a3 3a 73  61 76 65 64 25 3d b9 3a  |sar%=.:saved%=.:|
000006c0  7a 24 3d c4 31 32 2c bd  31 33 29 0d 02 3a 1f c8  |z$=.12,.13)..:..|
000006d0  99 20 22 4f 53 5f 42 79  74 65 22 2c 31 36 31 2c  |. "OS_Byte",161,|
000006e0  26 38 43 20 b8 20 2c 2c  66 25 0d 02 44 0d e7 66  |&8C . ,,f%..D..f|
000006f0  25 20 80 20 31 20 8c 0d  02 4e 37 c8 99 22 57 69  |% . 1 ...N7.."Wi|
00000700  6d 70 5f 4f 70 65 6e 54  65 6d 70 6c 61 74 65 22  |mp_OpenTemplate"|
00000710  2c 2c 22 3c 43 68 61 6e  67 65 46 53 49 24 44 69  |,,"<ChangeFSI$Di|
00000720  72 3e 2e 33 64 54 65 6d  70 6c 61 74 65 22 0d 02  |r>.3dTemplate"..|
00000730  58 05 cc 0d 02 62 36 c8  99 22 57 69 6d 70 5f 4f  |X....b6.."Wimp_O|
00000740  70 65 6e 54 65 6d 70 6c  61 74 65 22 2c 2c 22 3c  |penTemplate",,"<|
00000750  43 68 61 6e 67 65 46 53  49 24 44 69 72 3e 2e 54  |ChangeFSI$Dir>.T|
00000760  65 6d 70 6c 61 74 65 73  22 0d 02 6c 05 cd 0d 02  |emplates"..l....|
00000770  80 07 ea 20 85 0d 02 8a  36 ee 20 85 20 c8 99 22  |... ....6. . .."|
00000780  57 69 6d 70 5f 43 6c 6f  73 65 54 65 6d 70 6c 61  |Wimp_CloseTempla|
00000790  74 65 22 3a 85 20 30 2c  f6 24 2b 22 20 28 63 6f  |te":. 0,.$+" (co|
000007a0  64 65 20 22 2b c3 9e 2b  22 29 22 0d 02 9e 14 e7  |de "+..+")".....|
000007b0  76 65 72 73 69 6f 6e 25  3e 3d 33 30 30 20 8c 0d  |version%>=300 ..|
000007c0  02 b2 0b 6e 61 6d 65 3d  71 25 0d 02 bc 24 24 6e  |...name=q%...$$n|
000007d0  61 6d 65 3d 22 2a 22 3a  68 65 72 65 25 3d 30 3a  |ame="*":here%=0:|
000007e0  6c 61 72 67 65 73 74 5f  74 65 6d 25 3d 30 0d 02  |largest_tem%=0..|
000007f0  c6 3b c8 99 20 22 57 69  6d 70 5f 4c 6f 61 64 54  |.;.. "Wimp_LoadT|
00000800  65 6d 70 6c 61 74 65 22  2c 20 2c 30 2c 2c 2c 2c  |emplate", ,0,,,,|
00000810  6e 61 6d 65 2c 30 20 b8  20 2c 73 69 7a 65 25 2c  |name,0 . ,size%,|
00000820  2c 2c 2c 2c 68 65 72 65  25 0d 02 d0 0c c8 95 20  |,,,,here%...... |
00000830  68 65 72 65 25 0d 02 da  2b e7 20 6c 61 72 67 65  |here%...+. large|
00000840  73 74 5f 74 65 6d 25 3c  73 69 7a 65 25 20 6c 61  |st_tem%<size% la|
00000850  72 67 65 73 74 5f 74 65  6d 25 3d 73 69 7a 65 25  |rgest_tem%=size%|
00000860  0d 02 e4 0d 24 6e 61 6d  65 3d 22 2a 22 0d 02 ee  |....$name="*"...|
00000870  3f c8 99 20 22 57 69 6d  70 5f 4c 6f 61 64 54 65  |?.. "Wimp_LoadTe|
00000880  6d 70 6c 61 74 65 22 2c  20 2c 30 2c 2c 2c 2c 6e  |mplate", ,0,,,,n|
00000890  61 6d 65 2c 68 65 72 65  25 20 b8 20 2c 73 69 7a  |ame,here% . ,siz|
000008a0  65 25 2c 2c 2c 2c 2c 68  65 72 65 25 0d 02 f8 05  |e%,,,,,here%....|
000008b0  ce 0d 03 02 15 de 20 7a  25 20 6c 61 72 67 65 73  |...... z% larges|
000008c0  74 5f 74 65 6d 25 0d 03  0c 05 cd 0d 03 20 17 f2  |t_tem%....... ..|
000008d0  64 6f 74 65 6d 70 6c 61  74 65 28 22 49 6e 66 6f  |dotemplate("Info|
000008e0  22 29 0d 03 2a 34 c8 99  20 43 72 65 61 74 65 57  |")..*4.. CreateW|
000008f0  2c 2c 7a 25 20 b8 20 69  6e 66 6f 77 25 3a 24 21  |,,z% . infow%:$!|
00000900  28 7a 25 2b 38 38 2b 37  2a 33 32 2b 32 30 29 3d  |(z%+88+7*32+20)=|
00000910  6d 24 28 32 31 29 0d 03  3e 1d f2 64 6f 74 65 6d  |m$(21)..>..dotem|
00000920  70 6c 61 74 65 28 22 50  72 6f 63 65 73 73 69 6e  |plate("Processin|
00000930  67 22 29 0d 03 48 1a c8  99 20 43 72 65 61 74 65  |g")..H... Create|
00000940  57 2c 2c 7a 25 20 b8 20  70 72 6f 63 25 0d 03 52  |W,,z% . proc%..R|
00000950  61 70 25 28 30 29 3d 21  28 7a 25 2b 38 38 2b 38  |ap%(0)=!(z%+88+8|
00000960  2a 33 32 2b 32 30 29 3a  70 25 28 31 29 3d 21 28  |*32+20):p%(1)=!(|
00000970  7a 25 2b 38 38 2b 39 2a  33 32 2b 32 30 29 3a 70  |z%+88+9*32+20):p|
00000980  25 28 32 29 3d 21 28 7a  25 2b 38 38 2b 31 30 2a  |%(2)=!(z%+88+10*|
00000990  33 32 2b 32 30 29 3a 70  25 28 33 29 3d 21 28 7a  |32+20):p%(3)=!(z|
000009a0  25 2b 38 38 2b 31 32 2a  33 32 2b 32 30 29 0d 03  |%+88+12*32+20)..|
000009b0  66 19 f2 64 6f 74 65 6d  70 6c 61 74 65 28 22 4f  |f..dotemplate("O|
000009c0  75 74 70 75 74 22 29 0d  03 70 6b c8 99 20 43 72  |utput")..pk.. Cr|
000009d0  65 61 74 65 57 2c 2c 7a  25 20 b8 20 6f 75 74 70  |eateW,,z% . outp|
000009e0  75 74 25 3a 61 64 6d 6f  64 65 25 3d 21 28 7a 25  |ut%:admode%=!(z%|
000009f0  2b 38 38 2b 32 30 2a 33  32 2b 32 30 29 3a 61 64  |+88+20*32+20):ad|
00000a00  73 70 63 6c 25 3d 21 28  7a 25 2b 38 38 2b 31 39  |spcl%=!(z%+88+19|
00000a10  2a 33 32 2b 32 30 29 3a  6f 6c 64 6d 6f 64 65 25  |*32+20):oldmode%|
00000a20  3d 21 28 7a 25 2b 38 38  2b 33 34 2a 33 32 2b 32  |=!(z%+88+34*32+2|
00000a30  30 29 0d 03 84 1a f2 64  6f 74 65 6d 70 6c 61 74  |0).....dotemplat|
00000a40  65 28 22 53 63 61 6c 69  6e 67 22 29 0d 03 8e 36  |e("Scaling")...6|
00000a50  c8 99 20 43 72 65 61 74  65 57 2c 2c 7a 25 20 b8  |.. CreateW,,z% .|
00000a60  20 73 63 61 6c 65 77 25  3a 61 64 73 63 61 6c 65  | scalew%:adscale|
00000a70  25 3d 21 28 7a 25 2b 38  38 2b 31 2a 33 32 2b 32  |%=!(z%+88+1*32+2|
00000a80  30 29 0d 03 98 63 73 25  28 30 29 3d 21 28 7a 25  |0)...cs%(0)=!(z%|
00000a90  2b 38 38 2b 31 30 2a 33  32 2b 32 30 29 3a 73 25  |+88+10*32+20):s%|
00000aa0  28 31 29 3d 21 28 7a 25  2b 38 38 2b 31 31 2a 33  |(1)=!(z%+88+11*3|
00000ab0  32 2b 32 30 29 3a 73 25  28 32 29 3d 21 28 7a 25  |2+20):s%(2)=!(z%|
00000ac0  2b 38 38 2b 31 32 2a 33  32 2b 32 30 29 3a 73 25  |+88+12*32+20):s%|
00000ad0  28 33 29 3d 21 28 7a 25  2b 38 38 2b 31 33 2a 33  |(3)=!(z%+88+13*3|
00000ae0  32 2b 32 30 29 0d 03 ac  17 f2 64 6f 74 65 6d 70  |2+20).....dotemp|
00000af0  6c 61 74 65 28 22 53 61  76 65 22 29 0d 03 b6 52  |late("Save")...R|
00000b00  c8 99 20 43 72 65 61 74  65 57 2c 2c 7a 25 20 b8  |.. CreateW,,z% .|
00000b10  20 73 61 76 65 25 3a 61  64 73 61 76 65 25 3d 21  | save%:adsave%=!|
00000b20  28 7a 25 2b 38 38 2b 31  2a 33 32 2b 32 30 29 3a  |(z%+88+1*32+20):|
00000b30  61 64 73 61 76 65 73 70  72 69 74 65 25 3d 21 28  |adsavesprite%=!(|
00000b40  7a 25 2b 38 38 2b 30 2a  33 32 2b 32 30 29 0d 03  |z%+88+0*32+20)..|
00000b50  ca 19 f2 64 6f 74 65 6d  70 6c 61 74 65 28 22 53  |...dotemplate("S|
00000b60  70 72 69 74 65 22 29 0d  03 d4 50 c8 99 20 43 72  |prite")...P.. Cr|
00000b70  65 61 74 65 57 2c 2c 7a  25 20 b8 20 73 69 6e 66  |eateW,,z% . sinf|
00000b80  6f 25 3a 61 64 73 6e 61  6d 65 25 3d 21 28 7a 25  |o%:adsname%=!(z%|
00000b90  2b 38 38 2b 35 2a 33 32  2b 32 30 29 3a 61 64 73  |+88+5*32+20):ads|
00000ba0  62 79 74 65 73 25 3d 21  28 7a 25 2b 38 38 2b 38  |bytes%=!(z%+88+8|
00000bb0  2a 33 32 2b 32 30 29 0d  03 de 48 61 64 73 78 25  |*32+20)...Hadsx%|
00000bc0  3d 21 28 7a 25 2b 38 38  2b 37 2a 33 32 2b 32 30  |=!(z%+88+7*32+20|
00000bd0  29 3a 61 64 73 79 25 3d  21 28 7a 25 2b 38 38 2b  |):adsy%=!(z%+88+|
00000be0  39 2a 33 32 2b 32 30 29  3a 61 64 73 6d 25 3d 21  |9*32+20):adsm%=!|
00000bf0  28 7a 25 2b 38 38 2b 36  2a 33 32 2b 32 30 29 0d  |(z%+88+6*32+20).|
00000c00  03 f2 19 f2 64 6f 74 65  6d 70 6c 61 74 65 28 22  |....dotemplate("|
00000c10  53 6f 75 72 63 65 22 29  0d 03 fc 35 c8 99 20 43  |Source")...5.. C|
00000c20  72 65 61 74 65 57 2c 2c  7a 25 20 b8 20 73 72 63  |reateW,,z% . src|
00000c30  69 6e 66 6f 25 3a 61 64  73 72 63 25 3d 21 28 7a  |info%:adsrc%=!(z|
00000c40  25 2b 38 38 2b 30 2a 33  32 2b 32 30 29 0d 04 10  |%+88+0*32+20)...|
00000c50  18 f2 64 6f 74 65 6d 70  6c 61 74 65 28 22 52 61  |..dotemplate("Ra|
00000c60  6e 67 65 22 29 0d 04 1a  35 c8 99 20 43 72 65 61  |nge")...5.. Crea|
00000c70  74 65 57 2c 2c 7a 25 20  b8 20 72 61 6e 69 6e 66  |teW,,z% . raninf|
00000c80  6f 25 3a 61 64 72 61 6e  25 3d 21 28 7a 25 2b 38  |o%:adran%=!(z%+8|
00000c90  38 2b 30 2a 33 32 2b 32  30 29 0d 04 2e 17 f2 64  |8+0*32+20).....d|
00000ca0  6f 74 65 6d 70 6c 61 74  65 28 22 5a 6f 6f 6d 22  |otemplate("Zoom"|
00000cb0  29 0d 04 38 48 c8 99 20  43 72 65 61 74 65 57 2c  |)..8H.. CreateW,|
00000cc0  2c 7a 25 20 b8 20 7a 6f  6f 6d 25 3a 7a 25 28 30  |,z% . zoom%:z%(0|
00000cd0  29 3d 21 28 7a 25 2b 38  38 2b 34 2a 33 32 2b 32  |)=!(z%+88+4*32+2|
00000ce0  30 29 3a 7a 25 28 31 29  3d 21 28 7a 25 2b 38 38  |0):z%(1)=!(z%+88|
00000cf0  2b 35 2a 33 32 2b 32 30  29 0d 04 4c 1d f2 64 6f  |+5*32+20)..L..do|
00000d00  74 65 6d 70 6c 61 74 65  28 22 4a 50 45 47 4f 75  |template("JPEGOu|
00000d10  74 70 75 74 22 29 0d 04  56 35 c8 99 20 43 72 65  |tput")..V5.. Cre|
00000d20  61 74 65 57 2c 2c 7a 25  20 b8 20 6a 70 65 67 6f  |ateW,,z% . jpego|
00000d30  25 3a 61 64 6a 70 65 67  71 25 3d 21 28 7a 25 2b  |%:adjpegq%=!(z%+|
00000d40  38 38 2b 35 2a 33 32 2b  32 30 29 0d 04 6a 16 f2  |88+5*32+20)..j..|
00000d50  64 6f 74 65 6d 70 6c 61  74 65 28 22 50 69 63 22  |dotemplate("Pic"|
00000d60  29 0d 04 74 28 c8 99 20  43 72 65 61 74 65 57 2c  |)..t(.. CreateW,|
00000d70  2c 7a 25 20 b8 20 70 69  63 25 3a 61 64 74 69 74  |,z% . pic%:adtit|
00000d80  6c 65 25 3d 7a 25 21 37  32 0d 04 88 07 f7 20 85  |le%=z%!72..... .|
00000d90  0d 04 92 1a c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |......"Wimp_Clos|
00000da0  65 54 65 6d 70 6c 61 74  65 22 0d 04 9c 40 21 71  |eTemplate"...@!q|
00000db0  25 3d 2d 31 3a 71 25 21  34 3d 30 3a 71 25 21 38  |%=-1:q%!4=0:q%!8|
00000dc0  3d 30 3a 71 25 21 31 32  3d 36 38 3a 71 25 21 31  |=0:q%!12=68:q%!1|
00000dd0  36 3d 36 38 3a 71 25 21  32 30 3d 25 31 31 30 30  |6=68:q%!20=%1100|
00000de0  30 30 30 30 30 30 30 30  31 30 0d 04 a6 3a 24 28  |0000000010...:$(|
00000df0  71 25 2b 32 34 29 3d 22  21 22 2b 6d 24 28 32 30  |q%+24)="!"+m$(20|
00000e00  29 3a c8 99 22 57 69 6d  70 5f 43 72 65 61 74 65  |):.."Wimp_Create|
00000e10  49 63 6f 6e 22 2c 2c 71  25 20 b8 20 69 63 6f 6e  |Icon",,q% . icon|
00000e20  62 61 72 25 0d 04 b0 29  41 25 3d 8e 22 3c 43 68  |bar%...)A%=."<Ch|
00000e30  61 6e 67 65 46 53 49 24  44 69 72 3e 2e 43 68 6f  |angeFSI$Dir>.Cho|
00000e40  69 63 65 73 22 3a e7 41  25 3d 30 20 8c 0d 04 ba  |ices":.A%=0 ....|
00000e50  5d 66 61 73 74 25 3d a3  3a 64 65 73 74 25 3d 31  |]fast%=.:dest%=1|
00000e60  3a 73 74 61 74 65 73 63  61 6c 65 25 3d 25 31 30  |:statescale%=%10|
00000e70  30 30 30 30 30 30 31 30  30 3a 73 74 61 74 65 70  |000000100:statep|
00000e80  72 6f 63 25 3d 30 3a 73  74 61 74 65 6f 75 74 70  |roc%=0:stateoutp|
00000e90  75 74 25 3d 26 34 30 35  32 30 30 38 3a 73 74 61  |ut%=&4052008:sta|
00000ea0  74 65 6a 70 65 67 25 3d  26 32 0d 04 c4 4e 24 70  |tejpeg%=&2...N$p|
00000eb0  25 28 30 29 3d 22 22 3a  24 70 25 28 31 29 3d 22  |%(0)="":$p%(1)="|
00000ec0  32 22 2b 64 65 63 69 6d  61 6c 5f 70 6f 69 6e 74  |2"+decimal_point|
00000ed0  24 2b 22 32 22 3a 24 70  25 28 32 29 3d 22 32 34  |$+"2":$p%(2)="24|
00000ee0  22 3a 24 70 25 28 33 29  3d 22 34 22 3a 24 61 64  |":$p%(3)="4":$ad|
00000ef0  73 70 63 6c 25 3d 22 22  0d 04 ce 3d 24 61 64 6d  |spcl%=""...=$adm|
00000f00  6f 64 65 25 3d 22 32 38  22 3a 24 73 25 28 30 29  |ode%="28":$s%(0)|
00000f10  3d 22 31 22 3a 24 73 25  28 31 29 3d 22 34 22 3a  |="1":$s%(1)="4":|
00000f20  24 73 25 28 32 29 3d 22  31 22 3a 24 73 25 28 33  |$s%(2)="1":$s%(3|
00000f30  29 3d 22 34 22 0d 04 d8  1f 24 61 64 6a 70 65 67  |)="4"....$adjpeg|
00000f40  71 25 3d 22 37 35 22 3a  24 6f 6c 64 6d 6f 64 65  |q%="75":$oldmode|
00000f50  25 3d 22 22 0d 04 e2 05  cc 0d 04 ec 57 e8 23 41  |%=""........W.#A|
00000f60  25 2c 66 61 73 74 25 2c  64 65 73 74 25 2c 73 74  |%,fast%,dest%,st|
00000f70  61 74 65 73 63 61 6c 65  25 2c 73 74 61 74 65 70  |atescale%,statep|
00000f80  72 6f 63 25 2c 73 74 61  74 65 6f 75 74 70 75 74  |roc%,stateoutput|
00000f90  25 2c 73 74 61 74 65 6a  70 65 67 25 2c 24 61 64  |%,statejpeg%,$ad|
00000fa0  6a 70 65 67 71 25 2c 24  6f 6c 64 6d 6f 64 65 25  |jpegq%,$oldmode%|
00000fb0  0d 04 f6 36 e8 23 41 25  2c 24 70 25 28 30 29 2c  |...6.#A%,$p%(0),|
00000fc0  24 70 25 28 31 29 2c 24  70 25 28 32 29 2c 24 70  |$p%(1),$p%(2),$p|
00000fd0  25 28 33 29 2c 24 61 64  6d 6f 64 65 25 2c 24 61  |%(3),$admode%,$a|
00000fe0  64 73 70 63 6c 25 0d 05  00 35 24 70 25 28 31 29  |dspcl%...5$p%(1)|
00000ff0  3d a4 6c 6f 63 61 6c 65  5f 63 6f 6e 76 65 72 74  |=.locale_convert|
00001000  28 24 70 25 28 31 29 2c  22 2e 22 2c 64 65 63 69  |($p%(1),".",deci|
00001010  6d 61 6c 5f 70 6f 69 6e  74 24 29 0d 05 0a 24 e8  |mal_point$)...$.|
00001020  23 41 25 2c 24 73 25 28  30 29 2c 24 73 25 28 31  |#A%,$s%(0),$s%(1|
00001030  29 2c 24 73 25 28 32 29  2c 24 73 25 28 33 29 0d  |),$s%(2),$s%(3).|
00001040  05 14 08 d9 23 41 25 0d  05 1e 05 cd 0d 05 28 0f  |....#A%.......(.|
00001050  71 25 21 31 32 3d 31 3c  3c 32 31 0d 05 32 3d 21  |q%!12=1<<21..2=!|
00001060  71 25 3d 73 63 61 6c 65  77 25 3a e3 49 25 3d 30  |q%=scalew%:.I%=0|
00001070  b8 39 3a e7 73 74 61 74  65 73 63 61 6c 65 25 3e  |.9:.statescale%>|
00001080  3e 49 25 80 31 20 71 25  21 38 3d 31 3c 3c 32 31  |>I%.1 q%!8=1<<21|
00001090  20 8b 71 25 21 38 3d 30  0d 05 3c 19 71 25 21 34  | .q%!8=0..<.q%!4|
000010a0  3d 49 25 3a c8 99 20 53  65 74 49 2c 2c 71 25 3a  |=I%:.. SetI,,q%:|
000010b0  ed 0d 05 46 33 e3 49 25  3d 31 30 b8 31 33 3a e7  |...F3.I%=10.13:.|
000010c0  73 74 61 74 65 73 63 61  6c 65 25 3e 3e 49 25 80  |statescale%>>I%.|
000010d0  31 20 71 25 21 38 3d 31  3c 3c 32 31 20 8b 71 25  |1 q%!8=1<<21 .q%|
000010e0  21 38 3d 30 0d 05 50 1b  71 25 21 34 3d 49 25 2b  |!8=0..P.q%!4=I%+|
000010f0  36 3a c8 99 20 53 65 74  49 2c 2c 71 25 3a ed 0d  |6:.. SetI,,q%:..|
00001100  05 5a 3a 21 71 25 3d 70  72 6f 63 25 3a e3 49 25  |.Z:!q%=proc%:.I%|
00001110  3d 30 b8 37 3a e7 73 74  61 74 65 70 72 6f 63 25  |=0.7:.stateproc%|
00001120  3e 3e 49 25 80 31 20 71  25 21 38 3d 31 3c 3c 32  |>>I%.1 q%!8=1<<2|
00001130  31 20 8b 71 25 21 38 3d  30 0d 05 64 19 71 25 21  |1 .q%!8=0..d.q%!|
00001140  34 3d 49 25 3a c8 99 20  53 65 74 49 2c 2c 71 25  |4=I%:.. SetI,,q%|
00001150  3a ed 0d 05 6e 3f 21 71  25 3d 6f 75 74 70 75 74  |:...n?!q%=output|
00001160  25 3a e3 49 25 3d 30 b8  32 36 3a e7 73 74 61 74  |%:.I%=0.26:.stat|
00001170  65 6f 75 74 70 75 74 25  3e 3e 49 25 80 31 20 71  |eoutput%>>I%.1 q|
00001180  25 21 38 3d 31 3c 3c 32  31 20 8b 71 25 21 38 3d  |%!8=1<<21 .q%!8=|
00001190  30 0d 05 78 19 71 25 21  34 3d 49 25 3a c8 99 20  |0..x.q%!4=I%:.. |
000011a0  53 65 74 49 2c 2c 71 25  3a ed 0d 05 82 3b 21 71  |SetI,,q%:....;!q|
000011b0  25 3d 6a 70 65 67 6f 25  3a e3 49 25 3d 30 b8 33  |%=jpego%:.I%=0.3|
000011c0  3a e7 73 74 61 74 65 6a  70 65 67 25 3e 3e 49 25  |:.statejpeg%>>I%|
000011d0  80 31 20 71 25 21 38 3d  31 3c 3c 32 31 20 8b 71  |.1 q%!8=1<<21 .q|
000011e0  25 21 38 3d 30 0d 05 8c  19 71 25 21 34 3d 49 25  |%!8=0....q%!4=I%|
000011f0  3a c8 99 20 53 65 74 49  2c 2c 71 25 3a ed 0d 05  |:.. SetI,,q%:...|
00001200  96 2a e7 73 74 61 74 65  6f 75 74 70 75 74 25 3e  |.*.stateoutput%>|
00001210  3e 31 37 80 31 20 71 25  21 38 3d 31 3c 3c 32 32  |>17.1 q%!8=1<<22|
00001220  20 8b 71 25 21 38 3d 30  0d 05 a0 69 21 71 25 3d  | .q%!8=0...i!q%=|
00001230  6f 75 74 70 75 74 25 3a  71 25 21 31 32 3d 31 3c  |output%:q%!12=1<|
00001240  3c 32 32 3a 71 25 21 34  3d 37 3a c8 99 20 53 65  |<22:q%!4=7:.. Se|
00001250  74 49 2c 2c 71 25 3a 71  25 21 34 3d 38 3a c8 99  |tI,,q%:q%!4=8:..|
00001260  20 53 65 74 49 2c 2c 71  25 3a 71 25 21 34 3d 31  | SetI,,q%:q%!4=1|
00001270  33 3a c8 99 20 53 65 74  49 2c 2c 71 25 3a 71 25  |3:.. SetI,,q%:q%|
00001280  21 34 3d 31 34 3a c8 99  20 53 65 74 49 2c 2c 71  |!4=14:.. SetI,,q|
00001290  25 0d 05 aa 29 f2 73 68  6f 77 73 63 61 6c 65 74  |%...).showscalet|
000012a0  6f 66 69 74 3a 24 7a 25  28 30 29 3d 22 31 22 3a  |ofit:$z%(0)="1":|
000012b0  24 7a 25 28 31 29 3d 22  31 22 0d 05 b4 20 c8 99  |$z%(1)="1"... ..|
000012c0  20 22 4f 53 5f 55 70 64  61 74 65 4d 45 4d 43 22  | "OS_UpdateMEMC"|
000012d0  20 b8 20 6f 6c 64 6d 65  6d 63 0d 05 be 0f 6a 70  | . oldmemc....jp|
000012e0  65 67 73 61 76 65 25 3d  a3 0d 05 c8 3e ee 20 85  |egsave%=....>. .|
000012f0  20 c8 99 22 4f 53 5f 55  70 64 61 74 65 4d 45 4d  | .."OS_UpdateMEM|
00001300  43 22 2c 6f 6c 64 6d 65  6d 63 2c 26 37 30 30 3a  |C",oldmemc,&700:|
00001310  f2 65 72 72 6f 72 62 6f  78 3a c8 99 20 43 72 4d  |.errorbox:.. CrM|
00001320  65 6e 75 2c 2c 2d 31 0d  05 d2 0f c8 99 20 44 72  |enu,,-1...... Dr|
00001330  61 67 2c 2c 2d 31 0d 05  dc 31 e7 ac 73 70 72 69  |ag,,-1...1..spri|
00001340  74 65 25 20 c8 99 20 22  57 69 6d 70 5f 53 6c 6f  |te% .. "Wimp_Slo|
00001350  74 53 69 7a 65 22 2c 6f  72 69 67 69 6e 61 6c 73  |tSize",originals|
00001360  6c 6f 74 25 2c 2d 31 0d  05 e6 42 46 24 3d 22 22  |lot%,-1...BF$=""|
00001370  3a e7 73 74 61 72 74 66  69 6c 65 25 20 73 74 61  |:.startfile% sta|
00001380  72 74 66 69 6c 65 25 3d  a3 3a 46 24 3d c1 41 24  |rtfile%=.:F$=.A$|
00001390  2c a7 41 24 2c 22 2d 77  69 6d 70 22 29 2b 36 29  |,.A$,"-wimp")+6)|
000013a0  3a f2 63 61 6c 6c 46 53  49 0d 05 f0 05 f5 0d 05  |:.callFSI.......|
000013b0  fa 16 c8 99 20 50 6f 6c  6c 25 2c 31 2c 71 25 20  |.... Poll%,1,q% |
000013c0  b8 20 41 25 0d 06 04 0b  c8 8e 20 41 25 20 ca 0d  |. A%...... A% ..|
000013d0  06 0e 25 c9 20 31 20 3a  e7 73 70 72 69 74 65 25  |..%. 1 :.sprite%|
000013e0  20 f2 72 65 64 72 61 77  5f 77 69 6e 64 6f 77 28  | .redraw_window(|
000013f0  21 71 25 29 0d 06 18 42  c9 20 32 20 3a f2 6f 70  |!q%)...B. 2 :.op|
00001400  65 6e 5f 77 69 6e 64 6f  77 28 21 71 25 2c 71 25  |en_window(!q%,q%|
00001410  21 34 2c 71 25 21 38 2c  71 25 21 31 32 2c 71 25  |!4,q%!8,q%!12,q%|
00001420  21 31 36 2c 71 25 21 32  30 2c 71 25 21 32 34 2c  |!16,q%!20,q%!24,|
00001430  71 25 21 32 38 29 0d 06  22 32 c9 20 33 20 3a c8  |q%!28).."2. 3 :.|
00001440  99 20 26 34 30 30 63 33  2c 2c 71 25 3a 6e 65 78  |. &400c3,,q%:nex|
00001450  74 6c 6f 63 61 74 69 6f  6e 25 3d 93 3a f2 72 65  |tlocation%=.:.re|
00001460  6d 6f 76 65 61 72 65 61  0d 06 2c 3a c8 99 20 22  |movearea..,:.. "|
00001470  57 69 6d 70 5f 53 6c 6f  74 53 69 7a 65 22 2c 6f  |Wimp_SlotSize",o|
00001480  72 69 67 69 6e 61 6c 73  6c 6f 74 25 2c 2d 31 3a  |riginalslot%,-1:|
00001490  73 61 76 65 64 25 3d b9  3a 73 70 72 69 74 65 25  |saved%=.:sprite%|
000014a0  3d a3 0d 06 36 35 c9 20  36 20 3a f2 63 68 65 63  |=...65. 6 :.chec|
000014b0  6b 6d 6f 75 73 65 28 21  71 25 2c 71 25 21 34 2c  |kmouse(!q%,q%!4,|
000014c0  71 25 21 38 2c 71 25 21  31 32 2c 71 25 21 31 36  |q%!8,q%!12,q%!16|
000014d0  2c 71 25 21 32 30 29 0d  06 40 46 c9 20 37 20 3a  |,q%!20)..@F. 7 :|
000014e0  c8 99 20 47 65 74 50 2c  2c 71 25 3a 64 77 25 3d  |.. GetP,,q%:dw%=|
000014f0  71 25 21 31 32 3a 64 69  25 3d 71 25 21 31 36 3a  |q%!12:di%=q%!16:|
00001500  e7 64 73 74 61 72 74 25  20 c8 99 22 44 72 61 67  |.dstart% .."Drag|
00001510  41 53 70 72 69 74 65 5f  53 74 6f 70 22 0d 06 4a  |ASprite_Stop"..J|
00001520  4a 71 25 21 31 32 3d 30  3a 71 25 21 31 36 3d 31  |Jq%!12=0:q%!16=1|
00001530  3a 71 25 21 32 30 3d 64  77 25 3a 71 25 21 32 34  |:q%!20=dw%:q%!24|
00001540  3d 64 69 25 3a 71 25 21  32 38 3d 21 71 25 3a 71  |=di%:q%!28=!q%:q|
00001550  25 21 33 32 3d 71 25 21  34 3a 71 25 21 33 36 3d  |%!32=q%!4:q%!36=|
00001560  21 73 61 72 25 2b 33 0d  06 54 26 e7 6a 70 65 67  |!sar%+3..T&.jpeg|
00001570  73 61 76 65 25 20 8c 71  25 21 34 30 3d 26 63 38  |save% .q%!40=&c8|
00001580  35 20 8b 71 25 21 34 30  3d 26 66 66 39 0d 06 5e  |5 .q%!40=&ff9..^|
00001590  2e 74 65 6d 70 24 3d a4  5a 53 28 61 64 73 61 76  |.temp$=.ZS(adsav|
000015a0  65 25 29 3a 66 6f 6f 25  3d a7 74 65 6d 70 24 2c  |e%):foo%=.temp$,|
000015b0  22 2e 22 29 3a c8 95 66  6f 6f 25 0d 06 68 29 74  |"."):..foo%..h)t|
000015c0  65 6d 70 24 3d c1 74 65  6d 70 24 2c 66 6f 6f 25  |emp$=.temp$,foo%|
000015d0  2b 31 29 3a 66 6f 6f 25  3d a7 74 65 6d 70 24 2c  |+1):foo%=.temp$,|
000015e0  22 2e 22 29 0d 06 72 05  ce 0d 06 7c 2c 24 28 71  |".")..r....|,$(q|
000015f0  25 2b 34 34 29 3d 74 65  6d 70 24 2b bd 30 3a 21  |%+44)=temp$+.0:!|
00001600  71 25 3d 34 34 2b 28 a9  74 65 6d 70 24 2b 31 2b  |q%=44+(.temp$+1+|
00001610  33 80 ac 33 29 0d 06 86  33 c8 99 20 22 57 69 6d  |3..3)...3.. "Wim|
00001620  70 5f 53 65 6e 64 4d 65  73 73 61 67 65 22 2c 31  |p_SendMessage",1|
00001630  37 2c 71 25 2c 64 77 25  2c 64 69 25 3a 6d 79 72  |7,q%,dw%,di%:myr|
00001640  65 66 25 3d 71 25 21 38  0d 06 90 1d c9 20 38 20  |ef%=q%!8..... 8 |
00001650  3a f2 6b 65 79 28 21 71  25 2c 71 25 21 34 2c 71  |:.key(!q%,q%!4,q|
00001660  25 21 32 34 29 0d 06 9a  18 c9 20 39 20 3a f2 6d  |%!24)..... 9 :.m|
00001670  65 6e 75 73 65 6c 65 63  74 28 71 25 29 0d 06 a4  |enuselect(q%)...|
00001680  18 c9 20 31 37 2c 31 38  3a f2 72 65 63 65 69 76  |.. 17,18:.receiv|
00001690  65 28 71 25 29 0d 06 ae  05 cb 0d 06 b8 07 fd 20  |e(q%).......... |
000016a0  a3 0d 06 c2 05 cc 0d 06  cc 08 51 25 3d 93 0d 06  |..........Q%=...|
000016b0  d6 0e e0 3d 26 34 30 30  30 30 30 30 0d 06 e0 53  |...=&4000000...S|
000016c0  ee 20 85 20 ee 20 85 20  87 3a ff 22 53 65 74 20  |. . . . .:."Set |
000016d0  43 68 61 6e 67 65 46 53  49 24 52 65 74 75 72 6e  |ChangeFSI$Return|
000016e0  43 6f 64 65 20 22 2b f6  24 2b 22 20 28 63 6f 64  |Code "+.$+" (cod|
000016f0  65 20 22 2b c3 9e 2b 22  29 22 3a f2 72 65 6d 6f  |e "+..+")":.remo|
00001700  76 65 61 72 65 61 3a d8  3a e0 3d 51 25 3a e0 0d  |vearea:.:.=Q%:..|
00001710  06 ea 31 66 6f 6f 25 3d  30 3a 41 25 3d a4 43 68  |..1foo%=0:A%=.Ch|
00001720  61 6e 67 65 46 53 49 28  41 24 2c 2d 31 2c 2d 31  |angeFSI(A$,-1,-1|
00001730  2c 30 2c 2d 31 2c 2d 31  2c 66 6f 6f 25 2c b9 29  |,0,-1,-1,foo%,.)|
00001740  0d 06 f4 2b f2 72 65 6d  6f 76 65 61 72 65 61 3a  |...+.removearea:|
00001750  2a 75 6e 73 65 74 20 43  68 61 6e 67 65 46 53 49  |*unset ChangeFSI|
00001760  24 52 65 74 75 72 6e 43  6f 64 65 0d 06 fe 0a d8  |$ReturnCode.....|
00001770  3a e0 3d 51 25 0d 07 08  05 cd 0d 07 12 05 e0 0d  |:.=Q%...........|
00001780  07 26 15 dd 20 f2 64 6f  74 65 6d 70 6c 61 74 65  |.&.. .dotemplate|
00001790  28 61 24 29 0d 07 30 08  ea 20 41 25 0d 07 3a 13  |(a$)..0.. A%..:.|
000017a0  e7 76 65 72 73 69 6f 6e  25 3e 33 30 30 20 8c 0d  |.version%>300 ..|
000017b0  07 44 35 c8 99 20 22 57  69 6d 70 5f 4c 6f 61 64  |.D5.. "Wimp_Load|
000017c0  54 65 6d 70 6c 61 74 65  22 2c 2c 30 2c 2c 2c 2c  |Template",,0,,,,|
000017d0  61 24 2b 7a 24 2c 30 20  b8 20 2c 2c 69 6e 64 73  |a$+z$,0 . ,,inds|
000017e0  69 7a 65 25 0d 07 4e 11  de 20 41 25 20 69 6e 64  |ize%..N.. A% ind|
000017f0  73 69 7a 65 25 0d 07 58  37 c8 99 22 57 69 6d 70  |size%..X7.."Wimp|
00001800  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
00001810  7a 25 2c 41 25 2c 41 25  2b 69 6e 64 73 69 7a 65  |z%,A%,A%+indsize|
00001820  25 2c 2d 31 2c 61 24 2b  7a 24 2c 30 0d 07 62 05  |%,-1,a$+z$,0..b.|
00001830  cc 0d 07 6c 42 c8 99 22  57 69 6d 70 5f 4c 6f 61  |...lB.."Wimp_Loa|
00001840  64 54 65 6d 70 6c 61 74  65 22 2c 2c 7a 25 2c 69  |dTemplate",,z%,i|
00001850  64 61 74 61 25 2c 65 69  64 61 74 61 25 2c 2d 31  |data%,eidata%,-1|
00001860  2c 61 24 2b 7a 24 2c 30  20 b8 20 2c 2c 69 64 61  |,a$+z$,0 . ,,ida|
00001870  74 61 25 0d 07 76 05 cd  0d 07 80 05 e1 0d 07 94  |ta%..v..........|
00001880  18 dd 20 f2 6c 6f 63 61  6c 65 5f 69 6e 69 74 69  |.. .locale_initi|
00001890  61 6c 69 73 65 0d 07 9e  08 ea 20 70 25 0d 07 a8  |alise..... p%...|
000018a0  07 ea 20 85 0d 07 b2 1e  ee 20 85 20 ea 20 64 65  |.. ...... . . de|
000018b0  63 69 6d 61 6c 5f 70 6f  69 6e 74 24 3d 22 2e 22  |cimal_point$="."|
000018c0  3a e1 0d 07 bc 28 c8 99  20 22 54 65 72 72 69 74  |:....(.. "Territ|
000018d0  6f 72 79 5f 52 65 61 64  53 79 6d 62 6f 6c 73 22  |ory_ReadSymbols"|
000018e0  2c 2d 31 2c 30 20 b8 20  70 25 0d 07 c6 17 64 65  |,-1,0 . p%....de|
000018f0  63 69 6d 61 6c 5f 70 6f  69 6e 74 24 3d bd 3f 70  |cimal_point$=.?p|
00001900  25 0d 07 d0 05 e1 0d 07  e4 1f dd 20 a4 6c 6f 63  |%.......... .loc|
00001910  61 6c 65 5f 63 6f 6e 76  65 72 74 28 6e 24 2c 66  |ale_convert(n$,f|
00001920  24 2c 74 24 29 0d 07 ee  10 e7 20 66 24 3d 74 24  |$,t$)..... f$=t$|
00001930  20 8c 3d 6e 24 0d 07 f8  08 ea 20 69 25 0d 08 02  | .=n$..... i%...|
00001940  0e 69 25 3d a7 6e 24 2c  66 24 29 0d 08 0c 24 e7  |.i%=.n$,f$)...$.|
00001950  20 69 25 3c 3e 30 20 8c  3d c0 6e 24 2c 69 25 2d  | i%<>0 .=.n$,i%-|
00001960  31 29 2b 74 24 2b c1 6e  24 2c 69 25 2b 31 29 0d  |1)+t$+.n$,i%+1).|
00001970  08 16 07 3d 6e 24 0d 08  2a 12 dd 20 f2 72 65 63  |...=n$..*.. .rec|
00001980  65 69 76 65 28 71 25 29  0d 08 34 0e c8 8e 20 71  |eive(q%)..4... q|
00001990  25 21 31 36 20 ca 0d 08  3e 29 c9 20 30 3a f2 72  |%!16 ...>). 0:.r|
000019a0  65 6d 6f 76 65 61 72 65  61 3a c8 99 20 22 57 69  |emovearea:.. "Wi|
000019b0  6d 70 5f 43 6c 6f 73 65  44 6f 77 6e 22 3a e0 0d  |mp_CloseDown":..|
000019c0  08 48 17 c9 20 31 3a e7  71 25 21 32 30 3c 3e 73  |.H.. 1:.q%!20<>s|
000019d0  61 76 65 25 20 8c 0d 08  52 41 21 71 25 3d 36 30  |ave% ...RA!q%=60|
000019e0  3a 71 25 21 31 32 3d 71  25 21 38 3a 71 25 21 31  |:q%!12=q%!8:q%!1|
000019f0  36 3d 32 3a 71 25 21 33  36 3d 2d 31 3a 24 28 71  |6=2:q%!36=-1:$(q|
00001a00  25 2b 34 34 29 3d 22 3c  57 69 6d 70 24 53 63 72  |%+44)="<Wimp$Scr|
00001a10  61 70 3e 22 2b bd 30 0d  08 5c 2f c8 99 22 57 69  |ap>"+.0..\/.."Wi|
00001a20  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
00001a30  31 37 2c 71 25 2c 71 25  21 34 3a 73 63 72 61 70  |17,q%,q%!4:scrap|
00001a40  25 3d 71 25 21 38 0d 08  66 05 cd 0d 08 70 14 c9  |%=q%!8..f....p..|
00001a50  20 32 3a e7 6a 70 65 67  73 61 76 65 25 20 8c 0d  | 2:.jpegsave% ..|
00001a60  08 7a 37 c8 99 22 4f 53  5f 46 69 6c 65 22 2c 31  |.z7.."OS_File",1|
00001a70  30 2c a4 5a 53 28 71 25  2b 34 34 29 2c 26 63 38  |0,.ZS(q%+44),&c8|
00001a80  35 2c 2c 73 61 72 25 2c  73 61 72 25 2b 6a 70 65  |5,,sar%,sar%+jpe|
00001a90  67 73 69 7a 65 25 0d 08  84 05 cc 0d 08 8e 20 c8  |gsize%........ .|
00001aa0  99 73 70 6f 70 25 2c 26  31 30 43 2c 73 61 72 25  |.spop%,&10C,sar%|
00001ab0  2c a4 5a 53 28 71 25 2b  34 34 29 0d 08 98 05 cd  |,.ZS(q%+44).....|
00001ac0  0d 08 a2 17 24 61 64 73  61 76 65 25 3d a4 5a 53  |....$adsave%=.ZS|
00001ad0  28 71 25 2b 34 34 29 0d  08 ac 37 71 25 21 31 32  |(q%+44)...7q%!12|
00001ae0  3d 71 25 21 38 3a 71 25  21 31 36 3d 33 3a c8 99  |=q%!8:q%!16=3:..|
00001af0  20 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  | "Wimp_SendMessa|
00001b00  67 65 22 2c 31 38 2c 71  25 2c 71 25 21 34 0d 08  |ge",18,q%,q%!4..|
00001b10  b6 18 e7 20 71 25 21 33  36 3c 3e 2d 31 20 73 61  |... q%!36<>-1 sa|
00001b20  76 65 64 25 3d b9 0d 08  c0 11 c8 99 20 43 72 4d  |ved%=....... CrM|
00001b30  65 6e 75 2c 2c 2d 31 0d  08 ca 31 c9 20 33 3a 46  |enu,,-1...1. 3:F|
00001b40  24 3d a4 5a 53 28 71 25  2b 34 34 29 3a e7 73 63  |$=.ZS(q%+44):.sc|
00001b50  72 61 70 25 20 73 63 72  61 70 25 3d 73 63 72 61  |rap% scrap%=scra|
00001b60  70 25 3d 71 25 21 31 32  0d 08 d4 36 71 25 21 31  |p%=q%!12...6q%!1|
00001b70  32 3d 71 25 21 38 3a 71  25 21 31 36 3d 34 3a c8  |2=q%!8:q%!16=4:.|
00001b80  99 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  |."Wimp_SendMessa|
00001b90  67 65 22 2c 31 37 2c 71  25 2c 71 25 21 34 0d 08  |ge",17,q%,q%!4..|
00001ba0  de 0c f2 63 61 6c 6c 46  53 49 0d 08 e8 12 c9 20  |...callFSI..... |
00001bb0  35 3a c8 8e 20 71 25 21  34 30 20 ca 0d 08 f2 0f  |5:.. q%!40 .....|
00001bc0  c9 20 26 66 66 30 2c 26  63 38 35 0d 08 fc 36 71  |. &ff0,&c85...6q|
00001bd0  25 21 31 32 3d 71 25 21  38 3a 71 25 21 31 36 3d  |%!12=q%!8:q%!16=|
00001be0  34 3a c8 99 22 57 69 6d  70 5f 53 65 6e 64 4d 65  |4:.."Wimp_SendMe|
00001bf0  73 73 61 67 65 22 2c 31  37 2c 71 25 2c 71 25 21  |ssage",17,q%,q%!|
00001c00  34 0d 09 06 1a 46 24 3d  a4 5a 53 28 71 25 2b 34  |4....F$=.ZS(q%+4|
00001c10  34 29 3a f2 63 61 6c 6c  46 53 49 0d 09 10 05 cb  |4):.callFSI.....|
00001c20  0d 09 1a 1a c9 20 38 3a  e7 73 61 76 65 64 25 84  |..... 8:.saved%.|
00001c30  ac 73 70 72 69 74 65 25  20 e1 0d 09 24 2d 21 62  |.sprite% ...$-!b|
00001c40  75 66 66 65 72 25 3d 9f  3a 24 28 62 75 66 66 65  |uffer%=.:$(buffe|
00001c50  72 25 2b 34 29 3d 6d 24  28 32 29 2b 46 24 2b 6d  |r%+4)=m$(2)+F$+m|
00001c60  24 28 33 29 2b bd 30 0d  09 2e 34 c8 99 22 57 69  |$(3)+.0...4.."Wi|
00001c70  6d 70 5f 52 65 70 6f 72  74 45 72 72 6f 72 22 2c  |mp_ReportError",|
00001c80  62 75 66 66 65 72 25 2c  25 31 30 31 31 31 2c 6d  |buffer%,%10111,m|
00001c90  24 28 32 30 29 20 b8 20  2c 41 25 0d 09 38 32 71  |$(20) . ,A%..82q|
00001ca0  25 21 31 32 3d 71 25 21  38 3a e7 41 25 3c 3e 31  |%!12=q%!8:.A%<>1|
00001cb0  20 c8 99 22 57 69 6d 70  5f 53 65 6e 64 4d 65 73  | .."Wimp_SendMes|
00001cc0  73 61 67 65 22 2c 31 39  2c 71 25 2c 30 0d 09 42  |sage",19,q%,0..B|
00001cd0  42 c9 39 2c 26 34 30 30  43 31 3a e7 73 70 72 69  |B.9,&400C1:.spri|
00001ce0  74 65 25 20 f2 67 65 74  6d 6f 64 65 69 6e 66 6f  |te% .getmodeinfo|
00001cf0  3a c8 99 26 34 30 30 64  31 2c 70 69 63 25 2c 30  |:..&400d1,pic%,0|
00001d00  2c 2d 33 32 37 36 37 2c  33 32 37 36 37 2c 30 0d  |,-32767,32767,0.|
00001d10  09 4c 13 f2 73 68 6f 77  73 63 61 6c 65 74 6f 66  |.L..showscaletof|
00001d20  69 74 0d 09 56 48 c9 20  31 30 3a c8 99 22 58 4f  |it..VH. 10:.."XO|
00001d30  53 5f 52 65 61 64 56 61  72 56 61 6c 22 2c 22 43  |S_ReadVarVal","C|
00001d40  68 61 6e 67 65 46 53 49  24 44 69 72 22 2c 70 61  |hangeFSI$Dir",pa|
00001d50  6c 74 65 6d 70 25 2c 32  35 36 2c 30 2c 33 20 b8  |ltemp%,256,0,3 .|
00001d60  2c 2c 62 6f 6f 74 6c 65  6e 25 0d 09 60 18 70 61  |,,bootlen%..`.pa|
00001d70  6c 74 65 6d 70 25 3f 62  6f 6f 74 6c 65 6e 25 3d  |ltemp%?bootlen%=|
00001d80  31 33 0d 09 6a 1c d5 23  71 25 21 32 30 2c 22 52  |13..j..#q%!20,"R|
00001d90  75 6e 20 22 2b 24 70 61  6c 74 65 6d 70 25 0d 09  |un "+$paltemp%..|
00001da0  74 05 cb 0d 09 7e 05 e1  0d 09 92 0e dd 20 f2 63  |t....~....... .c|
00001db0  61 6c 6c 46 53 49 0d 09  9c 15 e7 20 a4 63 68 65  |allFSI..... .che|
00001dc0  63 6b 76 61 6c 75 65 73  20 8c e1 0d 09 a6 18 41  |ckvalues ......A|
00001dd0  24 3d a4 64 65 64 75 63  65 6d 6f 64 65 3a 41 25  |$=.deducemode:A%|
00001de0  3d 34 37 0d 09 b0 1a 6a  70 65 67 73 61 76 65 25  |=47....jpegsave%|
00001df0  3d a3 3a e7 64 65 73 74  25 3d 30 20 8c 0d 09 ba  |=.:.dest%=0 ....|
00001e00  40 6a 70 65 67 73 61 76  65 25 3d b9 3a 41 24 3d  |@jpegsave%=.:A$=|
00001e10  22 4a 50 45 47 22 3a e7  a4 67 65 74 69 63 6f 6e  |"JPEG":..geticon|
00001e20  73 74 61 74 65 28 6a 70  65 67 6f 25 2c 32 29 20  |state(jpego%,2) |
00001e30  41 24 3d 22 4a 50 45 47  4d 4f 4e 4f 22 0d 09 c4  |A$="JPEGMONO"...|
00001e40  11 41 24 2b 3d 24 61 64  6a 70 65 67 71 25 0d 09  |.A$+=$adjpegq%..|
00001e50  ce 05 cc 0d 09 d8 20 e7  a4 67 65 74 69 63 6f 6e  |...... ..geticon|
00001e60  73 74 61 74 65 28 6f 75  74 70 75 74 25 2c 31 35  |state(output%,15|
00001e70  29 20 8c 0d 09 e2 10 41  24 2b 3d 24 61 64 73 70  |) .....A$+=$adsp|
00001e80  63 6c 25 0d 09 ec 05 cc  0d 09 f6 20 e7 a4 67 65  |cl%........ ..ge|
00001e90  74 69 63 6f 6e 73 74 61  74 65 28 6f 75 74 70 75  |ticonstate(outpu|
00001ea0  74 25 2c 31 36 29 20 8c  0d 0a 00 3f e7 a4 67 65  |t%,16) ....?..ge|
00001eb0  74 69 63 6f 6e 73 74 61  74 65 28 6f 75 74 70 75  |ticonstate(outpu|
00001ec0  74 25 2c 35 29 84 a4 67  65 74 69 63 6f 6e 73 74  |t%,5)..geticonst|
00001ed0  61 74 65 28 6f 75 74 70  75 74 25 2c 31 31 29 20  |ate(output%,11) |
00001ee0  41 24 2b 3d 22 52 22 0d  0a 0a 05 cc 0d 0a 14 14  |A$+="R".........|
00001ef0  c8 99 35 33 2c bb 41 24  2c 33 20 b8 2c 2c 41 25  |..53,.A$,3 .,,A%|
00001f00  0d 0a 1e 0c e7 41 25 3d  36 33 20 8c 0d 0a 28 26  |.....A%=63 ...(&|
00001f10  e7 a4 67 65 74 69 63 6f  6e 73 74 61 74 65 28 6f  |..geticonstate(o|
00001f20  75 74 70 75 74 25 2c 36  29 20 41 24 3d 22 32 37  |utput%,6) A$="27|
00001f30  74 22 0d 0a 32 27 e7 a4  67 65 74 69 63 6f 6e 73  |t"..2'..geticons|
00001f40  74 61 74 65 28 6f 75 74  70 75 74 25 2c 31 32 29  |tate(output%,12)|
00001f50  20 41 24 3d 22 31 32 74  22 0d 0a 3c 05 cc 0d 0a  | A$="12t"..<....|
00001f60  46 13 e7 41 25 3d 32 35  35 20 41 24 2b 3d 22 64  |F..A%=255 A$+="d|
00001f70  22 0d 0a 50 05 cd 0d 0a  5a 05 cd 0d 0a 64 05 cd  |"..P....Z....d..|
00001f80  0d 0a 6e 05 cd 0d 0a 78  2f 41 24 3d 22 67 61 72  |..n....x/A$="gar|
00001f90  62 61 67 65 20 22 2b 46  24 2b 22 20 3c 43 68 61  |bage "+F$+" <Cha|
00001fa0  6e 67 65 46 53 49 24 44  69 72 3e 2e 46 6f 6f 20  |ngeFSI$Dir>.Foo |
00001fb0  22 2b 41 24 0d 0a 82 14  f2 43 68 61 6e 67 65 46  |"+A$.....ChangeF|
00001fc0  53 49 53 75 66 66 69 78  0d 0a 8c 25 69 6e 66 6f  |SISuffix...%info|
00001fd0  24 3d 22 22 3a 72 61 6e  67 65 24 3d 6d 24 28 31  |$="":range$=m$(1|
00001fe0  39 29 3a 63 70 75 74 69  6d 65 25 3d 30 0d 0a 96  |9):cputime%=0...|
00001ff0  36 e7 73 70 72 69 74 65  25 20 21 71 25 3d 70 69  |6.sprite% !q%=pi|
00002000  63 25 3a c8 99 20 26 34  30 30 63 33 2c 2c 71 25  |c%:.. &400c3,,q%|
00002010  3a 73 61 76 65 64 25 3d  b9 3a 73 70 72 69 74 65  |:saved%=.:sprite|
00002020  25 3d a3 0d 0a a0 13 6e  65 78 74 6c 6f 63 61 74  |%=.....nextlocat|
00002030  69 6f 6e 25 3d 93 0d 0a  aa 33 c8 99 20 22 57 69  |ion%=....3.. "Wi|
00002040  6d 70 5f 53 6c 6f 74 53  69 7a 65 22 2c 6f 72 69  |mp_SlotSize",ori|
00002050  67 69 6e 61 6c 73 6c 6f  74 25 2c 2d 31 3a f2 72  |ginalslot%,-1:.r|
00002060  65 6d 6f 76 65 61 72 65  61 0d 0a b4 31 e7 66 61  |emovearea...1.fa|
00002070  73 74 25 20 c8 99 20 22  4f 53 5f 55 70 64 61 74  |st% .. "OS_Updat|
00002080  65 4d 45 4d 43 22 2c 26  33 30 30 2c 26 37 30 30  |eMEMC",&300,&700|
00002090  20 b8 20 6f 6c 64 6d 65  6d 63 0d 0a be 34 41 25  | . oldmemc...4A%|
000020a0  3d a4 43 68 61 6e 67 65  46 53 49 28 41 24 2c 2d  |=.ChangeFSI(A$,-|
000020b0  31 2c 2d 31 2c 6e 65 78  74 6c 6f 63 61 74 69 6f  |1,-1,nextlocatio|
000020c0  6e 25 2c 30 2c 30 2c 73  61 72 25 2c 30 29 0d 0a  |n%,0,0,sar%,0)..|
000020d0  c8 2a e7 66 61 73 74 25  20 c8 99 20 22 4f 53 5f  |.*.fast% .. "OS_|
000020e0  55 70 64 61 74 65 4d 45  4d 43 22 2c 6f 6c 64 6d  |UpdateMEMC",oldm|
000020f0  65 6d 63 2c 26 37 30 30  0d 0a d2 25 e7 73 63 72  |emc,&700...%.scr|
00002100  61 70 25 20 73 63 72 61  70 25 3d a3 3a c8 99 22  |ap% scrap%=.:.."|
00002110  4f 53 5f 46 69 6c 65 22  2c 36 2c 46 24 0d 0a dc  |OS_File",6,F$...|
00002120  15 e7 41 25 3c 32 20 80  20 73 61 72 25 3c 3e 30  |..A%<2 . sar%<>0|
00002130  20 8c 0d 0a e6 2a 24 61  64 73 78 25 3d c3 78 73  | ....*$adsx%=.xs|
00002140  70 25 3a 24 61 64 73 79  25 3d c3 79 73 70 25 3a  |p%:$adsy%=.ysp%:|
00002150  e7 6a 70 65 67 73 61 76  65 25 20 8c 0d 0a f0 22  |.jpegsave% ...."|
00002160  24 61 64 73 6d 25 3d 22  4a 50 45 47 22 3a 24 61  |$adsm%="JPEG":$a|
00002170  64 73 6e 61 6d 65 25 3d  22 4a 50 45 47 22 0d 0a  |dsname%="JPEG"..|
00002180  fa 19 24 61 64 73 62 79  74 65 73 25 3d c3 6a 70  |..$adsbytes%=.jp|
00002190  65 67 73 69 7a 65 25 0d  0b 04 15 78 3d 78 73 70  |egsize%....x=xsp|
000021a0  25 2a 32 3a 79 3d 79 73  70 25 2a 32 0d 0b 0e 25  |%*2:y=ysp%*2...%|
000021b0  c8 99 26 33 35 2c 2d 31  2c 34 20 b8 2c 2c 6e 78  |..&35,-1,4 .,,nx|
000021c0  3a c8 99 26 33 35 2c 2d  31 2c 35 20 b8 2c 2c 6e  |:..&35,-1,5 .,,n|
000021d0  79 0d 0b 18 3d 21 69 66  61 63 74 6f 72 73 25 3d  |y...=!ifactors%=|
000021e0  31 3a 69 66 61 63 74 6f  72 73 25 21 34 3d 31 3a  |1:ifactors%!4=1:|
000021f0  69 66 61 63 74 6f 72 73  25 21 38 3d 6e 78 3a 69  |ifactors%!8=nx:i|
00002200  66 61 63 74 6f 72 73 25  21 31 32 3d 6e 79 0d 0b  |factors%!12=ny..|
00002210  22 1d 24 61 64 73 61 76  65 73 70 72 69 74 65 25  |".$adsavesprite%|
00002220  3d 22 66 69 6c 65 5f 63  38 35 22 0d 0b 2c 25 e7  |="file_c85"..,%.|
00002230  20 c0 46 24 2c 37 29 3d  22 3c 57 69 6d 70 24 53  | .F$,7)="<Wimp$S|
00002240  22 20 46 24 3d 22 4a 50  45 47 49 6d 61 67 65 22  |" F$="JPEGImage"|
00002250  0d 0b 36 05 cc 0d 0b 40  27 c8 99 20 73 70 6f 70  |..6....@'.. spop|
00002260  78 25 2c 26 31 30 64 2c  73 61 72 25 2c 70 69 78  |x%,&10d,sar%,pix|
00002270  74 72 61 6e 73 25 2c 32  35 35 2c 31 0d 0b 4a 37  |trans%,255,1..J7|
00002280  6e 24 3d a4 5a 53 28 70  69 78 74 72 61 6e 73 25  |n$=.ZS(pixtrans%|
00002290  29 3a c8 99 20 73 70 6f  70 78 25 2c 26 31 32 38  |):.. spopx%,&128|
000022a0  2c 73 61 72 25 2c 6e 24  20 b8 2c 2c 2c 78 2c 79  |,sar%,n$ .,,,x,y|
000022b0  2c 2c 6d 0d 0b 54 1a 24  61 64 73 6d 25 3d c3 6d  |,,m..T.$adsm%=.m|
000022c0  3a 24 61 64 73 6e 61 6d  65 25 3d 6e 24 0d 0b 5e  |:$adsname%=n$..^|
000022d0  17 24 61 64 73 62 79 74  65 73 25 3d c3 73 61 72  |.$adsbytes%=.sar|
000022e0  25 21 31 32 0d 0b 68 1b  c8 99 26 33 35 2c 6d 2c  |%!12..h...&35,m,|
000022f0  34 20 b8 2c 2c 6e 78 3a  78 3d 78 3c 3c 6e 78 0d  |4 .,,nx:x=x<<nx.|
00002300  0b 72 28 c8 99 26 33 35  2c 6d 2c 35 20 b8 2c 2c  |.r(..&35,m,5 .,,|
00002310  6e 79 3a 79 3d 79 3c 3c  6e 79 3a f2 67 65 74 6d  |ny:y=y<<ny:.getm|
00002320  6f 64 65 69 6e 66 6f 0d  0b 7c 1d 24 61 64 73 61  |odeinfo..|.$adsa|
00002330  76 65 73 70 72 69 74 65  25 3d 22 66 69 6c 65 5f  |vesprite%="file_|
00002340  66 66 39 22 0d 0b 86 26  e7 20 c0 46 24 2c 37 29  |ff9"...&. .F$,7)|
00002350  3d 22 3c 57 69 6d 70 24  53 22 20 46 24 3d 22 53  |="<Wimp$S" F$="S|
00002360  70 72 69 74 65 46 69 6c  65 22 0d 0b 90 05 cd 0d  |priteFile"......|
00002370  0b 9a 2f 21 71 25 3d 73  61 76 65 25 3a 71 25 21  |../!q%=save%:q%!|
00002380  34 3d 30 3a 71 25 21 38  3d 30 3a 71 25 21 31 32  |4=0:q%!8=0:q%!12|
00002390  3d 30 3a c8 99 20 53 65  74 49 2c 2c 71 25 0d 0b  |=0:.. SetI,,q%..|
000023a0  a4 63 24 61 64 72 61 6e  25 3d 72 61 6e 67 65 24  |.c$adran%=range$|
000023b0  3a 24 61 64 73 72 63 25  3d 69 6e 66 6f 24 2b 6d  |:$adsrc%=info$+m|
000023c0  24 28 30 29 2b c3 28 63  70 75 74 69 6d 65 25 81  |$(0)+.(cputime%.|
000023d0  31 30 30 29 2b 64 65 63  69 6d 61 6c 5f 70 6f 69  |100)+decimal_poi|
000023e0  6e 74 24 2b c2 22 30 22  2b c3 28 63 70 75 74 69  |nt$+."0"+.(cputi|
000023f0  6d 65 25 83 31 30 30 29  2c 32 29 2b 6d 24 28 31  |me%.100),2)+m$(1|
00002400  29 0d 0b ae 16 73 61 76  65 64 25 3d a3 3a 73 70  |)....saved%=.:sp|
00002410  72 69 74 65 25 3d b9 0d  0b d6 27 41 25 3d a9 46  |rite%=....'A%=.F|
00002420  24 3a c8 95 c1 22 2e 22  2b 46 24 2c 41 25 2c 31  |$:..."."+F$,A%,1|
00002430  29 3c 3e 22 2e 22 3a 41  25 2d 3d 31 3a ce 0d 0b  |)<>".":A%-=1:...|
00002440  e0 1a 24 61 64 73 61 76  65 25 3d c1 22 2e 22 2b  |..$adsave%=."."+|
00002450  46 24 2c 41 25 2b 31 29  0d 0b f4 1f 70 69 63 25  |F$,A%+1)....pic%|
00002460  3d a4 63 72 65 61 74 65  5f 77 69 6e 64 6f 77 28  |=.create_window(|
00002470  78 2c 79 2c 46 24 29 0d  0b fe 13 f2 70 6f 70 75  |x,y,F$).....popu|
00002480  70 28 70 69 63 25 2c 2d  31 29 0d 0c 08 05 cd 0d  |p(pic%,-1)......|
00002490  0c 12 05 e1 0d 0c 26 12  dd 20 a4 63 68 65 63 6b  |......&.. .check|
000024a0  76 61 6c 75 65 73 0d 0c  30 14 ea 20 65 2c 65 72  |values..0.. e,er|
000024b0  72 6f 72 24 2c 66 6c 61  67 25 0d 0c 44 20 e7 20  |ror$,flag%..D . |
000024c0  64 65 73 74 25 3d 30 20  80 20 bb 24 61 64 6a 70  |dest%=0 . .$adjp|
000024d0  65 67 71 25 3e 31 30 30  20 8c 0d 0c 4e 31 65 3d  |egq%>100 ...N1e=|
000024e0  31 3a 65 72 72 6f 72 24  3d 6d 24 28 32 32 29 2b  |1:error$=m$(22)+|
000024f0  6d 24 28 32 35 29 2b 6d  24 28 32 33 29 2b 6d 24  |m$(25)+m$(23)+m$|
00002500  28 32 37 29 2b 6d 24 28  32 34 29 0d 0c 58 05 cd  |(27)+m$(24)..X..|
00002510  0d 0c 6c 22 e7 20 c0 24  61 64 6d 6f 64 65 25 2c  |..l". .$admode%,|
00002520  31 29 3c 22 41 22 20 80  20 64 65 73 74 25 3d 31  |1)<"A" . dest%=1|
00002530  20 8c 0d 0c 76 1f c8 99  20 26 33 35 2c bb 24 61  | ...v... &35,.$a|
00002540  64 6d 6f 64 65 25 2c 30  20 b8 20 3b 66 6c 61 67  |dmode%,0 . ;flag|
00002550  25 0d 0c 8a 19 e7 20 a9  24 61 64 6d 6f 64 65 25  |%..... .$admode%|
00002560  3d 30 20 66 6c 61 67 25  3d 32 0d 0c 94 2b e7 20  |=0 flag%=2...+. |
00002570  bb 24 61 64 6d 6f 64 65  25 3e 31 32 37 20 80 20  |.$admode%>127 . |
00002580  bb 24 61 64 6d 6f 64 65  25 3c 32 35 36 20 66 6c  |.$admode%<256 fl|
00002590  61 67 25 3d 32 0d 0c 9e  13 e7 20 28 66 6c 61 67  |ag%=2..... (flag|
000025a0  25 80 32 29 3e 30 20 8c  0d 0c a8 31 65 3d 32 3a  |%.2)>0 ....1e=2:|
000025b0  65 72 72 6f 72 24 3d 6d  24 28 32 32 29 2b 6d 24  |error$=m$(22)+m$|
000025c0  28 32 36 29 2b 6d 24 28  32 33 29 2b 6d 24 28 31  |(26)+m$(23)+m$(1|
000025d0  33 29 2b 6d 24 28 32 34  29 0d 0c b2 05 cd 0d 0c  |3)+m$(24).......|
000025e0  bc 05 cd 0d 0c c6 09 e7  20 65 20 8c 0d 0c d0 31  |........ e ....1|
000025f0  c8 99 20 44 72 61 67 2c  2c 2d 31 3a 21 62 75 66  |.. Drag,,-1:!buf|
00002600  66 65 72 25 3d 65 3a 24  28 62 75 66 66 65 72 25  |fer%=e:$(buffer%|
00002610  2b 34 29 3d 65 72 72 6f  72 24 2b bd 30 0d 0c da  |+4)=error$+.0...|
00002620  32 c8 99 20 22 57 69 6d  70 5f 52 65 70 6f 72 74  |2.. "Wimp_Report|
00002630  45 72 72 6f 72 22 2c 62  75 66 66 65 72 25 2c 25  |Error",buffer%,%|
00002640  30 31 2c 6d 24 28 32 30  29 20 b8 20 2c 41 25 0d  |01,m$(20) . ,A%.|
00002650  0c e4 2b e7 41 25 3d 32  20 f2 72 65 6d 6f 76 65  |..+.A%=2 .remove|
00002660  61 72 65 61 3a c8 99 20  22 57 69 6d 70 5f 43 6c  |area:.. "Wimp_Cl|
00002670  6f 73 65 44 6f 77 6e 22  3a e0 0d 0c ee 05 cd 0d  |oseDown":.......|
00002680  0c f8 06 3d 65 0d 0d 0c  16 dd 20 f2 43 68 61 6e  |...=e..... .Chan|
00002690  67 65 46 53 49 53 75 66  66 69 78 0d 0d 16 0b 73  |geFSISuffix....s|
000026a0  61 66 65 25 3d b9 0d 0d  20 46 e7 a4 67 65 74 69  |afe%=... F..geti|
000026b0  63 6f 6e 73 74 61 74 65  28 73 63 61 6c 65 77 25  |constate(scalew%|
000026c0  2c 31 29 20 41 24 2b 3d  22 20 22 2b c3 74 6f 66  |,1) A$+=" "+.tof|
000026d0  69 74 78 2b 22 3a 20 22  2b c3 74 6f 66 69 74 79  |itx+": "+.tofity|
000026e0  2b 22 3a 22 3a 73 61 66  65 25 3d a3 0d 0d 2a 30  |+":":safe%=...*0|
000026f0  e7 a4 67 65 74 69 63 6f  6e 73 74 61 74 65 28 73  |..geticonstate(s|
00002700  63 61 6c 65 77 25 2c 35  29 20 41 24 2b 3d 22 20  |calew%,5) A$+=" |
00002710  31 3a 32 22 3a 73 61 66  65 25 3d a3 0d 0d 34 34  |1:2":safe%=...44|
00002720  e7 a4 67 65 74 69 63 6f  6e 73 74 61 74 65 28 73  |..geticonstate(s|
00002730  63 61 6c 65 77 25 2c 34  29 20 41 24 2b 3d 22 20  |calew%,4) A$+=" |
00002740  31 3a 32 20 31 3a 31 22  3a 73 61 66 65 25 3d a3  |1:2 1:1":safe%=.|
00002750  0d 0d 3e 34 e7 a4 67 65  74 69 63 6f 6e 73 74 61  |..>4..geticonsta|
00002760  74 65 28 73 63 61 6c 65  77 25 2c 33 29 20 41 24  |te(scalew%,3) A$|
00002770  2b 3d 22 20 31 3a 31 20  31 3a 32 22 3a 73 61 66  |+=" 1:1 1:2":saf|
00002780  65 25 3d a3 0d 0d 48 1f  e7 a4 67 65 74 69 63 6f  |e%=...H...getico|
00002790  6e 73 74 61 74 65 28 73  63 61 6c 65 77 25 2c 39  |nstate(scalew%,9|
000027a0  29 20 8c 0d 0d 52 0b 73  61 66 65 25 3d a3 0d 0d  |) ...R.safe%=...|
000027b0  5c 25 e7 bb 24 73 25 28  30 29 20 41 24 2b 3d 22  |\%..$s%(0) A$+="|
000027c0  20 22 2b 24 73 25 28 30  29 20 8b 41 24 2b 3d 22  | "+$s%(0) .A$+="|
000027d0  20 31 22 0d 0d 66 12 41  24 2b 3d 22 3a 22 2b 24  | 1"..f.A$+=":"+$|
000027e0  73 25 28 31 29 0d 0d 70  25 e7 bb 24 73 25 28 32  |s%(1)..p%..$s%(2|
000027f0  29 20 41 24 2b 3d 22 20  22 2b 24 73 25 28 32 29  |) A$+=" "+$s%(2)|
00002800  20 8b 41 24 2b 3d 22 20  31 22 0d 0d 7a 12 41 24  | .A$+=" 1"..z.A$|
00002810  2b 3d 22 3a 22 2b 24 73  25 28 33 29 0d 0d 84 05  |+=":"+$s%(3)....|
00002820  cd 0d 0d 8e 2c e7 a4 67  65 74 69 63 6f 6e 73 74  |....,..geticonst|
00002830  61 74 65 28 73 63 61 6c  65 77 25 2c 30 29 20 41  |ate(scalew%,0) A|
00002840  24 2b 3d 22 20 2d 6e 6f  73 69 7a 65 22 0d 0d 98  |$+=" -nosize"...|
00002850  2e e7 a4 67 65 74 69 63  6f 6e 73 74 61 74 65 28  |...geticonstate(|
00002860  73 63 61 6c 65 77 25 2c  31 38 29 20 41 24 2b 3d  |scalew%,18) A$+=|
00002870  22 20 2d 6e 6f 73 63 61  6c 65 22 0d 0d a2 2b e7  |" -noscale"...+.|
00002880  a4 67 65 74 69 63 6f 6e  73 74 61 74 65 28 73 63  |.geticonstate(sc|
00002890  61 6c 65 77 25 2c 31 39  29 20 41 24 2b 3d 22 20  |alew%,19) A$+=" |
000028a0  2d 6c 6f 63 6b 22 0d 0d  ac 1f e7 a4 67 65 74 69  |-lock"......geti|
000028b0  63 6f 6e 73 74 61 74 65  28 73 63 61 6c 65 77 25  |constate(scalew%|
000028c0  2c 36 29 20 8c 0d 0d b6  46 73 61 66 65 25 3d a3  |,6) ....Fsafe%=.|
000028d0  3a e7 a4 67 65 74 69 63  6f 6e 73 74 61 74 65 28  |:..geticonstate(|
000028e0  73 63 61 6c 65 77 25 2c  31 36 29 20 41 24 2b 3d  |scalew%,16) A$+=|
000028f0  22 20 2d 72 6f 74 61 74  65 22 20 8b 41 24 2b 3d  |" -rotate" .A$+=|
00002900  22 20 2d 72 6f 74 61 74  65 2d 22 0d 0d c0 05 cd  |" -rotate-".....|
00002910  0d 0d ca 33 e7 a4 67 65  74 69 63 6f 6e 73 74 61  |...3..geticonsta|
00002920  74 65 28 73 63 61 6c 65  77 25 2c 37 29 20 41 24  |te(scalew%,7) A$|
00002930  2b 3d 22 20 2d 68 66 6c  69 70 22 3a 73 61 66 65  |+=" -hflip":safe|
00002940  25 3d a3 0d 0d d4 33 e7  a4 67 65 74 69 63 6f 6e  |%=....3..geticon|
00002950  73 74 61 74 65 28 73 63  61 6c 65 77 25 2c 38 29  |state(scalew%,8)|
00002960  20 41 24 2b 3d 22 20 2d  76 66 6c 69 70 22 3a 73  | A$+=" -vflip":s|
00002970  61 66 65 25 3d a3 0d 0d  de 31 e7 a4 67 65 74 69  |afe%=....1..geti|
00002980  63 6f 6e 73 74 61 74 65  28 70 72 6f 63 25 2c 30  |constate(proc%,0|
00002990  29 20 41 24 2b 3d 22 20  2d 72 61 6e 67 65 22 3a  |) A$+=" -range":|
000029a0  73 61 66 65 25 3d a3 0d  0d e8 31 e7 a4 67 65 74  |safe%=....1..get|
000029b0  69 63 6f 6e 73 74 61 74  65 28 70 72 6f 63 25 2c  |iconstate(proc%,|
000029c0  31 29 20 41 24 2b 3d 22  20 2d 65 71 75 61 6c 22  |1) A$+=" -equal"|
000029d0  3a 73 61 66 65 25 3d a3  0d 0d f2 2c e7 a4 67 65  |:safe%=....,..ge|
000029e0  74 69 63 6f 6e 73 74 61  74 65 28 70 72 6f 63 25  |ticonstate(proc%|
000029f0  2c 32 29 20 41 24 2b 3d  22 20 2d 6e 6f 64 69 74  |,2) A$+=" -nodit|
00002a00  68 65 72 22 0d 0d fc 32  e7 a4 67 65 74 69 63 6f  |her"...2..getico|
00002a10  6e 73 74 61 74 65 28 70  72 6f 63 25 2c 33 29 20  |nstate(proc%,3) |
00002a20  41 24 2b 3d 22 20 2d 69  6e 76 65 72 74 22 3a 73  |A$+=" -invert":s|
00002a30  61 66 65 25 3d a3 0d 0e  06 2c e7 a4 67 65 74 69  |afe%=....,..geti|
00002a40  63 6f 6e 73 74 61 74 65  28 70 72 6f 63 25 2c 34  |constate(proc%,4|
00002a50  29 20 41 24 2b 3d 22 20  2d 62 72 69 67 68 74 65  |) A$+=" -brighte|
00002a60  6e 22 0d 0e 10 30 e7 a4  67 65 74 69 63 6f 6e 73  |n"...0..geticons|
00002a70  74 61 74 65 28 70 72 6f  63 25 2c 35 29 20 41 24  |tate(proc%,5) A$|
00002a80  2b 3d 22 20 2d 62 6c 61  63 6b 22 2b 24 70 25 28  |+=" -black"+$p%(|
00002a90  30 29 0d 0e 1a 5c e7 a4  67 65 74 69 63 6f 6e 73  |0)...\..geticons|
00002aa0  74 61 74 65 28 70 72 6f  63 25 2c 36 29 20 41 24  |tate(proc%,6) A$|
00002ab0  2b 3d 22 20 2d 67 61 6d  6d 61 22 2b a4 6c 6f 63  |+=" -gamma"+.loc|
00002ac0  61 6c 65 5f 63 6f 6e 76  65 72 74 28 24 70 25 28  |ale_convert($p%(|
00002ad0  31 29 2c 64 65 63 69 6d  61 6c 5f 70 6f 69 6e 74  |1),decimal_point|
00002ae0  24 2c 22 2e 22 29 3a 73  61 66 65 25 3d a3 0d 0e  |$,"."):safe%=...|
00002af0  24 3a e7 a4 67 65 74 69  63 6f 6e 73 74 61 74 65  |$:..geticonstate|
00002b00  28 70 72 6f 63 25 2c 37  29 20 41 24 2b 3d 22 20  |(proc%,7) A$+=" |
00002b10  2d 73 68 61 72 70 65 6e  22 2b 24 70 25 28 32 29  |-sharpen"+$p%(2)|
00002b20  3a 73 61 66 65 25 3d a3  0d 0e 2e 32 e7 a4 67 65  |:safe%=....2..ge|
00002b30  74 69 63 6f 6e 73 74 61  74 65 28 70 72 6f 63 25  |ticonstate(proc%|
00002b40  2c 31 31 29 20 41 24 2b  3d 22 20 2d 73 6d 6f 6f  |,11) A$+=" -smoo|
00002b50  74 68 22 2b 24 70 25 28  33 29 0d 0e 38 05 e1 0d  |th"+$p%(3)..8...|
00002b60  0e 4c 15 dd 20 f2 63 68  65 63 6b 61 6e 64 66 69  |.L.. .checkandfi|
00002b70  6e 69 73 68 0d 0e 56 37  e7 73 61 76 65 64 25 20  |nish..V7.saved% |
00002b80  84 ac 73 70 72 69 74 65  25 20 f2 72 65 6d 6f 76  |..sprite% .remov|
00002b90  65 61 72 65 61 3a c8 99  20 22 57 69 6d 70 5f 43  |earea:.. "Wimp_C|
00002ba0  6c 6f 73 65 44 6f 77 6e  22 3a e0 0d 0e 60 2d 21  |loseDown":...`-!|
00002bb0  62 75 66 66 65 72 25 3d  9f 3a 24 28 62 75 66 66  |buffer%=.:$(buff|
00002bc0  65 72 25 2b 34 29 3d 6d  24 28 32 29 2b 46 24 2b  |er%+4)=m$(2)+F$+|
00002bd0  6d 24 28 33 29 2b bd 30  0d 0e 6a 35 c8 99 20 22  |m$(3)+.0..j5.. "|
00002be0  57 69 6d 70 5f 52 65 70  6f 72 74 45 72 72 6f 72  |Wimp_ReportError|
00002bf0  22 2c 62 75 66 66 65 72  25 2c 25 31 30 31 31 31  |",buffer%,%10111|
00002c00  2c 6d 24 28 32 30 29 20  b8 20 2c 41 25 0d 0e 74  |,m$(20) . ,A%..t|
00002c10  2b e7 41 25 3d 31 20 f2  72 65 6d 6f 76 65 61 72  |+.A%=1 .removear|
00002c20  65 61 3a c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |ea:.. "Wimp_Clos|
00002c30  65 44 6f 77 6e 22 3a e0  0d 0e 7e 05 e1 0d 0e 92  |eDown":...~.....|
00002c40  1e dd 20 f2 6b 65 79 28  68 61 6e 64 6c 65 25 2c  |.. .key(handle%,|
00002c50  69 63 6f 6e 25 2c 6b 65  79 25 29 0d 0e 9c 1d e7  |icon%,key%).....|
00002c60  6b 65 79 25 3d 26 31 62  20 c8 99 20 43 72 4d 65  |key%=&1b .. CrMe|
00002c70  6e 75 2c 2c 2d 31 3a e1  0d 0e a6 10 c8 8e 20 68  |nu,,-1:....... h|
00002c80  61 6e 64 6c 65 25 20 ca  0d 0e b0 15 c9 20 7a 6f  |andle% ...... zo|
00002c90  6f 6d 25 3a c8 8e 20 6b  65 79 25 20 ca 0d 0e ba  |om%:.. key% ....|
00002ca0  43 c9 20 31 33 3a f2 64  6f 7a 6f 6f 6d 28 69 63  |C. 13:.dozoom(ic|
00002cb0  6f 6e 25 2d 34 2c 30 29  3a e7 69 63 6f 6e 25 3d  |on%-4,0):.icon%=|
00002cc0  34 20 c8 99 20 26 34 30  30 64 32 2c 7a 6f 6f 6d  |4 .. &400d2,zoom|
00002cd0  25 2c 35 2c 2c 2c 2d 31  2c a9 24 7a 25 28 30 29  |%,5,,,-1,.$z%(0)|
00002ce0  0d 0e c4 1a e7 69 63 6f  6e 25 3d 35 20 c8 99 20  |.....icon%=5 .. |
00002cf0  43 72 4d 65 6e 75 2c 2c  2d 31 0d 0e ce 05 e1 0d  |CrMenu,,-1......|
00002d00  0e d8 22 c9 20 26 31 38  65 2c 26 31 38 66 3a f2  |..". &18e,&18f:.|
00002d10  64 6f 7a 6f 6f 6d 28 69  63 6f 6e 25 2d 34 2c 30  |dozoom(icon%-4,0|
00002d20  29 0d 0e e2 30 c8 99 20  26 34 30 30 64 32 2c 7a  |)...0.. &400d2,z|
00002d30  6f 6f 6d 25 2c 69 63 6f  6e 25 82 31 2c 2c 2c 2d  |oom%,icon%.1,,,-|
00002d40  31 2c a9 24 7a 25 28 69  63 6f 6e 25 82 35 29 3a  |1,.$z%(icon%.5):|
00002d50  e1 0d 0e ec 05 cb 0d 0e  f6 0b c9 20 73 61 76 65  |........... save|
00002d60  25 0d 0f 00 1a e7 6b 65  79 25 3d 31 33 20 f2 73  |%.....key%=13 .s|
00002d70  61 76 65 73 70 72 69 74  65 3a e1 0d 0f 0a 0d c9  |avesprite:......|
00002d80  20 6f 75 74 70 75 74 25  0d 0f 14 70 e7 20 69 63  | output%...p. ic|
00002d90  6f 6e 25 3d 33 34 20 80  20 a4 67 65 74 69 63 6f  |on%=34 . .getico|
00002da0  6e 73 74 61 74 65 28 6f  75 74 70 75 74 25 2c 20  |nstate(output%, |
00002db0  32 34 29 20 8c 24 61 64  6d 6f 64 65 25 20 3d 20  |24) .$admode% = |
00002dc0  24 6f 6c 64 6d 6f 64 65  25 3a 21 71 25 3d 6f 75  |$oldmode%:!q%=ou|
00002dd0  74 70 75 74 25 3a 71 25  21 34 3d 32 30 3a 71 25  |tput%:q%!4=20:q%|
00002de0  21 38 3d 30 3a 71 25 21  31 32 3d 30 3a c8 99 20  |!8=0:q%!12=0:.. |
00002df0  53 65 74 49 2c 2c 71 25  0d 0f 1e 13 f2 73 68 6f  |SetI,,q%.....sho|
00002e00  77 73 63 61 6c 65 74 6f  66 69 74 0d 0f 28 1c e7  |wscaletofit..(..|
00002e10  6b 65 79 25 3d 31 33 20  c8 99 20 43 72 4d 65 6e  |key%=13 .. CrMen|
00002e20  75 2c 2c 2d 31 3a e1 0d  0f 32 10 e7 6b 65 79 25  |u,,-1:...2..key%|
00002e30  3d 26 31 38 65 20 8c 0d  0f 3c 0e c8 8e 20 69 63  |=&18e ...<... ic|
00002e40  6f 6e 25 20 ca 0d 0f 46  1f c9 20 31 39 3a 69 63  |on% ...F.. 19:ic|
00002e50  6f 6e 25 3d 33 34 3a 6b  65 79 25 3d 6f 6c 64 6d  |on%=34:key%=oldm|
00002e60  6f 64 65 25 0d 0f 50 1f  c9 20 33 34 3a 69 63 6f  |ode%..P.. 34:ico|
00002e70  6e 25 3d 32 32 3a 6b 65  79 25 3d 61 64 6a 70 65  |n%=22:key%=adjpe|
00002e80  67 71 25 0d 0f 5a 1e c9  20 32 32 3a 69 63 6f 6e  |gq%..Z.. 22:icon|
00002e90  25 3d 31 39 3a 6b 65 79  25 3d 61 64 73 70 63 6c  |%=19:key%=adspcl|
00002ea0  25 0d 0f 64 05 cb 0d 0f  6e 05 cd 0d 0f 78 10 e7  |%..d....n....x..|
00002eb0  6b 65 79 25 3d 26 31 38  66 20 8c 0d 0f 82 0e c8  |key%=&18f ......|
00002ec0  8e 20 69 63 6f 6e 25 20  ca 0d 0f 8c 1f c9 20 32  |. icon% ...... 2|
00002ed0  32 3a 69 63 6f 6e 25 3d  33 34 3a 6b 65 79 25 3d  |2:icon%=34:key%=|
00002ee0  6f 6c 64 6d 6f 64 65 25  0d 0f 96 1e c9 20 33 34  |oldmode%..... 34|
00002ef0  3a 69 63 6f 6e 25 3d 31  39 3a 6b 65 79 25 3d 61  |:icon%=19:key%=a|
00002f00  64 73 70 63 6c 25 0d 0f  a0 1f c9 20 31 39 3a 69  |dspcl%..... 19:i|
00002f10  63 6f 6e 25 3d 32 32 3a  6b 65 79 25 3d 61 64 6a  |con%=22:key%=adj|
00002f20  70 65 67 71 25 0d 0f aa  05 cb 0d 0f b4 05 cd 0d  |pegq%...........|
00002f30  0f be 34 e7 6b 65 79 25  3e 31 30 32 34 20 c8 99  |..4.key%>1024 ..|
00002f40  20 26 34 30 30 64 32 2c  6f 75 74 70 75 74 25 2c  | &400d2,output%,|
00002f50  69 63 6f 6e 25 2c 2c 2c  2d 31 2c a9 24 6b 65 79  |icon%,,,-1,.$key|
00002f60  25 3a e1 0d 0f c8 15 c9  20 70 72 6f 63 25 3a c8  |%:...... proc%:.|
00002f70  8e 20 6b 65 79 25 20 ca  0d 0f d2 41 c9 20 26 31  |. key% ....A. &1|
00002f80  38 65 2c 31 33 3a 69 63  6f 6e 25 2b 3d 31 3a e7  |8e,13:icon%+=1:.|
00002f90  69 63 6f 6e 25 3e 31 30  20 69 63 6f 6e 25 3d 38  |icon%>10 icon%=8|
00002fa0  3a e7 6b 65 79 25 3d 31  33 20 c8 99 20 43 72 4d  |:.key%=13 .. CrM|
00002fb0  65 6e 75 2c 2c 2d 31 3a  e1 0d 0f dc 2e c8 99 20  |enu,,-1:....... |
00002fc0  26 34 30 30 64 32 2c 70  72 6f 63 25 2c 69 63 6f  |&400d2,proc%,ico|
00002fd0  6e 25 2c 2c 2c 2d 31 2c  a9 24 70 25 28 69 63 6f  |n%,,,-1,.$p%(ico|
00002fe0  6e 25 2d 38 29 3a e1 0d  0f e6 25 c9 20 26 31 38  |n%-8):....%. &18|
00002ff0  66 3a 69 63 6f 6e 25 2d  3d 31 3a e7 69 63 6f 6e  |f:icon%-=1:.icon|
00003000  25 3c 38 20 69 63 6f 6e  25 3d 31 30 0d 0f f0 2e  |%<8 icon%=10....|
00003010  c8 99 20 26 34 30 30 64  32 2c 70 72 6f 63 25 2c  |.. &400d2,proc%,|
00003020  69 63 6f 6e 25 2c 2c 2c  2d 31 2c a9 24 70 25 28  |icon%,,,-1,.$p%(|
00003030  69 63 6f 6e 25 2d 38 29  3a e1 0d 0f fa 05 cb 0d  |icon%-8):.......|
00003040  10 04 17 c9 20 73 63 61  6c 65 77 25 3a c8 8e 20  |.... scalew%:.. |
00003050  6b 65 79 25 20 ca 0d 10  0e 42 c9 20 26 31 38 65  |key% ....B. &18e|
00003060  2c 31 33 3a 69 63 6f 6e  25 2b 3d 31 3a e7 69 63  |,13:icon%+=1:.ic|
00003070  6f 6e 25 3e 31 33 20 69  63 6f 6e 25 3d 31 30 3a  |on%>13 icon%=10:|
00003080  e7 6b 65 79 25 3d 31 33  20 c8 99 20 43 72 4d 65  |.key%=13 .. CrMe|
00003090  6e 75 2c 2c 2d 31 3a e1  0d 10 18 31 c8 99 20 26  |nu,,-1:....1.. &|
000030a0  34 30 30 64 32 2c 73 63  61 6c 65 77 25 2c 69 63  |400d2,scalew%,ic|
000030b0  6f 6e 25 2c 2c 2c 2d 31  2c a9 24 73 25 28 69 63  |on%,,,-1,.$s%(ic|
000030c0  6f 6e 25 2d 31 30 29 3a  e1 0d 10 22 26 c9 20 26  |on%-10):..."&. &|
000030d0  31 38 66 3a 69 63 6f 6e  25 2d 3d 31 3a e7 69 63  |18f:icon%-=1:.ic|
000030e0  6f 6e 25 3c 31 30 20 69  63 6f 6e 25 3d 31 33 0d  |on%<10 icon%=13.|
000030f0  10 2c 31 c8 99 20 26 34  30 30 64 32 2c 73 63 61  |.,1.. &400d2,sca|
00003100  6c 65 77 25 2c 69 63 6f  6e 25 2c 2c 2c 2d 31 2c  |lew%,icon%,,,-1,|
00003110  a9 24 73 25 28 69 63 6f  6e 25 2d 31 30 29 3a e1  |.$s%(icon%-10):.|
00003120  0d 10 36 05 cb 0d 10 40  05 cb 0d 10 4a 1d c8 99  |..6....@....J...|
00003130  20 22 57 69 6d 70 5f 50  72 6f 63 65 73 73 4b 65  | "Wimp_ProcessKe|
00003140  79 22 2c 6b 65 79 25 0d  10 54 05 e1 0d 10 68 11  |y",key%..T....h.|
00003150  dd 20 f2 73 61 76 65 73  70 72 69 74 65 0d 10 72  |. .savesprite..r|
00003160  13 e7 20 46 24 3d 24 61  64 73 61 76 65 25 20 8c  |.. F$=$adsave% .|
00003170  0d 10 7c 31 c8 99 20 44  72 61 67 2c 2c 2d 31 3a  |..|1.. Drag,,-1:|
00003180  21 62 75 66 66 65 72 25  3d 33 3a 24 28 62 75 66  |!buffer%=3:$(buf|
00003190  66 65 72 25 2b 34 29 3d  6d 24 28 32 38 29 2b bd  |fer%+4)=m$(28)+.|
000031a0  30 0d 10 86 32 c8 99 20  22 57 69 6d 70 5f 52 65  |0...2.. "Wimp_Re|
000031b0  70 6f 72 74 45 72 72 6f  72 22 2c 62 75 66 66 65  |portError",buffe|
000031c0  72 25 2c 25 31 31 2c 6d  24 28 32 30 29 20 b8 20  |r%,%11,m$(20) . |
000031d0  2c 41 25 0d 10 90 0b e7  41 25 3d 32 20 8c 0d 10  |,A%.....A%=2 ...|
000031e0  9a 11 c8 99 20 43 72 4d  65 6e 75 2c 2c 2d 31 0d  |.... CrMenu,,-1.|
000031f0  10 a4 05 e1 0d 10 ae 05  cd 0d 10 b8 05 cd 0d 10  |................|
00003200  c2 10 e7 6a 70 65 67 73  61 76 65 25 20 8c 0d 10  |...jpegsave% ...|
00003210  cc 35 c8 99 22 4f 53 5f  46 69 6c 65 22 2c 31 30  |.5.."OS_File",10|
00003220  2c 24 61 64 73 61 76 65  25 2c 26 63 38 35 2c 2c  |,$adsave%,&c85,,|
00003230  73 61 72 25 2c 73 61 72  25 2b 6a 70 65 67 73 69  |sar%,sar%+jpegsi|
00003240  7a 65 25 0d 10 d6 05 cc  0d 10 e0 1f c8 99 20 73  |ze%........... s|
00003250  70 6f 70 25 2c 26 31 30  43 2c 73 61 72 25 2c 24  |pop%,&10C,sar%,$|
00003260  61 64 73 61 76 65 25 0d  10 ea 05 cd 0d 10 f4 11  |adsave%.........|
00003270  c8 99 20 43 72 4d 65 6e  75 2c 2c 2d 31 0d 10 fe  |.. CrMenu,,-1...|
00003280  05 e1 0d 11 12 37 dd 20  f2 63 68 65 63 6b 6d 6f  |.....7. .checkmo|
00003290  75 73 65 28 6d 6f 75 73  65 78 25 2c 6d 6f 75 73  |use(mousex%,mous|
000032a0  65 79 25 2c 62 25 2c 68  61 6e 64 6c 65 25 2c 69  |ey%,b%,handle%,i|
000032b0  63 6f 6e 25 2c 6f 62 25  29 0d 11 1c 15 ea 20 6d  |con%,ob%)..... m|
000032c0  6f 76 65 64 25 3a 6d 6f  76 65 64 25 3d a3 0d 11  |oved%:moved%=...|
000032d0  26 0b e7 62 25 80 32 20  8c 0d 11 30 10 c8 8e 20  |&..b%.2 ...0... |
000032e0  68 61 6e 64 6c 65 25 20  ca 0d 11 3a 7c c9 20 70  |handle% ...:|. p|
000032f0  69 63 25 3a f2 64 6f 6d  65 6e 75 28 70 69 63 25  |ic%:.domenu(pic%|
00003300  2c 6d 24 28 34 29 2b 22  3e 73 69 6e 66 6f 25 2c  |,m$(4)+">sinfo%,|
00003310  22 2b 6d 24 28 35 29 2b  22 3e 73 72 63 69 6e 66  |"+m$(5)+">srcinf|
00003320  6f 25 2c 22 2b 6d 24 28  36 29 2b 22 3e 72 61 6e  |o%,"+m$(6)+">ran|
00003330  69 6e 66 6f 25 2c 22 2b  6d 24 28 37 29 2b 22 3e  |info%,"+m$(7)+">|
00003340  7a 6f 6f 6d 25 2c 22 2b  6d 24 28 38 29 2b 22 3e  |zoom%,"+m$(8)+">|
00003350  73 61 76 65 25 2c 22 2b  6d 24 28 39 29 2c 6d 24  |save%,"+m$(9),m$|
00003360  28 32 30 29 29 0d 11 44  b6 c9 20 2d 32 3a f2 64  |(20))..D.. -2:.d|
00003370  6f 6d 65 6e 75 28 31 30  31 2c 6d 24 28 31 30 29  |omenu(101,m$(10)|
00003380  2b 22 3e 69 6e 66 6f 77  25 2c 22 2b 6d 24 28 31  |+">infow%,"+m$(1|
00003390  31 29 2b 22 3e 73 63 61  6c 65 77 25 2c 22 2b 6d  |1)+">scalew%,"+m|
000033a0  24 28 31 32 29 2b 22 3e  70 72 6f 63 25 2c 22 2b  |$(12)+">proc%,"+|
000033b0  6d 24 28 31 33 29 2b 22  3e 6f 75 74 70 75 74 25  |m$(13)+">output%|
000033c0  3a 64 65 73 74 25 2c 22  2b 6d 24 28 32 37 29 2b  |:dest%,"+m$(27)+|
000033d0  22 3e 6a 70 65 67 6f 25  3a 31 2d 64 65 73 74 25  |">jpego%:1-dest%|
000033e0  2c 22 2b 6d 24 28 39 29  2b 22 2c 22 2b 6d 24 28  |,"+m$(9)+","+m$(|
000033f0  31 34 29 2b 22 3a 66 61  73 74 25 41 4e 44 31 2c  |14)+":fast%AND1,|
00003400  22 2b 6d 24 28 31 35 29  2b 22 2c 22 2b 6d 24 28  |"+m$(15)+","+m$(|
00003410  31 36 29 2c 6d 24 28 32  30 29 29 0d 11 4e 05 cb  |16),m$(20))..N..|
00003420  0d 11 58 18 72 6d 65 6e  75 68 61 6e 64 6c 65 25  |..X.rmenuhandle%|
00003430  3d 68 61 6e 64 6c 65 25  0d 11 62 05 cd 0d 11 6c  |=handle%..b....l|
00003440  0b e7 62 25 80 34 20 8c  0d 11 76 10 c8 8e 20 68  |..b%.4 ...v... h|
00003450  61 6e 64 6c 65 25 20 ca  0d 11 80 16 c9 20 7a 6f  |andle% ...... zo|
00003460  6f 6d 25 3a c8 8e 20 69  63 6f 6e 25 20 ca 0d 11  |om%:.. icon% ...|
00003470  8a 14 c9 20 30 3a f2 64  6f 7a 6f 6f 6d 28 30 2c  |... 0:.dozoom(0,|
00003480  31 29 0d 11 94 15 c9 20  31 3a f2 64 6f 7a 6f 6f  |1)..... 1:.dozoo|
00003490  6d 28 30 2c 2d 31 29 0d  11 9e 14 c9 20 32 3a f2  |m(0,-1)..... 2:.|
000034a0  64 6f 7a 6f 6f 6d 28 31  2c 31 29 0d 11 a8 15 c9  |dozoom(1,1).....|
000034b0  20 33 3a f2 64 6f 7a 6f  6f 6d 28 31 2c 2d 31 29  | 3:.dozoom(1,-1)|
000034c0  0d 11 b2 05 cb 0d 11 bc  05 cb 0d 11 c6 05 cd 0d  |................|
000034d0  11 d0 0b e7 62 25 80 31  20 8c 0d 11 da 10 c8 8e  |....b%.1 .......|
000034e0  20 68 61 6e 64 6c 65 25  20 ca 0d 11 e4 16 c9 20  | handle% ...... |
000034f0  7a 6f 6f 6d 25 3a c8 8e  20 69 63 6f 6e 25 20 ca  |zoom%:.. icon% .|
00003500  0d 11 ee 15 c9 20 30 3a  f2 64 6f 7a 6f 6f 6d 28  |..... 0:.dozoom(|
00003510  30 2c 2d 31 29 0d 11 f8  14 c9 20 31 3a f2 64 6f  |0,-1)..... 1:.do|
00003520  7a 6f 6f 6d 28 30 2c 31  29 0d 12 02 15 c9 20 32  |zoom(0,1)..... 2|
00003530  3a f2 64 6f 7a 6f 6f 6d  28 31 2c 2d 31 29 0d 12  |:.dozoom(1,-1)..|
00003540  0c 14 c9 20 33 3a f2 64  6f 7a 6f 6f 6d 28 31 2c  |... 3:.dozoom(1,|
00003550  31 29 0d 12 16 05 cb 0d  12 20 05 cb 0d 12 2a 05  |1)....... ....*.|
00003560  cd 0d 12 34 0b e7 62 25  80 35 20 8c 0d 12 3e 10  |...4..b%.5 ...>.|
00003570  c8 8e 20 68 61 6e 64 6c  65 25 20 ca 0d 12 48 e7  |.. handle% ...H.|
00003580  c9 20 6f 75 74 70 75 74  25 3a e7 20 64 65 73 74  |. output%:. dest|
00003590  25 3d 30 20 64 65 73 74  25 3d 31 3a f2 64 6f 6d  |%=0 dest%=1:.dom|
000035a0  65 6e 75 28 31 30 31 2c  6d 24 28 31 30 29 2b 22  |enu(101,m$(10)+"|
000035b0  3e 69 6e 66 6f 77 25 2c  22 2b 6d 24 28 31 31 29  |>infow%,"+m$(11)|
000035c0  2b 22 3e 73 63 61 6c 65  77 25 2c 22 2b 6d 24 28  |+">scalew%,"+m$(|
000035d0  31 32 29 2b 22 3e 70 72  6f 63 25 2c 22 2b 6d 24  |12)+">proc%,"+m$|
000035e0  28 31 33 29 2b 22 3e 6f  75 74 70 75 74 25 3a 64  |(13)+">output%:d|
000035f0  65 73 74 25 2c 22 2b 6d  24 28 32 37 29 2b 22 3e  |est%,"+m$(27)+">|
00003600  6a 70 65 67 6f 25 3a 31  2d 64 65 73 74 25 2c 22  |jpego%:1-dest%,"|
00003610  2b 6d 24 28 39 29 2b 22  2c 22 2b 6d 24 28 31 34  |+m$(9)+","+m$(14|
00003620  29 2b 22 3a 66 61 73 74  25 41 4e 44 31 2c 22 2b  |)+":fast%AND1,"+|
00003630  6d 24 28 31 35 29 2b 22  2c 22 2b 6d 24 28 31 36  |m$(15)+","+m$(16|
00003640  29 2c 6d 24 28 32 30 29  29 3a c8 99 20 47 65 74  |),m$(20)):.. Get|
00003650  63 61 72 65 74 25 2c 2c  71 25 3a 6d 6f 76 65 64  |caret%,,q%:moved|
00003660  25 3d b9 0d 12 52 0e c8  8e 20 69 63 6f 6e 25 20  |%=...R... icon% |
00003670  ca 0d 12 5c 6e c9 20 33  2c 34 2c 35 2c 36 3a f2  |...\n. 3,4,5,6:.|
00003680  6b 69 6c 6c 63 75 72 72  65 6e 74 28 c3 28 32 32  |killcurrent(.(22|
00003690  2b 69 63 6f 6e 25 29 29  3a 21 71 25 3d 6f 75 74  |+icon%)):!q%=out|
000036a0  70 75 74 25 3a 71 25 21  34 3d 31 38 3a 71 25 21  |put%:q%!4=18:q%!|
000036b0  38 3d 30 3a 71 25 21 31  32 3d 31 3c 3c 32 31 3a  |8=0:q%!12=1<<21:|
000036c0  c8 99 20 53 65 74 49 2c  2c 71 25 3a 71 25 21 34  |.. SetI,,q%:q%!4|
000036d0  3d 32 34 3a c8 99 20 53  65 74 49 2c 2c 71 25 0d  |=24:.. SetI,,q%.|
000036e0  12 66 68 c9 20 37 3a f2  6b 69 6c 6c 63 75 72 72  |.fh. 7:.killcurr|
000036f0  65 6e 74 28 22 53 31 36  2c 39 30 2c 39 30 22 29  |ent("S16,90,90")|
00003700  3a 21 71 25 3d 6f 75 74  70 75 74 25 3a 71 25 21  |:!q%=output%:q%!|
00003710  34 3d 31 38 3a 71 25 21  38 3d 30 3a 71 25 21 31  |4=18:q%!8=0:q%!1|
00003720  32 3d 31 3c 3c 32 31 3a  c8 99 20 53 65 74 49 2c  |2=1<<21:.. SetI,|
00003730  2c 71 25 3a 71 25 21 34  3d 32 34 3a c8 99 20 53  |,q%:q%!4=24:.. S|
00003740  65 74 49 2c 2c 71 25 0d  12 70 68 c9 20 38 3a f2  |etI,,q%..ph. 8:.|
00003750  6b 69 6c 6c 63 75 72 72  65 6e 74 28 22 53 33 32  |killcurrent("S32|
00003760  2c 39 30 2c 39 30 22 29  3a 21 71 25 3d 6f 75 74  |,90,90"):!q%=out|
00003770  70 75 74 25 3a 71 25 21  34 3d 31 38 3a 71 25 21  |put%:q%!4=18:q%!|
00003780  38 3d 30 3a 71 25 21 31  32 3d 31 3c 3c 32 31 3a  |8=0:q%!12=1<<21:|
00003790  c8 99 20 53 65 74 49 2c  2c 71 25 3a 71 25 21 34  |.. SetI,,q%:q%!4|
000037a0  3d 32 34 3a c8 99 20 53  65 74 49 2c 2c 71 25 0d  |=24:.. SetI,,q%.|
000037b0  12 7a 60 c9 20 39 3a f2  6b 69 6c 6c 63 75 72 72  |.z`. 9:.killcurr|
000037c0  65 6e 74 28 22 30 22 29  3a 21 71 25 3d 6f 75 74  |ent("0"):!q%=out|
000037d0  70 75 74 25 3a 71 25 21  34 3d 31 38 3a 71 25 21  |put%:q%!4=18:q%!|
000037e0  38 3d 30 3a 71 25 21 31  32 3d 31 3c 3c 32 31 3a  |8=0:q%!12=1<<21:|
000037f0  c8 99 20 53 65 74 49 2c  2c 71 25 3a 71 25 21 34  |.. SetI,,q%:q%!4|
00003800  3d 32 34 3a c8 99 20 53  65 74 49 2c 2c 71 25 0d  |=24:.. SetI,,q%.|
00003810  12 84 61 c9 20 31 30 3a  f2 6b 69 6c 6c 63 75 72  |..a. 10:.killcur|
00003820  72 65 6e 74 28 22 38 22  29 3a 21 71 25 3d 6f 75  |rent("8"):!q%=ou|
00003830  74 70 75 74 25 3a 71 25  21 34 3d 31 38 3a 71 25  |tput%:q%!4=18:q%|
00003840  21 38 3d 30 3a 71 25 21  31 32 3d 31 3c 3c 32 31  |!8=0:q%!12=1<<21|
00003850  3a c8 99 20 53 65 74 49  2c 2c 71 25 3a 71 25 21  |:.. SetI,,q%:q%!|
00003860  34 3d 32 34 3a c8 99 20  53 65 74 49 2c 2c 71 25  |4=24:.. SetI,,q%|
00003870  0d 12 8e 62 c9 20 31 31  3a f2 6b 69 6c 6c 63 75  |...b. 11:.killcu|
00003880  72 72 65 6e 74 28 22 31  32 22 29 3a 21 71 25 3d  |rrent("12"):!q%=|
00003890  6f 75 74 70 75 74 25 3a  71 25 21 34 3d 31 38 3a  |output%:q%!4=18:|
000038a0  71 25 21 38 3d 30 3a 71  25 21 31 32 3d 31 3c 3c  |q%!8=0:q%!12=1<<|
000038b0  32 31 3a c8 99 20 53 65  74 49 2c 2c 71 25 3a 71  |21:.. SetI,,q%:q|
000038c0  25 21 34 3d 32 34 3a c8  99 20 53 65 74 49 2c 2c  |%!4=24:.. SetI,,|
000038d0  71 25 0d 12 98 62 c9 20  31 32 3a f2 6b 69 6c 6c  |q%...b. 12:.kill|
000038e0  63 75 72 72 65 6e 74 28  22 31 35 22 29 3a 21 71  |current("15"):!q|
000038f0  25 3d 6f 75 74 70 75 74  25 3a 71 25 21 34 3d 31  |%=output%:q%!4=1|
00003900  38 3a 71 25 21 38 3d 30  3a 71 25 21 31 32 3d 31  |8:q%!8=0:q%!12=1|
00003910  3c 3c 32 31 3a c8 99 20  53 65 74 49 2c 2c 71 25  |<<21:.. SetI,,q%|
00003920  3a 71 25 21 34 3d 32 34  3a c8 99 20 53 65 74 49  |:q%!4=24:.. SetI|
00003930  2c 2c 71 25 0d 12 a2 69  c9 20 31 33 3a f2 6b 69  |,,q%...i. 13:.ki|
00003940  6c 6c 63 75 72 72 65 6e  74 28 22 53 31 36 2c 39  |llcurrent("S16,9|
00003950  30 2c 34 35 22 29 3a 21  71 25 3d 6f 75 74 70 75  |0,45"):!q%=outpu|
00003960  74 25 3a 71 25 21 34 3d  31 38 3a 71 25 21 38 3d  |t%:q%!4=18:q%!8=|
00003970  30 3a 71 25 21 31 32 3d  31 3c 3c 32 31 3a c8 99  |0:q%!12=1<<21:..|
00003980  20 53 65 74 49 2c 2c 71  25 3a 71 25 21 34 3d 32  | SetI,,q%:q%!4=2|
00003990  34 3a c8 99 20 53 65 74  49 2c 2c 71 25 0d 12 ac  |4:.. SetI,,q%...|
000039a0  69 c9 20 31 34 3a f2 6b  69 6c 6c 63 75 72 72 65  |i. 14:.killcurre|
000039b0  6e 74 28 22 53 33 32 2c  39 30 2c 34 35 22 29 3a  |nt("S32,90,45"):|
000039c0  21 71 25 3d 6f 75 74 70  75 74 25 3a 71 25 21 34  |!q%=output%:q%!4|
000039d0  3d 31 38 3a 71 25 21 38  3d 30 3a 71 25 21 31 32  |=18:q%!8=0:q%!12|
000039e0  3d 31 3c 3c 32 31 3a c8  99 20 53 65 74 49 2c 2c  |=1<<21:.. SetI,,|
000039f0  71 25 3a 71 25 21 34 3d  32 34 3a c8 99 20 53 65  |q%:q%!4=24:.. Se|
00003a00  74 49 2c 2c 71 25 0d 12  b6 c4 c9 20 31 35 3a f2  |tI,,q%..... 15:.|
00003a10  6b 69 6c 6c 63 75 72 72  65 6e 74 28 a4 64 65 64  |killcurrent(.ded|
00003a20  75 63 65 6d 6f 64 65 29  3a c8 99 20 53 65 74 49  |ucemode):.. SetI|
00003a30  2c 2c 71 25 3a c8 99 20  43 61 72 65 74 70 6f 73  |,,q%:.. Caretpos|
00003a40  25 2c 6f 75 74 70 75 74  25 2c 31 39 2c 2c 2c 2d  |%,output%,19,,,-|
00003a50  31 2c a9 28 24 61 64 73  70 63 6c 25 29 3a 21 71  |1,.($adspcl%):!q|
00003a60  25 3d 6f 75 74 70 75 74  25 3a 71 25 21 34 3d 37  |%=output%:q%!4=7|
00003a70  3a 71 25 21 38 3d 30 3a  71 25 21 31 32 3d 31 3c  |:q%!8=0:q%!12=1<|
00003a80  3c 32 32 3a c8 99 20 53  65 74 49 2c 2c 71 25 3a  |<22:.. SetI,,q%:|
00003a90  71 25 21 34 3d 38 3a c8  99 20 53 65 74 49 2c 2c  |q%!4=8:.. SetI,,|
00003aa0  71 25 3a 71 25 21 34 3d  31 33 3a c8 99 20 53 65  |q%:q%!4=13:.. Se|
00003ab0  74 49 2c 2c 71 25 3a 71  25 21 34 3d 31 34 3a c8  |tI,,q%:q%!4=14:.|
00003ac0  99 20 53 65 74 49 2c 2c  71 25 0d 12 c0 8f c9 20  |. SetI,,q%..... |
00003ad0  31 36 3a f2 6b 69 6c 6c  63 75 72 72 65 6e 74 28  |16:.killcurrent(|
00003ae0  a4 64 65 64 75 63 65 6d  6f 64 65 29 3a 21 71 25  |.deducemode):!q%|
00003af0  3d 6f 75 74 70 75 74 25  3a 71 25 21 34 3d 37 3a  |=output%:q%!4=7:|
00003b00  71 25 21 38 3d 30 3a 71  25 21 31 32 3d 31 3c 3c  |q%!8=0:q%!12=1<<|
00003b10  32 32 3a c8 99 20 53 65  74 49 2c 2c 71 25 3a 71  |22:.. SetI,,q%:q|
00003b20  25 21 34 3d 38 3a c8 99  20 53 65 74 49 2c 2c 71  |%!4=8:.. SetI,,q|
00003b30  25 3a 71 25 21 34 3d 31  33 3a c8 99 20 53 65 74  |%:q%!4=13:.. Set|
00003b40  49 2c 2c 71 25 3a 71 25  21 34 3d 31 34 3a c8 99  |I,,q%:q%!4=14:..|
00003b50  20 53 65 74 49 2c 2c 71  25 0d 12 ca 93 c9 20 31  | SetI,,q%..... 1|
00003b60  37 3a f2 6b 69 6c 6c 63  75 72 72 65 6e 74 28 a4  |7:.killcurrent(.|
00003b70  64 65 64 75 63 65 6d 6f  64 65 29 3a 21 71 25 3d  |deducemode):!q%=|
00003b80  6f 75 74 70 75 74 25 3a  71 25 21 34 3d 37 3a 71  |output%:q%!4=7:q|
00003b90  25 21 38 3d 31 3c 3c 32  32 3a 71 25 21 31 32 3d  |%!8=1<<22:q%!12=|
00003ba0  31 3c 3c 32 32 3a c8 99  20 53 65 74 49 2c 2c 71  |1<<22:.. SetI,,q|
00003bb0  25 3a 71 25 21 34 3d 38  3a c8 99 20 53 65 74 49  |%:q%!4=8:.. SetI|
00003bc0  2c 2c 71 25 3a 71 25 21  34 3d 31 33 3a c8 99 20  |,,q%:q%!4=13:.. |
00003bd0  53 65 74 49 2c 2c 71 25  3a 71 25 21 34 3d 31 34  |SetI,,q%:q%!4=14|
00003be0  3a c8 99 20 53 65 74 49  2c 2c 71 25 0d 12 d4 1a  |:.. SetI,,q%....|
00003bf0  e7 20 c0 24 61 64 6d 6f  64 65 25 2c 31 29 20 3d  |. .$admode%,1) =|
00003c00  20 22 53 22 20 8c 0d 12  de 1b e7 20 c2 24 61 64  | "S" ...... .$ad|
00003c10  6d 6f 64 65 25 2c 32 29  20 3d 20 22 34 35 22 20  |mode%,2) = "45" |
00003c20  8c 0d 12 e8 5d f2 6b 69  6c 6c 63 75 72 72 65 6e  |....].killcurren|
00003c30  74 28 22 31 35 22 29 3a  21 71 25 3d 6f 75 74 70  |t("15"):!q%=outp|
00003c40  75 74 25 3a 71 25 21 34  3d 31 38 3a 71 25 21 38  |ut%:q%!4=18:q%!8|
00003c50  3d 30 3a 71 25 21 31 32  3d 31 3c 3c 32 31 3a c8  |=0:q%!12=1<<21:.|
00003c60  99 20 53 65 74 49 2c 2c  71 25 3a 71 25 21 34 3d  |. SetI,,q%:q%!4=|
00003c70  32 34 3a c8 99 20 53 65  74 49 2c 2c 71 25 0d 12  |24:.. SetI,,q%..|
00003c80  f2 05 cc 0d 12 fc 5d f2  6b 69 6c 6c 63 75 72 72  |......].killcurr|
00003c90  65 6e 74 28 22 32 38 22  29 3a 21 71 25 3d 6f 75  |ent("28"):!q%=ou|
00003ca0  74 70 75 74 25 3a 71 25  21 34 3d 31 38 3a 71 25  |tput%:q%!4=18:q%|
00003cb0  21 38 3d 30 3a 71 25 21  31 32 3d 31 3c 3c 32 31  |!8=0:q%!12=1<<21|
00003cc0  3a c8 99 20 53 65 74 49  2c 2c 71 25 3a 71 25 21  |:.. SetI,,q%:q%!|
00003cd0  34 3d 32 34 3a c8 99 20  53 65 74 49 2c 2c 71 25  |4=24:.. SetI,,q%|
00003ce0  0d 13 06 05 cd 0d 13 10  05 cd 0d 13 1a 3b c9 20  |.............;. |
00003cf0  31 38 3a 21 71 25 3d 6f  75 74 70 75 74 25 3a 71  |18:!q%=output%:q|
00003d00  25 21 34 3d 32 34 3a 71  25 21 38 3d 30 3a 71 25  |%!4=24:q%!8=0:q%|
00003d10  21 31 32 3d 31 3c 3c 32  31 3a c8 99 20 53 65 74  |!12=1<<21:.. Set|
00003d20  49 2c 2c 71 25 0d 13 24  7f c9 20 32 34 3a 21 71  |I,,q%..$.. 24:!q|
00003d30  25 3d 6f 75 74 70 75 74  25 3a 71 25 21 34 3d 31  |%=output%:q%!4=1|
00003d40  38 3a 71 25 21 38 3d 30  3a 71 25 21 31 32 3d 31  |8:q%!8=0:q%!12=1|
00003d50  3c 3c 32 31 3a c8 99 20  53 65 74 49 2c 2c 71 25  |<<21:.. SetI,,q%|
00003d60  3a f2 6b 69 6c 6c 63 75  72 72 65 6e 74 28 a4 64  |:.killcurrent(.d|
00003d70  65 64 75 63 65 6d 6f 64  65 29 3a c8 99 20 43 61  |educemode):.. Ca|
00003d80  72 65 74 70 6f 73 25 2c  6f 75 74 70 75 74 25 2c  |retpos%,output%,|
00003d90  33 34 2c 2c 2c 2d 31 2c  a9 28 24 6f 6c 64 6d 6f  |34,,,-1,.($oldmo|
00003da0  64 65 25 29 0d 13 2e 42  c9 20 33 34 3a e7 20 6d  |de%)...B. 34:. m|
00003db0  6f 76 65 64 25 20 c8 99  20 43 61 72 65 74 70 6f  |oved% .. Caretpo|
00003dc0  73 25 2c 6f 75 74 70 75  74 25 2c 71 25 21 34 2c  |s%,output%,q%!4,|
00003dd0  71 25 21 38 2c 71 25 21  31 32 2c 71 25 21 31 36  |q%!8,q%!12,q%!16|
00003de0  2c 71 25 21 32 30 0d 13  38 42 c9 20 31 39 3a e7  |,q%!20..8B. 19:.|
00003df0  20 6d 6f 76 65 64 25 20  c8 99 20 43 61 72 65 74  | moved% .. Caret|
00003e00  70 6f 73 25 2c 6f 75 74  70 75 74 25 2c 71 25 21  |pos%,output%,q%!|
00003e10  34 2c 71 25 21 38 2c 71  25 21 31 32 2c 71 25 21  |4,q%!8,q%!12,q%!|
00003e20  31 36 2c 71 25 21 32 30  0d 13 42 05 cb 0d 13 4c  |16,q%!20..B....L|
00003e30  33 e7 a4 67 65 74 69 63  6f 6e 73 74 61 74 65 28  |3..geticonstate(|
00003e40  6f 75 74 70 75 74 25 2c  31 38 29 20 24 61 64 6d  |output%,18) $adm|
00003e50  6f 64 65 25 3d a4 64 65  64 75 63 65 6d 6f 64 65  |ode%=.deducemode|
00003e60  0d 13 56 32 21 71 25 3d  6f 75 74 70 75 74 25 3a  |..V2!q%=output%:|
00003e70  71 25 21 34 3d 32 30 3a  71 25 21 38 3d 30 3a 71  |q%!4=20:q%!8=0:q|
00003e80  25 21 31 32 3d 30 3a c8  99 20 53 65 74 49 2c 2c  |%!12=0:.. SetI,,|
00003e90  71 25 0d 13 60 13 f2 73  68 6f 77 73 63 61 6c 65  |q%..`..showscale|
00003ea0  74 6f 66 69 74 0d 13 6a  16 c9 20 73 61 76 65 25  |tofit..j.. save%|
00003eb0  3a c8 8e 20 69 63 6f 6e  25 20 ca 0d 13 74 13 c9  |:.. icon% ...t..|
00003ec0  20 32 3a f2 73 61 76 65  73 70 72 69 74 65 0d 13  | 2:.savesprite..|
00003ed0  7e 05 cb 0d 13 88 4d c9  20 2d 32 3a e7 73 70 72  |~.....M. -2:.spr|
00003ee0  69 74 65 25 20 f2 67 65  74 77 28 70 69 63 25 29  |ite% .getw(pic%)|
00003ef0  3a f2 6f 70 65 6e 5f 77  69 6e 64 6f 77 28 70 69  |:.open_window(pi|
00003f00  63 25 2c 78 30 25 2c 79  30 25 2c 78 31 25 2c 79  |c%,x0%,y0%,x1%,y|
00003f10  31 25 2c 73 63 78 25 2c  73 63 79 25 2c 2d 31 29  |1%,scx%,scy%,-1)|
00003f20  0d 13 92 18 c9 20 6a 70  65 67 6f 25 3a e7 20 64  |..... jpego%:. d|
00003f30  65 73 74 25 3d 31 20 8c  0d 13 9c 14 c8 99 20 47  |est%=1 ....... G|
00003f40  65 74 63 61 72 65 74 25  2c 2c 71 25 0d 13 a6 b9  |etcaret%,,q%....|
00003f50  64 65 73 74 25 3d 30 3a  f2 64 6f 6d 65 6e 75 28  |dest%=0:.domenu(|
00003f60  31 30 31 2c 6d 24 28 31  30 29 2b 22 3e 69 6e 66  |101,m$(10)+">inf|
00003f70  6f 77 25 2c 22 2b 6d 24  28 31 31 29 2b 22 3e 73  |ow%,"+m$(11)+">s|
00003f80  63 61 6c 65 77 25 2c 22  2b 6d 24 28 31 32 29 2b  |calew%,"+m$(12)+|
00003f90  22 3e 70 72 6f 63 25 2c  22 2b 6d 24 28 31 33 29  |">proc%,"+m$(13)|
00003fa0  2b 22 3e 6f 75 74 70 75  74 25 3a 64 65 73 74 25  |+">output%:dest%|
00003fb0  2c 22 2b 6d 24 28 32 37  29 2b 22 3e 6a 70 65 67  |,"+m$(27)+">jpeg|
00003fc0  6f 25 3a 31 2d 64 65 73  74 25 2c 22 2b 6d 24 28  |o%:1-dest%,"+m$(|
00003fd0  39 29 2b 22 2c 22 2b 6d  24 28 31 34 29 2b 22 3a  |9)+","+m$(14)+":|
00003fe0  66 61 73 74 25 41 4e 44  31 2c 22 2b 6d 24 28 31  |fast%AND1,"+m$(1|
00003ff0  35 29 2b 22 2c 22 2b 6d  24 28 31 36 29 2c 6d 24  |5)+","+m$(16),m$|
00004000  28 32 30 29 29 0d 13 b0  3d e7 20 69 63 6f 6e 25  |(20))...=. icon%|
00004010  3d 35 20 c8 99 20 43 61  72 65 74 70 6f 73 25 2c  |=5 .. Caretpos%,|
00004020  6a 70 65 67 6f 25 2c 71  25 21 34 2c 71 25 21 38  |jpego%,q%!4,q%!8|
00004030  2c 71 25 21 31 32 2c 71  25 21 31 36 2c 71 25 21  |,q%!12,q%!16,q%!|
00004040  32 30 0d 13 ba 05 cd 0d  13 c4 0e c8 8e 20 69 63  |20........... ic|
00004050  6f 6e 25 20 ca 0d 13 ce  44 c9 20 33 3a e7 20 62  |on% ....D. 3:. b|
00004060  25 80 34 20 8c 24 61 64  6a 70 65 67 71 25 3d c3  |%.4 .$adjpegq%=.|
00004070  28 bb 24 61 64 6a 70 65  67 71 25 2d 31 29 20 8b  |(.$adjpegq%-1) .|
00004080  24 61 64 6a 70 65 67 71  25 3d c3 28 bb 24 61 64  |$adjpegq%=.(.$ad|
00004090  6a 70 65 67 71 25 2b 31  29 0d 13 d8 20 e7 20 bb  |jpegq%+1)... . .|
000040a0  24 61 64 6a 70 65 67 71  25 3c 30 20 24 61 64 6a  |$adjpegq%<0 $adj|
000040b0  70 65 67 71 25 3d 22 30  22 0d 13 e2 24 e7 20 bb  |pegq%="0"...$. .|
000040c0  24 61 64 6a 70 65 67 71  25 3e 31 30 30 20 24 61  |$adjpegq%>100 $a|
000040d0  64 6a 70 65 67 71 25 3d  22 31 30 30 22 0d 13 ec  |djpegq%="100"...|
000040e0  30 21 71 25 3d 6a 70 65  67 6f 25 3a 71 25 21 34  |0!q%=jpego%:q%!4|
000040f0  3d 35 3a 71 25 21 38 3d  30 3a 71 25 21 31 32 3d  |=5:q%!8=0:q%!12=|
00004100  30 3a c8 99 20 53 65 74  49 2c 2c 71 25 0d 13 f6  |0:.. SetI,,q%...|
00004110  29 c8 99 20 43 61 72 65  74 70 6f 73 25 2c 6a 70  |).. Caretpos%,jp|
00004120  65 67 6f 25 2c 35 2c 2c  2c 2d 31 2c a9 24 61 64  |ego%,5,,,-1,.$ad|
00004130  6a 70 65 67 71 25 0d 14  00 44 c9 20 34 3a e7 20  |jpegq%...D. 4:. |
00004140  62 25 80 34 20 8c 24 61  64 6a 70 65 67 71 25 3d  |b%.4 .$adjpegq%=|
00004150  c3 28 bb 24 61 64 6a 70  65 67 71 25 2b 31 29 20  |.(.$adjpegq%+1) |
00004160  8b 24 61 64 6a 70 65 67  71 25 3d c3 28 bb 24 61  |.$adjpegq%=.(.$a|
00004170  64 6a 70 65 67 71 25 2d  31 29 0d 14 0a 20 e7 20  |djpegq%-1)... . |
00004180  bb 24 61 64 6a 70 65 67  71 25 3c 30 20 24 61 64  |.$adjpegq%<0 $ad|
00004190  6a 70 65 67 71 25 3d 22  30 22 0d 14 14 24 e7 20  |jpegq%="0"...$. |
000041a0  bb 24 61 64 6a 70 65 67  71 25 3e 31 30 30 20 24  |.$adjpegq%>100 $|
000041b0  61 64 6a 70 65 67 71 25  3d 22 31 30 30 22 0d 14  |adjpegq%="100"..|
000041c0  1e 30 21 71 25 3d 6a 70  65 67 6f 25 3a 71 25 21  |.0!q%=jpego%:q%!|
000041d0  34 3d 35 3a 71 25 21 38  3d 30 3a 71 25 21 31 32  |4=5:q%!8=0:q%!12|
000041e0  3d 30 3a c8 99 20 53 65  74 49 2c 2c 71 25 0d 14  |=0:.. SetI,,q%..|
000041f0  28 29 c8 99 20 43 61 72  65 74 70 6f 73 25 2c 6a  |().. Caretpos%,j|
00004200  70 65 67 6f 25 2c 35 2c  2c 2c 2d 31 2c a9 24 61  |pego%,5,,,-1,.$a|
00004210  64 6a 70 65 67 71 25 0d  14 32 07 c9 20 35 0d 14  |djpegq%..2.. 5..|
00004220  3c 05 cb 0d 14 46 05 cb  0d 14 50 05 cd 0d 14 5a  |<....F....P....Z|
00004230  0d e7 62 25 80 26 35 30  20 8c 0d 14 64 10 c8 8e  |..b%.&50 ...d...|
00004240  20 68 61 6e 64 6c 65 25  20 ca 0d 14 6e 16 c9 20  | handle% ...n.. |
00004250  73 61 76 65 25 3a c8 8e  20 69 63 6f 6e 25 20 ca  |save%:.. icon% .|
00004260  0d 14 78 14 c9 20 30 3a  f2 67 65 74 77 28 73 61  |..x.. 0:.getw(sa|
00004270  76 65 25 29 0d 14 82 20  21 71 25 3d 73 61 76 65  |ve%)... !q%=save|
00004280  25 3a 71 25 21 34 3d 30  3a c8 99 20 47 65 74 49  |%:q%!4=0:.. GetI|
00004290  2c 2c 71 25 0d 14 8c 3f  21 71 25 3d 73 61 76 65  |,,q%...?!q%=save|
000042a0  25 3a 71 25 21 34 3d 35  3a 71 25 21 38 2b 3d 62  |%:q%!4=5:q%!8+=b|
000042b0  78 25 3a 71 25 21 31 32  2b 3d 62 79 25 3a 71 25  |x%:q%!12+=by%:q%|
000042c0  21 31 36 2b 3d 62 78 25  3a 71 25 21 32 30 2b 3d  |!16+=bx%:q%!20+=|
000042d0  62 79 25 0d 14 96 33 71  25 21 32 34 3d 30 3a 71  |by%...3q%!24=0:q|
000042e0  25 21 32 38 3d 30 3a 71  25 21 33 32 3d 26 37 46  |%!28=0:q%!32=&7F|
000042f0  46 46 46 46 46 46 3a 71  25 21 33 36 3d 26 37 46  |FFFFFF:q%!36=&7F|
00004300  46 46 46 46 46 46 0d 14  a0 2a 74 24 3d 22 66 69  |FFFFFF...*t$="fi|
00004310  6c 65 5f 66 66 39 22 3a  e7 6a 70 65 67 73 61 76  |le_ff9":.jpegsav|
00004320  65 25 20 74 24 3d 22 66  69 6c 65 5f 63 38 35 22  |e% t$="file_c85"|
00004330  0d 14 aa 48 e7 64 73 74  61 72 74 25 20 c8 99 20  |...H.dstart% .. |
00004340  64 73 74 61 72 74 25 2c  25 31 31 30 30 30 31 30  |dstart%,%1100010|
00004350  31 2c 31 2c 74 24 2c 71  25 2b 38 2c 71 25 2b 32  |1,1,t$,q%+8,q%+2|
00004360  34 20 8b c8 99 20 22 57  69 6d 70 5f 44 72 61 67  |4 ... "Wimp_Drag|
00004370  42 6f 78 22 2c 2c 71 25  0d 14 b4 05 cb 0d 14 be  |Box",,q%........|
00004380  05 cb 0d 14 c8 05 cd 0d  14 d2 05 e1 0d 14 e6 14  |................|
00004390  dd 20 f2 64 6f 7a 6f 6f  6d 28 73 25 2c 61 25 29  |. .dozoom(s%,a%)|
000043a0  0d 14 f0 0b e7 73 25 3d  30 20 8c 0d 14 fa 2f 24  |.....s%=0 ..../$|
000043b0  7a 25 28 30 29 3d c3 28  bb 24 7a 25 28 30 29 2b  |z%(0)=.(.$z%(0)+|
000043c0  61 25 29 3a e7 24 7a 25  28 30 29 3d 22 30 22 20  |a%):.$z%(0)="0" |
000043d0  24 7a 25 28 30 29 3d 22  31 22 0d 15 04 05 cc 0d  |$z%(0)="1"......|
000043e0  15 0e 2f 24 7a 25 28 31  29 3d c3 28 bb 24 7a 25  |../$z%(1)=.(.$z%|
000043f0  28 31 29 2b 61 25 29 3a  e7 24 7a 25 28 31 29 3d  |(1)+a%):.$z%(1)=|
00004400  22 30 22 20 24 7a 25 28  31 29 3d 22 31 22 0d 15  |"0" $z%(1)="1"..|
00004410  18 05 cd 0d 15 22 32 21  71 25 3d 7a 6f 6f 6d 25  |....."2!q%=zoom%|
00004420  3a 71 25 21 34 3d 34 2b  73 25 3a 71 25 21 38 3d  |:q%!4=4+s%:q%!8=|
00004430  30 3a 71 25 21 31 32 3d  30 3a c8 99 20 53 65 74  |0:q%!12=0:.. Set|
00004440  49 2c 2c 71 25 0d 15 2c  2f 21 71 25 3d 70 69 63  |I,,q%..,/!q%=pic|
00004450  25 3a c8 99 20 47 65 74  57 2c 2c 71 25 3a 66 25  |%:.. GetW,,q%:f%|
00004460  3d 71 25 21 32 38 3a c8  99 20 26 34 30 30 63 33  |=q%!28:.. &400c3|
00004470  2c 2c 71 25 0d 15 36 1f  70 69 63 25 3d a4 63 72  |,,q%..6.pic%=.cr|
00004480  65 61 74 65 5f 77 69 6e  64 6f 77 28 78 2c 79 2c  |eate_window(x,y,|
00004490  46 24 29 0d 15 40 13 f2  70 6f 70 75 70 28 70 69  |F$)..@..popup(pi|
000044a0  63 25 2c 66 25 29 0d 15  4a 05 e1 0d 15 5e 27 dd  |c%,f%)..J....^'.|
000044b0  20 f2 64 6f 6d 65 6e 75  28 68 61 6e 64 6c 65 25  | .domenu(handle%|
000044c0  2c 6d 65 6e 75 24 2c 6d  65 6e 75 74 69 74 6c 65  |,menu$,menutitle|
000044d0  24 29 0d 15 68 17 6d 65  6e 75 68 61 6e 64 6c 65  |$)..h.menuhandle|
000044e0  25 3d 68 61 6e 64 6c 65  25 0d 15 72 25 6d 65 6e  |%=handle%..r%men|
000044f0  75 70 74 72 25 3d 62 75  66 66 65 72 25 3a 69 6e  |uptr%=buffer%:in|
00004500  64 69 72 65 63 74 25 3d  69 64 61 74 61 25 0d 15  |direct%=idata%..|
00004510  7c 08 69 25 3d 30 0d 15  86 12 6d 65 6e 75 70 74  ||.i%=0....menupt|
00004520  72 25 21 32 30 3d 34 34  0d 15 90 18 24 6d 65 6e  |r%!20=44....$men|
00004530  75 70 74 72 25 3d 6d 65  6e 75 74 69 74 6c 65 24  |uptr%=menutitle$|
00004540  0d 15 9a 3b 6d 65 6e 75  70 74 72 25 3f 31 32 3d  |...;menuptr%?12=|
00004550  37 3a 6d 65 6e 75 70 74  72 25 3f 31 33 3d 32 3a  |7:menuptr%?13=2:|
00004560  6d 65 6e 75 70 74 72 25  3f 31 34 3d 37 3a 6d 65  |menuptr%?14=7:me|
00004570  6e 75 70 74 72 25 3f 31  35 3d 30 0d 15 a4 21 6d  |nuptr%?15=0...!m|
00004580  65 6e 75 70 74 72 25 21  31 36 3d 32 30 30 3a 6d  |enuptr%!16=200:m|
00004590  65 6e 75 70 74 72 25 21  32 34 3d 30 0d 15 ae 10  |enuptr%!24=0....|
000045a0  6d 65 6e 75 70 74 72 25  2b 3d 32 38 0d 15 b8 25  |menuptr%+=28...%|
000045b0  f5 20 69 31 25 3d 69 25  2b 31 3a 69 25 3d a7 6d  |. i1%=i%+1:i%=.m|
000045c0  65 6e 75 24 2b 22 2c 22  2c 22 2c 22 2c 69 31 25  |enu$+",",",",i1%|
000045d0  29 0d 15 c2 38 69 74 65  6d 24 3d c1 6d 65 6e 75  |)...8item$=.menu|
000045e0  24 2c 69 31 25 2c 69 25  2d 69 31 25 29 3a f2 6d  |$,i1%,i%-i1%):.m|
000045f0  65 6e 75 69 74 65 6d 28  69 74 65 6d 24 29 3a fd  |enuitem(item$):.|
00004600  20 69 74 65 6d 24 3d 22  22 0d 15 cc 23 6d 65 6e  | item$=""...#men|
00004610  75 70 74 72 25 21 2d 32  34 3d 28 6d 65 6e 75 70  |uptr%!-24=(menup|
00004620  74 72 25 21 2d 32 34 29  84 26 38 30 0d 15 d6 60  |tr%!-24).&80...`|
00004630  e7 68 61 6e 64 6c 65 25  3d 31 30 31 20 c8 99 20  |.handle%=101 .. |
00004640  43 72 4d 65 6e 75 2c 2c  62 75 66 66 65 72 25 2c  |CrMenu,,buffer%,|
00004650  6d 6f 75 73 65 78 25 2d  36 34 2c 39 36 2b 39 2a  |mousex%-64,96+9*|
00004660  34 34 20 8b c8 99 20 43  72 4d 65 6e 75 2c 2c 62  |44 ... CrMenu,,b|
00004670  75 66 66 65 72 25 2c 6d  6f 75 73 65 78 25 2d 33  |uffer%,mousex%-3|
00004680  32 2c 6d 6f 75 73 65 79  25 2b 31 36 0d 15 e0 05  |2,mousey%+16....|
00004690  e1 0d 15 f4 16 dd 20 f2  6d 65 6e 75 69 74 65 6d  |...... .menuitem|
000046a0  28 74 65 78 74 24 29 0d  15 fe 10 e7 20 74 65 78  |(text$)..... tex|
000046b0  74 24 3d 22 22 20 e1 0d  16 08 2a 66 6c 67 25 3d  |t$="" ....*flg%=|
000046c0  30 3a 73 75 62 6d 65 6e  75 25 3d 2d 31 3a 49 25  |0:submenu%=-1:I%|
000046d0  3d a7 74 65 78 74 24 2c  22 3a 22 29 3a e7 49 25  |=.text$,":"):.I%|
000046e0  8c 0d 16 12 29 66 6c 67  25 3d a0 c1 74 65 78 74  |....)flg%=..text|
000046f0  24 2c 49 25 2b 31 29 3a  74 65 78 74 24 3d c0 74  |$,I%+1):text$=.t|
00004700  65 78 74 24 2c 49 25 2d  31 29 0d 16 1c 05 cd 0d  |ext$,I%-1)......|
00004710  16 26 17 49 25 3d a7 74  65 78 74 24 2c 22 3e 22  |.&.I%=.text$,">"|
00004720  29 3a e7 49 25 8c 0d 16  30 2d 73 75 62 6d 65 6e  |):.I%...0-submen|
00004730  75 25 3d a0 c1 74 65 78  74 24 2c 49 25 2b 31 29  |u%=..text$,I%+1)|
00004740  3a 74 65 78 74 24 3d c0  74 65 78 74 24 2c 49 25  |:text$=.text$,I%|
00004750  2d 31 29 0d 16 3a 05 cd  0d 16 44 13 6d 65 6e 75  |-1)..:....D.menu|
00004760  70 74 72 25 21 30 3d 66  6c 67 25 0d 16 4e 17 6d  |ptr%!0=flg%..N.m|
00004770  65 6e 75 70 74 72 25 21  34 3d 73 75 62 6d 65 6e  |enuptr%!4=submen|
00004780  75 25 0d 16 58 56 e7 28  74 65 78 74 24 3d 6d 24  |u%..XV.(text$=m$|
00004790  28 39 29 80 28 46 24 3d  22 22 20 84 20 46 24 3d  |(9).(F$="" . F$=|
000047a0  22 53 70 72 69 74 65 46  69 6c 65 22 20 84 20 46  |"SpriteFile" . F|
000047b0  24 3d 22 4a 50 45 47 49  6d 61 67 65 22 29 29 20  |$="JPEGImage")) |
000047c0  84 20 28 74 65 78 74 24  3d 6d 24 28 31 34 29 80  |. (text$=m$(14).|
000047d0  76 72 61 6d 25 29 20 8c  0d 16 62 18 6d 65 6e 75  |vram%) ...b.menu|
000047e0  70 74 72 25 21 38 3d 26  30 37 34 30 30 30 32 31  |ptr%!8=&07400021|
000047f0  0d 16 6c 05 cc 0d 16 76  18 6d 65 6e 75 70 74 72  |..l....v.menuptr|
00004800  25 21 38 3d 26 30 37 30  30 30 30 32 31 0d 16 80  |%!8=&07000021...|
00004810  05 cd 0d 16 8a 32 e7 a9  74 65 78 74 24 2a 31 36  |.....2..text$*16|
00004820  2b 38 3e 62 75 66 66 65  72 25 21 31 36 20 62 75  |+8>buffer%!16 bu|
00004830  66 66 65 72 25 21 31 36  3d a9 74 65 78 74 24 2a  |ffer%!16=.text$*|
00004840  31 36 2b 38 0d 16 94 10  e7 a9 74 65 78 74 24 3e  |16+8......text$>|
00004850  31 32 20 8c 0d 16 9e 42  6d 65 6e 75 70 74 72 25  |12 ....Bmenuptr%|
00004860  21 38 3d 6d 65 6e 75 70  74 72 25 21 38 20 84 20  |!8=menuptr%!8 . |
00004870  32 35 36 3a 6d 65 6e 75  70 74 72 25 21 32 30 3d  |256:menuptr%!20=|
00004880  a9 74 65 78 74 24 2b 31  3a 6d 65 6e 75 70 74 72  |.text$+1:menuptr|
00004890  25 21 31 36 3d 30 0d 16  a8 3e 6d 65 6e 75 70 74  |%!16=0...>menupt|
000048a0  72 25 21 31 32 3d 69 6e  64 69 72 65 63 74 25 3a  |r%!12=indirect%:|
000048b0  24 69 6e 64 69 72 65 63  74 25 3d 74 65 78 74 24  |$indirect%=text$|
000048c0  3a 69 6e 64 69 72 65 63  74 25 2b 3d a9 74 65 78  |:indirect%+=.tex|
000048d0  74 24 2b 32 0d 16 b2 05  cc 0d 16 bc 18 24 28 6d  |t$+2.........$(m|
000048e0  65 6e 75 70 74 72 25 2b  31 32 29 3d 74 65 78 74  |enuptr%+12)=text|
000048f0  24 0d 16 c6 05 cd 0d 16  d0 10 6d 65 6e 75 70 74  |$.........menupt|
00004900  72 25 2b 3d 32 34 0d 16  da 05 e1 0d 16 ee 19 dd  |r%+=24..........|
00004910  20 f2 6d 65 6e 75 73 65  6c 65 63 74 28 6d 65 6e  | .menuselect(men|
00004920  75 73 25 29 0d 16 f8 2c  c8 99 20 47 65 74 50 2c  |us%)...,.. GetP,|
00004930  2c 70 61 6c 74 65 6d 70  25 3a 61 64 6a 75 73 74  |,paltemp%:adjust|
00004940  25 3d 70 61 6c 74 65 6d  70 25 21 38 20 80 20 31  |%=paltemp%!8 . 1|
00004950  0d 17 02 2d c8 99 20 44  63 4d 65 6e 75 2c 2c 62  |...-.. DcMenu,,b|
00004960  75 66 66 65 72 25 2c 6d  65 6e 75 73 25 2c c4 32  |uffer%,menus%,.2|
00004970  30 30 2c 22 20 22 29 b8  2c 2c 2c 61 24 0d 17 0c  |00," ").,,,a$...|
00004980  0e e7 20 61 24 3d 22 22  20 8c e1 0d 17 16 14 c8  |.. a$="" .......|
00004990  8e 20 6d 65 6e 75 68 61  6e 64 6c 65 25 20 ca 0d  |. menuhandle% ..|
000049a0  17 20 0a c9 20 70 69 63  25 0d 17 2a 0b c8 8e 20  |. .. pic%..*... |
000049b0  61 24 20 ca 0d 17 34 14  c9 20 6d 24 28 39 29 3a  |a$ ...4.. m$(9):|
000049c0  f2 63 61 6c 6c 46 53 49  0d 17 3e 05 cb 0d 17 48  |.callFSI..>....H|
000049d0  09 c9 20 31 30 31 0d 17  52 0b c8 8e 20 61 24 20  |.. 101..R... a$ |
000049e0  ca 0d 17 5c 19 c9 20 6d  24 28 31 34 29 3a 66 61  |...\.. m$(14):fa|
000049f0  73 74 25 3d ac 66 61 73  74 25 0d 17 66 14 c9 20  |st%=.fast%..f.. |
00004a00  6d 24 28 32 37 29 3a 64  65 73 74 25 3d 30 0d 17  |m$(27):dest%=0..|
00004a10  70 14 c9 20 6d 24 28 31  33 29 3a 64 65 73 74 25  |p.. m$(13):dest%|
00004a20  3d 31 0d 17 7a 14 c9 20  6d 24 28 39 29 3a f2 63  |=1..z.. m$(9):.c|
00004a30  61 6c 6c 46 53 49 0d 17  84 0c c9 20 6d 24 28 31  |allFSI..... m$(1|
00004a40  35 29 0d 17 8e 46 73 74  61 74 65 73 63 61 6c 65  |5)...Fstatescale|
00004a50  25 3d 30 3a e3 49 25 3d  30 b8 39 3a 73 74 61 74  |%=0:.I%=0.9:stat|
00004a60  65 73 63 61 6c 65 25 2b  3d a4 67 65 74 69 63 6f  |escale%+=.getico|
00004a70  6e 73 74 61 74 65 28 73  63 61 6c 65 77 25 2c 49  |nstate(scalew%,I|
00004a80  25 29 3c 3c 49 25 3a ed  0d 17 98 3c e3 49 25 3d  |%)<<I%:....<.I%=|
00004a90  31 30 b8 31 33 3a 73 74  61 74 65 73 63 61 6c 65  |10.13:statescale|
00004aa0  25 2b 3d a4 67 65 74 69  63 6f 6e 73 74 61 74 65  |%+=.geticonstate|
00004ab0  28 73 63 61 6c 65 77 25  2c 49 25 2b 36 29 3c 3c  |(scalew%,I%+6)<<|
00004ac0  49 25 3a ed 0d 17 a2 42  73 74 61 74 65 70 72 6f  |I%:....Bstatepro|
00004ad0  63 25 3d 30 3a e3 49 25  3d 30 b8 37 3a 73 74 61  |c%=0:.I%=0.7:sta|
00004ae0  74 65 70 72 6f 63 25 2b  3d a4 67 65 74 69 63 6f  |teproc%+=.getico|
00004af0  6e 73 74 61 74 65 28 70  72 6f 63 25 2c 49 25 29  |nstate(proc%,I%)|
00004b00  3c 3c 49 25 3a ed 0d 17  ac 49 73 74 61 74 65 6f  |<<I%:....Istateo|
00004b10  75 74 70 75 74 25 3d 30  3a e3 49 25 3d 30 b8 32  |utput%=0:.I%=0.2|
00004b20  36 3a 73 74 61 74 65 6f  75 74 70 75 74 25 2b 3d  |6:stateoutput%+=|
00004b30  a4 67 65 74 69 63 6f 6e  73 74 61 74 65 28 6f 75  |.geticonstate(ou|
00004b40  74 70 75 74 25 2c 49 25  29 3c 3c 49 25 3a ed 0d  |tput%,I%)<<I%:..|
00004b50  17 b6 43 73 74 61 74 65  6a 70 65 67 25 3d 30 3a  |..Cstatejpeg%=0:|
00004b60  e3 49 25 3d 30 b8 33 3a  73 74 61 74 65 6a 70 65  |.I%=0.3:statejpe|
00004b70  67 25 2b 3d a4 67 65 74  69 63 6f 6e 73 74 61 74  |g%+=.geticonstat|
00004b80  65 28 6a 70 65 67 6f 25  2c 49 25 29 3c 3c 49 25  |e(jpego%,I%)<<I%|
00004b90  3a ed 0d 17 c0 21 41 25  3d ae 22 3c 43 68 61 6e  |:....!A%=."<Chan|
00004ba0  67 65 46 53 49 24 44 69  72 3e 2e 43 68 6f 69 63  |geFSI$Dir>.Choic|
00004bb0  65 73 22 0d 17 ca 57 f1  23 41 25 2c 66 61 73 74  |es"...W.#A%,fast|
00004bc0  25 2c 64 65 73 74 25 2c  73 74 61 74 65 73 63 61  |%,dest%,statesca|
00004bd0  6c 65 25 2c 73 74 61 74  65 70 72 6f 63 25 2c 73  |le%,stateproc%,s|
00004be0  74 61 74 65 6f 75 74 70  75 74 25 2c 73 74 61 74  |tateoutput%,stat|
00004bf0  65 6a 70 65 67 25 2c 24  61 64 6a 70 65 67 71 25  |ejpeg%,$adjpegq%|
00004c00  2c 24 6f 6c 64 6d 6f 64  65 25 0d 17 d4 5a f1 23  |,$oldmode%...Z.#|
00004c10  41 25 2c 24 70 25 28 30  29 2c a4 6c 6f 63 61 6c  |A%,$p%(0),.local|
00004c20  65 5f 63 6f 6e 76 65 72  74 28 24 70 25 28 31 29  |e_convert($p%(1)|
00004c30  2c 64 65 63 69 6d 61 6c  5f 70 6f 69 6e 74 24 2c  |,decimal_point$,|
00004c40  22 2e 22 29 2c 24 70 25  28 32 29 2c 24 70 25 28  |"."),$p%(2),$p%(|
00004c50  33 29 2c 24 61 64 6d 6f  64 65 25 2c 24 61 64 73  |3),$admode%,$ads|
00004c60  70 63 6c 25 0d 17 de 24  f1 23 41 25 2c 24 73 25  |pcl%...$.#A%,$s%|
00004c70  28 30 29 2c 24 73 25 28  31 29 2c 24 73 25 28 32  |(0),$s%(1),$s%(2|
00004c80  29 2c 24 73 25 28 33 29  0d 17 e8 08 d9 23 41 25  |),$s%(3).....#A%|
00004c90  0d 17 f2 1c c9 20 6d 24  28 31 36 29 3a f2 63 68  |..... m$(16):.ch|
00004ca0  65 63 6b 61 6e 64 66 69  6e 69 73 68 0d 17 fc 05  |eckandfinish....|
00004cb0  cb 0d 18 06 05 cb 0d 18  10 30 e7 61 64 6a 75 73  |.........0.adjus|
00004cc0  74 25 20 f2 63 68 65 63  6b 6d 6f 75 73 65 28 30  |t% .checkmouse(0|
00004cd0  2c 30 2c 32 2c 72 6d 65  6e 75 68 61 6e 64 6c 65  |,0,2,rmenuhandle|
00004ce0  25 2c 30 2c 30 29 0d 18  1a 05 e1 0d 18 2e 20 dd  |%,0,0)........ .|
00004cf0  20 a4 63 72 65 61 74 65  5f 77 69 6e 64 6f 77 28  | .create_window(|
00004d00  78 2c 79 2c 74 69 74 6c  65 24 29 0d 18 38 2b 78  |x,y,title$)..8+x|
00004d10  3d 78 2a bb 24 7a 25 28  30 29 81 bb 24 7a 25 28  |=x*.$z%(0)..$z%(|
00004d20  31 29 3a 79 3d 79 2a bb  24 7a 25 28 30 29 81 bb  |1):y=y*.$z%(0)..|
00004d30  24 7a 25 28 31 29 0d 18  42 20 21 7a 25 3d 30 3a  |$z%(1)..B !z%=0:|
00004d40  7a 25 21 34 3d 2d 79 3a  7a 25 21 38 3d 78 3a 7a  |z%!4=-y:z%!8=x:z|
00004d50  25 21 31 32 3d 30 0d 18  4c 24 7a 25 21 34 30 3d  |%!12=0..L$z%!40=|
00004d60  30 3a 7a 25 21 34 34 3d  2d 79 3a 7a 25 21 34 38  |0:z%!44=-y:z%!48|
00004d70  3d 78 3a 7a 25 21 35 32  3d 30 0d 18 56 25 e7 78  |=x:z%!52=0..V%.x|
00004d80  3c 31 32 38 20 84 20 79  3c 31 32 38 20 7a 25 3f  |<128 . y<128 z%?|
00004d90  33 35 3d 30 20 8b 7a 25  3f 33 35 3d 32 35 35 0d  |35=0 .z%?35=255.|
00004da0  18 60 29 24 61 64 74 69  74 6c 65 25 3d 22 22 3a  |.`)$adtitle%="":|
00004db0  c8 99 20 43 72 65 61 74  65 57 2c 2c 7a 25 20 b8  |.. CreateW,,z% .|
00004dc0  20 68 61 6e 64 6c 65 25  0d 18 6a 14 24 61 64 74  | handle%..j.$adt|
00004dd0  69 74 6c 65 25 3d 74 69  74 6c 65 24 0d 18 74 0c  |itle%=title$..t.|
00004de0  3d 68 61 6e 64 6c 65 25  0d 18 88 18 dd 20 f2 70  |=handle%..... .p|
00004df0  6f 70 75 70 28 68 61 6e  64 6c 65 25 2c 66 25 29  |opup(handle%,f%)|
00004e00  0d 18 92 31 c8 99 20 22  4f 53 5f 52 65 61 64 4d  |...1.. "OS_ReadM|
00004e10  6f 64 65 56 61 72 69 61  62 6c 65 22 2c 2d 31 2c  |odeVariable",-1,|
00004e20  34 20 b8 20 2c 2c 6d 6f  64 65 78 73 68 69 66 74  |4 . ,,modexshift|
00004e30  25 0d 18 9c 31 c8 99 20  22 4f 53 5f 52 65 61 64  |%...1.. "OS_Read|
00004e40  4d 6f 64 65 56 61 72 69  61 62 6c 65 22 2c 2d 31  |ModeVariable",-1|
00004e50  2c 35 20 b8 20 2c 2c 6d  6f 64 65 79 73 68 69 66  |,5 . ,,modeyshif|
00004e60  74 25 0d 18 a6 30 c8 99  20 22 4f 53 5f 52 65 61  |t%...0.. "OS_Rea|
00004e70  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 2d  |dModeVariable",-|
00004e80  31 2c 31 31 20 b8 20 2c  2c 72 69 67 68 74 73 63  |1,11 . ,,rightsc|
00004e90  72 25 0d 18 b0 2e c8 99  20 22 4f 53 5f 52 65 61  |r%...... "OS_Rea|
00004ea0  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 2d  |dModeVariable",-|
00004eb0  31 2c 31 32 20 b8 20 2c  2c 74 6f 70 73 63 72 25  |1,12 . ,,topscr%|
00004ec0  0d 18 ba 41 72 69 67 68  74 73 63 72 25 3d 72 69  |...Arightscr%=ri|
00004ed0  67 68 74 73 63 72 25 3c  3c 6d 6f 64 65 78 73 68  |ghtscr%<<modexsh|
00004ee0  69 66 74 25 3a 74 6f 70  73 63 72 25 3d 74 6f 70  |ift%:topscr%=top|
00004ef0  73 63 72 25 3c 3c 6d 6f  64 65 79 73 68 69 66 74  |scr%<<modeyshift|
00004f00  25 0d 18 c4 12 f2 67 65  74 77 28 68 61 6e 64 6c  |%.....getw(handl|
00004f10  65 25 29 0d 18 ce 39 78  6f 25 3d 72 69 67 68 74  |e%)...9xo%=right|
00004f20  73 63 72 25 2f 32 2d 28  78 30 25 2b 78 31 25 29  |scr%/2-(x0%+x1%)|
00004f30  2f 32 3a 79 6f 25 3d 74  6f 70 73 63 72 25 2f 32  |/2:yo%=topscr%/2|
00004f40  2d 28 79 30 25 2b 79 31  25 29 2f 32 0d 18 d8 46  |-(y0%+y1%)/2...F|
00004f50  f2 6f 70 65 6e 5f 77 69  6e 64 6f 77 28 68 61 6e  |.open_window(han|
00004f60  64 6c 65 25 2c 78 30 25  2b 78 6f 25 2c 79 30 25  |dle%,x0%+xo%,y0%|
00004f70  2b 79 6f 25 2c 78 31 25  2b 78 6f 25 2c 79 31 25  |+yo%,x1%+xo%,y1%|
00004f80  2b 79 6f 25 2c 73 63 78  25 2c 73 63 79 25 2c 66  |+yo%,scx%,scy%,f|
00004f90  25 29 0d 18 e2 05 e1 0d  18 f6 3e dd 20 f2 6f 70  |%)........>. .op|
00004fa0  65 6e 5f 77 69 6e 64 6f  77 28 68 61 6e 64 6c 65  |en_window(handle|
00004fb0  25 2c 78 30 25 2c 79 30  25 2c 78 31 25 2c 79 31  |%,x0%,y0%,x1%,y1|
00004fc0  25 2c 73 63 78 25 2c 73  63 79 25 2c 62 68 61 6e  |%,scx%,scy%,bhan|
00004fd0  64 6c 65 25 29 0d 19 00  11 e7 68 61 6e 64 6c 65  |dle%).....handle|
00004fe0  25 3d 2d 31 8c e1 0d 19  0a 1f 71 25 21 30 3d 68  |%=-1......q%!0=h|
00004ff0  61 6e 64 6c 65 25 3a 71  25 21 32 38 3d 62 68 61  |andle%:q%!28=bha|
00005000  6e 64 6c 65 25 0d 19 14  29 71 25 21 34 3d 78 30  |ndle%...)q%!4=x0|
00005010  25 3a 71 25 21 38 3d 79  30 25 3a 71 25 21 31 32  |%:q%!8=y0%:q%!12|
00005020  3d 78 31 25 3a 71 25 21  31 36 3d 79 31 25 0d 19  |=x1%:q%!16=y1%..|
00005030  1e 19 71 25 21 32 30 3d  73 63 78 25 3a 71 25 21  |..q%!20=scx%:q%!|
00005040  32 34 3d 73 63 79 25 0d  19 28 10 c8 99 20 4f 70  |24=scy%..(... Op|
00005050  65 6e 57 2c 2c 71 25 0d  19 32 05 e1 0d 19 46 14  |enW,,q%..2....F.|
00005060  dd 20 f2 67 65 74 77 28  68 61 6e 64 6c 65 25 29  |. .getw(handle%)|
00005070  0d 19 50 1b 21 71 25 3d  68 61 6e 64 6c 65 25 3a  |..P.!q%=handle%:|
00005080  c8 99 20 47 65 74 57 2c  2c 71 25 0d 19 5a 2b f2  |.. GetW,,q%..Z+.|
00005090  69 6e 66 6f 28 71 25 2b  34 29 3a 62 68 61 6e 64  |info(q%+4):bhand|
000050a0  6c 65 25 3d 71 25 21 32  38 3a 66 6c 61 67 73 25  |le%=q%!28:flags%|
000050b0  3d 71 25 21 33 32 0d 19  64 05 e1 0d 19 78 0f dd  |=q%!32..d....x..|
000050c0  20 f2 69 6e 66 6f 28 71  25 29 0d 19 82 3d 78 30  | .info(q%)...=x0|
000050d0  25 3d 21 71 25 3a 79 30  25 3d 71 25 21 34 3a 78  |%=!q%:y0%=q%!4:x|
000050e0  31 25 3d 71 25 21 38 3a  79 31 25 3d 71 25 21 31  |1%=q%!8:y1%=q%!1|
000050f0  32 3a 73 63 78 25 3d 71  25 21 31 36 3a 73 63 79  |2:scx%=q%!16:scy|
00005100  25 3d 71 25 21 32 30 0d  19 8c 1d 62 78 25 3d 78  |%=q%!20....bx%=x|
00005110  30 25 2d 73 63 78 25 3a  62 79 25 3d 79 31 25 2d  |0%-scx%:by%=y1%-|
00005120  73 63 79 25 0d 19 96 05  e1 0d 19 aa 1d dd 20 f2  |scy%.......... .|
00005130  72 65 64 72 61 77 5f 77  69 6e 64 6f 77 28 68 61  |redraw_window(ha|
00005140  6e 64 6c 65 25 29 0d 19  b4 14 e7 20 68 61 6e 64  |ndle%)..... hand|
00005150  6c 65 25 3d 70 69 63 25  20 8c 0d 19 be 3f 21 66  |le%=pic% ....?!f|
00005160  61 63 74 6f 72 73 25 3d  21 69 66 61 63 74 6f 72  |actors%=!ifactor|
00005170  73 25 2a bb 24 7a 25 28  30 29 3a 66 61 63 74 6f  |s%*.$z%(0):facto|
00005180  72 73 25 21 34 3d 69 66  61 63 74 6f 72 73 25 21  |rs%!4=ifactors%!|
00005190  34 2a bb 24 7a 25 28 30  29 0d 19 c8 43 66 61 63  |4*.$z%(0)...Cfac|
000051a0  74 6f 72 73 25 21 38 3d  69 66 61 63 74 6f 72 73  |tors%!8=ifactors|
000051b0  25 21 38 2a bb 24 7a 25  28 31 29 3a 66 61 63 74  |%!8*.$z%(1):fact|
000051c0  6f 72 73 25 21 31 32 3d  69 66 61 63 74 6f 72 73  |ors%!12=ifactors|
000051d0  25 21 31 32 2a bb 24 7a  25 28 31 29 0d 19 d2 41  |%!12*.$z%(1)...A|
000051e0  f2 72 65 64 75 63 65 28  21 66 61 63 74 6f 72 73  |.reduce(!factors|
000051f0  25 2c 66 61 63 74 6f 72  73 25 21 38 29 3a f2 72  |%,factors%!8):.r|
00005200  65 64 75 63 65 28 66 61  63 74 6f 72 73 25 21 34  |educe(factors%!4|
00005210  2c 66 61 63 74 6f 72 73  25 21 31 32 29 0d 19 dc  |,factors%!12)...|
00005220  0f 21 71 25 3d 68 61 6e  64 6c 65 25 0d 19 e6 1a  |.!q%=handle%....|
00005230  c8 99 20 52 65 64 72 61  77 57 2c 2c 71 25 20 b8  |.. RedrawW,,q% .|
00005240  20 6d 6f 72 65 25 0d 19  f0 2c f2 69 6e 66 6f 28  | more%...,.info(|
00005250  71 25 2b 34 29 3a 62 79  25 3d 62 79 25 2d a8 28  |q%+4):by%=by%-.(|
00005260  79 2a bb 24 7a 25 28 30  29 81 bb 24 7a 25 28 31  |y*.$z%(0)..$z%(1|
00005270  29 29 0d 19 fa 0c c8 95  20 6d 6f 72 65 25 0d 1a  |))...... more%..|
00005280  04 10 e7 6a 70 65 67 73  61 76 65 25 20 8c 0d 1a  |...jpegsave% ...|
00005290  0e 51 e7 6a 70 65 67 70  61 69 6e 74 25 20 c8 99  |.Q.jpegpaint% ..|
000052a0  20 6a 70 65 67 70 61 69  6e 74 25 2c 73 61 72 25  | jpegpaint%,sar%|
000052b0  2c 62 78 25 2c 62 79 25  2c 66 61 63 74 6f 72 73  |,bx%,by%,factors|
000052c0  25 2c 6a 70 65 67 73 69  7a 65 25 2c 31 20 b8 3b  |%,jpegsize%,1 .;|
000052d0  56 25 3a e7 28 56 25 80  31 29 3d 30 20 8b da 0d  |V%:.(V%.1)=0 ...|
000052e0  1a 18 05 cc 0d 1a 22 31  c8 99 20 73 70 6f 70 78  |......"1.. spopx|
000052f0  25 2c 26 31 33 34 2c 73  61 72 25 2c 6e 24 2c 62  |%,&134,sar%,n$,b|
00005300  78 25 2c 62 79 25 2c 2c  66 61 63 74 6f 72 73 25  |x%,by%,,factors%|
00005310  2c 73 70 78 25 0d 1a 2c  05 cd 0d 1a 36 19 c8 99  |,spx%..,....6...|
00005320  20 47 65 74 52 25 2c 30  2c 71 25 20 b8 20 6d 6f  | GetR%,0,q% . mo|
00005330  72 65 25 0d 1a 40 05 ce  0d 1a 4a 05 cd 0d 1a 54  |re%..@....J....T|
00005340  05 e1 0d 1a 68 22 dd 20  a4 67 65 74 69 63 6f 6e  |....h". .geticon|
00005350  73 74 61 74 65 28 68 61  6e 64 6c 65 25 2c 69 63  |state(handle%,ic|
00005360  6f 6e 25 29 0d 1a 72 26  21 71 25 3d 68 61 6e 64  |on%)..r&!q%=hand|
00005370  6c 65 25 3a 71 25 21 34  3d 69 63 6f 6e 25 3a c8  |le%:q%!4=icon%:.|
00005380  99 20 47 65 74 49 2c 2c  71 25 0d 1a 7c 12 3d 71  |. GetI,,q%..|.=q|
00005390  25 21 32 34 3e 3e 32 31  20 80 20 31 0d 1a 90 12  |%!24>>21 . 1....|
000053a0  dd 20 f2 67 65 74 6d 6f  64 65 69 6e 66 6f 0d 1a  |. .getmodeinfo..|
000053b0  9a 10 e7 6a 70 65 67 73  61 76 65 25 20 8c 0d 1a  |...jpegsave% ...|
000053c0  a4 25 c8 99 26 33 35 2c  2d 31 2c 34 20 b8 2c 2c  |.%..&35,-1,4 .,,|
000053d0  6e 78 3a c8 99 26 33 35  2c 2d 31 2c 35 20 b8 2c  |nx:..&35,-1,5 .,|
000053e0  2c 6e 79 0d 1a ae 3d 21  69 66 61 63 74 6f 72 73  |,ny...=!ifactors|
000053f0  25 3d 31 3a 69 66 61 63  74 6f 72 73 25 21 34 3d  |%=1:ifactors%!4=|
00005400  31 3a 69 66 61 63 74 6f  72 73 25 21 38 3d 6e 78  |1:ifactors%!8=nx|
00005410  3a 69 66 61 63 74 6f 72  73 25 21 31 32 3d 6e 79  |:ifactors%!12=ny|
00005420  0d 1a b8 05 e1 0d 1a c2  05 cd 0d 1a cc 3e c8 99  |.............>..|
00005430  22 58 57 69 6d 70 5f 52  65 61 64 50 69 78 54 72  |"XWimp_ReadPixTr|
00005440  61 6e 73 22 2c 26 31 30  30 2c 73 61 72 25 2c 6e  |ans",&100,sar%,n|
00005450  24 2c 2c 2c 2c 69 66 61  63 74 6f 72 73 25 2c 70  |$,,,,ifactors%,p|
00005460  69 78 74 72 61 6e 73 25  0d 1a d6 24 c8 99 20 73  |ixtrans%...$.. s|
00005470  70 6f 70 78 25 2c 26 31  31 38 2c 73 61 72 25 2c  |popx%,&118,sar%,|
00005480  6e 24 20 b8 20 2c 2c 73  70 74 72 25 0d 1a e0 13  |n$ . ,,sptr%....|
00005490  e7 20 73 70 74 72 25 21  33 32 3d 34 34 20 8c 0d  |. sptr%!32=44 ..|
000054a0  1a ea 0d 70 61 6c 70 74  72 25 3d 30 0d 1a f4 05  |...palptr%=0....|
000054b0  cc 0d 1a fe 41 e3 20 67  72 61 62 25 3d 30 20 b8  |....A. grab%=0 .|
000054c0  20 32 30 34 38 2d 38 20  88 20 38 3a 70 61 6c 74  | 2048-8 . 8:palt|
000054d0  65 6d 70 25 21 28 67 72  61 62 25 3e 3e 31 29 3d  |emp%!(grab%>>1)=|
000054e0  73 70 74 72 25 21 28 67  72 61 62 25 2b 34 34 29  |sptr%!(grab%+44)|
000054f0  3a ed 0d 1b 08 14 70 61  6c 70 74 72 25 3d 70 61  |:.....palptr%=pa|
00005500  6c 74 65 6d 70 25 0d 1b  12 05 cd 0d 1b 1c 1f e3  |ltemp%..........|
00005510  51 25 3d 30 b8 32 35 35  3a 70 69 78 74 72 61 6e  |Q%=0.255:pixtran|
00005520  73 25 3f 51 25 3d 51 25  3a ed 0d 1b 26 17 e7 73  |s%?Q%=Q%:...&..s|
00005530  70 74 72 25 21 33 32 3d  34 34 2b 32 30 34 38 20  |ptr%!32=44+2048 |
00005540  8c 0d 1b 30 35 e3 51 25  3d 30 b8 32 35 35 3a c8  |...05.Q%=0.255:.|
00005550  99 63 74 72 61 6e 25 2c  70 61 6c 70 74 72 25 21  |.ctran%,palptr%!|
00005560  28 51 25 3c 3c 32 29 b8  70 69 78 74 72 61 6e 73  |(Q%<<2).pixtrans|
00005570  25 3f 51 25 3a ed 0d 1b  3a 05 cc 0d 1b 44 3a c8  |%?Q%:...:....D:.|
00005580  99 20 22 43 6f 6c 6f 75  72 54 72 61 6e 73 5f 53  |. "ColourTrans_S|
00005590  65 6c 65 63 74 54 61 62  6c 65 22 2c 6d 2c 70 61  |electTable",m,pa|
000055a0  6c 70 74 72 25 2c 2d 31  2c 2d 31 2c 70 69 78 74  |lptr%,-1,-1,pixt|
000055b0  72 61 6e 73 25 0d 1b 4e  05 cd 0d 1b 58 36 73 70  |rans%..N....X6sp|
000055c0  78 25 3d 2d 31 3a e3 51  25 3d 30 b8 32 35 35 3a  |x%=-1:.Q%=0.255:|
000055d0  e7 70 69 78 74 72 61 6e  73 25 3f 51 25 3c 3e 51  |.pixtrans%?Q%<>Q|
000055e0  25 20 73 70 78 25 3d 70  69 78 74 72 61 6e 73 25  |% spx%=pixtrans%|
000055f0  0d 1b 62 05 ed 0d 1b 6c  05 e1 0d 1b 80 11 dd 20  |..b....l....... |
00005600  a4 64 65 64 75 63 65 6d  6f 64 65 0d 1b 8a 0b ea  |.deducemode.....|
00005610  20 6d 2c 78 2c 79 0d 1b  94 20 e7 a4 67 65 74 69  | m,x,y... ..geti|
00005620  63 6f 6e 73 74 61 74 65  28 6f 75 74 70 75 74 25  |constate(output%|
00005630  2c 32 31 29 20 8c 0d 1b  9e 33 e7 a4 67 65 74 69  |,21) ....3..geti|
00005640  63 6f 6e 73 74 61 74 65  28 6f 75 74 70 75 74 25  |constate(output%|
00005650  2c 31 37 29 20 8c 3d 22  4a 50 45 47 38 22 20 8b  |,17) .="JPEG8" .|
00005660  3d 22 4a 50 45 47 32 34  22 0d 1b a8 05 cc 0d 1b  |="JPEG24".......|
00005670  b2 20 e7 a4 67 65 74 69  63 6f 6e 73 74 61 74 65  |. ..geticonstate|
00005680  28 6f 75 74 70 75 74 25  2c 31 38 29 20 8c 0d 1b  |(output%,18) ...|
00005690  bc 13 c8 99 20 26 36 2c  31 33 35 20 b8 20 2c 2c  |.... &6,135 . ,,|
000056a0  6d 0d 1b d0 13 c8 99 26  33 35 2c 2d 31 2c 39 20  |m......&35,-1,9 |
000056b0  b8 2c 2c 6d 0d 1b da 0a  e7 6d 3e 33 20 8c 0d 1b  |.,,m.....m>3 ...|
000056c0  e4 23 c8 99 26 33 35 2c  2d 31 2c 34 20 b8 2c 2c  |.#..&35,-1,4 .,,|
000056d0  78 3a c8 99 26 33 35 2c  2d 31 2c 35 20 b8 2c 2c  |x:..&35,-1,5 .,,|
000056e0  79 0d 1b ee 1b 78 3d 31  38 30 2f 28 32 5e 78 29  |y....x=180/(2^x)|
000056f0  3a 79 3d 31 38 30 2f 28  32 5e 79 29 0d 1b f8 1d  |:y=180/(2^y)....|
00005700  3d 22 53 22 2b c3 28 32  5e 6d 29 2b 22 2c 22 2b  |="S"+.(2^m)+","+|
00005710  c3 78 2b 22 2c 22 2b c3  79 0d 1c 02 05 cc 0d 1c  |.x+","+.y.......|
00005720  0c 07 3d c3 eb 0d 1c 16  05 cd 0d 1c 20 05 cc 0d  |..=......... ...|
00005730  1c 2a 21 e7 20 a4 67 65  74 69 63 6f 6e 73 74 61  |.*!. .geticonsta|
00005740  74 65 28 6f 75 74 70 75  74 25 2c 32 34 29 20 8c  |te(output%,24) .|
00005750  0d 1c 34 0e 3d 24 6f 6c  64 6d 6f 64 65 25 0d 1c  |..4.=$oldmode%..|
00005760  3e 05 cc 0d 1c 48 0d 3d  24 61 64 6d 6f 64 65 25  |>....H.=$admode%|
00005770  0d 1c 52 05 cd 0d 1c 5c  05 cd 0d 1c 66 05 cd 0d  |..R....\....f...|
00005780  1c 7a 15 dd 20 f2 73 68  6f 77 73 63 61 6c 65 74  |.z.. .showscalet|
00005790  6f 66 69 74 0d 1c 84 0b  ea 20 6d 2c 78 2c 79 0d  |ofit..... m,x,y.|
000057a0  1c 8e 18 24 61 64 6d 6f  64 65 25 3d a4 64 65 64  |...$admode%=.ded|
000057b0  75 63 65 6d 6f 64 65 0d  1c 98 11 c8 8e 20 3f 61  |ucemode...... ?a|
000057c0  64 6d 6f 64 65 25 20 ca  0d 1c a2 0a c9 20 97 22  |dmode% ...... ."|
000057d0  53 22 0d 1c ac 29 e7 bb  c1 24 61 64 6d 6f 64 65  |S"...)...$admode|
000057e0  25 2c 35 29 3e bb c1 24  61 64 6d 6f 64 65 25 2c  |%,5)>..$admode%,|
000057f0  38 29 20 78 3d 36 20 8b  78 3d 30 0d 1c b6 20 e7  |8) x=6 .x=0... .|
00005800  bb c1 24 61 64 6d 6f 64  65 25 2c 32 29 3e 31 36  |..$admode%,2)>16|
00005810  20 78 2b 3d 35 20 8b 78  2b 3d 34 0d 1c c0 2f c8  | x+=5 .x+=4.../.|
00005820  99 26 33 35 2c 2d 31 2c  31 31 20 b8 2c 2c 74 6f  |.&35,-1,11 .,,to|
00005830  66 69 74 78 3a c8 99 26  33 35 2c 2d 31 2c 31 32  |fitx:..&35,-1,12|
00005840  20 b8 2c 2c 74 6f 66 69  74 79 0d 1c ca 0a c9 20  | .,,tofity..... |
00005850  97 22 4a 22 0d 1c d4 2f  c8 99 26 33 35 2c 2d 31  |."J".../..&35,-1|
00005860  2c 31 31 20 b8 2c 2c 74  6f 66 69 74 78 3a c8 99  |,11 .,,tofitx:..|
00005870  26 33 35 2c 2d 31 2c 31  32 20 b8 2c 2c 74 6f 66  |&35,-1,12 .,,tof|
00005880  69 74 79 0d 1c e8 08 78  3d 31 32 0d 1c f2 05 7f  |ity....x=12.....|
00005890  0d 1c fc 0f 6d 3d bb 24  61 64 6d 6f 64 65 25 0d  |....m=.$admode%.|
000058a0  1d 06 2d c8 99 26 33 35  2c 6d 2c 31 31 20 b8 2c  |..-..&35,m,11 .,|
000058b0  2c 74 6f 66 69 74 78 3a  c8 99 26 33 35 2c 6d 2c  |,tofitx:..&35,m,|
000058c0  31 32 20 b8 2c 2c 74 6f  66 69 74 79 0d 1d 10 2f  |12 .,,tofity.../|
000058d0  c8 99 26 33 35 2c 6d 2c  34 20 b8 2c 2c 78 3a c8  |..&35,m,4 .,,x:.|
000058e0  99 26 33 35 2c 6d 2c 35  20 b8 2c 2c 79 3a e7 79  |.&35,m,5 .,,y:.y|
000058f0  3e 78 20 78 3d 36 20 8b  78 3d 30 0d 1d 1a 17 c8  |>x x=6 .x=0.....|
00005900  99 26 33 35 2c 6d 2c 39  20 b8 2c 2c 79 3a 78 2b  |.&35,m,9 .,,y:x+|
00005910  3d 79 0d 1d 24 05 cb 0d  1d 2e 3f 74 6f 66 69 74  |=y..$.....?tofit|
00005920  78 2b 3d 31 3a 74 6f 66  69 74 79 2b 3d 31 3a 24  |x+=1:tofity+=1:$|
00005930  61 64 73 63 61 6c 65 25  3d 6d 24 28 31 37 29 2b  |adscale%=m$(17)+|
00005940  c3 74 6f 66 69 74 78 2b  6d 24 28 31 38 29 2b c3  |.tofitx+m$(18)+.|
00005950  74 6f 66 69 74 79 0d 1d  38 3d 71 25 21 31 32 3d  |tofity..8=q%!12=|
00005960  31 3c 3c 32 31 3a 21 71  25 3d 6f 75 74 70 75 74  |1<<21:!q%=output|
00005970  25 3a e3 49 25 3d 30 b8  31 31 3a e7 49 25 3d 78  |%:.I%=0.11:.I%=x|
00005980  20 71 25 21 38 3d 31 3c  3c 32 31 20 8b 71 25 21  | q%!8=1<<21 .q%!|
00005990  38 3d 30 0d 1d 42 3c 71  25 21 34 3d 49 25 2b 33  |8=0..B<q%!4=I%+3|
000059a0  3a c8 99 20 53 65 74 49  2c 2c 71 25 3a ed 3a e7  |:.. SetI,,q%:.:.|
000059b0  78 3d 31 32 20 71 25 21  38 3d 30 3a 71 25 21 34  |x=12 q%!8=0:q%!4|
000059c0  3d 32 34 3a c8 99 20 53  65 74 49 2c 2c 71 25 0d  |=24:.. SetI,,q%.|
000059d0  1d 4c 05 e1 0d 1d 60 16  dd 20 f2 6b 69 6c 6c 63  |.L....`.. .killc|
000059e0  75 72 72 65 6e 74 28 6d  24 29 0d 1d 6a 22 71 25  |urrent(m$)..j"q%|
000059f0  21 31 32 3d 31 3c 3c 32  31 3a 21 71 25 3d 6f 75  |!12=1<<21:!q%=ou|
00005a00  74 70 75 74 25 3a 71 25  21 38 3d 30 0d 1d 74 17  |tput%:q%!8=0..t.|
00005a10  71 25 21 34 3d 32 30 3a  c8 99 20 53 65 74 49 2c  |q%!4=20:.. SetI,|
00005a20  2c 71 25 0d 1d 7e 0f 24  61 64 6d 6f 64 65 25 3d  |,q%..~.$admode%=|
00005a30  6d 24 0d 1d 92 05 e1 0d  1d a6 2b dd a4 5a 53 28  |m$........+..ZS(|
00005a40  49 25 29 ea 41 24 3a f5  41 24 2b 3d bd 3f 49 25  |I%).A$:.A$+=.?I%|
00005a50  3a 49 25 2b 3d 31 3a fd  3f 49 25 3c 31 34 3a 3d  |:I%+=1:.?I%<14:=|
00005a60  41 24 0d 1d ba 0f dd 20  f2 65 72 72 6f 72 62 6f  |A$..... .errorbo|
00005a70  78 0d 1d c4 3e c8 99 20  44 72 61 67 2c 2c 2d 31  |x...>.. Drag,,-1|
00005a80  3a 21 62 75 66 66 65 72  25 3d 9f 3a 24 28 62 75  |:!buffer%=.:$(bu|
00005a90  66 66 65 72 25 2b 34 29  3d f6 24 2b 22 20 28 63  |ffer%+4)=.$+" (c|
00005aa0  6f 64 65 20 22 2b c3 9e  2b 22 29 22 2b bd 30 0d  |ode "+..+")"+.0.|
00005ab0  1d ce 32 c8 99 20 22 57  69 6d 70 5f 52 65 70 6f  |..2.. "Wimp_Repo|
00005ac0  72 74 45 72 72 6f 72 22  2c 62 75 66 66 65 72 25  |rtError",buffer%|
00005ad0  2c 25 31 31 2c 6d 24 28  32 30 29 20 b8 20 2c 41  |,%11,m$(20) . ,A|
00005ae0  25 0d 1d d8 2b e7 41 25  3d 32 20 f2 72 65 6d 6f  |%...+.A%=2 .remo|
00005af0  76 65 61 72 65 61 3a c8  99 20 22 57 69 6d 70 5f  |vearea:.. "Wimp_|
00005b00  43 6c 6f 73 65 44 6f 77  6e 22 3a e0 0d 1d e2 05  |CloseDown":.....|
00005b10  e1 0d 1e c8 53 dd 20 a4  43 68 61 6e 67 65 46 53  |....S. .ChangeFS|
00005b20  49 28 41 24 2c 73 70 72  69 74 65 61 72 65 61 25  |I(A$,spritearea%|
00005b30  2c 77 6f 72 6b 73 70 61  63 65 25 2c 77 6f 72 6b  |,workspace%,work|
00005b40  6c 69 6d 69 74 25 2c 6f  6b 73 61 76 65 25 2c 6f  |limit%,oksave%,o|
00005b50  6b 69 6e 66 6f 25 2c f8  20 72 61 6d 25 2c 66 61  |kinfo%,. ram%,fa|
00005b60  73 74 25 29 0d 1e d2 4d  ea 20 41 24 28 29 2c 72  |st%)...M. A$(),r|
00005b70  25 28 29 2c 67 25 28 29  2c 62 25 28 29 2c 72 70  |%(),g%(),b%(),rp|
00005b80  61 6c 25 28 29 2c 67 70  61 6c 25 28 29 2c 62 70  |al%(),gpal%(),bp|
00005b90  61 6c 25 28 29 2c 74 61  62 6c 65 25 28 29 2c 63  |al%(),table%(),c|
00005ba0  6c 25 28 29 2c 78 6c 25  28 29 2c 78 6c 32 25 28  |l%(),xl%(),xl2%(|
00005bb0  29 0d 1e dc 4d ea 20 78  70 25 28 29 2c 72 6d 25  |)...M. xp%(),rm%|
00005bc0  28 29 2c 72 6d 31 25 28  29 2c 72 6d 32 25 28 29  |(),rm1%(),rm2%()|
00005bd0  2c 76 61 6c 73 25 28 29  2c 6e 6c 25 28 29 2c 41  |,vals%(),nl%(),A|
00005be0  25 28 29 2c 42 25 28 29  2c 6e 65 77 25 28 29 2c  |%(),B%(),new%(),|
00005bf0  73 74 25 28 29 2c 6a 70  71 25 28 29 2c 6d 0d 1e  |st%(),jpq%(),m..|
00005c00  e6 24 c8 95 c0 41 24 2c  31 29 3c 3e 22 20 22 80  |.$...A$,1)<>" ".|
00005c10  a9 41 24 3c 3e 30 20 41  24 3d c1 41 24 2c 32 29  |.A$<>0 A$=.A$,2)|
00005c20  3a ce 0d 1e f0 1c c8 95  c0 41 24 2c 31 29 3d 22  |:........A$,1)="|
00005c30  20 22 20 41 24 3d c1 41  24 2c 32 29 3a ce 0d 1e  | " A$=.A$,2):...|
00005c40  fa 1a c8 95 c2 41 24 2c  31 29 3d 22 20 22 20 41  |.....A$,1)=" " A|
00005c50  24 3d c0 41 24 29 3a ce  0d 1f 04 1a e7 a4 75 63  |$=.A$):.......uc|
00005c60  28 c0 41 24 2c 35 29 29  3d 22 2d 51 55 49 54 22  |(.A$,5))="-QUIT"|
00005c70  20 8c 0d 1f 0e 2e 41 24  3d c1 41 24 2c 37 29 3a  | .....A$=.A$,7):|
00005c80  c8 95 c0 41 24 2c 31 29  3c 3e 22 20 22 80 a9 41  |...A$,1)<>" "..A|
00005c90  24 3c 3e 30 20 41 24 3d  c1 41 24 2c 32 29 3a ce  |$<>0 A$=.A$,2):.|
00005ca0  0d 1f 18 1c c8 95 c0 41  24 2c 31 29 3d 22 20 22  |.......A$,1)=" "|
00005cb0  20 41 24 3d c1 41 24 2c  32 29 3a ce 0d 1f 22 05  | A$=.A$,2):...".|
00005cc0  cd 0d 1f 2c 20 de 20 41  24 28 31 30 30 29 3a 41  |..., . A$(100):A|
00005cd0  52 47 25 3d 30 3a 42 25  3d a7 41 24 2c 22 20 22  |RG%=0:B%=.A$," "|
00005ce0  29 0d 1f 36 0c c8 95 20  42 25 3c 3e 30 0d 1f 40  |)..6... B%<>0..@|
00005cf0  2b 41 52 47 25 2b 3d 31  3a 41 24 28 41 52 47 25  |+ARG%+=1:A$(ARG%|
00005d00  29 3d c0 41 24 2c 42 25  2d 31 29 3a 41 24 3d c1  |)=.A$,B%-1):A$=.|
00005d10  41 24 2c 42 25 2b 31 29  0d 1f 4a 1d c8 95 20 c0  |A$,B%+1)..J... .|
00005d20  41 24 2c 31 29 3d 22 20  22 3a 41 24 3d c1 41 24  |A$,1)=" ":A$=.A$|
00005d30  2c 32 29 3a ce 0d 1f 54  0f 42 25 3d a7 41 24 2c  |,2):...T.B%=.A$,|
00005d40  22 20 22 29 0d 1f 5e 05  ce 0d 1f 68 1f e7 41 24  |" ")..^....h..A$|
00005d50  3c 3e 22 22 20 41 52 47  25 2b 3d 31 3a 41 24 28  |<>"" ARG%+=1:A$(|
00005d60  41 52 47 25 29 3d 41 24  0d 1f 72 58 69 6e 76 65  |ARG%)=A$..rXinve|
00005d70  72 74 25 3d a3 3a 72 61  6e 67 65 25 3d a3 3a 73  |rt%=.:range%=.:s|
00005d80  68 61 72 70 65 6e 25 3d  a3 3a 69 6e 66 6f 25 3d  |harpen%=.:info%=|
00005d90  a3 3a 63 61 63 68 65 25  3d a3 3a 63 61 63 68 65  |.:cache%=.:cache|
00005da0  61 72 65 61 6e 75 6d 62  65 72 25 3d 30 3a 64 69  |areanumber%=0:di|
00005db0  74 68 65 72 25 3d b9 3a  62 6c 61 63 6b 25 3d a3  |ther%=.:black%=.|
00005dc0  0d 1f 7c 43 68 69 73 74  25 3d a3 3a 65 71 75 61  |..|Chist%=.:equa|
00005dd0  6c 25 3d a3 3a 76 66 6c  69 70 25 3d a3 3a 68 66  |l%=.:vflip%=.:hf|
00005de0  6c 69 70 25 3d a3 3a 73  63 61 6c 65 25 3d b9 3a  |lip%=.:scale%=.:|
00005df0  73 63 61 6c 65 6f 25 3d  b9 3a 73 63 72 61 70 66  |scaleo%=.:scrapf|
00005e00  25 3d a3 0d 1f 86 36 67  61 6d 6d 61 3d 31 3a 72  |%=....6gamma=1:r|
00005e10  6f 74 61 74 65 25 3d a3  3a 6d 61 78 25 3d 32 30  |otate%=.:max%=20|
00005e20  30 30 30 30 30 30 3a 62  72 69 67 68 74 25 3d 31  |000000:bright%=1|
00005e30  35 3a 6c 6f 63 6b 25 3d  a3 0d 1f 90 1e 72 77 74  |5:lock%=.....rwt|
00005e40  3d 2e 32 39 39 3a 67 77  74 3d 2e 35 38 37 3a 62  |=.299:gwt=.587:b|
00005e50  77 74 3d 2e 31 31 34 0d  1f 9a 0d e7 41 52 47 25  |wt=.114.....ARG%|
00005e60  3c 33 20 8c 0d 1f a4 4a  f1 22 43 68 61 6e 67 65  |<3 ....J."Change|
00005e70  46 53 49 20 69 6e 74 65  72 61 63 74 69 76 65 20  |FSI interactive |
00005e80  69 6e 70 75 74 20 28 72  65 61 64 20 46 53 49 69  |input (read FSIi|
00005e90  6e 66 6f 20 66 6f 72 20  63 6f 6d 6d 61 6e 64 20  |nfo for command |
00005ea0  6c 69 6e 65 20 64 65 74  61 69 6c 73 29 22 0d 1f  |line details)"..|
00005eb0  ae 3f e8 22 53 6f 75 72  63 65 20 66 69 6c 65 3a  |.?."Source file:|
00005ec0  20 22 73 24 2c 22 44 65  73 74 69 6e 61 74 69 6f  | "s$,"Destinatio|
00005ed0  6e 20 66 69 6c 65 3a 20  22 66 24 2c 22 4f 75 74  |n file: "f$,"Out|
00005ee0  70 75 74 20 6d 6f 64 65  3a 20 22 6d 24 0d 1f b8  |put mode: "m$...|
00005ef0  2f e8 22 28 58 29 53 63  61 6c 65 20 28 65 2e 67  |/."(X)Scale (e.g|
00005f00  2e 20 32 3a 31 29 3a 20  22 78 73 24 3a e8 22 59  |. 2:1): "xs$:."Y|
00005f10  20 53 63 61 6c 65 3a 20  22 79 73 24 0d 1f c2 38  | Scale: "ys$...8|
00005f20  e8 22 49 6e 66 6f 20 6f  6e 20 69 6e 70 75 74 20  |."Info on input |
00005f30  70 69 63 74 75 72 65 3f  22 61 24 3a e7 a4 75 63  |picture?"a$:..uc|
00005f40  28 c0 61 24 2c 31 29 29  3d 22 59 22 20 69 6e 66  |(.a$,1))="Y" inf|
00005f50  6f 25 3d b9 0d 1f cc 3b  e8 22 49 6e 76 65 72 74  |o%=....;."Invert|
00005f60  20 70 69 63 74 75 72 65  20 63 6f 6c 6f 75 72 73  | picture colours|
00005f70  3f 22 61 24 3a e7 a4 75  63 28 c0 61 24 2c 31 29  |?"a$:..uc(.a$,1)|
00005f80  29 3d 22 59 22 20 69 6e  76 65 72 74 25 3d b9 0d  |)="Y" invert%=..|
00005f90  1f d6 3d e8 22 43 6f 6d  70 75 74 65 20 68 69 73  |..=."Compute his|
00005fa0  74 6f 67 72 61 6d 20 6f  66 20 69 6e 70 75 74 3f  |togram of input?|
00005fb0  22 61 24 3a e7 a4 75 63  28 c0 61 24 2c 31 29 29  |"a$:..uc(.a$,1))|
00005fc0  3d 22 59 22 20 68 69 73  74 25 3d b9 0d 1f e0 40  |="Y" hist%=....@|
00005fd0  e8 22 41 70 70 6c 79 20  68 69 73 74 6f 67 72 61  |."Apply histogra|
00005fe0  6d 20 65 71 75 61 6c 69  73 61 74 69 6f 6e 3f 22  |m equalisation?"|
00005ff0  61 24 3a e7 a4 75 63 28  c0 61 24 2c 31 29 29 3d  |a$:..uc(.a$,1))=|
00006000  22 59 22 20 65 71 75 61  6c 25 3d b9 0d 1f ea 47  |"Y" equal%=....G|
00006010  e8 22 45 78 70 61 6e 64  20 69 6e 70 75 74 20 64  |."Expand input d|
00006020  79 6e 61 6d 69 63 20 72  61 6e 67 65 3f 22 61 24  |ynamic range?"a$|
00006030  3a e7 a4 75 63 28 c0 61  24 2c 31 29 29 3d 22 59  |:..uc(.a$,1))="Y|
00006040  22 20 72 61 6e 67 65 25  3d b9 3a 65 71 75 61 6c  |" range%=.:equal|
00006050  25 3d a3 0d 1f f4 3d e8  22 53 68 61 72 70 65 6e  |%=....=."Sharpen|
00006060  20 70 69 63 74 75 72 65  20 62 79 20 28 65 2e 67  | picture by (e.g|
00006070  2e 20 31 32 20 66 6f 72  20 68 61 72 73 68 2c 20  |. 12 for harsh, |
00006080  32 34 20 66 6f 72 20 73  6f 66 74 29 20 22 61 24  |24 for soft) "a$|
00006090  0d 1f fe 18 e7 61 24 3c  3e 22 22 20 73 68 61 72  |.....a$<>"" shar|
000060a0  70 65 6e 25 3d bb 61 24  0d 20 08 2b e8 22 52 6f  |pen%=.a$. .+."Ro|
000060b0  74 61 74 65 3f 22 61 24  3a e7 a4 75 63 28 c0 61  |tate?"a$:..uc(.a|
000060c0  24 2c 31 29 29 3d 22 59  22 20 72 6f 74 61 74 65  |$,1))="Y" rotate|
000060d0  25 3d 31 0d 20 12 1e 73  63 61 6c 65 25 3d a3 3a  |%=1. ..scale%=.:|
000060e0  73 63 61 6c 65 6f 25 3d  a3 3a 66 61 73 74 25 3d  |scaleo%=.:fast%=|
000060f0  a3 0d 20 1c 05 cc 0d 20  26 0d f5 20 41 25 3d 41  |.. .... &.. A%=A|
00006100  52 47 25 0d 20 30 36 e7  a4 75 63 28 41 24 28 41  |RG%. 06..uc(A$(A|
00006110  52 47 25 29 29 3d 22 2d  49 4e 46 4f 22 20 69 6e  |RG%))="-INFO" in|
00006120  66 6f 25 3d b9 3a 41 24  28 41 52 47 25 29 3d 22  |fo%=.:A$(ARG%)="|
00006130  22 3a 41 52 47 25 2d 3d  31 0d 20 3a 36 e7 a4 75  |":ARG%-=1. :6..u|
00006140  63 28 41 24 28 41 52 47  25 29 29 3d 22 2d 48 49  |c(A$(ARG%))="-HI|
00006150  53 54 22 20 68 69 73 74  25 3d b9 3a 41 24 28 41  |ST" hist%=.:A$(A|
00006160  52 47 25 29 3d 22 22 3a  41 52 47 25 2d 3d 31 0d  |RG%)="":ARG%-=1.|
00006170  20 44 36 e7 a4 75 63 28  41 24 28 41 52 47 25 29  | D6..uc(A$(ARG%)|
00006180  29 3d 22 2d 4c 4f 43 4b  22 20 6c 6f 63 6b 25 3d  |)="-LOCK" lock%=|
00006190  b9 3a 41 24 28 41 52 47  25 29 3d 22 22 3a 41 52  |.:A$(ARG%)="":AR|
000061a0  47 25 2d 3d 31 0d 20 4e  41 e7 a4 75 63 28 41 24  |G%-=1. NA..uc(A$|
000061b0  28 41 52 47 25 29 29 3d  22 2d 45 51 55 41 4c 22  |(ARG%))="-EQUAL"|
000061c0  20 65 71 75 61 6c 25 3d  b9 3a 72 61 6e 67 65 25  | equal%=.:range%|
000061d0  3d a3 3a 41 24 28 41 52  47 25 29 3d 22 22 3a 41  |=.:A$(ARG%)="":A|
000061e0  52 47 25 2d 3d 31 0d 20  58 41 e7 a4 75 63 28 41  |RG%-=1. XA..uc(A|
000061f0  24 28 41 52 47 25 29 29  3d 22 2d 52 41 4e 47 45  |$(ARG%))="-RANGE|
00006200  22 20 72 61 6e 67 65 25  3d b9 3a 65 71 75 61 6c  |" range%=.:equal|
00006210  25 3d a3 3a 41 24 28 41  52 47 25 29 3d 22 22 3a  |%=.:A$(ARG%)="":|
00006220  41 52 47 25 2d 3d 31 0d  20 62 3a e7 a4 75 63 28  |ARG%-=1. b:..uc(|
00006230  41 24 28 41 52 47 25 29  29 3d 22 2d 49 4e 56 45  |A$(ARG%))="-INVE|
00006240  52 54 22 20 69 6e 76 65  72 74 25 3d b9 3a 41 24  |RT" invert%=.:A$|
00006250  28 41 52 47 25 29 3d 22  22 3a 41 52 47 25 2d 3d  |(ARG%)="":ARG%-=|
00006260  31 0d 20 6c 44 e7 a4 75  63 28 41 24 28 41 52 47  |1. lD..uc(A$(ARG|
00006270  25 29 29 3d 22 2d 4e 4f  53 43 41 4c 45 22 20 73  |%))="-NOSCALE" s|
00006280  63 61 6c 65 25 3d a3 3a  73 63 61 6c 65 6f 25 3d  |cale%=.:scaleo%=|
00006290  a3 3a 41 24 28 41 52 47  25 29 3d 22 22 3a 41 52  |.:A$(ARG%)="":AR|
000062a0  47 25 2d 3d 31 0d 20 76  39 e7 a4 75 63 28 41 24  |G%-=1. v9..uc(A$|
000062b0  28 41 52 47 25 29 29 3d  22 2d 4e 4f 53 49 5a 45  |(ARG%))="-NOSIZE|
000062c0  22 20 73 63 61 6c 65 25  3d a3 3a 41 24 28 41 52  |" scale%=.:A$(AR|
000062d0  47 25 29 3d 22 22 3a 41  52 47 25 2d 3d 31 0d 20  |G%)="":ARG%-=1. |
000062e0  80 3c e7 a4 75 63 28 41  24 28 41 52 47 25 29 29  |.<..uc(A$(ARG%))|
000062f0  3d 22 2d 4e 4f 44 49 54  48 45 52 22 20 64 69 74  |="-NODITHER" dit|
00006300  68 65 72 25 3d a3 3a 41  24 28 41 52 47 25 29 3d  |her%=.:A$(ARG%)=|
00006310  22 22 3a 41 52 47 25 2d  3d 31 0d 20 8a 3d e7 a4  |"":ARG%-=1. .=..|
00006320  75 63 28 41 24 28 41 52  47 25 29 29 3d 22 2d 42  |uc(A$(ARG%))="-B|
00006330  52 49 47 48 54 45 4e 22  20 62 72 69 67 68 74 25  |RIGHTEN" bright%|
00006340  3d 31 36 3a 41 24 28 41  52 47 25 29 3d 22 22 3a  |=16:A$(ARG%)="":|
00006350  41 52 47 25 2d 3d 31 0d  20 94 3a e7 a4 75 63 28  |ARG%-=1. .:..uc(|
00006360  41 24 28 41 52 47 25 29  29 3d 22 2d 52 4f 54 41  |A$(ARG%))="-ROTA|
00006370  54 45 22 20 72 6f 74 61  74 65 25 3d 31 3a 41 24  |TE" rotate%=1:A$|
00006380  28 41 52 47 25 29 3d 22  22 3a 41 52 47 25 2d 3d  |(ARG%)="":ARG%-=|
00006390  31 0d 20 9e 3c e7 a4 75  63 28 41 24 28 41 52 47  |1. .<..uc(A$(ARG|
000063a0  25 29 29 3d 22 2d 52 4f  54 41 54 45 2d 22 20 72  |%))="-ROTATE-" r|
000063b0  6f 74 61 74 65 25 3d 2d  31 3a 41 24 28 41 52 47  |otate%=-1:A$(ARG|
000063c0  25 29 3d 22 22 3a 41 52  47 25 2d 3d 31 0d 20 a8  |%)="":ARG%-=1. .|
000063d0  38 e7 a4 75 63 28 41 24  28 41 52 47 25 29 29 3d  |8..uc(A$(ARG%))=|
000063e0  22 2d 56 46 4c 49 50 22  20 76 66 6c 69 70 25 3d  |"-VFLIP" vflip%=|
000063f0  b9 3a 41 24 28 41 52 47  25 29 3d 22 22 3a 41 52  |.:A$(ARG%)="":AR|
00006400  47 25 2d 3d 31 0d 20 b2  38 e7 a4 75 63 28 41 24  |G%-=1. .8..uc(A$|
00006410  28 41 52 47 25 29 29 3d  22 2d 48 46 4c 49 50 22  |(ARG%))="-HFLIP"|
00006420  20 68 66 6c 69 70 25 3d  b9 3a 41 24 28 41 52 47  | hflip%=.:A$(ARG|
00006430  25 29 3d 22 22 3a 41 52  47 25 2d 3d 31 0d 20 bc  |%)="":ARG%-=1. .|
00006440  38 e7 a4 75 63 28 41 24  28 41 52 47 25 29 29 3d  |8..uc(A$(ARG%))=|
00006450  22 2d 4e 4f 4d 4f 44 45  22 20 66 61 73 74 25 3d  |"-NOMODE" fast%=|
00006460  a3 3a 41 24 28 41 52 47  25 29 3d 22 22 3a 41 52  |.:A$(ARG%)="":AR|
00006470  47 25 2d 3d 31 0d 20 c6  21 e7 a4 75 63 28 c0 41  |G%-=1. .!..uc(.A|
00006480  24 28 41 52 47 25 29 2c  36 29 29 3d 22 2d 42 4c  |$(ARG%),6))="-BL|
00006490  41 43 4b 22 20 8c 0d 20  d0 46 62 6c 61 63 6b 25  |ACK" .. .Fblack%|
000064a0  3d 33 32 3a e7 a9 41 24  28 41 52 47 25 29 3e 36  |=32:..A$(ARG%)>6|
000064b0  20 62 6c 61 63 6b 25 3d  bb c1 41 24 28 41 52 47  | black%=..A$(ARG|
000064c0  25 29 2c 37 29 3a e7 62  6c 61 63 6b 25 3e 31 32  |%),7):.black%>12|
000064d0  38 20 62 6c 61 63 6b 25  3d 31 32 38 0d 20 da 17  |8 black%=128. ..|
000064e0  41 24 28 41 52 47 25 29  3d 22 22 3a 41 52 47 25  |A$(ARG%)="":ARG%|
000064f0  2d 3d 31 0d 20 e4 05 cd  0d 20 ee 21 e7 a4 75 63  |-=1. .... .!..uc|
00006500  28 c0 41 24 28 41 52 47  25 29 2c 36 29 29 3d 22  |(.A$(ARG%),6))="|
00006510  2d 47 41 4d 4d 41 22 20  8c 0d 20 f8 2e 67 61 6d  |-GAMMA" .. ..gam|
00006520  6d 61 3d 32 2e 32 3a e7  a9 41 24 28 41 52 47 25  |ma=2.2:..A$(ARG%|
00006530  29 3e 36 20 67 61 6d 6d  61 3d bb c1 41 24 28 41  |)>6 gamma=..A$(A|
00006540  52 47 25 29 2c 37 29 0d  21 02 17 41 24 28 41 52  |RG%),7).!..A$(AR|
00006550  47 25 29 3d 22 22 3a 41  52 47 25 2d 3d 31 0d 21  |G%)="":ARG%-=1.!|
00006560  0c 05 cd 0d 21 16 23 e7  a4 75 63 28 c0 41 24 28  |....!.#..uc(.A$(|
00006570  41 52 47 25 29 2c 38 29  29 3d 22 2d 53 48 41 52  |ARG%),8))="-SHAR|
00006580  50 45 4e 22 20 8c 0d 21  20 33 73 68 61 72 70 65  |PEN" ..! 3sharpe|
00006590  6e 25 3d 32 34 3a e7 a9  41 24 28 41 52 47 25 29  |n%=24:..A$(ARG%)|
000065a0  3e 38 20 73 68 61 72 70  65 6e 25 3d bb c1 41 24  |>8 sharpen%=..A$|
000065b0  28 41 52 47 25 29 2c 39  29 0d 21 2a 17 41 24 28  |(ARG%),9).!*.A$(|
000065c0  41 52 47 25 29 3d 22 22  3a 41 52 47 25 2d 3d 31  |ARG%)="":ARG%-=1|
000065d0  0d 21 34 05 cd 0d 21 3e  22 e7 a4 75 63 28 c0 41  |.!4...!>"..uc(.A|
000065e0  24 28 41 52 47 25 29 2c  37 29 29 3d 22 2d 53 4d  |$(ARG%),7))="-SM|
000065f0  4f 4f 54 48 22 20 8c 0d  21 48 34 73 68 61 72 70  |OOTH" ..!H4sharp|
00006600  65 6e 25 3d 2d 31 3a e7  a9 41 24 28 41 52 47 25  |en%=-1:..A$(ARG%|
00006610  29 3e 37 20 73 68 61 72  70 65 6e 25 3d 2d bb c1  |)>7 sharpen%=-..|
00006620  41 24 28 41 52 47 25 29  2c 38 29 0d 21 52 32 41  |A$(ARG%),8).!R2A|
00006630  24 28 41 52 47 25 29 3d  22 22 3a 41 52 47 25 2d  |$(ARG%)="":ARG%-|
00006640  3d 31 3a e7 73 68 61 72  70 65 6e 25 3c 2d 32 33  |=1:.sharpen%<-23|
00006650  20 73 68 61 72 70 65 6e  25 3d 2d 32 33 0d 21 5c  | sharpen%=-23.!\|
00006660  05 cd 0d 21 66 43 e7 a4  75 63 28 c0 41 24 28 41  |...!fC..uc(.A$(A|
00006670  52 47 25 29 2c 34 29 29  3d 22 2d 52 45 44 22 20  |RG%),4))="-RED" |
00006680  72 77 74 3d bb c1 41 24  28 41 52 47 25 29 2c 35  |rwt=..A$(ARG%),5|
00006690  29 3a 41 24 28 41 52 47  25 29 3d 22 22 3a 41 52  |):A$(ARG%)="":AR|
000066a0  47 25 2d 3d 31 0d 21 70  45 e7 a4 75 63 28 c0 41  |G%-=1.!pE..uc(.A|
000066b0  24 28 41 52 47 25 29 2c  36 29 29 3d 22 2d 47 52  |$(ARG%),6))="-GR|
000066c0  45 45 4e 22 20 67 77 74  3d bb c1 41 24 28 41 52  |EEN" gwt=..A$(AR|
000066d0  47 25 29 2c 37 29 3a 41  24 28 41 52 47 25 29 3d  |G%),7):A$(ARG%)=|
000066e0  22 22 3a 41 52 47 25 2d  3d 31 0d 21 7a 44 e7 a4  |"":ARG%-=1.!zD..|
000066f0  75 63 28 c0 41 24 28 41  52 47 25 29 2c 35 29 29  |uc(.A$(ARG%),5))|
00006700  3d 22 2d 42 4c 55 45 22  20 62 77 74 3d bb c1 41  |="-BLUE" bwt=..A|
00006710  24 28 41 52 47 25 29 2c  36 29 3a 41 24 28 41 52  |$(ARG%),6):A$(AR|
00006720  47 25 29 3d 22 22 3a 41  52 47 25 2d 3d 31 0d 21  |G%)="":ARG%-=1.!|
00006730  84 1f e7 a4 75 63 28 c0  41 24 28 41 52 47 25 29  |....uc(.A$(ARG%)|
00006740  2c 34 29 29 3d 22 2d 4d  41 58 22 20 8c 0d 21 8e  |,4))="-MAX" ..!.|
00006750  44 6d 61 78 25 3d bb c1  41 24 28 41 52 47 25 29  |Dmax%=..A$(ARG%)|
00006760  2c 35 29 3a e7 a7 41 24  28 41 52 47 25 29 2c 22  |,5):..A$(ARG%),"|
00006770  4b 22 29 84 a7 41 24 28  41 52 47 25 29 2c 22 6b  |K")..A$(ARG%),"k|
00006780  22 29 20 6d 61 78 25 3d  6d 61 78 25 2a 31 30 32  |") max%=max%*102|
00006790  34 0d 21 98 17 41 24 28  41 52 47 25 29 3d 22 22  |4.!..A$(ARG%)=""|
000067a0  3a 41 52 47 25 2d 3d 31  0d 21 a2 05 cd 0d 21 ac  |:ARG%-=1.!....!.|
000067b0  0c fd 41 25 3d 41 52 47  25 0d 21 b6 32 73 24 3d  |..A%=ARG%.!.2s$=|
000067c0  41 24 28 31 29 3a 66 24  3d 41 24 28 32 29 3a 6d  |A$(1):f$=A$(2):m|
000067d0  24 3d 41 24 28 33 29 3a  78 73 24 3d 41 24 28 34  |$=A$(3):xs$=A$(4|
000067e0  29 3a 79 73 24 3d 41 24  28 35 29 0d 21 c0 05 cd  |):ys$=A$(5).!...|
000067f0  0d 21 ca 15 e7 6f 6b 69  6e 66 6f 25 20 8b 69 6e  |.!...okinfo% .in|
00006800  66 6f 25 3d a3 0d 21 d4  14 e7 77 6f 72 6b 73 70  |fo%=..!...worksp|
00006810  61 63 65 25 3e 3d 30 20  8c 0d 21 de 0b 66 6c 65  |ace%>=0 ..!..fle|
00006820  78 25 3d a3 0d 21 e8 05  cc 0d 21 f2 3c e7 77 6f  |x%=..!....!.<.wo|
00006830  72 6b 6c 69 6d 69 74 25  3d 30 20 8c 66 6c 65 78  |rklimit%=0 .flex|
00006840  25 3d a3 20 8b 66 6c 65  78 25 3d b9 3a 6e 65 78  |%=. .flex%=.:nex|
00006850  74 6c 6f 63 61 74 69 6f  6e 25 3d 77 6f 72 6b 6c  |tlocation%=workl|
00006860  69 6d 69 74 25 0d 21 fc  05 cd 0d 22 06 22 70 6e  |imit%.!...."."pn|
00006870  6d 24 3d a4 75 63 28 6d  24 29 3a c8 8e 20 c0 70  |m$=.uc(m$):.. .p|
00006880  6e 6d 24 2b 22 2c 22 2c  33 29 20 ca 0d 22 10 15  |nm$+",",3) .."..|
00006890  c9 22 41 49 4d 22 3a 6d  3d 2d 31 3a 6d 24 3d 22  |."AIM":m=-1:m$="|
000068a0  22 0d 22 1a 22 c9 22 50  31 2c 22 2c 22 50 34 2c  |"."."."P1,","P4,|
000068b0  22 3a 6d 3d 2d 32 3a 6d  24 3d 22 22 3a 73 70 6d  |":m=-2:m$="":spm|
000068c0  3d 31 38 0d 22 24 23 c9  22 50 32 2c 22 2c 22 50  |=18."$#."P2,","P|
000068d0  35 2c 22 3a 6d 3d 2d 32  3a 6d 24 3d 22 54 22 3a  |5,":m=-2:m$="T":|
000068e0  73 70 6d 3d 32 30 0d 22  2e 3d c9 22 50 33 2c 22  |spm=20.".=."P3,"|
000068f0  2c 22 50 36 2c 22 3a 6d  3d 2d 34 3a 70 6e 6d 24  |,"P6,":m=-4:pnm$|
00006900  3d c0 70 6e 6d 24 2c 32  29 3a 70 36 62 69 74 73  |=.pnm$,2):p6bits|
00006910  3d 38 3a 49 25 3d bb c1  6d 24 2c 34 29 3a 6d 24  |=8:I%=..m$,4):m$|
00006920  3d 22 22 0d 22 38 18 e7  49 25 3e 30 e7 49 25 3c  |=""."8..I%>0.I%<|
00006930  38 20 70 36 62 69 74 73  3d 49 25 0d 22 42 15 c9  |8 p6bits=I%."B..|
00006940  22 50 31 35 22 3a 6d 3d  2d 33 3a 6d 24 3d 22 22  |"P15":m=-3:m$=""|
00006950  0d 22 4c 15 c9 22 43 31  35 22 3a 6d 3d 2d 35 3a  |."L.."C15":m=-5:|
00006960  6d 24 3d 22 22 0d 22 56  1e c9 22 49 52 4c 22 3a  |m$=""."V.."IRL":|
00006970  6d 3d 2d 34 3a 6d 24 3d  22 22 3a 70 36 62 69 74  |m=-4:m$="":p6bit|
00006980  73 3d 38 0d 22 60 15 c9  22 53 31 36 22 3a 6d 3d  |s=8."`.."S16":m=|
00006990  2d 36 3a 6d 24 3d 22 22  0d 22 6a 1e c9 22 53 32  |-6:m$=""."j.."S2|
000069a0  34 22 3a 6d 3d 2d 37 3a  6d 24 3d 22 22 3a 70 36  |4":m=-7:m$="":p6|
000069b0  62 69 74 73 3d 38 0d 22  74 1e c9 22 53 33 32 22  |bits=8."t.."S32"|
000069c0  3a 6d 3d 2d 38 3a 6d 24  3d 22 22 3a 70 36 62 69  |:m=-8:m$="":p6bi|
000069d0  74 73 3d 38 0d 22 7e 68  c9 22 4a 50 45 22 3a 6d  |ts=8."~h."JPE":m|
000069e0  24 3d 22 22 3a 70 36 62  69 74 73 3d 38 3a e7 c0  |$="":p6bits=8:..|
000069f0  70 6e 6d 24 2c 38 29 3d  22 4a 50 45 47 4d 4f 4e  |pnm$,8)="JPEGMON|
00006a00  4f 22 20 6d 3d 2d 39 3a  6a 70 65 67 71 75 61 6c  |O" m=-9:jpegqual|
00006a10  69 74 79 25 3d bb c1 70  6e 6d 24 2c 39 29 20 8b  |ity%=..pnm$,9) .|
00006a20  6d 3d 2d 31 30 3a 6a 70  65 67 71 75 61 6c 69 74  |m=-10:jpegqualit|
00006a30  79 25 3d bb c1 70 6e 6d  24 2c 35 29 0d 22 88 35  |y%=..pnm$,5).".5|
00006a40  7f 3a 6d 3d bb 6d 24 3a  73 70 6d 3d 6d 3a 6d 24  |.:m=.m$:spm=m:m$|
00006a50  3d a4 75 63 28 c2 6d 24  2c 31 29 29 3a e7 a7 22  |=.uc(.m$,1)):.."|
00006a60  43 44 52 54 22 2c 6d 24  29 3d 30 20 6d 24 3d 22  |CDRT",m$)=0 m$="|
00006a70  22 0d 22 92 05 cb 0d 22  9c 1b e7 78 73 24 3d 22  |"."...."...xs$="|
00006a80  22 20 84 20 c0 78 73 24  2c 31 29 3d 22 2d 22 20  |" . .xs$,1)="-" |
00006a90  8c 0d 22 a6 23 78 6d 75  6c 25 3d 31 3a 78 64 69  |..".#xmul%=1:xdi|
00006aa0  76 25 3d 31 3a 79 6d 75  6c 25 3d 31 3a 79 64 69  |v%=1:ymul%=1:ydi|
00006ab0  76 25 3d 31 0d 22 b0 05  cc 0d 22 ba 13 e7 79 73  |v%=1."...."...ys|
00006ac0  24 3d 22 22 20 79 73 24  3d 78 73 24 0d 22 c4 27  |$="" ys$=xs$.".'|
00006ad0  78 6d 75 6c 25 3d bb 78  73 24 3a 78 64 69 76 25  |xmul%=.xs$:xdiv%|
00006ae0  3d bb c1 78 73 24 2c a7  78 73 24 2c 22 3a 22 29  |=..xs$,.xs$,":")|
00006af0  2b 31 29 0d 22 ce 27 79  6d 75 6c 25 3d bb 79 73  |+1).".'ymul%=.ys|
00006b00  24 3a 79 64 69 76 25 3d  bb c1 79 73 24 2c a7 79  |$:ydiv%=..ys$,.y|
00006b10  73 24 2c 22 3a 22 29 2b  31 29 0d 22 d8 05 cd 0d  |s$,":")+1)."....|
00006b20  22 e2 26 66 6c 61 67 3d  2d 31 3a c8 99 38 2c 35  |".&flag=-1:..8,5|
00006b30  2c 73 24 20 b8 20 72 30  2c 2c 72 32 3a 64 69 72  |,s$ . r0,,r2:dir|
00006b40  3d 72 30 3d 32 0d 22 ec  0a e7 64 69 72 20 8c 0d  |=r0=2."...dir ..|
00006b50  22 f6 43 70 61 6e 69 63  3d b9 3a c8 99 38 2c 35  |".Cpanic=.:..8,5|
00006b60  2c 73 24 2b 22 2e 72 61  77 22 20 b8 20 72 30 2c  |,s$+".raw" . r0,|
00006b70  2c 72 32 3a e7 72 30 3d  31 20 73 24 2b 3d 22 2e  |,r2:.r0=1 s$+=".|
00006b80  72 61 77 22 3a 64 69 72  3d a3 3a 70 61 6e 69 63  |raw":dir=.:panic|
00006b90  3d a3 0d 23 00 31 e7 70  61 6e 69 63 20 c8 99 38  |=..#.1.panic ..8|
00006ba0  2c 35 2c 73 24 2b 22 2e  72 65 64 22 20 b8 20 72  |,5,s$+".red" . r|
00006bb0  30 2c 2c 72 32 3a e7 72  30 3d 31 20 70 61 6e 69  |0,,r2:.r0=1 pani|
00006bc0  63 3d a3 0d 23 0a 21 e7  70 61 6e 69 63 20 85 20  |c=..#.!.panic . |
00006bd0  34 32 2c 22 44 69 72 65  63 74 6f 72 79 20 67 69  |42,"Directory gi|
00006be0  76 65 6e 22 0d 23 14 05  cd 0d 23 1e 3e 66 74 79  |ven".#....#.>fty|
00006bf0  70 65 3d 72 32 3e 3e 38  20 80 20 26 46 46 46 3a  |pe=r2>>8 . &FFF:|
00006c00  62 69 74 73 3d 32 38 3a  46 3d 32 5e 62 69 74 73  |bits=28:F=2^bits|
00006c10  3a 63 25 3d 30 3a 63 63  25 3d 30 3a 63 63 63 25  |:c%=0:cc%=0:ccc%|
00006c20  3d 30 3a 6f 25 3d 30 0d  23 28 0a e7 64 69 72 20  |=0:o%=0.#(..dir |
00006c30  8c 0d 23 32 3e 63 25 3d  8e 28 73 24 2b 22 2e 72  |..#2>c%=.(s$+".r|
00006c40  65 64 22 29 3a e7 63 25  3d 30 20 85 20 34 32 2c  |ed"):.c%=0 . 42,|
00006c50  22 52 65 64 20 66 69 6c  65 20 22 2b 73 24 2b 22  |"Red file "+s$+"|
00006c60  2e 72 65 64 20 6e 6f 74  20 66 6f 75 6e 64 22 0d  |.red not found".|
00006c70  23 3c 45 63 63 25 3d 8e  28 73 24 2b 22 2e 67 72  |#<Ecc%=.(s$+".gr|
00006c80  65 65 6e 22 29 3a e7 63  63 25 3d 30 20 85 34 32  |een"):.cc%=0 .42|
00006c90  2c 22 47 72 65 65 6e 20  66 69 6c 65 20 22 2b 73  |,"Green file "+s|
00006ca0  24 2b 22 2e 67 72 65 65  6e 20 6e 6f 74 20 66 6f  |$+".green not fo|
00006cb0  75 6e 64 22 0d 23 46 44  63 63 63 25 3d 8e 28 73  |und".#FDccc%=.(s|
00006cc0  24 2b 22 2e 62 6c 75 65  22 29 3a e7 63 63 63 25  |$+".blue"):.ccc%|
00006cd0  3d 30 20 85 34 32 2c 22  42 6c 75 65 20 66 69 6c  |=0 .42,"Blue fil|
00006ce0  65 20 22 2b 73 24 2b 22  2e 62 6c 75 65 20 6e 6f  |e "+s$+".blue no|
00006cf0  74 20 66 6f 75 6e 64 22  0d 23 50 05 cc 0d 23 5a  |t found".#P...#Z|
00006d00  2d 63 25 3d 8e 73 24 3a  e7 63 25 3d 30 20 85 20  |-c%=.s$:.c%=0 . |
00006d10  34 32 2c 22 46 69 6c 65  20 22 2b 73 24 2b 22 20  |42,"File "+s$+" |
00006d20  6e 6f 74 20 66 6f 75 6e  64 22 0d 23 64 05 cd 0d  |not found".#d...|
00006d30  23 6e 07 ea 20 85 0d 23  78 1f ee 20 85 20 ea 20  |#n.. ..#x.. . . |
00006d40  f7 20 85 3a fc 20 87 3a  f2 63 6c 6f 73 65 3a 85  |. .:. .:.close:.|
00006d50  20 9f 2c f6 24 0d 23 96  13 63 6f 6c 6f 75 72 69  | .,.$.#..colouri|
00006d60  6e 64 65 78 3d 32 35 35  0d 23 a0 13 c8 99 26 36  |ndex=255.#....&6|
00006d70  36 66 34 64 20 b8 3b 70  63 64 25 0d 23 aa 0e c8  |6f4d .;pcd%.#...|
00006d80  8e 20 66 74 79 70 65 20  ca 0d 23 b4 11 c9 20 26  |. ftype ..#... &|
00006d90  46 46 39 3a 66 6c 61 67  3d 30 0d 23 be 2e e7 a7  |FF9:flag=0.#....|
00006da0  22 2e 22 2b a4 75 63 28  73 24 29 2c 22 2e 48 49  |"."+.uc(s$),".HI|
00006db0  50 2e 22 29 84 a7 a4 75  63 28 73 24 29 2c 22 3a  |P.")...uc(s$),":|
00006dc0  48 49 50 2e 22 29 20 8c  0d 23 c8 20 66 6c 61 67  |HIP.") ..#. flag|
00006dd0  3d 33 30 30 3a 49 25 3d  a7 a4 75 63 28 73 24 29  |=300:I%=..uc(s$)|
00006de0  2c 22 48 49 50 2e 22 29  0d 23 d2 3f c1 73 24 2c  |,"HIP.").#.?.s$,|
00006df0  49 25 29 3d 22 4c 4f 50  2e 22 3a 63 63 25 3d 8e  |I%)="LOP.":cc%=.|
00006e00  73 24 3a e7 63 63 25 3d  30 20 85 34 32 2c 22 43  |s$:.cc%=0 .42,"C|
00006e10  61 6e 27 74 20 66 69 6e  64 20 4c 6f 70 20 66 69  |an't find Lop fi|
00006e20  6c 65 20 22 2b 73 24 0d  23 dc 05 cd 0d 23 e6 2b  |le "+s$.#....#.+|
00006e30  c9 20 26 46 46 30 3a cf  23 63 25 3d 30 3a 53 24  |. &FF0:.#c%=0:S$|
00006e40  3d 22 22 3a e3 49 25 3d  31 b8 34 3a 53 24 2b 3d  |="":.I%=1.4:S$+=|
00006e50  bd 9a 23 63 25 3a ed 0d  23 f0 26 e7 53 24 3d 22  |..#c%:..#.&.S$="|
00006e60  49 49 2a 22 2b bd 30 20  66 6c 61 67 3d 31 35 30  |II*"+.0 flag=150|
00006e70  30 3a 62 69 67 65 6e 64  69 61 6e 3d a3 0d 23 fa  |0:bigendian=..#.|
00006e80  29 e7 53 24 3d 22 4d 4d  22 2b bd 30 2b 22 2a 22  |).S$="MM"+.0+"*"|
00006e90  20 66 6c 61 67 3d 31 35  30 30 3a 62 69 67 65 6e  | flag=1500:bigen|
00006ea0  64 69 61 6e 3d b9 0d 24  04 21 c9 20 26 44 46 41  |dian=..$.!. &DFA|
00006eb0  3a 66 6c 61 67 3d 38 30  30 3a e7 64 69 72 20 66  |:flag=800:.dir f|
00006ec0  6c 61 67 3d 38 30 31 0d  24 0e 14 c9 20 26 44 45  |lag=801.$... &DE|
00006ed0  32 3a 66 6c 61 67 3d 31  30 30 30 0d 24 18 14 c9  |2:flag=1000.$...|
00006ee0  20 26 43 42 45 3a 66 6c  61 67 3d 33 38 30 30 0d  | &CBE:flag=3800.|
00006ef0  24 22 20 c9 20 26 42 45  38 3a e7 28 70 63 64 25  |$" . &BE8:.(pcd%|
00006f00  80 31 29 3d 30 20 66 6c  61 67 3d 33 36 30 30 0d  |.1)=0 flag=3600.|
00006f10  24 2c 14 c9 20 26 37 41  30 3a 66 6c 61 67 3d 31  |$,.. &7A0:flag=1|
00006f20  32 30 30 0d 24 36 14 c9  20 26 36 39 64 3a 66 6c  |200.$6.. &69d:fl|
00006f30  61 67 3d 32 30 30 30 0d  24 40 13 c9 20 26 36 39  |ag=2000.$@.. &69|
00006f40  39 3a 66 6c 61 67 3d 37  30 30 0d 24 4a 13 c9 20  |9:flag=700.$J.. |
00006f50  26 36 39 38 3a 66 6c 61  67 3d 31 30 30 0d 24 54  |&698:flag=100.$T|
00006f60  14 c9 20 26 36 39 37 3a  66 6c 61 67 3d 31 39 30  |.. &697:flag=190|
00006f70  30 0d 24 5e 14 c9 20 26  36 39 31 3a 66 6c 61 67  |0.$^.. &691:flag|
00006f80  3d 32 36 30 30 0d 24 68  14 c9 20 26 36 39 30 3a  |=2600.$h.. &690:|
00006f90  66 6c 61 67 3d 32 35 30  30 0d 24 72 13 c9 20 26  |flag=2500.$r.. &|
00006fa0  36 36 36 3a 66 6c 61 67  3d 36 36 36 0d 24 7c 14  |666:flag=666.$|.|
00006fb0  c9 20 26 36 30 31 3a 66  6c 61 67 3d 33 30 30 30  |. &601:flag=3000|
00006fc0  0d 24 86 14 c9 20 26 33  37 31 3a 66 6c 61 67 3d  |.$... &371:flag=|
00006fd0  33 31 30 30 0d 24 90 23  c9 20 26 33 30 30 3a 66  |3100.$.#. &300:f|
00006fe0  6c 61 67 3d 31 33 30 30  3a e7 64 69 72 20 66 6c  |lag=1300:.dir fl|
00006ff0  61 67 3d 31 33 30 31 0d  24 9a 1e c9 20 34 3a 66  |ag=1301.$... 4:f|
00007000  6c 61 67 3d 39 30 30 3a  e7 64 69 72 20 66 6c 61  |lag=900:.dir fla|
00007010  67 3d 39 30 31 0d 24 a4  10 c9 20 36 3a 66 6c 61  |g=901.$... 6:fla|
00007020  67 3d 39 35 30 0d 24 ae  05 cb 0d 24 b8 0e e7 66  |g=950.$....$...f|
00007030  6c 61 67 3d 2d 31 20 8c  0d 24 c2 25 cf 23 63 25  |lag=-1 ..$.%.#c%|
00007040  3d 30 3a 53 24 3d 22 22  3a e3 49 25 3d 31 b8 32  |=0:S$="":.I%=1.2|
00007050  32 3a 53 24 2b 3d bd 9a  23 63 25 3a ed 0d 24 cc  |2:S$+=..#c%:..$.|
00007060  1f e7 c0 53 24 2c 37 29  3d 22 46 53 49 66 69 6c  |...S$,7)="FSIfil|
00007070  65 22 20 66 6c 61 67 3d  32 31 30 30 0d 24 d6 29  |e" flag=2100.$.)|
00007080  e7 66 6c 61 67 3d 2d 31  20 e7 c0 53 24 2c 38 29  |.flag=-1 ..S$,8)|
00007090  3d 22 53 49 4d 50 4c 45  20 20 22 20 66 6c 61 67  |="SIMPLE  " flag|
000070a0  3d 32 38 30 30 0d 24 e0  43 e7 66 6c 61 67 3d 2d  |=2800.$.C.flag=-|
000070b0  31 20 e7 a4 75 63 28 c0  53 24 2c 38 29 29 3d 22  |1 ..uc(.S$,8))="|
000070c0  4d 45 52 43 53 4f 46 54  22 84 a4 75 63 28 c0 53  |MERCSOFT"..uc(.S|
000070d0  24 2c 38 29 29 3d 22 53  4e 41 50 53 48 4f 54 22  |$,8))="SNAPSHOT"|
000070e0  66 6c 61 67 3d 39 30 32  0d 24 ea 2d e7 66 6c 61  |flag=902.$.-.fla|
000070f0  67 3d 2d 31 20 e7 a4 75  63 28 c0 53 24 2c 38 29  |g=-1 ..uc(.S$,8)|
00007100  29 3d 22 4d 45 52 43 53  4f 46 31 22 20 66 6c 61  |)="MERCSOF1" fla|
00007110  67 3d 39 30 33 0d 24 f4  34 e7 66 6c 61 67 3d 2d  |g=903.$.4.flag=-|
00007120  31 20 e7 a4 75 63 28 c0  53 24 2c 31 33 29 29 3d  |1 ..uc(.S$,13))=|
00007130  22 49 52 4c 41 4d 20 59  55 56 20 34 31 31 22 20  |"IRLAM YUV 411" |
00007140  66 6c 61 67 3d 32 32 35  30 0d 24 fe 26 e7 66 6c  |flag=2250.$.&.fl|
00007150  61 67 3d 2d 31 20 e7 c0  53 24 2c 35 29 3d 22 49  |ag=-1 ..S$,5)="I|
00007160  72 6c 61 6d 22 20 66 6c  61 67 3d 32 32 30 30 0d  |rlam" flag=2200.|
00007170  25 08 2e e7 66 6c 61 67  3d 2d 31 20 e7 c0 53 24  |%...flag=-1 ..S$|
00007180  2c 32 29 3d 22 42 4d 22  20 66 6c 61 67 3d 32 34  |,2)="BM" flag=24|
00007190  30 30 3a 72 69 66 66 6f  66 66 25 3d 30 0d 25 12  |00:riffoff%=0.%.|
000071a0  58 e7 66 6c 61 67 3d 2d  31 20 e7 c0 53 24 2c 34  |X.flag=-1 ..S$,4|
000071b0  29 3d 22 52 49 46 46 22  20 80 20 c1 53 24 2c 39  |)="RIFF" . .S$,9|
000071c0  2c 38 29 3d 22 52 44 49  42 64 61 74 61 22 20 80  |,8)="RDIBdata" .|
000071d0  20 c1 53 24 2c 32 31 2c  32 29 3d 22 42 4d 22 20  | .S$,21,2)="BM" |
000071e0  66 6c 61 67 3d 32 34 30  30 3a 72 69 66 66 6f 66  |flag=2400:riffof|
000071f0  66 25 3d 32 30 0d 25 1c  24 e7 66 6c 61 67 3d 2d  |f%=20.%.$.flag=-|
00007200  31 20 e7 c0 53 24 2c 34  29 3d 22 47 49 46 38 22  |1 ..S$,4)="GIF8"|
00007210  20 66 6c 61 67 3d 35 30  30 0d 25 26 25 e7 66 6c  | flag=500.%&%.fl|
00007220  61 67 3d 2d 31 20 e7 c0  53 24 2c 35 29 3d 22 41  |ag=-1 ..S$,5)="A|
00007230  56 5f 56 4f 22 20 66 6c  61 67 3d 36 30 30 0d 25  |V_VO" flag=600.%|
00007240  30 32 e7 66 6c 61 67 3d  2d 31 20 e7 c0 53 24 2c  |02.flag=-1 ..S$,|
00007250  34 29 3d bd 26 35 39 2b  bd 26 41 36 2b bd 26 36  |4)=.&59+.&A6+.&6|
00007260  41 2b bd 26 39 35 20 66  6c 61 67 3d 31 31 30 30  |A+.&95 flag=1100|
00007270  0d 25 3a 2a e7 66 6c 61  67 3d 2d 31 20 e7 c0 53  |.%:*.flag=-1 ..S|
00007280  24 2c 34 29 3d bd 30 2b  bd 31 2b bd 30 2b bd 38  |$,4)=.0+.1+.0+.8|
00007290  20 66 6c 61 67 3d 31 34  30 30 0d 25 44 2a e7 66  | flag=1400.%D*.f|
000072a0  6c 61 67 3d 2d 31 20 e7  c0 53 24 2c 34 29 3d bd  |lag=-1 ..S$,4)=.|
000072b0  30 2b bd 31 2b bd 30 2b  bd 31 20 66 6c 61 67 3d  |0+.1+.0+.1 flag=|
000072c0  32 39 30 30 0d 25 4e 25  e7 66 6c 61 67 3d 2d 31  |2900.%N%.flag=-1|
000072d0  20 e7 c0 53 24 2c 34 29  3d 22 52 49 58 33 22 20  | ..S$,4)="RIX3" |
000072e0  66 6c 61 67 3d 32 37 30  30 0d 25 58 33 e7 66 6c  |flag=2700.%X3.fl|
000072f0  61 67 3d 2d 31 20 e7 c0  53 24 2c 34 29 3d 22 49  |ag=-1 ..S$,4)="I|
00007300  49 2a 22 2b bd 30 20 66  6c 61 67 3d 31 35 30 30  |I*"+.0 flag=1500|
00007310  3a 62 69 67 65 6e 64 69  61 6e 3d a3 0d 25 62 36  |:bigendian=..%b6|
00007320  e7 66 6c 61 67 3d 2d 31  20 e7 c0 53 24 2c 34 29  |.flag=-1 ..S$,4)|
00007330  3d 22 4d 4d 22 2b bd 30  2b 22 2a 22 20 66 6c 61  |="MM"+.0+"*" fla|
00007340  67 3d 31 35 30 30 3a 62  69 67 65 6e 64 69 61 6e  |g=1500:bigendian|
00007350  3d b9 0d 25 6c 28 e7 66  6c 61 67 3d 2d 31 20 e7  |=..%l(.flag=-1 .|
00007360  c0 53 24 2c 32 29 3d bd  26 35 32 2b bd 26 43 43  |.S$,2)=.&52+.&CC|
00007370  20 66 6c 61 67 3d 32 33  30 30 0d 25 76 44 e7 66  | flag=2300.%vD.f|
00007380  6c 61 67 3d 2d 31 20 e7  c0 53 24 2c 32 29 3d 22  |lag=-1 ..S$,2)="|
00007390  50 34 22 84 c0 53 24 2c  32 29 3d 22 50 35 22 84  |P4"..S$,2)="P5".|
000073a0  c0 53 24 2c 32 29 3d 22  50 36 22 20 66 6c 61 67  |.S$,2)="P6" flag|
000073b0  3d 33 33 30 30 3a 69 6e  66 6f 24 3d 22 22 0d 25  |=3300:info$="".%|
000073c0  80 24 e7 66 6c 61 67 3d  2d 31 20 e7 c0 53 24 2c  |.$.flag=-1 ..S$,|
000073d0  33 29 3d 22 50 31 35 22  20 66 6c 61 67 3d 33 34  |3)="P15" flag=34|
000073e0  30 30 0d 25 8a 24 e7 66  6c 61 67 3d 2d 31 20 e7  |00.%.$.flag=-1 .|
000073f0  c0 53 24 2c 33 29 3d 22  50 49 43 22 20 66 6c 61  |.S$,3)="PIC" fla|
00007400  67 3d 33 35 30 30 0d 25  94 24 e7 66 6c 61 67 3d  |g=3500.%.$.flag=|
00007410  2d 31 20 e7 c0 53 24 2c  33 29 3d 22 54 2d 49 22  |-1 ..S$,3)="T-I"|
00007420  20 66 6c 61 67 3d 33 38  30 30 0d 25 9e 29 e7 66  | flag=3800.%.).f|
00007430  6c 61 67 3d 2d 31 20 e7  a4 75 63 28 c0 53 24 2c  |lag=-1 ..uc(.S$,|
00007440  33 29 29 3d 22 50 31 33  22 20 66 6c 61 67 3d 33  |3))="P13" flag=3|
00007450  34 35 30 0d 25 a8 36 e7  66 6c 61 67 3d 2d 31 20  |450.%.6.flag=-1 |
00007460  e7 c0 53 24 2c 34 29 3d  22 46 4f 52 4d 22 20 e7  |..S$,4)="FORM" .|
00007470  c1 53 24 2c 39 2c 34 29  3d 22 49 4c 42 4d 22 20  |.S$,9,4)="ILBM" |
00007480  66 6c 61 67 3d 31 36 30  30 0d 25 b2 3a e7 66 6c  |flag=1600.%.:.fl|
00007490  61 67 3d 2d 31 20 e7 c0  53 24 2c 38 29 3d 22 41  |ag=-1 ..S$,8)="A|
000074a0  4c 50 49 41 52 31 32 22  20 66 6c 61 67 3d 33 39  |LPIAR12" flag=39|
000074b0  30 30 3a 63 6f 6c 6f 75  72 69 6e 64 65 78 3d 34  |00:colourindex=4|
000074c0  30 39 35 0d 25 bc 3b e7  66 6c 61 67 3d 2d 31 20  |095.%.;.flag=-1 |
000074d0  e7 c0 53 24 2c 38 29 3d  22 41 4c 50 49 41 52 31  |..S$,8)="ALPIAR1|
000074e0  36 22 20 66 6c 61 67 3d  33 39 30 35 3a 63 6f 6c  |6" flag=3905:col|
000074f0  6f 75 72 69 6e 64 65 78  3d 36 35 35 33 35 0d 25  |ourindex=65535.%|
00007500  c6 0e e7 66 6c 61 67 3d  2d 31 20 8c 0d 25 d0 23  |...flag=-1 ..%.#|
00007510  e7 c1 53 24 2c 37 2c 34  29 3d 22 4a 46 49 46 22  |..S$,7,4)="JFIF"|
00007520  20 84 20 66 74 79 70 65  3d 26 43 38 35 20 8c 0d  | . ftype=&C85 ..|
00007530  25 da 2a 6a 70 65 67 62  6c 6b 25 3d a4 64 69 6d  |%.*jpegblk%=.dim|
00007540  28 32 30 29 3a f2 63 61  63 68 65 73 69 7a 65 28  |(20):.cachesize(|
00007550  6a 70 65 67 62 6c 6b 25  29 0d 25 e4 12 e7 63 61  |jpegblk%).%...ca|
00007560  63 68 65 25 3c a2 23 63  25 20 8c 0d 25 ee 1d d9  |che%<.#c% ..%...|
00007570  23 63 25 3a 63 25 3d 30  3a 58 25 3d 8e 22 52 75  |#c%:c%=0:X%=."Ru|
00007580  6e 3a 64 6a 70 65 67 22  0d 25 f8 09 e7 58 25 20  |n:djpeg".%...X% |
00007590  8c 0d 26 02 2e d9 23 58  25 3a f2 73 75 62 74 61  |..&...#X%:.subta|
000075a0  73 6b 28 22 64 6a 70 65  67 20 22 2b 73 24 2b 22  |sk("djpeg "+s$+"|
000075b0  20 3c 57 69 6d 70 24 53  63 72 61 70 3e 22 29 0d  | <Wimp$Scrap>").|
000075c0  26 0c 05 cc 0d 26 16 30  c8 99 22 58 4f 53 5f 43  |&....&.0.."XOS_C|
000075d0  4c 49 22 2c 22 64 6a 70  65 67 20 22 2b 73 24 2b  |LI","djpeg "+s$+|
000075e0  22 20 3c 57 69 6d 70 24  53 63 72 61 70 3e 22 20  |" <Wimp$Scrap>" |
000075f0  b8 20 3b 56 0d 26 20 0b  e7 56 20 80 31 20 8c 0d  |. ;V.& ..V .1 ..|
00007600  26 2a 39 f2 73 75 62 74  61 73 6b 28 22 3c 43 68  |&*9.subtask("<Ch|
00007610  61 6e 67 65 46 53 49 24  44 69 72 3e 2e 64 6a 70  |angeFSI$Dir>.djp|
00007620  65 67 20 22 2b 73 24 2b  22 20 3c 57 69 6d 70 24  |eg "+s$+" <Wimp$|
00007630  53 63 72 61 70 3e 22 29  0d 26 34 05 cd 0d 26 3e  |Scrap>").&4...&>|
00007640  05 cd 0d 26 48 22 63 25  3d 8e 22 3c 57 69 6d 70  |...&H"c%=."<Wimp|
00007650  24 53 63 72 61 70 3e 22  3a e7 63 25 3d 30 20 8c  |$Scrap>":.c%=0 .|
00007660  3d 31 30 30 0d 26 52 3e  73 63 72 61 70 66 25 3d  |=100.&R>scrapf%=|
00007670  b9 3a 66 6c 61 67 3d 33  33 30 30 3a 69 6e 66 6f  |.:flag=3300:info|
00007680  24 3d 22 4a 50 45 47 20  28 4a 46 49 46 29 20 66  |$="JPEG (JFIF) f|
00007690  69 6c 65 20 63 6f 6e 76  65 72 74 65 64 20 74 6f  |ile converted to|
000076a0  20 22 0d 26 5c 05 cc 0d  26 66 0d 66 6c 61 67 3d  | ".&\...&f.flag=|
000076b0  33 37 30 30 0d 26 70 05  cd 0d 26 7a 05 cd 0d 26  |3700.&p...&z...&|
000076c0  84 05 cd 0d 26 8e 0e e7  66 6c 61 67 3d 2d 31 20  |....&...flag=-1 |
000076d0  8c 0d 26 98 15 e7 c0 53  24 2c 35 29 3d 22 62 74  |..&....S$,5)="bt|
000076e0  70 63 20 22 20 8c 0d 26  a2 42 d9 23 63 25 3a 63  |pc " ..&.B.#c%:c|
000076f0  25 3d 30 3a f2 73 75 62  74 61 73 6b 28 22 3c 43  |%=0:.subtask("<C|
00007700  68 61 6e 67 65 46 53 49  24 44 69 72 3e 2e 62 74  |hangeFSI$Dir>.bt|
00007710  70 63 20 22 2b 73 24 2b  22 20 3c 57 69 6d 70 24  |pc "+s$+" <Wimp$|
00007720  53 63 72 61 70 3e 22 29  0d 26 ac 22 63 25 3d 8e  |Scrap>").&."c%=.|
00007730  22 3c 57 69 6d 70 24 53  63 72 61 70 3e 22 3a e7  |"<Wimp$Scrap>":.|
00007740  63 25 3d 30 20 8c 3d 31  30 30 0d 26 b6 37 73 63  |c%=0 .=100.&.7sc|
00007750  72 61 70 66 25 3d b9 3a  66 6c 61 67 3d 33 33 30  |rapf%=.:flag=330|
00007760  30 3a 69 6e 66 6f 24 3d  22 42 54 50 43 20 66 69  |0:info$="BTPC fi|
00007770  6c 65 20 63 6f 6e 76 65  72 74 65 64 20 74 6f 20  |le converted to |
00007780  22 0d 26 c0 05 cd 0d 26  ca 05 cd 0d 26 d4 0e e7  |".&....&....&...|
00007790  66 6c 61 67 3d 2d 31 20  8c 0d 26 de 26 cf 23 63  |flag=-1 ..&.&.#c|
000077a0  25 3d 26 31 30 3a 53 24  3d 22 22 3a e3 49 25 3d  |%=&10:S$="":.I%=|
000077b0  31 b8 39 3a 53 24 2b 3d  bd 9a 23 63 25 3a ed 0d  |1.9:S$+=..#c%:..|
000077c0  26 e8 1c e7 53 24 3d 22  4d 49 4c 4c 49 50 45 44  |&...S$="MILLIPED|
000077d0  45 22 20 66 6c 61 67 3d  32 30 30 0d 26 f2 05 cd  |E" flag=200.&...|
000077e0  0d 26 fc 0e e7 66 6c 61  67 3d 2d 31 20 8c 0d 27  |.&...flag=-1 ..'|
000077f0  06 26 cf 23 63 25 3d 26  34 31 3a 53 24 3d 22 22  |.&.#c%=&41:S$=""|
00007800  3a e3 49 25 3d 31 b8 38  3a 53 24 2b 3d bd 9a 23  |:.I%=1.8:S$+=..#|
00007810  63 25 3a ed 0d 27 10 25  e7 c0 53 24 2c 34 29 3d  |c%:..'.%..S$,4)=|
00007820  22 50 4e 54 47 22 20 66  6c 61 67 3d 31 38 30 30  |"PNTG" flag=1800|
00007830  3a 73 74 25 3d 26 32 38  30 0d 27 1a 05 cd 0d 27  |:st%=&280.'....'|
00007840  24 0e e7 66 6c 61 67 3d  2d 31 20 8c 0d 27 2e 26  |$..flag=-1 ..'.&|
00007850  cf 23 63 25 3d 31 39 36  3a 53 24 3d 22 22 3a e3  |.#c%=196:S$="":.|
00007860  49 25 3d 31 b8 38 3a 53  24 2b 3d bd 9a 23 63 25  |I%=1.8:S$+=..#c%|
00007870  3a ed 0d 27 38 25 e7 c0  53 24 2c 34 29 3d 22 50  |:..'8%..S$,4)="P|
00007880  4e 54 47 22 20 66 6c 61  67 3d 31 38 30 30 3a 73  |NTG" flag=1800:s|
00007890  74 25 3d 26 32 65 32 0d  27 42 05 cd 0d 27 4c 0e  |t%=&2e2.'B...'L.|
000078a0  e7 66 6c 61 67 3d 2d 31  20 8c 0d 27 56 26 cf 23  |.flag=-1 ..'V&.#|
000078b0  63 25 3d 35 32 32 3a 53  24 3d 22 22 3a e3 49 25  |c%=522:S$="":.I%|
000078c0  3d 31 b8 38 3a 53 24 2b  3d bd 9a 23 63 25 3a ed  |=1.8:S$+=..#c%:.|
000078d0  0d 27 60 32 e7 53 24 3d  bd 30 2b bd 26 31 31 2b  |.'`2.S$=.0+.&11+|
000078e0  bd 32 2b bd 26 66 66 2b  bd 26 63 2b bd 30 2b bd  |.2+.&ff+.&c+.0+.|
000078f0  26 66 66 2b bd 26 66 65  20 66 6c 61 67 3d 31 38  |&ff+.&fe flag=18|
00007900  35 30 0d 27 6a 05 cd 0d  27 74 0e e7 66 6c 61 67  |50.'j...'t..flag|
00007910  3d 2d 31 20 8c 0d 27 7e  15 cf 23 63 25 3d 30 3a  |=-1 ..'~..#c%=0:|
00007920  e7 9a 23 63 25 3d 31 30  20 8c 0d 27 88 2b 43 25  |..#c%=10 ..'.+C%|
00007930  3d 9a 23 63 25 3a e7 43  25 3c 36 20 80 20 43 25  |=.#c%:.C%<6 . C%|
00007940  3c 3e 31 20 80 9a 23 63  25 3d 31 20 66 6c 61 67  |<>1 ..#c%=1 flag|
00007950  3d 31 39 30 30 0d 27 92  05 cd 0d 27 9c 05 cd 0d  |=1900.'....'....|
00007960  27 a6 4d e7 66 6c 61 67  3d 2d 31 20 e7 a7 22 2e  |'.M.flag=-1 ..".|
00007970  22 2b a4 75 63 28 73 24  29 2c 22 2e 50 43 58 2e  |"+.uc(s$),".PCX.|
00007980  22 29 84 a7 a4 75 63 28  73 24 29 2c 22 3a 50 43  |")...uc(s$),":PC|
00007990  58 2e 22 29 84 c2 73 24  2c 34 29 3d 22 2f 50 43  |X.")..s$,4)="/PC|
000079a0  58 22 20 66 6c 61 67 3d  31 39 30 30 0d 27 b0 42  |X" flag=1900.'.B|
000079b0  e7 66 6c 61 67 3d 2d 31  20 e7 a7 22 2e 22 2b a4  |.flag=-1 .."."+.|
000079c0  75 63 28 73 24 29 2c 22  2e 49 4d 41 47 45 2e 22  |uc(s$),".IMAGE."|
000079d0  29 84 a7 a4 75 63 28 73  24 29 2c 22 3a 49 4d 41  |)...uc(s$),":IMA|
000079e0  47 45 2e 22 29 20 66 6c  61 67 3d 34 30 30 0d 27  |GE.") flag=400.'|
000079f0  ba 29 e7 66 6c 61 67 3d  2d 31 20 e7 a4 75 63 28  |.).flag=-1 ..uc(|
00007a00  c2 73 24 2c 34 29 29 3d  22 2e 52 41 57 22 20 66  |.s$,4))=".RAW" f|
00007a10  6c 61 67 3d 31 30 30 0d  27 c4 29 e7 66 6c 61 67  |lag=100.'.).flag|
00007a20  3d 2d 31 20 e7 a4 75 63  28 c2 73 24 2c 33 29 29  |=-1 ..uc(.s$,3))|
00007a30  3d 22 54 47 41 22 20 66  6c 61 67 3d 32 30 30 30  |="TGA" flag=2000|
00007a40  0d 27 ce 29 e7 66 6c 61  67 3d 2d 31 20 e7 a4 75  |.'.).flag=-1 ..u|
00007a50  63 28 c2 73 24 2c 33 29  29 3d 22 56 44 41 22 20  |c(.s$,3))="VDA" |
00007a60  66 6c 61 67 3d 32 30 30  30 0d 27 d8 3e e7 66 6c  |flag=2000.'.>.fl|
00007a70  61 67 3d 2d 31 20 e7 a7  22 2e 22 2b a4 75 63 28  |ag=-1 .."."+.uc(|
00007a80  73 24 29 2c 22 2e 50 49  43 2e 22 29 84 a7 a4 75  |s$),".PIC.")...u|
00007a90  63 28 73 24 29 2c 22 3a  50 49 43 2e 22 29 20 66  |c(s$),":PIC.") f|
00007aa0  6c 61 67 3d 37 30 30 0d  27 e2 4d e7 66 6c 61 67  |lag=700.'.M.flag|
00007ab0  3d 2d 31 20 e7 a7 22 2e  22 2b a4 75 63 28 73 24  |=-1 .."."+.uc(s$|
00007ac0  29 2c 22 2e 49 4d 47 2e  22 29 84 a7 a4 75 63 28  |),".IMG.")...uc(|
00007ad0  73 24 29 2c 22 3a 49 4d  47 2e 22 29 84 c2 73 24  |s$),":IMG.")..s$|
00007ae0  2c 34 29 3d 22 2f 49 4d  47 22 20 66 6c 61 67 3d  |,4)="/IMG" flag=|
00007af0  31 34 30 30 0d 27 ec 4d  e7 66 6c 61 67 3d 2d 31  |1400.'.M.flag=-1|
00007b00  20 e7 a7 22 2e 22 2b a4  75 63 28 73 24 29 2c 22  | .."."+.uc(s$),"|
00007b10  2e 44 53 50 2e 22 29 84  a7 a4 75 63 28 73 24 29  |.DSP.")...uc(s$)|
00007b20  2c 22 3a 44 53 50 2e 22  29 84 c2 73 24 2c 34 29  |,":DSP.")..s$,4)|
00007b30  3d 22 2f 44 53 50 22 20  66 6c 61 67 3d 31 37 30  |="/DSP" flag=170|
00007b40  30 0d 27 f6 2a e7 66 6c  61 67 3d 2d 31 20 e7 a4  |0.'.*.flag=-1 ..|
00007b50  75 63 28 c2 73 24 2c 34  29 29 3d 22 2f 52 47 42  |uc(.s$,4))="/RGB|
00007b60  22 20 66 6c 61 67 3d 33  32 30 30 0d 28 00 3c e7  |" flag=3200.(.<.|
00007b70  66 6c 61 67 3d 2d 31 20  80 28 a4 75 63 28 c2 73  |flag=-1 .(.uc(.s|
00007b80  24 2c 34 29 29 3d 22 2f  50 43 44 22 84 66 74 79  |$,4))="/PCD".fty|
00007b90  70 65 3d 26 62 65 38 29  80 28 28 70 63 64 25 80  |pe=&be8).((pcd%.|
00007ba0  31 29 3d 31 29 20 8c 0d  28 0a 6b d9 23 63 25 3a  |1)=1) ..(.k.#c%:|
00007bb0  63 25 3d 30 3a f2 73 75  62 74 61 73 6b 28 22 3c  |c%=0:.subtask("<|
00007bc0  43 68 61 6e 67 65 46 53  49 24 44 69 72 3e 2e 68  |ChangeFSI$Dir>.h|
00007bd0  70 63 64 74 6f 70 70 6d  20 2d 33 20 2d 61 20 22  |pcdtoppm -3 -a "|
00007be0  2b 73 24 2b 22 20 3c 57  69 6d 70 24 53 63 72 61  |+s$+" <Wimp$Scra|
00007bf0  70 3e 20 7b 20 3e 20 3c  43 68 61 6e 67 65 46 53  |p> { > <ChangeFS|
00007c00  49 24 44 69 72 3e 2e 70  63 64 74 65 6d 70 20 7d  |I$Dir>.pcdtemp }|
00007c10  22 29 0d 28 14 4d 63 25  3d 8e 22 3c 57 69 6d 70  |").(.Mc%=."<Wimp|
00007c20  24 53 63 72 61 70 3e 22  3a 73 63 72 61 70 66 25  |$Scrap>":scrapf%|
00007c30  3d b9 3a 66 6c 61 67 3d  33 33 30 30 3a 69 6e 66  |=.:flag=3300:inf|
00007c40  6f 24 3d 22 50 68 6f 74  6f 43 44 20 66 69 6c 65  |o$="PhotoCD file|
00007c50  20 63 6f 6e 76 65 72 74  65 64 20 74 6f 20 22 0d  | converted to ".|
00007c60  28 1e 05 cd 0d 28 28 05  cd 0d 28 32 63 e7 66 6c  |(....((...(2c.fl|
00007c70  61 67 3d 2d 31 20 f2 63  6c 6f 73 65 3a 85 20 34  |ag=-1 .close:. 4|
00007c80  32 2c 22 53 6f 72 72 79  3a 20 66 6f 72 6d 61 74  |2,"Sorry: format|
00007c90  20 6e 6f 74 20 72 65 63  6f 67 6e 69 73 65 64 20  | not recognised |
00007ca0  2d 20 70 6c 65 61 73 65  20 74 72 79 20 61 67 61  |- please try aga|
00007cb0  69 6e 20 6f 72 20 63 6f  6e 74 61 63 74 20 79 6f  |in or contact yo|
00007cc0  75 72 20 73 75 70 70 6c  69 65 72 22 0d 28 3c 42  |ur supplier".(<B|
00007cd0  73 74 65 70 32 34 3d 31  3a 69 6e 70 75 74 3d 38  |step24=1:input=8|
00007ce0  3a 68 61 6d 3d 30 3a 70  6c 61 6e 61 72 25 3d 30  |:ham=0:planar%=0|
00007cf0  3a 62 69 67 65 6e 64 69  61 6e 62 69 74 73 3d a3  |:bigendianbits=.|
00007d00  3a 72 24 3d 22 46 4e 22  2b c3 66 6c 61 67 0d 28  |:r$="FN"+.flag.(|
00007d10  46 39 63 6f 6d 70 72 65  73 73 69 6f 6e 3d 30 3a  |F9compression=0:|
00007d20  68 70 72 65 64 69 63 74  25 3d 31 3a 73 74 72 69  |hpredict%=1:stri|
00007d30  70 72 6f 77 73 25 3d 2d  31 3a 63 61 63 68 65 62  |prows%=-1:cacheb|
00007d40  79 74 65 73 25 3d a3 0d  28 50 1f e7 78 64 69 76  |ytes%=..(P..xdiv|
00007d50  25 3d 30 20 80 20 79 64  69 76 25 3d 30 20 73 63  |%=0 . ydiv%=0 sc|
00007d60  61 6c 65 25 3d a3 0d 28  5a 15 de 20 72 25 28 63  |ale%=..(Z.. r%(c|
00007d70  6f 6c 6f 75 72 69 6e 64  65 78 29 0d 28 64 25 de  |olourindex).(d%.|
00007d80  20 67 25 28 63 6f 6c 6f  75 72 69 6e 64 65 78 29  | g%(colourindex)|
00007d90  2c 62 25 28 63 6f 6c 6f  75 72 69 6e 64 65 78 29  |,b%(colourindex)|
00007da0  0d 28 6e 0d c8 8e 20 66  6c 61 67 20 ca 0d 28 78  |.(n... flag ..(x|
00007db0  07 c9 20 30 0d 28 82 40  71 75 61 6e 74 25 3d 34  |.. 0.(.@quant%=4|
00007dc0  3a cf 23 63 25 3d 34 3a  46 25 3d a4 57 2b 26 31  |:.#c%=4:F%=.W+&1|
00007dd0  43 3a cf 23 63 25 3d 46  25 3a 73 74 25 3d a4 57  |C:.#c%=F%:st%=.W|
00007de0  2b 46 25 2d 26 32 30 3a  4b 25 3d a4 57 2b 46 25  |+F%-&20:K%=.W+F%|
00007df0  2d 26 32 30 0d 28 8c 13  73 6d 3d a4 57 3a e7 73  |-&20.(..sm=.W:.s|
00007e00  6d 3c 32 35 36 20 8c 0d  28 96 14 c8 99 35 33 2c  |m<256 ..(....53,|
00007e10  73 6d 2c 33 20 b8 20 2c  2c 49 25 0d 28 a0 0b c8  |sm,3 . ,,I%.(...|
00007e20  8e 20 49 25 20 ca 0d 28  aa 25 c9 20 31 3a e7 73  |. I% ..(.%. 1:.s|
00007e30  74 25 3d 46 25 2b 31 32  20 f2 64 65 66 70 61 6c  |t%=F%+12 .defpal|
00007e40  32 20 8b f2 69 70 61 6c  28 32 29 0d 28 b4 35 cf  |2 ..ipal(2).(.5.|
00007e50  23 63 25 3d 46 25 2d 31  36 3a 73 78 25 3d 28 a4  |#c%=F%-16:sx%=(.|
00007e60  57 2b 31 29 2a 33 32 3a  72 6f 77 62 79 74 65 73  |W+1)*32:rowbytes|
00007e70  25 3d 73 78 25 3e 3e 33  3a 69 6e 70 75 74 3d 31  |%=sx%>>3:input=1|
00007e80  0d 28 be 1d 73 79 25 3d  a4 57 2b 31 3a 49 25 3d  |.(..sy%=.W+1:I%=|
00007e90  a4 57 3a 73 78 25 2d 3d  33 31 2d a4 57 0d 28 c8  |.W:sx%-=31-.W.(.|
00007ea0  25 c9 20 33 3a e7 73 74  25 3d 46 25 2b 31 32 20  |%. 3:.st%=F%+12 |
00007eb0  f2 64 65 66 70 61 6c 34  20 8b f2 69 70 61 6c 28  |.defpal4 ..ipal(|
00007ec0  34 29 0d 28 d2 35 cf 23  63 25 3d 46 25 2d 31 36  |4).(.5.#c%=F%-16|
00007ed0  3a 73 78 25 3d 28 a4 57  2b 31 29 2a 31 36 3a 72  |:sx%=(.W+1)*16:r|
00007ee0  6f 77 62 79 74 65 73 25  3d 73 78 25 3e 3e 32 3a  |owbytes%=sx%>>2:|
00007ef0  69 6e 70 75 74 3d 32 0d  28 dc 21 73 79 25 3d a4  |input=2.(.!sy%=.|
00007f00  57 2b 31 3a 49 25 3d a4  57 3a 73 78 25 2d 3d 28  |W+1:I%=.W:sx%-=(|
00007f10  33 31 2d a4 57 29 81 32  0d 28 e6 28 c9 20 31 35  |31-.W).2.(.(. 15|
00007f20  3a e7 73 74 25 3d 46 25  2b 31 32 20 f2 64 65 66  |:.st%=F%+12 .def|
00007f30  70 61 6c 31 36 20 8b f2  69 70 61 6c 28 31 36 29  |pal16 ..ipal(16)|
00007f40  0d 28 f0 34 cf 23 63 25  3d 46 25 2d 31 36 3a 73  |.(.4.#c%=F%-16:s|
00007f50  78 25 3d 28 a4 57 2b 31  29 2a 38 3a 72 6f 77 62  |x%=(.W+1)*8:rowb|
00007f60  79 74 65 73 25 3d 73 78  25 3e 3e 31 3a 69 6e 70  |ytes%=sx%>>1:inp|
00007f70  75 74 3d 34 0d 28 fa 21  73 79 25 3d a4 57 2b 31  |ut=4.(.!sy%=.W+1|
00007f80  3a 49 25 3d a4 57 3a 73  78 25 2d 3d 28 33 31 2d  |:I%=.W:sx%-=(31-|
00007f90  a4 57 29 81 34 0d 29 04  19 c9 20 36 33 2c 32 35  |.W).4.)... 63,25|
00007fa0  35 3a e7 73 74 25 3d 46  25 2b 31 32 20 8c 0d 29  |5:.st%=F%+12 ..)|
00007fb0  0e 0b f2 64 65 66 70 61  6c 0d 29 18 05 cc 0d 29  |...defpal.)....)|
00007fc0  22 12 e7 4b 25 3e 73 74  25 20 4b 25 3d 73 74 25  |"..K%>st% K%=st%|
00007fd0  0d 29 2c 1c e7 4b 25 2d  31 32 2d 46 25 3d 32 30  |.),..K%-12-F%=20|
00007fe0  34 38 20 84 49 25 3d 32  35 35 20 8c 0d 29 36 0c  |48 .I%=255 ..)6.|
00007ff0  cf 23 63 25 3d 26 33 38  0d 29 40 15 e3 43 25 3d  |.#c%=&38.)@..C%=|
00008000  30 b8 32 35 35 3a 44 25  3d 9a 23 63 25 0d 29 4a  |0.255:D%=.#c%.)J|
00008010  39 72 25 28 43 25 29 3d  9a 23 63 25 2f 32 35 35  |9r%(C%)=.#c%/255|
00008020  2a 46 3a 67 25 28 43 25  29 3d 9a 23 63 25 2f 32  |*F:g%(C%)=.#c%/2|
00008030  35 35 2a 46 3a 62 25 28  43 25 29 3d 9a 23 63 25  |55*F:b%(C%)=.#c%|
00008040  2f 32 35 35 2a 46 0d 29  54 0b 44 25 3d a4 57 3a  |/255*F.)T.D%=.W:|
00008050  ed 0d 29 5e 05 cc 0d 29  68 0b f2 69 70 61 6c 36  |..)^...)h..ipal6|
00008060  33 0d 29 72 05 cd 0d 29  7c 05 cd 0d 29 86 47 cf  |3.)r...)|...).G.|
00008070  23 63 25 3d 46 25 2d 31  36 3a 73 78 25 3d 28 a4  |#c%=F%-16:sx%=(.|
00008080  57 2b 31 29 2a 34 3a 72  6f 77 62 79 74 65 73 25  |W+1)*4:rowbytes%|
00008090  3d 73 78 25 3a 73 79 25  3d a4 57 2b 31 3a 49 25  |=sx%:sy%=.W+1:I%|
000080a0  3d a4 57 3a 73 78 25 2d  3d 28 33 31 2d a4 57 29  |=.W:sx%-=(31-.W)|
000080b0  81 38 0d 29 90 29 7f 20  85 34 32 2c 22 4e 6f 74  |.8.).). .42,"Not|
000080c0  20 75 6e 64 65 72 73 74  6f 6f 64 20 52 49 53 43  | understood RISC|
000080d0  20 4f 53 20 73 70 72 69  74 65 22 0d 29 9a 05 cb  | OS sprite".)...|
000080e0  0d 29 a4 40 72 24 3d 22  46 4e 38 22 3a c8 99 35  |.).@r$="FN8":..5|
000080f0  33 2c 73 6d 2c 34 20 b8  20 2c 2c 6e 78 3a c8 99  |3,sm,4 . ,,nx:..|
00008100  35 33 2c 73 6d 2c 35 20  b8 20 2c 2c 6e 79 3a 6e  |53,sm,5 . ,,ny:n|
00008110  78 3d 31 3c 3c 6e 78 3a  6e 79 3d 31 3c 3c 6e 79  |x=1<<nx:ny=1<<ny|
00008120  0d 29 ae 2d e7 73 63 61  6c 65 25 20 78 6d 75 6c  |.).-.scale% xmul|
00008130  25 3d 78 6d 75 6c 25 2a  6e 78 2f 32 3a 79 6d 75  |%=xmul%*nx/2:ymu|
00008140  6c 25 3d 79 6d 75 6c 25  2a 6e 79 2f 32 0d 29 b8  |l%=ymul%*ny/2.).|
00008150  53 69 6e 66 6f 24 3d 22  52 49 53 43 20 4f 53 20  |Sinfo$="RISC OS |
00008160  73 70 72 69 74 65 2c 20  6d 6f 64 65 20 22 2b c3  |sprite, mode "+.|
00008170  73 6d 2b 22 20 22 2b c3  73 78 25 2b 22 20 62 79  |sm+" "+.sx%+" by|
00008180  20 22 2b c3 73 79 25 2b  22 20 70 69 78 65 6c 73  | "+.sy%+" pixels|
00008190  2c 20 22 2b a4 62 69 74  73 28 69 6e 70 75 74 29  |, "+.bits(input)|
000081a0  0d 29 c2 05 cc 0d 29 cc  19 62 70 70 25 3d 73 6d  |.)....)..bpp%=sm|
000081b0  3e 3e 3e 32 37 3a c8 8e  62 70 70 25 20 ca 0d 29  |>>>27:..bpp% ..)|
000081c0  d6 39 c9 20 31 3a 62 70  70 25 3d 31 3a 72 24 3d  |.9. 1:bpp%=1:r$=|
000081d0  22 46 4e 38 22 3a e7 73  74 25 3d 46 25 2b 31 32  |"FN8":.st%=F%+12|
000081e0  20 f2 64 65 66 70 61 6c  32 20 8b f2 6e 65 77 72  | .defpal2 ..newr|
000081f0  6f 70 61 6c 28 32 29 0d  29 e0 39 c9 20 32 3a 62  |opal(2).).9. 2:b|
00008200  70 70 25 3d 32 3a 72 24  3d 22 46 4e 38 22 3a e7  |pp%=2:r$="FN8":.|
00008210  73 74 25 3d 46 25 2b 31  32 20 f2 64 65 66 70 61  |st%=F%+12 .defpa|
00008220  6c 34 20 8b f2 6e 65 77  72 6f 70 61 6c 28 34 29  |l4 ..newropal(4)|
00008230  0d 29 ea 3b c9 20 33 3a  62 70 70 25 3d 34 3a 72  |.).;. 3:bpp%=4:r|
00008240  24 3d 22 46 4e 38 22 3a  e7 73 74 25 3d 46 25 2b  |$="FN8":.st%=F%+|
00008250  31 32 20 f2 64 65 66 70  61 6c 31 36 20 8b f2 6e  |12 .defpal16 ..n|
00008260  65 77 72 6f 70 61 6c 28  31 36 29 0d 29 f4 3a c9  |ewropal(16).).:.|
00008270  20 34 3a 62 70 70 25 3d  38 3a 72 24 3d 22 46 4e  | 4:bpp%=8:r$="FN|
00008280  38 22 3a e7 73 74 25 3d  46 25 2b 31 32 20 f2 64  |8":.st%=F%+12 .d|
00008290  65 66 70 61 6c 20 8b f2  6e 65 77 72 6f 70 61 6c  |efpal ..newropal|
000082a0  28 32 35 36 29 0d 29 fe  26 c9 20 35 3a 62 70 70  |(256).).&. 5:bpp|
000082b0  25 3d 31 36 3a 72 24 3d  22 46 4e 31 36 22 3a e7  |%=16:r$="FN16":.|
000082c0  73 74 25 3d 46 25 2b 31  32 20 8b 0d 2a 08 24 de  |st%=F%+12 ..*.$.|
000082d0  20 72 70 61 6c 25 28 32  35 35 29 2c 67 70 61 6c  | rpal%(255),gpal|
000082e0  25 28 32 35 35 29 3a 73  74 65 70 32 34 3d 32 0d  |%(255):step24=2.|
000082f0  2a 12 0d e3 43 25 3d 30  b8 32 35 35 0d 2a 1c 22  |*...C%=0.255.*."|
00008300  67 70 61 6c 25 28 43 25  29 3d 28 43 25 3e 3e 35  |gpal%(C%)=(C%>>5|
00008310  29 3c 3c 38 20 84 20 28  43 25 80 33 31 29 0d 2a  |)<<8 . (C%.31).*|
00008320  26 2b 72 70 61 6c 25 28  43 25 29 3d 28 28 43 25  |&+rpal%(C%)=((C%|
00008330  3e 3e 32 29 80 33 31 29  3c 3c 31 36 20 84 20 28  |>>2).31)<<16 . (|
00008340  43 25 80 33 29 3c 3c 31  31 0d 2a 30 05 ed 0d 2a  |C%.3)<<11.*0...*|
00008350  3a 31 e3 43 25 3d 30 b8  33 31 3a 72 25 28 43 25  |:1.C%=0.31:r%(C%|
00008360  29 3d 43 25 2f 33 31 2a  46 3a ed 3a 67 25 28 29  |)=C%/31*F:.:g%()|
00008370  3d 72 25 28 29 3a 62 25  28 29 3d 72 25 28 29 0d  |=r%():b%()=r%().|
00008380  2a 44 2d c9 20 36 3a 62  70 70 25 3d 33 32 3a 72  |*D-. 6:bpp%=32:r|
00008390  24 3d 22 46 4e 32 34 22  3a e7 73 74 25 3d 46 25  |$="FN24":.st%=F%|
000083a0  2b 31 32 20 f2 6e 6f 70  61 6c 20 8b 0d 2a 4e 21  |+12 .nopal ..*N!|
000083b0  72 62 6f 25 3d 30 3a 67  62 6f 25 3d 31 3a 62 62  |rbo%=0:gbo%=1:bb|
000083c0  6f 25 3d 32 3a 73 74 65  70 32 34 3d 34 0d 2a 58  |o%=2:step24=4.*X|
000083d0  2d c9 20 38 3a 62 70 70  25 3d 32 34 3a 72 24 3d  |-. 8:bpp%=24:r$=|
000083e0  22 46 4e 32 34 22 3a e7  73 74 25 3d 46 25 2b 31  |"FN24":.st%=F%+1|
000083f0  32 20 f2 6e 6f 70 61 6c  20 8b 0d 2a 62 18 72 62  |2 .nopal ..*b.rb|
00008400  6f 25 3d 30 3a 67 62 6f  25 3d 31 3a 62 62 6f 25  |o%=0:gbo%=1:bbo%|
00008410  3d 32 0d 2a 6c 38 7f 20  85 34 32 2c 22 4e 6f 74  |=2.*l8. .42,"Not|
00008420  20 75 6e 64 65 72 73 74  6f 6f 64 20 6e 65 77 20  | understood new |
00008430  66 6f 72 6d 61 74 20 52  49 53 43 20 4f 53 20 73  |format RISC OS s|
00008440  70 72 69 74 65 20 62 70  70 22 0d 2a 76 05 cb 0d  |prite bpp".*v...|
00008450  2a 80 28 6e 78 3d 28 73  6d 3e 3e 31 29 20 80 26  |*.(nx=(sm>>1) .&|
00008460  31 66 66 66 3a 6e 79 3d  28 73 6d 3e 3e 31 34 29  |1fff:ny=(sm>>14)|
00008470  20 80 26 31 66 66 66 0d  2a 8a 47 e7 73 63 61 6c  | .&1fff.*.G.scal|
00008480  65 25 20 78 64 69 76 25  3d 78 64 69 76 25 2a 6e  |e% xdiv%=xdiv%*n|
00008490  78 3a 79 64 69 76 25 3d  79 64 69 76 25 2a 6e 79  |x:ydiv%=ydiv%*ny|
000084a0  3a 78 6d 75 6c 25 3d 78  6d 75 6c 25 2a 39 30 3a  |:xmul%=xmul%*90:|
000084b0  79 6d 75 6c 25 3d 79 6d  75 6c 25 2a 39 30 0d 2a  |ymul%=ymul%*90.*|
000084c0  94 5a cf 23 63 25 3d 46  25 2d 31 36 3a 72 6f 77  |.Z.#c%=F%-16:row|
000084d0  62 79 74 65 73 25 3d 28  a4 57 2b 31 29 2a 34 3a  |bytes%=(.W+1)*4:|
000084e0  73 79 25 3d a4 57 2b 31  3a 49 25 3d a4 57 3a 73  |sy%=.W+1:I%=.W:s|
000084f0  78 25 3d 28 72 6f 77 62  79 74 65 73 25 2a 38 2d  |x%=(rowbytes%*8-|
00008500  28 33 31 2d a4 57 29 29  2f 62 70 70 25 3a 69 6e  |(31-.W))/bpp%:in|
00008510  70 75 74 3d 62 70 70 25  0d 2a 9e 4a 69 6e 66 6f  |put=bpp%.*.Jinfo|
00008520  24 3d 22 4e 65 77 20 52  49 53 43 20 4f 53 20 73  |$="New RISC OS s|
00008530  70 72 69 74 65 2c 20 22  2b c3 73 78 25 2b 22 20  |prite, "+.sx%+" |
00008540  62 79 20 22 2b c3 73 79  25 2b 22 20 70 69 78 65  |by "+.sy%+" pixe|
00008550  6c 73 2c 20 22 2b a4 62  69 74 73 28 69 6e 70 75  |ls, "+.bits(inpu|
00008560  74 29 0d 2a a8 15 e7 62  70 70 25 3d 33 32 20 69  |t).*...bpp%=32 i|
00008570  6e 70 75 74 3d 32 34 0d  2a b2 05 cd 0d 2a bc 15  |nput=24.*....*..|
00008580  cf 23 63 25 3d 73 74 25  3a 63 61 63 68 65 25 3d  |.#c%=st%:cache%=|
00008590  b9 0d 2a c6 09 c9 20 31  30 30 0d 2a d0 45 71 75  |..*... 100.*.Equ|
000085a0  61 6e 74 25 3d 38 3a cf  23 63 25 3d 30 3a 73 78  |ant%=8:.#c%=0:sx|
000085b0  25 3d a4 48 57 3a 73 79  25 3d a4 48 57 3a f2 6e  |%=.HW:sy%=.HW:.n|
000085c0  6f 70 61 6c 3a 69 6e 70  75 74 3d 32 34 3a 72 6f  |opal:input=24:ro|
000085d0  77 62 79 74 65 73 25 3d  73 78 25 2a 33 2b 32 0d  |wbytes%=sx%*3+2.|
000085e0  2a da 35 72 62 6f 25 3d  32 3a 67 62 6f 25 3d 32  |*.5rbo%=2:gbo%=2|
000085f0  2b 73 78 25 3a 62 62 6f  25 3d 32 2b 32 2a 73 78  |+sx%:bbo%=2+2*sx|
00008600  25 3a 72 24 3d 22 46 4e  32 34 22 3a 63 61 63 68  |%:r$="FN24":cach|
00008610  65 25 3d b9 0d 2a e4 4a  69 6e 66 6f 24 3d 22 51  |e%=..*.Jinfo$="Q|
00008620  52 54 20 2e 72 61 77 20  69 6d 61 67 65 2c 20 22  |RT .raw image, "|
00008630  2b c3 73 78 25 2b 22 20  62 79 20 22 2b c3 73 79  |+.sx%+" by "+.sy|
00008640  25 2b 22 20 70 69 78 65  6c 73 2c 20 32 34 20 62  |%+" pixels, 24 b|
00008650  69 74 73 20 70 65 72 20  70 69 78 65 6c 22 0d 2a  |its per pixel".*|
00008660  ee 09 c9 20 32 30 30 0d  2a f8 47 71 75 61 6e 74  |... 200.*.Gquant|
00008670  25 3d 38 3a cf 23 63 25  3d 35 3a 73 78 25 3d a4  |%=8:.#c%=5:sx%=.|
00008680  48 57 3a 73 79 25 3d a4  48 57 3a 73 78 25 3d 28  |HW:sy%=.HW:sx%=(|
00008690  a4 48 57 2d 73 78 25 2b  32 29 2f 32 3a 73 79 25  |.HW-sx%+2)/2:sy%|
000086a0  3d 28 a4 48 57 2d 73 79  25 2b 32 29 2f 32 0d 2b  |=(.HW-sy%+2)/2.+|
000086b0  02 24 cf 23 63 25 3d 26  31 61 3a 63 61 64 73 6f  |.$.#c%=&1a:cadso|
000086c0  66 74 25 3d 9a 23 63 25  3a cf 23 63 25 3d 26 32  |ft%=.#c%:.#c%=&2|
000086d0  30 30 0d 2b 0c 3f e3 43  25 3d 30 b8 32 35 35 3a  |00.+.?.C%=0.255:|
000086e0  72 25 28 43 25 29 3d 9a  23 63 25 2f 32 35 35 2a  |r%(C%)=.#c%/255*|
000086f0  46 3a ed 3a e3 43 25 3d  30 b8 32 35 35 3a 67 25  |F:.:.C%=0.255:g%|
00008700  28 43 25 29 3d 9a 23 63  25 2f 32 35 35 2a 46 3a  |(C%)=.#c%/255*F:|
00008710  ed 0d 2b 16 21 e3 43 25  3d 30 b8 32 35 35 3a 62  |..+.!.C%=0.255:b|
00008720  25 28 43 25 29 3d 9a 23  63 25 2f 32 35 35 2a 46  |%(C%)=.#c%/255*F|
00008730  3a ed 0d 2b 20 2d cf 23  63 25 3d 26 36 30 30 3a  |:..+ -.#c%=&600:|
00008740  73 74 25 3d 26 36 30 30  3a 63 61 63 68 65 25 3d  |st%=&600:cache%=|
00008750  b9 3a e7 63 61 64 73 6f  66 74 25 3d 32 20 8c 0d  |.:.cadsoft%=2 ..|
00008760  2b 2a 43 72 65 70 25 3d  30 3a 72 24 3d 22 46 4e  |+*Crep%=0:r$="FN|
00008770  31 31 30 30 22 3a 70 6c  62 75 66 66 25 3d a4 64  |1100":plbuff%=.d|
00008780  69 6d 28 73 78 25 29 3a  70 6c 62 79 74 65 73 25  |im(sx%):plbytes%|
00008790  3d 73 78 25 3a 63 61 63  68 65 62 79 74 65 73 25  |=sx%:cachebytes%|
000087a0  3d b9 0d 2b 34 05 cc 0d  2b 3e 1a 72 24 3d 22 46  |=..+4...+>.r$="F|
000087b0  4e 38 22 3a 72 6f 77 62  79 74 65 73 25 3d 73 78  |N8":rowbytes%=sx|
000087c0  25 0d 2b 48 05 cd 0d 2b  52 5b 69 6e 66 6f 24 3d  |%.+H...+R[info$=|
000087d0  22 43 61 64 73 6f 66 74  20 74 79 70 65 20 22 2b  |"Cadsoft type "+|
000087e0  c3 63 61 64 73 6f 66 74  25 2b 22 20 69 6d 61 67  |.cadsoft%+" imag|
000087f0  65 2c 20 22 2b c3 73 78  25 2b 22 20 62 79 20 22  |e, "+.sx%+" by "|
00008800  2b c3 73 79 25 2b 22 20  70 69 78 65 6c 73 2c 20  |+.sy%+" pixels, |
00008810  38 20 62 69 74 73 20 70  65 72 20 70 69 78 65 6c  |8 bits per pixel|
00008820  22 0d 2b 5c 09 c9 20 33  30 30 0d 2b 66 49 71 75  |".+\.. 300.+fIqu|
00008830  61 6e 74 25 3d 35 3a cf  23 63 25 3d 26 32 63 3a  |ant%=5:.#c%=&2c:|
00008840  73 74 25 3d a4 57 2b 28  26 33 38 2d 26 32 63 29  |st%=.W+(&38-&2c)|
00008850  3a cf 23 63 63 25 3d 26  32 63 3a 73 74 63 63 25  |:.#cc%=&2c:stcc%|
00008860  3d a4 57 31 28 63 63 25  29 2b 28 26 33 38 2d 26  |=.W1(cc%)+(&38-&|
00008870  32 63 29 0d 2b 70 37 cf  23 63 25 3d 26 31 63 3a  |2c).+p7.#c%=&1c:|
00008880  73 78 25 3d 28 a4 57 2b  31 29 2a 34 3a 73 79 25  |sx%=(.W+1)*4:sy%|
00008890  3d a4 57 2b 31 3a cf 23  63 25 3d 73 74 25 3a cf  |=.W+1:.#c%=st%:.|
000088a0  23 63 63 25 3d 73 74 63  63 25 0d 2b 7a 3b de 20  |#cc%=stcc%.+z;. |
000088b0  72 70 61 6c 25 28 32 35  35 29 2c 67 70 61 6c 25  |rpal%(255),gpal%|
000088c0  28 32 35 35 29 3a 69 6e  70 75 74 3d 31 36 3a 63  |(255):input=16:c|
000088d0  61 63 68 65 25 3d b9 3a  72 6f 77 62 79 74 65 73  |ache%=.:rowbytes|
000088e0  25 3d 73 78 25 0d 2b 84  0d e3 43 25 3d 30 b8 32  |%=sx%.+...C%=0.2|
000088f0  35 35 0d 2b 8e 2e 72 70  61 6c 25 28 43 25 29 3d  |55.+..rpal%(C%)=|
00008900  43 25 80 37 20 84 20 28  43 25 80 36 34 29 3c 3c  |C%.7 . (C%.64)<<|
00008910  32 20 84 20 28 43 25 80  26 33 38 29 3c 3c 31 33  |2 . (C%.&38)<<13|
00008920  0d 2b 98 53 67 70 61 6c  25 28 43 25 29 3d 28 43  |.+.Sgpal%(C%)=(C|
00008930  25 80 34 29 3c 3c 31 84  43 25 80 31 36 20 84 20  |%.4)<<1.C%.16 . |
00008940  28 28 43 25 80 33 29 3c  3c 31 84 28 43 25 80 26  |((C%.3)<<1.(C%.&|
00008950  36 30 29 3e 3e 32 29 3c  3c 38 20 84 20 28 43 25  |60)>>2)<<8 . (C%|
00008960  80 38 84 28 43 25 80 31  32 38 29 3e 3e 33 29 3c  |.8.(C%.128)>>3)<|
00008970  3c 31 36 0d 2b a2 05 ed  0d 2b ac 31 e3 43 25 3d  |<16.+....+.1.C%=|
00008980  30 b8 33 31 3a 72 25 28  43 25 29 3d 43 25 2f 33  |0.31:r%(C%)=C%/3|
00008990  31 2a 46 3a ed 3a 67 25  28 29 3d 72 25 28 29 3a  |1*F:.:g%()=r%():|
000089a0  62 25 28 29 3d 72 25 28  29 0d 2b b6 2a 70 62 75  |b%()=r%().+.*pbu|
000089b0  66 66 25 3d a4 64 69 6d  28 73 78 25 29 3a e7 73  |ff%=.dim(sx%):.s|
000089c0  63 61 6c 65 25 20 79 6d  75 6c 25 3d 79 6d 75 6c  |cale% ymul%=ymul|
000089d0  25 2a 32 0d 2b c0 47 69  6e 66 6f 24 3d 22 41 72  |%*2.+.Ginfo$="Ar|
000089e0  56 69 73 20 69 6d 61 67  65 2c 20 22 2b c3 73 78  |Vis image, "+.sx|
000089f0  25 2b 22 20 62 79 20 22  2b c3 73 79 25 2b 22 20  |%+" by "+.sy%+" |
00008a00  70 69 78 65 6c 73 2c 20  31 35 20 62 69 74 73 20  |pixels, 15 bits |
00008a10  70 65 72 20 70 69 78 65  6c 22 0d 2b ca 09 c9 20  |per pixel".+... |
00008a20  34 30 30 0d 2b d4 45 71  75 61 6e 74 25 3d 38 3a  |400.+.Equant%=8:|
00008a30  cf 23 63 25 3d 30 3a 73  78 25 3d a4 62 65 48 57  |.#c%=0:sx%=.beHW|
00008a40  3a 73 79 25 3d a4 62 65  48 57 3a 58 25 3d a4 62  |:sy%=.beHW:X%=.b|
00008a50  65 48 57 3a 73 74 25 3d  8f 23 63 25 2b 58 25 3a  |eHW:st%=.#c%+X%:|
00008a60  cf 23 63 25 3d 73 74 25  0d 2b de 56 70 6c 62 75  |.#c%=st%.+.Vplbu|
00008a70  66 66 25 3d a4 64 69 6d  28 73 78 25 2a 33 29 3a  |ff%=.dim(sx%*3):|
00008a80  70 6c 62 79 74 65 73 25  3d 73 78 25 2a 33 3a 72  |plbytes%=sx%*3:r|
00008a90  62 25 3d 70 6c 62 75 66  66 25 3a 67 62 25 3d 70  |b%=plbuff%:gb%=p|
00008aa0  6c 62 75 66 66 25 2b 31  3a 62 62 25 3d 70 6c 62  |lbuff%+1:bb%=plb|
00008ab0  75 66 66 25 2b 32 3a 72  62 6f 25 3d 2d 31 0d 2b  |uff%+2:rbo%=-1.+|
00008ac0  e8 3a f2 6e 6f 70 61 6c  3a 69 6e 70 75 74 3d 32  |.:.nopal:input=2|
00008ad0  34 3a 72 65 70 25 3d 30  3a 63 61 63 68 65 62 79  |4:rep%=0:cacheby|
00008ae0  74 65 73 25 3d b9 3a 63  61 63 68 65 25 3d b9 3a  |tes%=.:cache%=.:|
00008af0  73 74 65 70 32 34 3d 33  0d 2b f2 5e 69 6e 66 6f  |step24=3.+.^info|
00008b00  24 3d 22 52 54 20 69 6d  61 67 65 2e 20 72 75 6e  |$="RT image. run|
00008b10  20 6c 65 6e 67 74 68 20  65 6e 63 6f 64 65 64 20  | length encoded |
00008b20  69 6d 61 67 65 2c 20 22  2b c3 73 78 25 2b 22 20  |image, "+.sx%+" |
00008b30  62 79 20 22 2b c3 73 79  25 2b 22 20 70 69 78 65  |by "+.sy%+" pixe|
00008b40  6c 73 2c 20 32 34 20 62  69 74 73 20 70 65 72 20  |ls, 24 bits per |
00008b50  70 69 78 65 6c 22 0d 2b  fc 09 c9 20 35 30 30 0d  |pixel".+... 500.|
00008b60  2c 06 2c 63 6f 6d 70 72  65 73 73 69 6f 6e 3d 35  |,.,compression=5|
00008b70  3a cf 23 63 25 3d 36 3a  47 49 46 73 78 3d a4 48  |:.#c%=6:GIFsx=.H|
00008b80  57 3a 47 49 46 73 79 3d  a4 48 57 0d 2c 10 38 47  |W:GIFsy=.HW.,.8G|
00008b90  49 46 3d 9a 23 63 25 3a  47 49 46 62 61 63 6b 3d  |IF=.#c%:GIFback=|
00008ba0  9a 23 63 25 3a 47 49 46  65 78 74 3d 9a 23 63 25  |.#c%:GIFext=.#c%|
00008bb0  3a 71 75 61 6e 74 25 3d  28 47 49 46 20 80 20 37  |:quant%=(GIF . 7|
00008bc0  29 2b 31 0d 2c 1a 10 e7  47 49 46 20 80 20 26 38  |)+1.,...GIF . &8|
00008bd0  30 20 8c 0d 2c 24 17 e3  43 25 3d 30 b8 28 31 3c  |0 ..,$..C%=0.(1<|
00008be0  3c 71 75 61 6e 74 25 29  2d 31 0d 2c 2e 39 72 25  |<quant%)-1.,.9r%|
00008bf0  28 43 25 29 3d 9a 23 63  25 2f 32 35 35 2a 46 3a  |(C%)=.#c%/255*F:|
00008c00  67 25 28 43 25 29 3d 9a  23 63 25 2f 32 35 35 2a  |g%(C%)=.#c%/255*|
00008c10  46 3a 62 25 28 43 25 29  3d 9a 23 63 25 2f 32 35  |F:b%(C%)=.#c%/25|
00008c20  35 2a 46 0d 2c 38 05 ed  0d 2c 42 05 cd 0d 2c 4c  |5*F.,8...,B...,L|
00008c30  16 49 25 3d 9a 23 63 25  3a c8 95 20 49 25 3d 97  |.I%=.#c%:.. I%=.|
00008c40  22 21 22 0d 2c 60 0a e7  20 9a 23 63 25 0d 2c 6a  |"!".,`.. .#c%.,j|
00008c50  05 f5 0d 2c 74 24 47 49  46 67 63 65 73 7a 3d 9a  |...,t$GIFgcesz=.|
00008c60  23 63 25 3a cf 23 63 25  3d 8f 23 63 25 2b 47 49  |#c%:.#c%=.#c%+GI|
00008c70  46 67 63 65 73 7a 0d 2c  92 18 fd 20 47 49 46 67  |Fgcesz.,... GIFg|
00008c80  63 65 73 7a 3d 30 3a 49  25 3d 9a 23 63 25 0d 2c  |cesz=0:I%=.#c%.,|
00008c90  9c 05 ce 0d 2c a6 36 e7  49 25 3c 3e 97 22 2c 22  |....,.6.I%<>.","|
00008ca0  20 85 20 34 32 2c 22 47  49 46 20 66 69 6c 65 20  | . 42,"GIF file |
00008cb0  77 69 74 68 6f 75 74 20  2c 20 69 6e 20 72 69 67  |without , in rig|
00008cc0  68 74 20 70 6c 61 63 65  22 0d 2c ba 1d e7 47 49  |ht place".,...GI|
00008cd0  46 65 78 74 3c 3e 30 20  80 20 47 49 46 65 78 74  |Fext<>0 . GIFext|
00008ce0  3c 3e 34 39 20 8c 0d 2c  c4 10 e7 47 49 46 65 78  |<>49 ..,...GIFex|
00008cf0  74 3e 34 39 20 8c 0d 2c  d8 2a 78 64 69 76 25 3d  |t>49 ..,.*xdiv%=|
00008d00  78 64 69 76 25 2a 36 34  3a 78 6d 75 6c 25 3d 78  |xdiv%*64:xmul%=x|
00008d10  6d 75 6c 25 2a 28 47 49  46 65 78 74 2b 31 35 29  |mul%*(GIFext+15)|
00008d20  0d 2c e2 05 cc 0d 2c ec  2a 79 64 69 76 25 3d 79  |.,....,.*ydiv%=y|
00008d30  64 69 76 25 2a 28 47 49  46 65 78 74 2b 31 35 29  |div%*(GIFext+15)|
00008d40  3a 79 6d 75 6c 25 3d 79  6d 75 6c 25 2a 36 34 0d  |:ymul%=ymul%*64.|
00008d50  2c f6 05 cd 0d 2d 00 05  cd 0d 2d 0a 2c 47 49 46  |,....-....-.,GIF|
00008d60  6c 65 66 74 3d a4 48 57  3a 47 49 46 72 69 67 68  |left=.HW:GIFrigh|
00008d70  74 3d a4 48 57 3a 73 78  25 3d a4 48 57 3a 73 79  |t=.HW:sx%=.HW:sy|
00008d80  25 3d a4 48 57 0d 2d 14  1c e7 47 49 46 73 78 3c  |%=.HW.-...GIFsx<|
00008d90  73 78 25 20 84 20 47 49  46 73 79 3c 73 79 25 20  |sx% . GIFsy<sy% |
00008da0  8c 0d 2d 1e 0c e7 69 6e  66 6f 25 20 8c 0d 2d 28  |..-...info% ..-(|
00008db0  29 f1 22 47 49 46 20 66  69 6c 65 20 77 69 74 68  |)."GIF file with|
00008dc0  20 62 69 67 67 65 72 20  69 6d 61 67 65 20 69 6e  | bigger image in|
00008dd0  73 69 64 65 3a 22 0d 2d  32 3b f1 22 53 63 72 65  |side:".-2;."Scre|
00008de0  65 6e 20 22 3b 47 49 46  73 78 22 78 20 62 79 20  |en ";GIFsx"x by |
00008df0  22 47 49 46 73 79 22 79  3b 20 69 6d 61 67 65 20  |"GIFsy"y; image |
00008e00  22 73 78 25 22 78 20 62  79 20 22 73 79 25 22 79  |"sx%"x by "sy%"y|
00008e10  22 0d 2d 3c 2f e8 22 43  6f 6e 74 69 6e 75 65 20  |".-</."Continue |
00008e20  77 69 74 68 20 6d 6f 6e  69 74 6f 72 27 73 20 73  |with monitor's s|
00008e30  69 7a 65 20 5b 59 20 6f  72 20 79 5d 3f 22 41 24  |ize [Y or y]?"A$|
00008e40  0d 2d 46 26 e7 41 24 3d  22 59 22 84 41 24 3d 22  |.-F&.A$="Y".A$="|
00008e50  79 22 20 73 78 25 3d 47  49 46 73 78 3a 73 79 25  |y" sx%=GIFsx:sy%|
00008e60  3d 47 49 46 73 79 0d 2d  50 28 f1 22 43 6f 6e 74  |=GIFsy.-P(."Cont|
00008e70  69 6e 75 69 6e 67 20 77  69 74 68 20 22 3b 73 78  |inuing with ";sx|
00008e80  25 22 78 20 62 79 20 22  73 79 25 22 79 22 0d 2d  |%"x by "sy%"y".-|
00008e90  5a 05 cd 0d 2d 64 05 cd  0d 2d 6e 29 47 49 46 3d  |Z...-d...-n)GIF=|
00008ea0  9a 23 63 25 3a e7 47 49  46 20 80 20 26 34 30 20  |.#c%:.GIF . &40 |
00008eb0  66 6c 61 67 3d 35 30 31  3a 72 24 3d 22 46 4e 38  |flag=501:r$="FN8|
00008ec0  22 0d 2d 78 4a 73 65 74  63 6f 64 65 73 25 3d 9a  |".-xJsetcodes%=.|
00008ed0  23 63 25 3a 63 6c 65 61  72 63 6f 64 65 25 3d 31  |#c%:clearcode%=1|
00008ee0  3c 3c 73 65 74 63 6f 64  65 73 25 3a 73 74 25 3d  |<<setcodes%:st%=|
00008ef0  8f 23 63 25 3a 63 61 63  68 65 25 3d b9 3a 63 61  |.#c%:cache%=.:ca|
00008f00  63 68 65 62 79 74 65 73  25 3d b9 0d 2d 82 45 de  |chebytes%=..-.E.|
00008f10  20 74 61 62 6c 65 25 28  31 3c 3c 31 32 29 3a 73  | table%(1<<12):s|
00008f20  74 6b 25 3d a4 64 69 6d  28 31 3c 3c 31 33 29 3a  |tk%=.dim(1<<13):|
00008f30  62 75 66 25 3d a4 64 69  6d 28 32 38 30 29 3a 70  |buf%=.dim(280):p|
00008f40  6c 62 75 66 66 25 3d a4  64 69 6d 28 73 78 25 29  |lbuff%=.dim(sx%)|
00008f50  0d 2d 8c 26 e3 49 25 3d  30 b8 63 6c 65 61 72 63  |.-.&.I%=0.clearc|
00008f60  6f 64 65 25 2d 31 3a 74  61 62 6c 65 25 28 49 25  |ode%-1:table%(I%|
00008f70  29 3d 49 25 3a ed 0d 2d  96 41 69 6e 66 6f 24 3d  |)=I%:..-.Ainfo$=|
00008f80  22 47 49 46 20 66 69 6c  65 2c 20 22 2b c3 73 78  |"GIF file, "+.sx|
00008f90  25 2b 22 20 62 79 20 22  2b c3 73 79 25 2b 22 20  |%+" by "+.sy%+" |
00008fa0  70 69 78 65 6c 73 2c 20  22 2b a4 62 69 74 73 28  |pixels, "+.bits(|
00008fb0  71 75 61 6e 74 25 29 0d  2d a0 09 c9 20 36 30 30  |quant%).-... 600|
00008fc0  0d 2d aa 1f 71 75 61 6e  74 25 3d 38 3a cf 23 63  |.-..quant%=8:.#c|
00008fd0  25 3d 26 35 63 3a e3 43  25 3d 30 b8 32 35 35 0d  |%=&5c:.C%=0.255.|
00008fe0  2d b4 39 72 25 28 43 25  29 3d 9a 23 63 25 2f 32  |-.9r%(C%)=.#c%/2|
00008ff0  35 35 2a 46 3a 67 25 28  43 25 29 3d 9a 23 63 25  |55*F:g%(C%)=.#c%|
00009000  2f 32 35 35 2a 46 3a 62  25 28 43 25 29 3d 9a 23  |/255*F:b%(C%)=.#|
00009010  63 25 2f 32 35 35 2a 46  0d 2d be 05 ed 0d 2d c8  |c%/255*F.-....-.|
00009020  1d cf 23 63 25 3d 26 33  36 65 3a 73 79 25 3d a4  |..#c%=&36e:sy%=.|
00009030  48 57 3a 73 78 25 3d a4  48 57 0d 2d d2 35 73 74  |HW:sx%=.HW.-.5st|
00009040  25 3d 26 33 38 30 3a cf  23 63 25 3d 73 74 25 3a  |%=&380:.#c%=st%:|
00009050  72 6f 77 62 79 74 65 73  25 3d 73 78 25 3a 72 24  |rowbytes%=sx%:r$|
00009060  3d 22 46 4e 38 22 3a 63  61 63 68 65 25 3d b9 0d  |="FN8":cache%=..|
00009070  2d dc 45 69 6e 66 6f 24  3d 22 2e 50 49 43 20 69  |-.Einfo$=".PIC i|
00009080  6d 61 67 65 2c 20 22 2b  c3 73 78 25 2b 22 20 62  |mage, "+.sx%+" b|
00009090  79 20 22 2b c3 73 79 25  2b 22 20 70 69 78 65 6c  |y "+.sy%+" pixel|
000090a0  73 2c 20 38 20 62 69 74  73 20 70 65 72 20 70 69  |s, 8 bits per pi|
000090b0  78 65 6c 22 0d 2d e6 09  c9 20 37 30 30 0d 2d f0  |xel".-... 700.-.|
000090c0  24 71 75 61 6e 74 25 3d  38 3a cf 23 63 25 3d 30  |$quant%=8:.#c%=0|
000090d0  3a 61 24 3d be 23 63 25  3a 73 74 25 3d 8f 23 63  |:a$=.#c%:st%=.#c|
000090e0  25 0d 2d fa 20 73 78 25  3d bb 61 24 3a 73 79 25  |%.-. sx%=.a$:sy%|
000090f0  3d bb 28 c1 61 24 2c a7  61 24 2c 22 20 22 29 29  |=.(.a$,.a$," "))|
00009100  29 0d 2e 04 36 f2 6e 6f  70 61 6c 3a 69 6e 70 75  |)...6.nopal:inpu|
00009110  74 3d 32 34 3a 73 74 65  70 32 34 3d 33 3a 72 6f  |t=24:step24=3:ro|
00009120  77 62 79 74 65 73 25 3d  73 78 25 2a 33 3a 72 24  |wbytes%=sx%*3:r$|
00009130  3d 22 46 4e 32 34 22 0d  2e 0e 21 72 62 6f 25 3d  |="FN24"...!rbo%=|
00009140  30 3a 67 62 6f 25 3d 31  3a 62 62 6f 25 3d 32 3a  |0:gbo%=1:bbo%=2:|
00009150  63 61 63 68 65 25 3d b9  0d 2e 18 4a 69 6e 66 6f  |cache%=....Jinfo|
00009160  24 3d 22 4d 54 56 20 2e  70 69 63 20 69 6d 61 67  |$="MTV .pic imag|
00009170  65 2c 20 22 2b c3 73 78  25 2b 22 20 62 79 20 22  |e, "+.sx%+" by "|
00009180  2b c3 73 79 25 2b 22 20  70 69 78 65 6c 73 2c 20  |+.sy%+" pixels, |
00009190  32 34 20 62 69 74 73 20  70 65 72 20 70 69 78 65  |24 bits per pixe|
000091a0  6c 22 0d 2e 22 09 c9 20  38 30 30 0d 2e 2c 29 73  |l"..".. 800..,)s|
000091b0  78 25 3d 35 31 32 3a 73  79 25 3d 32 35 36 3a e7  |x%=512:sy%=256:.|
000091c0  73 63 61 6c 65 25 20 79  6d 75 6c 25 3d 79 6d 75  |scale% ymul%=ymu|
000091d0  6c 25 2a 32 0d 2e 36 34  70 6c 62 75 66 66 25 3d  |l%*2..64plbuff%=|
000091e0  a4 64 69 6d 28 73 78 25  29 3a 72 65 70 25 3d 30  |.dim(sx%):rep%=0|
000091f0  3a 77 74 25 3d 30 3a 77  74 73 78 25 3d 70 6c 62  |:wt%=0:wtsx%=plb|
00009200  75 66 66 25 2b 73 78 25  0d 2e 40 1a 63 61 63 68  |uff%+sx%..@.cach|
00009210  65 25 3d b9 3a 63 61 63  68 65 62 79 74 65 73 25  |e%=.:cachebytes%|
00009220  3d b9 0d 2e 4a 40 e3 43  25 3d 30 b8 32 35 35 3a  |=...J@.C%=0.255:|
00009230  72 25 28 43 25 29 3d 28  43 25 80 36 33 29 2f 36  |r%(C%)=(C%.63)/6|
00009240  33 2a 46 3a ed 3a 67 25  28 29 3d 72 25 28 29 3a  |3*F:.:g%()=r%():|
00009250  62 25 28 29 3d 72 25 28  29 3a 71 75 61 6e 74 25  |b%()=r%():quant%|
00009260  3d 36 0d 2e 54 4a 69 6e  66 6f 24 3d 22 57 61 74  |=6..TJinfo$="Wat|
00009270  66 6f 72 64 20 64 69 67  69 74 69 73 65 72 20 70  |ford digitiser p|
00009280  69 63 74 75 72 65 2c 20  35 31 32 20 62 79 20 32  |icture, 512 by 2|
00009290  35 36 20 70 69 78 65 6c  73 2c 20 36 20 62 69 74  |56 pixels, 6 bit|
000092a0  73 20 70 65 72 20 70 69  78 65 6c 22 0d 2e 5e 09  |s per pixel"..^.|
000092b0  c9 20 38 30 31 0d 2e 68  3b 73 78 25 3d 35 31 32  |. 801..h;sx%=512|
000092c0  3a 73 79 25 3d 32 35 36  3a 69 6e 70 75 74 3d 32  |:sy%=256:input=2|
000092d0  34 3a 71 75 61 6e 74 25  3d 36 3a e7 73 63 61 6c  |4:quant%=6:.scal|
000092e0  65 25 20 79 6d 75 6c 25  3d 79 6d 75 6c 25 2a 32  |e% ymul%=ymul%*2|
000092f0  0d 2e 72 30 72 65 70 31  25 3d 30 3a 77 74 31 25  |..r0rep1%=0:wt1%|
00009300  3d 30 3a 72 65 70 32 25  3d 30 3a 77 74 32 25 3d  |=0:rep2%=0:wt2%=|
00009310  30 3a 72 65 70 33 25 3d  30 3a 77 74 33 25 3d 30  |0:rep3%=0:wt3%=0|
00009320  0d 2e 7c 3d 62 75 66 66  25 3d a4 64 69 6d 28 73  |..|=buff%=.dim(s|
00009330  78 25 2a 33 29 3a 72 62  25 3d 62 75 66 66 25 3a  |x%*3):rb%=buff%:|
00009340  67 62 25 3d 62 75 66 66  25 2b 73 78 25 3a 62 62  |gb%=buff%+sx%:bb|
00009350  25 3d 62 75 66 66 25 2b  32 2a 73 78 25 0d 2e 86  |%=buff%+2*sx%...|
00009360  3a 77 74 73 78 31 25 3d  62 75 66 66 25 2b 73 78  |:wtsx1%=buff%+sx|
00009370  25 3a 77 74 73 78 32 25  3d 62 75 66 66 25 2b 32  |%:wtsx2%=buff%+2|
00009380  2a 73 78 25 3a 77 74 73  78 33 25 3d 62 75 66 66  |*sx%:wtsx3%=buff|
00009390  25 2b 33 2a 73 78 25 0d  2e 90 37 e3 43 25 3d 30  |%+3*sx%...7.C%=0|
000093a0  b8 32 35 35 3a 72 25 28  43 25 29 3d 28 43 25 80  |.255:r%(C%)=(C%.|
000093b0  36 33 29 2f 36 33 2a 46  3a ed 3a 67 25 28 29 3d  |63)/63*F:.:g%()=|
000093c0  72 25 28 29 3a 62 25 28  29 3d 72 25 28 29 0d 2e  |r%():b%()=r%()..|
000093d0  9a 52 69 6e 66 6f 24 3d  22 54 72 69 70 6c 65 20  |.Rinfo$="Triple |
000093e0  57 61 74 66 6f 72 64 20  64 69 67 69 74 69 73 65  |Watford digitise|
000093f0  72 20 70 69 63 74 75 72  65 2c 20 35 31 32 20 62  |r picture, 512 b|
00009400  79 20 32 35 36 20 70 69  78 65 6c 73 2c 20 31 38  |y 256 pixels, 18|
00009410  20 62 69 74 73 20 70 65  72 20 70 69 78 65 6c 22  | bits per pixel"|
00009420  0d 2e a4 09 c9 20 39 30  30 0d 2e ae 27 71 75 61  |..... 900...'qua|
00009430  6e 74 25 3d 38 3a 73 74  25 3d 30 3a cf 23 63 25  |nt%=8:st%=0:.#c%|
00009440  3d 30 3a e7 a2 23 63 25  3d 36 35 35 33 36 20 8c  |=0:..#c%=65536 .|
00009450  0d 2e b8 37 73 78 25 3d  32 35 36 3a 73 79 25 3d  |...7sx%=256:sy%=|
00009460  32 35 36 3a e7 73 63 61  6c 65 25 20 79 6d 75 6c  |256:.scale% ymul|
00009470  25 3d 79 6d 75 6c 25 2a  32 3a 78 6d 75 6c 25 3d  |%=ymul%*2:xmul%=|
00009480  78 6d 75 6c 25 2a 32 0d  2e c2 05 cc 0d 2e cc 13  |xmul%*2.........|
00009490  73 78 25 3d 35 31 32 3a  73 79 25 3d 35 31 32 0d  |sx%=512:sy%=512.|
000094a0  2e d6 05 cd 0d 2e e0 53  e3 43 25 3d 30 b8 32 35  |.......S.C%=0.25|
000094b0  35 3a 72 25 28 43 25 29  3d 43 25 2f 32 35 35 2a  |5:r%(C%)=C%/255*|
000094c0  46 3a ed 3a 67 25 28 29  3d 72 25 28 29 3a 62 25  |F:.:g%()=r%():b%|
000094d0  28 29 3d 72 25 28 29 3a  72 6f 77 62 79 74 65 73  |()=r%():rowbytes|
000094e0  25 3d 73 78 25 3a 72 24  3d 22 46 4e 38 22 3a 63  |%=sx%:r$="FN8":c|
000094f0  61 63 68 65 25 3d b9 0d  2e ea 3f 69 6e 66 6f 24  |ache%=....?info$|
00009500  3d 22 41 49 4d 20 2e 72  61 77 20 69 6d 61 67 65  |="AIM .raw image|
00009510  2c 20 32 35 36 20 62 79  20 32 35 36 20 70 69 78  |, 256 by 256 pix|
00009520  65 6c 73 2c 20 38 20 62  69 74 73 20 70 65 72 20  |els, 8 bits per |
00009530  70 69 78 65 6c 22 0d 2e  f4 09 c9 20 39 30 31 0d  |pixel"..... 901.|
00009540  2e fe 1a 71 75 61 6e 74  25 3d 34 3a e7 a2 23 63  |...quant%=4:..#c|
00009550  25 3d 36 35 35 33 36 20  8c 0d 2f 08 37 73 78 25  |%=65536 ../.7sx%|
00009560  3d 32 35 36 3a 73 79 25  3d 32 35 36 3a e7 73 63  |=256:sy%=256:.sc|
00009570  61 6c 65 25 20 79 6d 75  6c 25 3d 79 6d 75 6c 25  |ale% ymul%=ymul%|
00009580  2a 32 3a 78 6d 75 6c 25  3d 78 6d 75 6c 25 2a 32  |*2:xmul%=xmul%*2|
00009590  0d 2f 12 05 cc 0d 2f 1c  13 73 78 25 3d 35 31 32  |./..../..sx%=512|
000095a0  3a 73 79 25 3d 35 31 32  0d 2f 26 05 cd 0d 2f 30  |:sy%=512./&.../0|
000095b0  3d 62 75 66 66 25 3d a4  64 69 6d 28 73 78 25 2a  |=buff%=.dim(sx%*|
000095c0  33 29 3a 72 62 25 3d 62  75 66 66 25 3a 67 62 25  |3):rb%=buff%:gb%|
000095d0  3d 62 75 66 66 25 2b 73  78 25 3a 62 62 25 3d 62  |=buff%+sx%:bb%=b|
000095e0  75 66 66 25 2b 73 78 25  2a 32 0d 2f 3a 33 e3 43  |uff%+sx%*2./:3.C|
000095f0  25 3d 30 b8 32 35 35 3a  72 25 28 43 25 29 3d 43  |%=0.255:r%(C%)=C|
00009600  25 2f 32 35 35 2a 46 3a  ed 3a 67 25 28 29 3d 72  |%/255*F:.:g%()=r|
00009610  25 28 29 3a 62 25 28 29  3d 72 25 28 29 0d 2f 44  |%():b%()=r%()./D|
00009620  4f 69 6e 70 75 74 3d 32  34 3a 69 6e 66 6f 24 3d  |Oinput=24:info$=|
00009630  22 48 61 77 6b 20 56 39  20 54 72 69 70 6c 65 20  |"Hawk V9 Triple |
00009640  69 6d 61 67 65 2c 20 32  35 36 20 62 79 20 32 35  |image, 256 by 25|
00009650  36 20 70 69 78 65 6c 73  2c 20 32 34 20 62 69 74  |6 pixels, 24 bit|
00009660  73 20 70 65 72 20 70 69  78 65 6c 22 0d 2f 4e 09  |s per pixel"./N.|
00009670  c9 20 39 30 32 0d 2f 58  42 71 75 61 6e 74 25 3d  |. 902./XBquant%=|
00009680  34 3a cf 23 63 25 3d 38  3a 73 78 25 3d a4 57 3a  |4:.#c%=8:sx%=.W:|
00009690  72 6f 77 62 79 74 65 73  25 3d 73 78 25 2a 33 2f  |rowbytes%=sx%*3/|
000096a0  32 3a 73 79 25 3d a4 57  3a 73 74 25 3d 32 30 3a  |2:sy%=.W:st%=20:|
000096b0  cf 23 63 25 3d 32 30 0d  2f 62 19 e7 73 63 61 6c  |.#c%=20./b..scal|
000096c0  65 25 20 79 6d 75 6c 25  3d 79 6d 75 6c 25 2a 32  |e% ymul%=ymul%*2|
000096d0  0d 2f 6c 4d 70 6c 62 75  66 66 25 3d a4 64 69 6d  |./lMplbuff%=.dim|
000096e0  28 73 78 25 2a 33 29 3a  72 62 25 3d 70 6c 62 75  |(sx%*3):rb%=plbu|
000096f0  66 66 25 3a 67 62 25 3d  70 6c 62 75 66 66 25 2b  |ff%:gb%=plbuff%+|
00009700  73 78 25 3a 62 62 25 3d  70 6c 62 75 66 66 25 2b  |sx%:bb%=plbuff%+|
00009710  73 78 25 2a 32 3a 72 62  6f 25 3d 2d 31 0d 2f 76  |sx%*2:rbo%=-1./v|
00009720  40 e3 43 25 3d 30 b8 32  35 35 3a 72 25 28 43 25  |@.C%=0.255:r%(C%|
00009730  29 3d 28 43 25 80 26 46  29 2f 26 46 2a 46 3a ed  |)=(C%.&F)/&F*F:.|
00009740  3a 67 25 28 29 3d 72 25  28 29 3a 62 25 28 29 3d  |:g%()=r%():b%()=|
00009750  72 25 28 29 3a 63 61 63  68 65 25 3d b9 0d 2f 80  |r%():cache%=../.|
00009760  62 69 6e 70 75 74 3d 32  34 3a 69 6e 66 6f 24 3d  |binput=24:info$=|
00009770  22 48 61 77 6b 20 56 39  2f 53 6e 61 70 73 68 6f  |"Hawk V9/Snapsho|
00009780  74 20 43 6f 6c 6f 75 72  20 69 6d 61 67 65 2c 20  |t Colour image, |
00009790  22 2b c3 73 78 25 2b 22  20 62 79 20 22 2b c3 73  |"+.sx%+" by "+.s|
000097a0  79 25 2b 22 20 70 69 78  65 6c 73 2c 20 31 32 20  |y%+" pixels, 12 |
000097b0  62 69 74 73 20 70 65 72  20 70 69 78 65 6c 22 0d  |bits per pixel".|
000097c0  2f 8a 09 c9 20 39 30 33  0d 2f 94 5c 71 75 61 6e  |/... 903./.\quan|
000097d0  74 25 3d 35 3a cf 23 63  25 3d 38 3a 73 78 25 3d  |t%=5:.#c%=8:sx%=|
000097e0  a4 57 3a 72 6f 77 62 79  74 65 73 25 3d 73 78 25  |.W:rowbytes%=sx%|
000097f0  2a 32 3a 73 79 25 3d a4  57 3a 73 74 25 3d 32 30  |*2:sy%=.W:st%=20|
00009800  3a cf 23 63 25 3d 32 30  3a 63 61 63 68 65 25 3d  |:.#c%=20:cache%=|
00009810  b9 3a 72 24 3d 22 46 4e  31 36 22 3a 66 6c 61 67  |.:r$="FN16":flag|
00009820  3d 37 30 30 0d 2f 9e 2d  de 20 72 70 61 6c 25 28  |=700./.-. rpal%(|
00009830  32 35 35 29 2c 67 70 61  6c 25 28 32 35 35 29 3a  |255),gpal%(255):|
00009840  69 6e 70 75 74 3d 31 36  3a 73 74 65 70 32 34 3d  |input=16:step24=|
00009850  32 0d 2f a8 0d e3 43 25  3d 30 b8 32 35 35 0d 2f  |2./...C%=0.255./|
00009860  b2 22 67 70 61 6c 25 28  43 25 29 3d 28 43 25 3e  |."gpal%(C%)=(C%>|
00009870  3e 35 29 3c 3c 38 20 84  20 28 43 25 80 33 31 29  |>5)<<8 . (C%.31)|
00009880  0d 2f bc 2b 72 70 61 6c  25 28 43 25 29 3d 28 28  |./.+rpal%(C%)=((|
00009890  43 25 3e 3e 32 29 80 33  31 29 3c 3c 31 36 20 84  |C%>>2).31)<<16 .|
000098a0  20 28 43 25 80 33 29 3c  3c 31 31 0d 2f c6 05 ed  | (C%.3)<<11./...|
000098b0  0d 2f d0 31 e3 43 25 3d  30 b8 33 31 3a 72 25 28  |./.1.C%=0.31:r%(|
000098c0  43 25 29 3d 43 25 2f 33  31 2a 46 3a ed 3a 67 25  |C%)=C%/31*F:.:g%|
000098d0  28 29 3d 72 25 28 29 3a  62 25 28 29 3d 72 25 28  |()=r%():b%()=r%(|
000098e0  29 0d 2f da 5f 69 6e 70  75 74 3d 31 36 3a 69 6e  |)./._input=16:in|
000098f0  66 6f 24 3d 22 48 61 77  6b 20 56 39 20 6d 6b 20  |fo$="Hawk V9 mk |
00009900  49 49 20 43 6f 6c 6f 75  72 20 69 6d 61 67 65 2c  |II Colour image,|
00009910  20 22 2b c3 73 78 25 2b  22 20 62 79 20 22 2b c3  | "+.sx%+" by "+.|
00009920  73 79 25 2b 22 20 70 69  78 65 6c 73 2c 20 31 36  |sy%+" pixels, 16|
00009930  20 62 69 74 73 20 70 65  72 20 70 69 78 65 6c 22  | bits per pixel"|
00009940  0d 2f e4 09 c9 20 39 35  30 0d 2f ee 40 71 75 61  |./... 950./.@qua|
00009950  6e 74 25 3d 38 3a cf 23  63 25 3d 30 3a 73 78 25  |nt%=8:.#c%=0:sx%|
00009960  3d 35 31 32 3a 72 6f 77  62 79 74 65 73 25 3d 35  |=512:rowbytes%=5|
00009970  31 32 3a 73 79 25 3d 35  31 32 3a 73 74 25 3d 30  |12:sy%=512:st%=0|
00009980  3a 66 6c 61 67 3d 39 30  30 0d 2f f8 45 e3 43 25  |:flag=900./.E.C%|
00009990  3d 30 b8 32 35 35 3a 72  25 28 43 25 29 3d 43 25  |=0.255:r%(C%)=C%|
000099a0  2f 32 35 35 2a 46 3a ed  3a 67 25 28 29 3d 72 25  |/255*F:.:g%()=r%|
000099b0  28 29 3a 62 25 28 29 3d  72 25 28 29 3a 72 24 3d  |():b%()=r%():r$=|
000099c0  22 46 4e 38 22 3a 63 61  63 68 65 25 3d b9 0d 30  |"FN8":cache%=..0|
000099d0  02 46 69 6e 66 6f 24 3d  22 57 69 6c 64 20 56 69  |.Finfo$="Wild Vi|
000099e0  73 69 6f 6e 20 56 31 32  20 69 6d 61 67 65 2c 20  |sion V12 image, |
000099f0  35 31 32 20 62 79 20 35  31 32 20 70 69 78 65 6c  |512 by 512 pixel|
00009a00  73 2c 20 38 20 62 69 74  73 20 70 65 72 20 70 69  |s, 8 bits per pi|
00009a10  78 65 6c 22 0d 30 0c 0a  c9 20 31 30 30 30 0d 30  |xel".0... 1000.0|
00009a20  16 54 71 75 61 6e 74 25  3d 34 3a 73 78 25 3d 36  |.Tquant%=4:sx%=6|
00009a30  34 30 3a 73 79 25 3d 32  35 36 3a f2 64 65 66 70  |40:sy%=256:.defp|
00009a40  61 6c 3a 73 74 25 3d a4  57 3a 72 24 3d 22 46 4e  |al:st%=.W:r$="FN|
00009a50  22 2b c3 28 31 30 30 30  2b a4 57 29 3a e7 73 63  |"+.(1000+.W):.sc|
00009a60  61 6c 65 25 20 79 6d 75  6c 25 3d 79 6d 75 6c 25  |ale% ymul%=ymul%|
00009a70  2a 32 0d 30 2a 25 62 75  66 66 25 3d a4 64 69 6d  |*2.0*%buff%=.dim|
00009a80  28 73 78 25 29 3a 63 74  61 62 6c 65 25 3d a4 64  |(sx%):ctable%=.d|
00009a90  69 6d 28 73 74 25 29 0d  30 34 22 c8 99 31 32 2c  |im(st%).04"..12,|
00009aa0  34 2c 63 25 2c 63 74 61  62 6c 65 25 2c 73 74 25  |4,c%,ctable%,st%|
00009ab0  3a 73 74 25 3d 8f 23 63  25 0d 30 3e 2e 70 61 25  |:st%=.#c%.0>.pa%|
00009ac0  3d 63 74 61 62 6c 65 25  3a 72 65 70 25 3d 30 3a  |=ctable%:rep%=0:|
00009ad0  72 65 70 32 25 3d 30 3a  70 61 73 78 25 3d 62 75  |rep2%=0:pasx%=bu|
00009ae0  66 66 25 2b 73 78 25 0d  30 48 41 69 6e 66 6f 24  |ff%+sx%.0HAinfo$|
00009af0  3d 22 50 72 6f 41 72 74  69 73 61 6e 20 69 6d 61  |="ProArtisan ima|
00009b00  67 65 2c 20 36 34 30 20  62 79 20 32 35 36 20 70  |ge, 640 by 256 p|
00009b10  69 78 65 6c 73 2c 20 38  20 62 69 74 73 20 70 65  |ixels, 8 bits pe|
00009b20  72 20 70 69 78 65 6c 22  0d 30 52 0a c9 20 31 31  |r pixel".0R.. 11|
00009b30  30 30 0d 30 5c 40 71 75  61 6e 74 25 3d 31 3a cf  |00.0\@quant%=1:.|
00009b40  23 63 25 3d 34 3a 73 78  25 3d a4 62 65 57 3a 73  |#c%=4:sx%=.beW:s|
00009b50  79 25 3d a4 62 65 57 3a  69 6e 70 75 74 3d a4 62  |y%=.beW:input=.b|
00009b60  65 57 3a 62 69 67 65 6e  64 69 61 6e 62 69 74 73  |eW:bigendianbits|
00009b70  3d b9 0d 30 66 13 53 25  3d a4 62 65 57 3a 53 25  |=..0f.S%=.beW:S%|
00009b80  3d a4 62 65 57 0d 30 70  49 63 61 63 68 65 25 3d  |=.beW.0pIcache%=|
00009b90  b9 3a e7 53 25 3d 32 20  63 61 63 68 65 62 79 74  |.:.S%=2 cachebyt|
00009ba0  65 73 25 3d b9 3a 69 6e  66 6f 24 3d 22 42 79 74  |es%=.:info$="Byt|
00009bb0  65 20 45 6e 63 6f 64 65  64 20 22 20 8b 69 6e 66  |e Encoded " .inf|
00009bc0  6f 24 3d 22 22 3a 72 24  3d 22 46 4e 38 22 0d 30  |o$="":r$="FN8".0|
00009bd0  7a 0b 43 25 3d a4 62 65  57 0d 30 84 0b 44 25 3d  |z.C%=.beW.0..D%=|
00009be0  a4 62 65 57 0d 30 8e 0b  c8 8e 20 43 25 20 ca 0d  |.beW.0.... C% ..|
00009bf0  30 98 09 c9 20 31 2c 32  0d 30 a2 24 e3 49 25 3d  |0... 1,2.0.$.I%=|
00009c00  30 b8 44 25 2f 33 2d 31  3a 72 25 28 49 25 29 3d  |0.D%/3-1:r%(I%)=|
00009c10  9a 23 63 25 2f 32 35 35  2a 46 3a ed 0d 30 ac 24  |.#c%/255*F:..0.$|
00009c20  e3 49 25 3d 30 b8 44 25  2f 33 2d 31 3a 67 25 28  |.I%=0.D%/3-1:g%(|
00009c30  49 25 29 3d 9a 23 63 25  2f 32 35 35 2a 46 3a ed  |I%)=.#c%/255*F:.|
00009c40  0d 30 b6 24 e3 49 25 3d  30 b8 44 25 2f 33 2d 31  |.0.$.I%=0.D%/3-1|
00009c50  3a 62 25 28 49 25 29 3d  9a 23 63 25 2f 32 35 35  |:b%(I%)=.#c%/255|
00009c60  2a 46 3a ed 0d 30 c0 05  7f 0d 30 ca 0e c8 8e 20  |*F:..0....0.... |
00009c70  69 6e 70 75 74 20 ca 0d  30 d4 1f c9 20 31 3a 72  |input ..0... 1:r|
00009c80  25 28 30 29 3d 46 3a 67  25 28 30 29 3d 46 3a 62  |%(0)=F:g%(0)=F:b|
00009c90  25 28 30 29 3d 46 0d 30  de 10 c9 20 34 2c 38 3a  |%(0)=F.0... 4,8:|
00009ca0  f2 6e 6f 70 61 6c 0d 30  e8 0f c9 20 32 34 3a f2  |.nopal.0... 24:.|
00009cb0  6e 6f 70 61 6c 0d 30 f2  05 cb 0d 30 fc 05 cb 0d  |nopal.0....0....|
00009cc0  31 06 0e c8 8e 20 69 6e  70 75 74 20 ca 0d 31 10  |1.... input ..1.|
00009cd0  20 c9 20 31 3a 72 6f 77  62 79 74 65 73 25 3d 28  | . 1:rowbytes%=(|
00009ce0  73 78 25 2b 31 35 3e 3e  34 29 3c 3c 31 0d 31 1a  |sx%+15>>4)<<1.1.|
00009cf0  1f c9 20 34 3a 72 6f 77  62 79 74 65 73 25 3d 28  |.. 4:rowbytes%=(|
00009d00  73 78 25 2b 33 3e 3e 32  29 3c 3c 31 0d 31 24 1f  |sx%+3>>2)<<1.1$.|
00009d10  c9 20 38 3a 72 6f 77 62  79 74 65 73 25 3d 28 73  |. 8:rowbytes%=(s|
00009d20  78 25 2b 31 3e 3e 31 29  3c 3c 31 0d 31 2e 4a c9  |x%+1>>1)<<1.1.J.|
00009d30  20 32 34 3a 72 6f 77 62  79 74 65 73 25 3d 28 33  | 24:rowbytes%=(3|
00009d40  2a 73 78 25 2b 31 3e 3e  31 29 3c 3c 31 3a 72 24  |*sx%+1>>1)<<1:r$|
00009d50  3d 22 46 4e 32 34 22 3a  72 62 6f 25 3d 30 3a 67  |="FN24":rbo%=0:g|
00009d60  62 6f 25 3d 31 3a 62 62  6f 25 3d 32 3a 73 74 65  |bo%=1:bbo%=2:ste|
00009d70  70 32 34 3d 33 0d 31 38  17 e7 53 25 3d 31 20 62  |p24=3.18..S%=1 b|
00009d80  62 6f 25 3d 30 3a 72 62  6f 25 3d 32 0d 31 42 26  |bo%=0:rbo%=2.1B&|
00009d90  7f 3a 85 20 34 32 2c 22  43 61 6e 27 74 20 64 6f  |.:. 42,"Can't do|
00009da0  20 74 68 69 73 20 53 75  6e 20 70 69 78 72 65 63  | this Sun pixrec|
00009db0  74 22 0d 31 4c 05 cb 0d  31 56 4d 73 74 25 3d 44  |t".1L...1VMst%=D|
00009dc0  25 2b 26 32 30 3a 72 65  70 25 3d 30 3a e7 63 61  |%+&20:rep%=0:.ca|
00009dd0  63 68 65 62 79 74 65 73  25 20 70 6c 62 75 66 66  |chebytes% plbuff|
00009de0  25 3d a4 64 69 6d 28 72  6f 77 62 79 74 65 73 25  |%=.dim(rowbytes%|
00009df0  29 3a 70 6c 62 79 74 65  73 25 3d 72 6f 77 62 79  |):plbytes%=rowby|
00009e00  74 65 73 25 0d 31 60 42  69 6e 66 6f 24 2b 3d 22  |tes%.1`Binfo$+="|
00009e10  53 75 6e 20 69 6d 61 67  65 2c 20 22 2b c3 73 78  |Sun image, "+.sx|
00009e20  25 2b 22 20 62 79 20 22  2b c3 73 79 25 2b 22 20  |%+" by "+.sy%+" |
00009e30  70 69 78 65 6c 73 2c 20  22 2b a4 62 69 74 73 28  |pixels, "+.bits(|
00009e40  69 6e 70 75 74 29 0d 31  6a 0a c9 20 31 32 30 30  |input).1j.. 1200|
00009e50  0d 31 74 3e 71 75 61 6e  74 25 3d 38 3a 73 78 25  |.1t>quant%=8:sx%|
00009e60  3d 38 30 30 3a 73 79 25  3d 38 30 30 3a 73 74 25  |=800:sy%=800:st%|
00009e70  3d 31 36 30 30 3a cf 23  63 25 3d 73 74 25 3a 76  |=1600:.#c%=st%:v|
00009e80  66 6c 69 70 25 3d ac 20  76 66 6c 69 70 25 0d 31  |flip%=. vflip%.1|
00009e90  7e 2a f2 6e 6f 70 61 6c  3a 72 24 3d 22 46 4e 38  |~*.nopal:r$="FN8|
00009ea0  22 3a 72 6f 77 62 79 74  65 73 25 3d 73 78 25 3a  |":rowbytes%=sx%:|
00009eb0  63 61 63 68 65 25 3d b9  0d 31 88 49 69 6e 66 6f  |cache%=..1.Iinfo|
00009ec0  24 3d 22 54 69 6d 65 53  74 65 70 20 73 61 74 65  |$="TimeStep sate|
00009ed0  6c 6c 69 74 65 20 69 6d  61 67 65 2c 20 38 30 30  |llite image, 800|
00009ee0  20 62 79 20 38 30 30 20  70 69 78 65 6c 73 2c 20  | by 800 pixels, |
00009ef0  38 20 62 69 74 73 20 70  65 72 20 70 69 78 65 6c  |8 bits per pixel|
00009f00  22 0d 31 92 0a c9 20 31  33 30 30 0d 31 9c 3f 71  |".1... 1300.1.?q|
00009f10  75 61 6e 74 25 3d 38 3a  73 78 25 3d 31 32 38 3a  |uant%=8:sx%=128:|
00009f20  73 79 25 3d 32 35 36 3a  73 74 25 3d 30 3a cf 23  |sy%=256:st%=0:.#|
00009f30  63 25 3d 30 3a e7 73 63  61 6c 65 25 20 78 6d 75  |c%=0:.scale% xmu|
00009f40  6c 25 3d 78 6d 75 6c 25  2a 32 0d 31 a6 2a f2 6e  |l%=xmul%*2.1.*.n|
00009f50  6f 70 61 6c 3a 72 24 3d  22 46 4e 38 22 3a 72 6f  |opal:r$="FN8":ro|
00009f60  77 62 79 74 65 73 25 3d  73 78 25 3a 63 61 63 68  |wbytes%=sx%:cach|
00009f70  65 25 3d b9 0d 31 b0 40  69 6e 66 6f 24 3d 22 73  |e%=..1.@info$="s|
00009f80  61 74 65 6c 6c 69 74 65  20 69 6d 61 67 65 2c 20  |atellite image, |
00009f90  31 32 38 20 62 79 20 32  35 36 20 70 69 78 65 6c  |128 by 256 pixel|
00009fa0  73 2c 20 38 20 62 69 74  73 20 70 65 72 20 70 69  |s, 8 bits per pi|
00009fb0  78 65 6c 22 0d 31 ba 0a  c9 20 31 33 30 31 0d 31  |xel".1... 1301.1|
00009fc0  c4 3b 69 6e 70 75 74 3d  32 34 3a 71 75 61 6e 74  |.;input=24:quant|
00009fd0  25 3d 38 3a 73 78 25 3d  31 32 38 3a 73 79 25 3d  |%=8:sx%=128:sy%=|
00009fe0  32 35 36 3a e7 73 63 61  6c 65 25 20 78 6d 75 6c  |256:.scale% xmul|
00009ff0  25 3d 78 6d 75 6c 25 2a  32 0d 31 ce 4f 62 75 66  |%=xmul%*2.1.Obuf|
0000a000  66 25 3d a4 64 69 6d 28  73 78 25 2a 33 29 3a 72  |f%=.dim(sx%*3):r|
0000a010  62 25 3d 62 75 66 66 25  3a 67 62 25 3d 62 75 66  |b%=buff%:gb%=buf|
0000a020  66 25 2b 73 78 25 3a 62  62 25 3d 62 75 66 66 25  |f%+sx%:bb%=buff%|
0000a030  2b 32 2a 73 78 25 3a f2  6e 6f 70 61 6c 3a 72 24  |+2*sx%:.nopal:r$|
0000a040  3d 22 46 4e 39 30 31 22  0d 31 d8 48 69 6e 66 6f  |="FN901".1.Hinfo|
0000a050  24 3d 22 54 72 69 70 6c  65 20 73 61 74 65 6c 6c  |$="Triple satell|
0000a060  69 74 65 20 69 6d 61 67  65 2c 20 31 32 38 20 62  |ite image, 128 b|
0000a070  79 20 32 35 36 20 70 69  78 65 6c 73 2c 20 32 34  |y 256 pixels, 24|
0000a080  20 62 69 74 73 20 70 65  72 20 70 69 78 65 6c 22  | bits per pixel"|
0000a090  0d 31 e2 0a c9 20 31 34  30 30 0d 31 ec 25 70 6c  |.1... 1400.1.%pl|
0000a0a0  61 6e 61 72 25 3d b9 3a  cf 23 63 25 3d 30 3a 5a  |anar%=.:.#c%=0:Z|
0000a0b0  25 3d a4 48 57 3a e7 5a  25 3e 32 35 35 20 8c 0d  |%=.HW:.Z%>255 ..|
0000a0c0  31 f6 2b 73 74 25 3d a4  62 65 48 57 2a 32 3a 70  |1.+st%=.beHW*2:p|
0000a0d0  6c 61 6e 65 73 25 3d a4  62 65 48 57 3a 70 61 74  |lanes%=.beHW:pat|
0000a0e0  6c 65 6e 25 3d a4 62 65  48 57 0d 32 00 2b 70 77  |len%=.beHW.2.+pw|
0000a0f0  25 3d a4 62 65 48 57 3a  70 68 25 3d a4 62 65 48  |%=.beHW:ph%=.beH|
0000a100  57 3a 73 78 25 3d a4 62  65 48 57 3a 73 79 25 3d  |W:sx%=.beHW:sy%=|
0000a110  a4 62 65 48 57 0d 32 0a  05 cc 0d 32 14 43 73 74  |.beHW.2....2.Cst|
0000a120  25 3d a4 48 57 2a 32 3a  69 6e 70 75 74 3d a4 48  |%=.HW*2:input=.H|
0000a130  57 3a 70 61 74 6c 65 6e  25 3d a4 48 57 3a 70 77  |W:patlen%=.HW:pw|
0000a140  25 3d a4 48 57 3a 70 68  25 3d a4 48 57 3a 73 78  |%=.HW:ph%=.HW:sx|
0000a150  25 3d a4 48 57 3a 73 79  25 3d a4 48 57 0d 32 1e  |%=.HW:sy%=.HW.2.|
0000a160  05 cd 0d 32 28 0d e7 73  63 61 6c 65 25 20 8c 0d  |...2(..scale% ..|
0000a170  32 32 23 78 6d 75 6c 25  3d 78 6d 75 6c 25 2a 70  |22#xmul%=xmul%*p|
0000a180  77 25 3a 78 64 69 76 25  3d 78 64 69 76 25 2a 32  |w%:xdiv%=xdiv%*2|
0000a190  38 32 0d 32 3c 23 79 6d  75 6c 25 3d 79 6d 75 6c  |82.2<#ymul%=ymul|
0000a1a0  25 2a 70 68 25 3a 79 64  69 76 25 3d 79 64 69 76  |%*ph%:ydiv%=ydiv|
0000a1b0  25 2a 32 38 32 0d 32 46  05 cd 0d 32 50 57 72 6f  |%*282.2F...2PWro|
0000a1c0  77 62 79 74 65 73 25 3d  73 78 25 2b 37 3e 3e 33  |wbytes%=sx%+7>>3|
0000a1d0  3a 70 62 75 66 66 25 3d  a4 64 69 6d 28 73 78 25  |:pbuff%=.dim(sx%|
0000a1e0  29 3a 70 6c 62 79 74 65  73 25 3d 72 6f 77 62 79  |):plbytes%=rowby|
0000a1f0  74 65 73 25 2a 70 6c 61  6e 65 73 25 3a 62 75 66  |tes%*planes%:buf|
0000a200  66 25 3d a4 64 69 6d 28  70 6c 62 79 74 65 73 25  |f%=.dim(plbytes%|
0000a210  29 0d 32 5a 14 cf 23 63  25 3d 73 74 25 3a 76 72  |).2Z..#c%=st%:vr|
0000a220  65 70 25 3d 30 0d 32 64  4d e3 43 25 3d 30 b8 28  |ep%=0.2dM.C%=0.(|
0000a230  31 3c 3c 70 6c 61 6e 65  73 25 29 2d 31 3a 72 25  |1<<planes%)-1:r%|
0000a240  28 43 25 29 3d 46 2d 43  25 2f 28 28 31 3c 3c 70  |(C%)=F-C%/((1<<p|
0000a250  6c 61 6e 65 73 25 29 2d  31 29 2a 46 3a ed 3a 67  |lanes%)-1)*F:.:g|
0000a260  25 28 29 3d 72 25 28 29  3a 62 25 28 29 3d 72 25  |%()=r%():b%()=r%|
0000a270  28 29 0d 32 6e 42 69 6e  66 6f 24 3d 22 49 4d 47  |().2nBinfo$="IMG|
0000a280  20 66 69 6c 65 2c 20 22  2b c3 73 78 25 2b 22 20  | file, "+.sx%+" |
0000a290  62 79 20 22 2b c3 73 79  25 2b 22 20 70 69 78 65  |by "+.sy%+" pixe|
0000a2a0  6c 73 2c 20 22 2b a4 62  69 74 73 28 70 6c 61 6e  |ls, "+.bits(plan|
0000a2b0  65 73 25 29 0d 32 78 0a  c9 20 31 35 30 30 0d 32  |es%).2x.. 1500.2|
0000a2c0  82 22 cf 23 63 25 3d 34  3a 64 69 72 25 3d a4 74  |.".#c%=4:dir%=.t|
0000a2d0  69 66 66 28 34 29 3a cf  23 63 25 3d 64 69 72 25  |iff(4):.#c%=dir%|
0000a2e0  0d 32 8c 36 72 67 62 3d  a3 3a 67 72 65 79 75 6e  |.2.6rgb=.:greyun|
0000a2f0  69 74 3d 31 30 30 3a 70  6c 61 6e 61 72 25 3d 31  |it=100:planar%=1|
0000a300  3a 66 69 6c 6c 6f 72 64  65 72 3d 31 3a 72 65 73  |:fillorder=1:res|
0000a310  75 6e 69 74 3d 32 0d 32  96 29 78 6e 75 6d 25 3d  |unit=2.2.)xnum%=|
0000a320  39 30 3a 78 64 65 6e 6f  6d 25 3d 31 3a 79 6e 75  |90:xdenom%=1:ynu|
0000a330  6d 25 3d 39 30 3a 79 64  65 6e 6f 6d 25 3d 31 0d  |m%=90:ydenom%=1.|
0000a340  32 a0 18 45 25 3d a4 74  69 66 66 28 33 29 3a e3  |2..E%=.tiff(3):.|
0000a350  5a 25 3d 31 b8 45 25 0d  32 aa 27 54 25 3d a4 74  |Z%=1.E%.2.'T%=.t|
0000a360  69 66 66 28 33 29 3a 44  25 3d a4 74 69 66 66 28  |iff(3):D%=.tiff(|
0000a370  33 29 3a 43 25 3d a4 74  69 66 66 28 34 29 0d 32  |3):C%=.tiff(4).2|
0000a380  b4 61 e7 43 25 3e 31 20  56 25 3d a4 74 69 66 66  |.a.C%>1 V%=.tiff|
0000a390  28 34 29 20 8b e7 44 25  3d 32 20 8f 23 63 25 3d  |(4) ..D%=2 .#c%=|
0000a3a0  64 69 72 25 2b 32 2b 5a  25 2a 31 32 20 8b e7 44  |dir%+2+Z%*12 ..D|
0000a3b0  25 3c 34 20 56 25 3d a4  74 69 66 66 28 44 25 29  |%<4 V%=.tiff(D%)|
0000a3c0  3a cf 23 63 25 3d 64 69  72 25 2b 32 2b 5a 25 2a  |:.#c%=dir%+2+Z%*|
0000a3d0  31 32 20 8b 56 25 3d a4  74 69 66 66 28 34 29 0d  |12 .V%=.tiff(4).|
0000a3e0  32 be 3f f1 22 52 65 61  64 20 74 61 67 20 22 3b  |2.?."Read tag ";|
0000a3f0  54 25 22 20 64 61 74 61  74 79 70 65 20 22 44 25  |T%" datatype "D%|
0000a400  22 20 63 6f 75 6e 74 20  22 43 25 22 20 76 61 6c  |" count "C%" val|
0000a410  75 65 2f 70 6f 69 6e 74  65 72 20 22 56 25 0d 32  |ue/pointer "V%.2|
0000a420  c8 0b c8 8e 20 54 25 20  ca 0d 32 d2 10 c9 20 32  |.... T% ..2... 2|
0000a430  35 36 3a 73 78 25 3d 56  25 0d 32 dc 10 c9 20 32  |56:sx%=V%.2... 2|
0000a440  35 37 3a 73 79 25 3d 56  25 0d 32 e6 11 c9 20 32  |57:sy%=V%.2... 2|
0000a450  35 38 3a e7 43 25 3e 31  20 8c 0d 32 f0 0e e7 44  |58:.C%>1 ..2...D|
0000a460  25 2a 43 25 3e 36 20 8c  0d 32 fa 1c cf 23 63 25  |%*C%>6 ..2...#c%|
0000a470  3d 56 25 3a 71 75 61 6e  74 25 3d a4 74 69 66 66  |=V%:quant%=.tiff|
0000a480  28 44 25 29 0d 33 04 28  69 6e 70 75 74 3d 71 75  |(D%).3.(input=qu|
0000a490  61 6e 74 25 3a e3 49 25  3d 31 b8 43 25 2d 31 3a  |ant%:.I%=1.C%-1:|
0000a4a0  56 25 3d a4 74 69 66 66  28 44 25 29 0d 33 0e 50  |V%=.tiff(D%).3.P|
0000a4b0  e7 56 25 3c 3e 71 75 61  6e 74 25 20 85 34 32 2c  |.V%<>quant% .42,|
0000a4c0  22 43 61 6e 27 74 20 64  6f 20 52 47 42 20 54 49  |"Can't do RGB TI|
0000a4d0  46 46 20 77 69 74 68 20  64 69 66 66 65 72 65 6e  |FF with differen|
0000a4e0  74 20 6e 75 6d 62 65 72  73 20 6f 66 20 62 69 74  |t numbers of bit|
0000a4f0  73 20 70 65 72 20 70 69  78 65 6c 22 0d 33 18 0d  |s per pixel".3..|
0000a500  69 6e 70 75 74 2b 3d 56  25 0d 33 22 0c ed 3a f2  |input+=V%.3"..:.|
0000a510  6e 6f 70 61 6c 0d 33 2c  05 cc 0d 33 36 20 71 75  |nopal.3,...36 qu|
0000a520  61 6e 74 25 3d 56 25 20  80 20 26 46 46 3a 69 6e  |ant%=V% . &FF:in|
0000a530  70 75 74 3d 71 75 61 6e  74 25 0d 33 40 35 e3 49  |put=quant%.3@5.I|
0000a540  25 3d 30 b8 28 31 3c 3c  71 75 61 6e 74 25 29 2d  |%=0.(1<<quant%)-|
0000a550  31 3a 72 25 28 49 25 29  3d 49 25 2f 28 28 31 3c  |1:r%(I%)=I%/((1<|
0000a560  3c 71 75 61 6e 74 25 29  2d 31 29 2a 46 3a ed 0d  |<quant%)-1)*F:..|
0000a570  33 4a 17 67 25 28 29 3d  72 25 28 29 3a 62 25 28  |3J.g%()=r%():b%(|
0000a580  29 3d 72 25 28 29 0d 33  54 05 cd 0d 33 5e 15 cf  |)=r%().3T...3^..|
0000a590  23 63 25 3d 64 69 72 25  2b 32 2b 5a 25 2a 31 32  |#c%=dir%+2+Z%*12|
0000a5a0  0d 33 68 05 cc 0d 33 72  1a 71 75 61 6e 74 25 3d  |.3h...3r.quant%=|
0000a5b0  56 25 3a 69 6e 70 75 74  3d 71 75 61 6e 74 25 0d  |V%:input=quant%.|
0000a5c0  33 7c 35 e3 49 25 3d 30  b8 28 31 3c 3c 71 75 61  |3|5.I%=0.(1<<qua|
0000a5d0  6e 74 25 29 2d 31 3a 72  25 28 49 25 29 3d 49 25  |nt%)-1:r%(I%)=I%|
0000a5e0  2f 28 28 31 3c 3c 71 75  61 6e 74 25 29 2d 31 29  |/((1<<quant%)-1)|
0000a5f0  2a 46 3a ed 0d 33 86 17  67 25 28 29 3d 72 25 28  |*F:..3..g%()=r%(|
0000a600  29 3a 62 25 28 29 3d 72  25 28 29 0d 33 90 05 cd  |):b%()=r%().3...|
0000a610  0d 33 9a 18 c9 20 32 35  39 3a 63 6f 6d 70 72 65  |.3... 259:compre|
0000a620  73 73 69 6f 6e 3d 56 25  0d 33 a4 2f c9 20 32 36  |ssion=V%.3./. 26|
0000a630  32 3a 70 68 6f 74 6f 6d  65 74 72 69 63 3d 56 25  |2:photometric=V%|
0000a640  3a e7 56 25 3d 30 20 69  6e 76 65 72 74 25 3d ac  |:.V%=0 invert%=.|
0000a650  69 6e 76 65 72 74 25 0d  33 ae 16 c9 20 32 36 36  |invert%.3... 266|
0000a660  3a 66 69 6c 6c 6f 72 64  65 72 3d 56 25 0d 33 b8  |:fillorder=V%.3.|
0000a670  21 c9 20 32 37 33 3a 73  74 63 25 3d 43 25 3a 73  |!. 273:stc%=C%:s|
0000a680  74 76 25 3d 56 25 3a 73  74 64 25 3d 44 25 0d 33  |tv%=V%:std%=D%.3|
0000a690  c2 31 c9 20 32 37 37 3a  73 61 6d 70 70 65 72 70  |.1. 277:sampperp|
0000a6a0  69 78 25 3d 56 25 3a 69  6e 70 75 74 3d 71 75 61  |ix%=V%:input=qua|
0000a6b0  6e 74 25 2a 56 25 3a 72  67 62 3d 56 25 3d 33 0d  |nt%*V%:rgb=V%=3.|
0000a6c0  33 cc 17 c9 20 32 37 38  3a 73 74 72 69 70 72 6f  |3... 278:stripro|
0000a6d0  77 73 25 3d 56 25 0d 33  d6 2d c9 20 32 37 39 3a  |ws%=V%.3.-. 279:|
0000a6e0  73 74 63 62 79 74 65 25  3d 43 25 3a 73 74 76 62  |stcbyte%=C%:stvb|
0000a6f0  79 74 65 25 3d 56 25 3a  73 74 64 62 79 74 65 25  |yte%=V%:stdbyte%|
0000a700  3d 44 25 0d 33 e0 31 c9  20 32 38 32 3a cf 23 63  |=D%.3.1. 282:.#c|
0000a710  25 3d 56 25 3a 78 6e 75  6d 25 3d a4 74 69 66 66  |%=V%:xnum%=.tiff|
0000a720  28 34 29 3a 78 64 65 6e  6f 6d 25 3d a4 74 69 66  |(4):xdenom%=.tif|
0000a730  66 28 34 29 0d 33 ea 15  cf 23 63 25 3d 64 69 72  |f(4).3...#c%=dir|
0000a740  25 2b 32 2b 5a 25 2a 31  32 0d 33 f4 31 c9 20 32  |%+2+Z%*12.3.1. 2|
0000a750  38 33 3a cf 23 63 25 3d  56 25 3a 79 6e 75 6d 25  |83:.#c%=V%:ynum%|
0000a760  3d a4 74 69 66 66 28 34  29 3a 79 64 65 6e 6f 6d  |=.tiff(4):ydenom|
0000a770  25 3d a4 74 69 66 66 28  34 29 0d 33 fe 15 cf 23  |%=.tiff(4).3...#|
0000a780  63 25 3d 64 69 72 25 2b  32 2b 5a 25 2a 31 32 0d  |c%=dir%+2+Z%*12.|
0000a790  34 08 2c c9 20 32 38 34  3a 70 6c 61 6e 61 72 25  |4.,. 284:planar%|
0000a7a0  3d 56 25 3a e7 70 6c 61  6e 61 72 25 3d 32 20 69  |=V%:.planar%=2 i|
0000a7b0  6e 70 75 74 3d 71 75 61  6e 74 25 0d 34 12 18 c9  |nput=quant%.4...|
0000a7c0  20 32 39 30 3a 67 72 65  79 75 6e 69 74 3d 31 30  | 290:greyunit=10|
0000a7d0  5e 56 25 0d 34 1c 3c c9  20 32 39 31 3a cf 23 63  |^V%.4.<. 291:.#c|
0000a7e0  25 3d 56 25 3a e3 49 25  3d 30 b8 43 25 2d 31 3a  |%=V%:.I%=0.C%-1:|
0000a7f0  72 25 28 49 25 29 3d a4  74 69 66 66 28 44 25 29  |r%(I%)=.tiff(D%)|
0000a800  2f 67 72 65 79 75 6e 69  74 2f 32 2a 46 3a ed 0d  |/greyunit/2*F:..|
0000a810  34 26 17 67 25 28 29 3d  72 25 28 29 3a 62 25 28  |4&.g%()=r%():b%(|
0000a820  29 3d 72 25 28 29 0d 34  30 15 cf 23 63 25 3d 64  |)=r%().40..#c%=d|
0000a830  69 72 25 2b 32 2b 5a 25  2a 31 32 0d 34 3a 14 c9  |ir%+2+Z%*12.4:..|
0000a840  20 32 39 36 3a 72 65 73  75 6e 69 74 3d 56 25 0d  | 296:resunit=V%.|
0000a850  34 44 16 c9 20 33 31 37  3a 68 70 72 65 64 69 63  |4D.. 317:hpredic|
0000a860  74 25 3d 56 25 0d 34 4e  38 c9 20 33 32 30 3a cf  |t%=V%.4N8. 320:.|
0000a870  23 63 25 3d 56 25 3a e3  49 25 3d 30 b8 43 25 2f  |#c%=V%:.I%=0.C%/|
0000a880  33 2d 31 3a 72 25 28 49  25 29 3d a4 74 69 66 66  |3-1:r%(I%)=.tiff|
0000a890  28 33 29 2f 36 35 35 33  35 2a 46 3a ed 0d 34 58  |(3)/65535*F:..4X|
0000a8a0  2a e3 49 25 3d 30 b8 43  25 2f 33 2d 31 3a 67 25  |*.I%=0.C%/3-1:g%|
0000a8b0  28 49 25 29 3d a4 74 69  66 66 28 33 29 2f 36 35  |(I%)=.tiff(3)/65|
0000a8c0  35 33 35 2a 46 3a ed 0d  34 62 2a e3 49 25 3d 30  |535*F:..4b*.I%=0|
0000a8d0  b8 43 25 2f 33 2d 31 3a  62 25 28 49 25 29 3d a4  |.C%/3-1:b%(I%)=.|
0000a8e0  74 69 66 66 28 33 29 2f  36 35 35 33 35 2a 46 3a  |tiff(3)/65535*F:|
0000a8f0  ed 0d 34 6c 15 cf 23 63  25 3d 64 69 72 25 2b 32  |..4l..#c%=dir%+2|
0000a900  2b 5a 25 2a 31 32 0d 34  76 05 7f 0d 34 80 4a e7  |+Z%*12.4v...4.J.|
0000a910  69 6e 66 6f 25 20 f1 22  49 67 6e 6f 72 69 6e 67  |info% ."Ignoring|
0000a920  20 74 61 67 20 22 3b 54  25 22 20 64 61 74 61 74  | tag ";T%" datat|
0000a930  79 70 65 20 22 44 25 22  20 63 6f 75 6e 74 20 22  |ype "D%" count "|
0000a940  43 25 22 20 76 61 6c 75  65 2f 70 6f 69 6e 74 65  |C%" value/pointe|
0000a950  72 20 22 56 25 0d 34 8a  05 cb 0d 34 94 05 ed 0d  |r "V%.4....4....|
0000a960  34 9e 19 de 20 73 74 25  28 73 74 63 25 29 3a e7  |4... st%(stc%):.|
0000a970  73 74 63 25 3e 31 20 8c  0d 34 a8 30 cf 23 63 25  |stc%>1 ..4.0.#c%|
0000a980  3d 73 74 76 25 3a e3 49  25 3d 30 b8 73 74 63 25  |=stv%:.I%=0.stc%|
0000a990  2d 31 3a 73 74 25 28 49  25 29 3d a4 74 69 66 66  |-1:st%(I%)=.tiff|
0000a9a0  28 73 74 64 25 29 3a ed  0d 34 bc 05 cc 0d 34 c6  |(std%):..4....4.|
0000a9b0  0f 73 74 25 28 30 29 3d  73 74 76 25 0d 34 d0 05  |.st%(0)=stv%.4..|
0000a9c0  cd 0d 34 da 14 c8 8e 20  63 6f 6d 70 72 65 73 73  |..4.... compress|
0000a9d0  69 6f 6e 20 ca 0d 34 e4  12 c9 20 30 2c 31 3a 69  |ion ..4... 0,1:i|
0000a9e0  6e 66 6f 24 3d 22 22 0d  34 ee 29 c9 20 32 3a 69  |nfo$="".4.). 2:i|
0000a9f0  6e 66 6f 24 3d 22 43 43  49 54 54 20 47 72 6f 75  |nfo$="CCITT Grou|
0000aa00  70 20 33 20 63 6f 6d 70  72 65 73 73 65 64 20 22  |p 3 compressed "|
0000aa10  0d 34 f8 2b c9 20 35 3a  69 6e 66 6f 24 3d 22 4c  |.4.+. 5:info$="L|
0000aa20  5a 57 20 63 6f 6d 70 72  65 73 73 65 64 20 22 3a  |ZW compressed ":|
0000aa30  72 24 3d 22 46 4e 31 35  30 35 22 0d 35 02 6e e7  |r$="FN1505".5.n.|
0000aa40  68 70 72 65 64 69 63 74  25 3d 32 20 8c 69 6e 66  |hpredict%=2 .inf|
0000aa50  6f 24 2b 3d 22 68 6f 72  69 7a 6f 6e 74 61 6c 20  |o$+="horizontal |
0000aa60  64 69 66 66 65 72 65 6e  63 65 64 20 22 20 8b e7  |differenced " ..|
0000aa70  68 70 72 65 64 69 63 74  25 3e 32 20 69 6e 66 6f  |hpredict%>2 info|
0000aa80  24 2b 3d 22 20 75 6e 6b  6e 6f 77 6e 20 70 72 65  |$+=" unknown pre|
0000aa90  64 69 63 74 6f 72 20 28  22 2b c3 68 70 72 65 64  |dictor ("+.hpred|
0000aaa0  69 63 74 25 2b 22 29 20  22 0d 35 0c 27 73 65 74  |ict%+") ".5.'set|
0000aab0  63 6f 64 65 73 25 3d 38  3a 63 6c 65 61 72 63 6f  |codes%=8:clearco|
0000aac0  64 65 25 3d 31 3c 3c 73  65 74 63 6f 64 65 73 25  |de%=1<<setcodes%|
0000aad0  0d 35 16 33 de 20 74 61  62 6c 65 25 28 31 3c 3c  |.5.3. table%(1<<|
0000aae0  31 32 29 3a 73 74 6b 25  3d a4 64 69 6d 28 31 3c  |12):stk%=.dim(1<|
0000aaf0  3c 31 33 29 3a 62 75 66  25 3d a4 64 69 6d 28 32  |<13):buf%=.dim(2|
0000ab00  38 30 29 0d 35 20 26 e3  49 25 3d 30 b8 63 6c 65  |80).5 &.I%=0.cle|
0000ab10  61 72 63 6f 64 65 25 2d  31 3a 74 61 62 6c 65 25  |arcode%-1:table%|
0000ab20  28 49 25 29 3d 49 25 3a  ed 0d 35 2a 34 c9 20 33  |(I%)=I%:..5*4. 3|
0000ab30  32 37 37 33 3a 69 6e 66  6f 24 3d 22 50 61 63 6b  |2773:info$="Pack|
0000ab40  42 69 74 73 20 63 6f 6d  70 72 65 73 73 65 64 20  |Bits compressed |
0000ab50  22 3a 72 24 3d 22 46 4e  31 35 30 31 22 0d 35 34  |":r$="FN1501".54|
0000ab60  20 c9 20 36 3a 69 6e 66  6f 24 3d 22 4a 50 45 47  | . 6:info$="JPEG|
0000ab70  20 63 6f 6d 70 72 65 73  73 65 64 20 22 0d 35 3e  | compressed ".5>|
0000ab80  32 7f 20 69 6e 66 6f 24  3d 22 43 6f 6d 70 72 65  |2. info$="Compre|
0000ab90  73 73 20 22 2b c3 63 6f  6d 70 72 65 73 73 69 6f  |ss "+.compressio|
0000aba0  6e 2b 22 20 2d 20 75 6e  6b 6e 6f 77 6e 20 22 0d  |n+" - unknown ".|
0000abb0  35 48 05 cb 0d 35 52 42  69 6e 66 6f 24 2b 3d 22  |5H...5RBinfo$+="|
0000abc0  54 49 46 46 20 66 69 6c  65 2c 20 22 2b c3 73 78  |TIFF file, "+.sx|
0000abd0  25 2b 22 20 62 79 20 22  2b c3 73 79 25 2b 22 20  |%+" by "+.sy%+" |
0000abe0  70 69 78 65 6c 73 2c 20  22 2b a4 62 69 74 73 28  |pixels, "+.bits(|
0000abf0  69 6e 70 75 74 29 0d 35  5c 53 62 69 67 65 6e 64  |input).5\Sbigend|
0000ac00  69 61 6e 62 69 74 73 3d  66 69 6c 6c 6f 72 64 65  |ianbits=fillorde|
0000ac10  72 3d 31 3a cf 23 63 25  3d 73 74 25 28 30 29 3a  |r=1:.#c%=st%(0):|
0000ac20  73 74 72 69 70 70 74 72  3d 30 3a e7 73 74 72 69  |stripptr=0:.stri|
0000ac30  70 72 6f 77 73 25 3e 3d  73 79 25 20 73 74 72 69  |prows%>=sy% stri|
0000ac40  70 72 6f 77 73 25 3d 2d  31 0d 35 66 0e c8 8e 20  |prows%=-1.5f... |
0000ac50  69 6e 70 75 74 20 ca 0d  35 70 1a c9 20 31 3a 72  |input ..5p.. 1:r|
0000ac60  6f 77 62 79 74 65 73 25  3d 73 78 25 2b 37 3e 3e  |owbytes%=sx%+7>>|
0000ac70  33 0d 35 7a 1a c9 20 32  3a 72 6f 77 62 79 74 65  |3.5z.. 2:rowbyte|
0000ac80  73 25 3d 73 78 25 2b 33  3e 3e 32 0d 35 84 1a c9  |s%=sx%+3>>2.5...|
0000ac90  20 34 3a 72 6f 77 62 79  74 65 73 25 3d 73 78 25  | 4:rowbytes%=sx%|
0000aca0  2b 31 3e 3e 31 0d 35 8e  15 c9 20 38 3a 72 6f 77  |+1>>1.5... 8:row|
0000acb0  62 79 74 65 73 25 3d 73  78 25 0d 35 98 18 c9 20  |bytes%=sx%.5... |
0000acc0  32 34 3a 72 6f 77 62 79  74 65 73 25 3d 33 2a 73  |24:rowbytes%=3*s|
0000acd0  78 25 0d 35 a2 48 c9 20  33 32 3a 72 6f 77 62 79  |x%.5.H. 32:rowby|
0000ace0  74 65 73 25 3d 34 2a 73  78 25 3a e7 70 68 6f 74  |tes%=4*sx%:.phot|
0000acf0  6f 6d 65 74 72 69 63 3c  3e 35 20 85 20 34 32 2c  |ometric<>5 . 42,|
0000ad00  22 33 32 20 62 70 70 20  54 49 46 46 20 62 75 74  |"32 bpp TIFF but|
0000ad10  20 6e 6f 74 20 43 4d 59  4b 22 0d 35 ac 2b 7f 20  | not CMYK".5.+. |
0000ad20  85 20 34 32 2c 22 43 61  6e 27 74 20 64 6f 20 22  |. 42,"Can't do "|
0000ad30  2b a4 62 69 74 73 28 69  6e 70 75 74 29 2b 22 20  |+.bits(input)+" |
0000ad40  54 49 46 46 22 0d 35 b6  05 cb 0d 35 c0 2e e7 70  |TIFF".5....5...p|
0000ad50  6c 61 6e 61 72 25 3d 32  20 72 6f 77 62 79 74 65  |lanar%=2 rowbyte|
0000ad60  73 25 3d 72 6f 77 62 79  74 65 73 25 2a 73 61 6d  |s%=rowbytes%*sam|
0000ad70  70 70 65 72 70 69 78 25  0d 35 ca 49 e7 70 6c 61  |pperpix%.5.I.pla|
0000ad80  6e 61 72 25 3c 3e 31 20  80 20 72 67 62 3c 3e 30  |nar%<>1 . rgb<>0|
0000ad90  20 85 34 32 2c 22 43 61  6e 27 74 20 64 6f 20 74  | .42,"Can't do t|
0000ada0  68 69 73 20 73 74 79 6c  65 20 6f 66 20 54 49 46  |his style of TIF|
0000adb0  46 20 79 65 74 22 20 8b  70 6c 61 6e 61 72 25 3d  |F yet" .planar%=|
0000adc0  a3 0d 35 d4 15 e7 20 63  6f 6d 70 72 65 73 73 69  |..5... compressi|
0000add0  6f 6e 3c 32 20 8c 0d 35  de 53 63 61 63 68 65 25  |on<2 ..5.Scache%|
0000ade0  3d b9 3a 73 74 72 69 70  70 74 72 3d 2d 31 3a 72  |=.:stripptr=-1:r|
0000adf0  24 3d 22 46 4e 38 22 3a  e7 69 6e 70 75 74 3d 32  |$="FN8":.input=2|
0000ae00  34 20 72 62 6f 25 3d 30  3a 67 62 6f 25 3d 31 3a  |4 rbo%=0:gbo%=1:|
0000ae10  62 62 6f 25 3d 32 3a 73  74 65 70 32 34 3d 33 3a  |bbo%=2:step24=3:|
0000ae20  72 24 3d 22 46 4e 32 34  22 0d 35 e8 62 e7 69 6e  |r$="FN24".5.b.in|
0000ae30  70 75 74 3d 33 32 20 72  62 6f 25 3d 30 3a 67 62  |put=32 rbo%=0:gb|
0000ae40  6f 25 3d 31 3a 62 62 6f  25 3d 32 3a 73 74 65 70  |o%=1:bbo%=2:step|
0000ae50  32 34 3d 34 3a 72 24 3d  22 46 4e 32 34 22 3a 72  |24=4:r$="FN24":r|
0000ae60  25 28 29 3d 46 2d 72 25  28 29 3a 67 25 28 29 3d  |%()=F-r%():g%()=|
0000ae70  46 2d 67 25 28 29 3a 62  25 28 29 3d 46 2d 62 25  |F-g%():b%()=F-b%|
0000ae80  28 29 3a 69 6e 70 75 74  3d 32 34 0d 35 f2 05 cc  |():input=24.5...|
0000ae90  0d 35 fc 27 e7 63 6f 6d  70 72 65 73 73 69 6f 6e  |.5.'.compression|
0000aea0  3d 35 20 84 63 6f 6d 70  72 65 73 73 69 6f 6e 3d  |=5 .compression=|
0000aeb0  33 32 37 37 33 20 8c 0d  36 06 2d 63 61 63 68 65  |32773 ..6.-cache|
0000aec0  25 3d b9 3a 63 61 63 68  65 62 79 74 65 73 25 3d  |%=.:cachebytes%=|
0000aed0  72 6f 77 62 79 74 65 73  25 2a 73 74 72 69 70 72  |rowbytes%*stripr|
0000aee0  6f 77 73 25 0d 36 10 30  70 6c 62 75 66 66 25 3d  |ows%.6.0plbuff%=|
0000aef0  a4 64 69 6d 28 72 6f 77  62 79 74 65 73 25 29 3a  |.dim(rowbytes%):|
0000af00  72 6f 77 73 74 6f 67 6f  25 3d 73 74 72 69 70 72  |rowstogo%=stripr|
0000af10  6f 77 73 25 0d 36 1a 5c  e7 69 6e 70 75 74 3d 32  |ows%.6.\.input=2|
0000af20  34 20 72 62 25 3d 70 6c  62 75 66 66 25 3a 67 62  |4 rb%=plbuff%:gb|
0000af30  25 3d 70 6c 62 75 66 66  25 2b 31 3a 62 62 25 3d  |%=plbuff%+1:bb%=|
0000af40  70 6c 62 75 66 66 25 2b  32 3a 72 24 3d 22 46 4e  |plbuff%+2:r$="FN|
0000af50  22 2b c3 28 bb c1 72 24  2c 33 29 2b 31 30 29 3a  |"+.(..r$,3)+10):|
0000af60  73 74 65 70 32 34 3d 33  3a 72 62 6f 25 3d 2d 31  |step24=3:rbo%=-1|
0000af70  0d 36 24 05 cc 0d 36 2e  2e 62 75 66 66 25 3d a4  |.6$...6..buff%=.|
0000af80  64 69 6d 28 72 6f 77 62  79 74 65 73 25 29 3a 72  |dim(rowbytes%):r|
0000af90  6f 77 73 74 6f 67 6f 25  3d 73 74 72 69 70 72 6f  |owstogo%=stripro|
0000afa0  77 73 25 0d 36 38 4e e7  69 6e 70 75 74 3d 32 34  |ws%.68N.input=24|
0000afb0  20 72 62 25 3d 62 75 66  66 25 3a 67 62 25 3d 62  | rb%=buff%:gb%=b|
0000afc0  75 66 66 25 2b 31 3a 62  62 25 3d 62 75 66 66 25  |uff%+1:bb%=buff%|
0000afd0  2b 32 3a 72 24 3d 22 46  4e 22 2b c3 28 bb c1 72  |+2:r$="FN"+.(..r|
0000afe0  24 2c 33 29 2b 31 30 29  3a 73 74 65 70 32 34 3d  |$,3)+10):step24=|
0000aff0  33 0d 36 42 05 cd 0d 36  4c 05 cd 0d 36 56 0d e7  |3.6B...6L...6V..|
0000b000  73 63 61 6c 65 25 20 8c  0d 36 60 1a 53 25 3d 72  |scale% ..6`.S%=r|
0000b010  65 73 75 6e 69 74 3a e7  53 25 3d 32 20 53 25 3d  |esunit:.S%=2 S%=|
0000b020  39 30 0d 36 6a 0f e7 53  25 3d 33 20 53 25 3d 33  |90.6j..S%=3 S%=3|
0000b030  35 0d 36 74 2c 78 64 69  76 25 3d 78 64 69 76 25  |5.6t,xdiv%=xdiv%|
0000b040  2a 78 6e 75 6d 25 3a 78  6d 75 6c 25 3d 78 6d 75  |*xnum%:xmul%=xmu|
0000b050  6c 25 2a 78 64 65 6e 6f  6d 25 2a 53 25 0d 36 7e  |l%*xdenom%*S%.6~|
0000b060  2c 79 64 69 76 25 3d 79  64 69 76 25 2a 79 6e 75  |,ydiv%=ydiv%*ynu|
0000b070  6d 25 3a 79 6d 75 6c 25  3d 79 6d 75 6c 25 2a 79  |m%:ymul%=ymul%*y|
0000b080  64 65 6e 6f 6d 25 2a 53  25 0d 36 88 05 cd 0d 36  |denom%*S%.6....6|
0000b090  92 19 e7 72 24 3d 22 46  4e 31 35 30 30 22 20 72  |...r$="FN1500" r|
0000b0a0  24 3d 22 46 4e 38 22 0d  36 9c 0a c9 20 31 36 30  |$="FN8".6... 160|
0000b0b0  30 0d 36 a6 1e cf 23 63  25 3d 31 32 3a 63 61 6d  |0.6...#c%=12:cam|
0000b0c0  67 3d 30 3a 70 6c 61 6e  61 72 25 3d b9 3a f5 0d  |g=0:planar%=.:..|
0000b0d0  36 b0 26 53 24 3d bd 9a  23 63 25 2b bd 9a 23 63  |6.&S$=..#c%+..#c|
0000b0e0  25 2b bd 9a 23 63 25 2b  bd 9a 23 63 25 3a 53 25  |%+..#c%+..#c%:S%|
0000b0f0  3d a4 62 65 57 0d 36 ba  0b c8 8e 20 53 24 20 ca  |=.beW.6.... S$ .|
0000b100  0d 36 c4 43 c9 20 22 42  4d 48 44 22 3a 73 78 25  |.6.C. "BMHD":sx%|
0000b110  3d a4 62 65 48 57 3a 73  79 25 3d a4 62 65 48 57  |=.beHW:sy%=.beHW|
0000b120  3a 53 25 3d a4 57 3a 70  6c 61 6e 65 73 25 3d 9a  |:S%=.W:planes%=.|
0000b130  23 63 25 3a 6d 61 73 6b  69 6e 67 25 3d 9a 23 63  |#c%:masking%=.#c|
0000b140  25 3d 31 0d 36 ce 36 63  6f 6d 70 72 65 73 73 69  |%=1.6.6compressi|
0000b150  6f 6e 3d 9a 23 63 25 3a  53 25 3d 9a 23 63 25 2b  |on=.#c%:S%=.#c%+|
0000b160  a4 48 57 3a 55 25 3d 9a  23 63 25 3a 56 25 3d 9a  |.HW:U%=.#c%:V%=.|
0000b170  23 63 25 3a 53 25 3d a4  57 0d 36 d8 29 e7 73 63  |#c%:S%=.W.6.).sc|
0000b180  61 6c 65 25 20 79 6d 75  6c 25 3d 79 6d 75 6c 25  |ale% ymul%=ymul%|
0000b190  2a 56 25 3a 79 64 69 76  25 3d 79 64 69 76 25 2a  |*V%:ydiv%=ydiv%*|
0000b1a0  55 25 0d 36 e2 4b e3 49  25 3d 30 b8 28 31 3c 3c  |U%.6.K.I%=0.(1<<|
0000b1b0  70 6c 61 6e 65 73 25 29  2d 31 3a 72 25 28 49 25  |planes%)-1:r%(I%|
0000b1c0  29 3d 49 25 2f 28 28 31  3c 3c 70 6c 61 6e 65 73  |)=I%/((1<<planes|
0000b1d0  25 29 2d 31 29 2a 46 3a  ed 3a 67 25 28 29 3d 72  |%)-1)*F:.:g%()=r|
0000b1e0  25 28 29 3a 62 25 28 29  3d 72 25 28 29 0d 36 ec  |%():b%()=r%().6.|
0000b1f0  42 c9 20 22 43 4d 41 50  22 3a 53 25 3d 8f 23 63  |B. "CMAP":S%=.#c|
0000b200  25 2b 53 25 3a e3 49 25  3d 30 b8 28 31 3c 3c 70  |%+S%:.I%=0.(1<<p|
0000b210  6c 61 6e 65 73 25 29 2d  31 3a 72 25 28 49 25 29  |lanes%)-1:r%(I%)|
0000b220  3d 28 9a 23 63 25 3e 3e  34 29 2f 31 35 2a 46 0d  |=(.#c%>>4)/15*F.|
0000b230  36 f6 31 67 25 28 49 25  29 3d 28 9a 23 63 25 3e  |6.1g%(I%)=(.#c%>|
0000b240  3e 34 29 2f 31 35 2a 46  3a 62 25 28 49 25 29 3d  |>4)/15*F:b%(I%)=|
0000b250  28 9a 23 63 25 3e 3e 34  29 2f 31 35 2a 46 3a ed  |(.#c%>>4)/15*F:.|
0000b260  0d 37 00 47 cf 23 63 25  3d 53 25 3a e7 69 6e 66  |.7.G.#c%=S%:.inf|
0000b270  6f 25 20 f1 22 57 61 72  6e 69 6e 67 3a 20 74 72  |o% ."Warning: tr|
0000b280  75 6e 63 61 74 65 64 20  49 46 46 20 43 4d 41 50  |uncated IFF CMAP|
0000b290  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 74 6f 20  | information to |
0000b2a0  34 20 62 69 74 73 22 0d  37 0a 3b c9 20 22 43 41  |4 bits".7.;. "CA|
0000b2b0  4d 47 22 3a 63 61 6d 67  3d a4 62 65 57 3a e7 69  |MG":camg=.beW:.i|
0000b2c0  6e 66 6f 25 20 f1 22 41  6d 69 67 61 20 76 69 65  |nfo% ."Amiga vie|
0000b2d0  77 70 6f 72 74 20 6d 6f  64 65 20 22 3b 7e 63 61  |wport mode ";~ca|
0000b2e0  6d 67 0d 37 14 15 c9 20  22 42 4f 44 59 22 3a 73  |mg.7... "BODY":s|
0000b2f0  74 25 3d 8f 23 63 25 0d  37 1e 34 7f 20 e7 20 69  |t%=.#c%.7.4. . i|
0000b300  6e 66 6f 25 20 f1 22 49  67 6e 6f 72 69 6e 67 20  |nfo% ."Ignoring |
0000b310  49 46 46 20 70 72 6f 70  65 72 74 79 20 22 53 24  |IFF property "S$|
0000b320  22 20 73 69 7a 65 20 22  3b 53 25 0d 37 28 10 cf  |" size ";S%.7(..|
0000b330  23 63 25 3d 8f 23 63 25  2b 53 25 0d 37 32 05 cb  |#c%=.#c%+S%.72..|
0000b340  0d 37 3c 39 fd 53 24 3d  22 42 4f 44 59 22 3a e7  |.7<9.S$="BODY":.|
0000b350  63 6f 6d 70 72 65 73 73  69 6f 6e 20 69 6e 66 6f  |compression info|
0000b360  24 3d 22 43 6f 6d 70 72  65 73 73 65 64 20 22 20  |$="Compressed " |
0000b370  8b 69 6e 66 6f 24 3d 22  22 0d 37 50 2b 68 61 6d  |.info$="".7P+ham|
0000b380  3d 28 63 61 6d 67 20 80  20 26 38 30 30 29 3c 3e  |=(camg . &800)<>|
0000b390  30 3a e7 68 61 6d 20 69  6e 66 6f 24 2b 3d 22 48  |0:.ham info$+="H|
0000b3a0  41 4d 20 22 0d 37 5a 34  68 61 6c 66 3d 28 63 61  |AM ".7Z4half=(ca|
0000b3b0  6d 67 20 80 20 26 38 30  29 3c 3e 30 3a e7 68 61  |mg . &80)<>0:.ha|
0000b3c0  6c 66 20 69 6e 66 6f 24  2b 3d 22 68 61 6c 66 2d  |lf info$+="half-|
0000b3d0  62 72 69 67 68 74 20 22  0d 37 64 6e e7 68 61 6c  |bright ".7dn.hal|
0000b3e0  66 20 68 61 6c 66 25 3d  31 3c 3c 70 6c 61 6e 65  |f half%=1<<plane|
0000b3f0  73 25 2d 31 3a e3 49 25  3d 30 b8 68 61 6c 66 25  |s%-1:.I%=0.half%|
0000b400  2d 31 3a 72 25 28 49 25  2b 68 61 6c 66 25 29 3d  |-1:r%(I%+half%)=|
0000b410  72 25 28 49 25 29 2f 32  3a 67 25 28 49 25 2b 68  |r%(I%)/2:g%(I%+h|
0000b420  61 6c 66 25 29 3d 67 25  28 49 25 29 2f 32 3a 62  |alf%)=g%(I%)/2:b|
0000b430  25 28 49 25 2b 68 61 6c  66 25 29 3d 62 25 28 49  |%(I%+half%)=b%(I|
0000b440  25 29 2f 32 3a ed 0d 37  6e 43 69 6e 66 6f 24 2b  |%)/2:..7nCinfo$+|
0000b450  3d 22 49 46 46 20 66 69  6c 65 2c 20 22 2b c3 73  |="IFF file, "+.s|
0000b460  78 25 2b 22 20 62 79 20  22 2b c3 73 79 25 2b 22  |x%+" by "+.sy%+"|
0000b470  20 70 69 78 65 6c 73 2c  20 22 2b a4 62 69 74 73  | pixels, "+.bits|
0000b480  28 70 6c 61 6e 65 73 25  29 0d 37 78 2b e7 6d 61  |(planes%).7x+.ma|
0000b490  73 6b 69 6e 67 25 20 69  6e 66 6f 24 2b 3d 22 20  |sking% info$+=" |
0000b4a0  77 69 74 68 20 6d 61 73  6b 20 28 69 67 6e 6f 72  |with mask (ignor|
0000b4b0  65 64 29 22 0d 37 82 37  72 6f 77 62 79 74 65 73  |ed)".7.7rowbytes|
0000b4c0  25 3d 28 73 78 25 2b 31  35 3e 3e 34 29 3c 3c 31  |%=(sx%+15>>4)<<1|
0000b4d0  3a 70 6c 62 79 74 65 73  25 3d 72 6f 77 62 79 74  |:plbytes%=rowbyt|
0000b4e0  65 73 25 2a 70 6c 61 6e  65 73 25 0d 37 8c 39 70  |es%*planes%.7.9p|
0000b4f0  62 75 66 66 25 3d a4 64  69 6d 28 73 78 25 29 3a  |buff%=.dim(sx%):|
0000b500  72 24 3d 22 46 4e 22 2b  c3 28 31 36 30 30 2b 63  |r$="FN"+.(1600+c|
0000b510  6f 6d 70 72 65 73 73 69  6f 6e 29 3a 63 61 63 68  |ompression):cach|
0000b520  65 25 3d b9 0d 37 96 12  e7 63 6f 6d 70 72 65 73  |e%=..7...compres|
0000b530  73 69 6f 6e 20 8c 0d 37  a0 28 63 61 63 68 65 62  |sion ..7.(cacheb|
0000b540  79 74 65 73 25 3d b9 3a  70 6c 62 75 66 66 25 3d  |ytes%=.:plbuff%=|
0000b550  a4 64 69 6d 28 70 6c 62  79 74 65 73 25 29 0d 37  |.dim(plbytes%).7|
0000b560  aa 05 cc 0d 37 b4 51 72  65 61 6c 72 6f 77 62 79  |....7.Qrealrowby|
0000b570  74 65 73 25 3d 72 6f 77  62 79 74 65 73 25 3a 72  |tes%=rowbytes%:r|
0000b580  6f 77 62 79 74 65 73 25  3d 70 6c 62 79 74 65 73  |owbytes%=plbytes|
0000b590  25 3a e7 6d 61 73 6b 69  6e 67 25 20 72 6f 77 62  |%:.masking% rowb|
0000b5a0  79 74 65 73 25 2b 3d 72  65 61 6c 72 6f 77 62 79  |ytes%+=realrowby|
0000b5b0  74 65 73 25 0d 37 be 05  cd 0d 37 c8 0c cf 23 63  |tes%.7....7...#c|
0000b5c0  25 3d 73 74 25 0d 37 d2  0a c9 20 31 37 30 30 0d  |%=st%.7... 1700.|
0000b5d0  37 dc 42 73 78 25 3d 36  34 30 3a 72 6f 77 62 79  |7.Bsx%=640:rowby|
0000b5e0  74 65 73 25 3d 38 30 3a  73 79 25 3d 33 35 30 3a  |tes%=80:sy%=350:|
0000b5f0  70 6c 61 6e 65 73 25 3d  34 3a 70 6c 62 79 74 65  |planes%=4:plbyte|
0000b600  73 25 3d 34 2a 38 30 3a  70 6c 61 6e 61 72 25 3d  |s%=4*80:planar%=|
0000b610  b9 0d 37 e6 33 62 75 66  66 25 3d a4 64 69 6d 28  |..7.3buff%=.dim(|
0000b620  38 30 2a 34 29 3a 70 62  75 66 66 25 3d a4 64 69  |80*4):pbuff%=.di|
0000b630  6d 28 36 34 30 29 3a 47  3d 46 2f 33 3a 48 3d 46  |m(640):G=F/3:H=F|
0000b640  2a 32 2f 33 0d 37 f0 28  72 25 28 29 3d 30 2c 30  |*2/3.7.(r%()=0,0|
0000b650  2c 30 2c 30 2c 46 2c 46  2c 46 2c 48 2c 47 2c 47  |,0,0,F,F,F,H,G,G|
0000b660  2c 47 2c 47 2c 46 2c 46  2c 46 2c 46 0d 37 fa 28  |,G,G,F,F,F,F.7.(|
0000b670  67 25 28 29 3d 30 2c 30  2c 46 2c 46 2c 30 2c 30  |g%()=0,0,F,F,0,0|
0000b680  2c 46 2c 48 2c 47 2c 47  2c 46 2c 46 2c 47 2c 47  |,F,H,G,G,F,F,G,G|
0000b690  2c 46 2c 46 0d 38 04 28  62 25 28 29 3d 30 2c 46  |,F,F.8.(b%()=0,F|
0000b6a0  2c 30 2c 46 2c 30 2c 46  2c 30 2c 48 2c 47 2c 46  |,0,F,0,F,0,H,G,F|
0000b6b0  2c 47 2c 46 2c 47 2c 46  2c 47 2c 46 0d 38 0e 56  |,G,F,G,F,G,F.8.V|
0000b6c0  6d 61 73 6b 69 6e 67 25  3d a3 3a 72 24 3d 22 46  |masking%=.:r$="F|
0000b6d0  4e 31 36 30 30 22 3a 73  74 25 3d 31 36 3a cf 23  |N1600":st%=16:.#|
0000b6e0  63 25 3d 31 36 3a 63 61  63 68 65 25 3d b9 3a 72  |c%=16:cache%=.:r|
0000b6f0  65 61 6c 72 6f 77 62 79  74 65 73 25 3d 38 30 3a  |ealrowbytes%=80:|
0000b700  72 6f 77 62 79 74 65 73  25 3d 70 6c 62 79 74 65  |rowbytes%=plbyte|
0000b710  73 25 0d 38 18 53 69 6e  66 6f 24 3d 22 50 43 20  |s%.8.Sinfo$="PC |
0000b720  45 47 41 20 27 2e 64 73  70 27 20 66 69 6c 65 2c  |EGA '.dsp' file,|
0000b730  20 36 34 30 20 62 79 20  33 35 30 20 70 69 78 65  | 640 by 350 pixe|
0000b740  6c 73 2c 20 34 20 62 69  74 73 20 70 65 72 20 70  |ls, 4 bits per p|
0000b750  69 78 65 6c 20 28 66 69  78 65 64 20 70 61 6c 65  |ixel (fixed pale|
0000b760  74 74 65 29 22 0d 38 22  0a c9 20 31 38 30 30 0d  |tte)".8".. 1800.|
0000b770  38 2c 3f 73 78 25 3d 37  32 2a 38 3a 73 79 25 3d  |8,?sx%=72*8:sy%=|
0000b780  37 32 30 3a 71 75 61 6e  74 25 3d 31 3a 69 6e 70  |720:quant%=1:inp|
0000b790  75 74 3d 31 3a cf 23 63  25 3d 73 74 25 3a 70 6c  |ut=1:.#c%=st%:pl|
0000b7a0  62 75 66 66 25 3d a4 64  69 6d 28 37 32 29 0d 38  |buff%=.dim(72).8|
0000b7b0  36 1a 63 61 63 68 65 25  3d b9 3a 63 61 63 68 65  |6.cache%=.:cache|
0000b7c0  62 79 74 65 73 25 3d b9  0d 38 40 51 72 25 28 30  |bytes%=..8@Qr%(0|
0000b7d0  29 3d 46 3a 67 25 28 30  29 3d 46 3a 62 25 28 30  |)=F:g%(0)=F:b%(0|
0000b7e0  29 3d 46 3a 62 69 67 65  6e 64 69 61 6e 62 69 74  |)=F:bigendianbit|
0000b7f0  73 3d b9 3a 72 6f 77 62  79 74 65 73 25 3d 37 32  |s=.:rowbytes%=72|
0000b800  3a 72 24 3d 22 46 4e 31  35 30 31 22 3a 72 6f 77  |:r$="FN1501":row|
0000b810  73 74 6f 67 6f 25 3d 2d  31 0d 38 4a 47 e7 73 63  |stogo%=-1.8JG.sc|
0000b820  61 6c 65 25 20 78 6d 75  6c 25 3d 78 6d 75 6c 25  |ale% xmul%=xmul%|
0000b830  2a 39 30 3a 78 64 69 76  25 3d 78 64 69 76 25 2a  |*90:xdiv%=xdiv%*|
0000b840  37 32 3a 79 6d 75 6c 25  3d 79 6d 75 6c 25 2a 39  |72:ymul%=ymul%*9|
0000b850  30 3a 79 64 69 76 25 3d  79 64 69 76 25 2a 37 32  |0:ydiv%=ydiv%*72|
0000b860  0d 38 54 3e 69 6e 66 6f  24 3d 22 4d 61 63 50 61  |.8T>info$="MacPa|
0000b870  69 6e 74 20 66 69 6c 65  2c 20 35 37 36 20 62 79  |int file, 576 by|
0000b880  20 37 32 30 20 62 69 74  73 2c 20 63 72 65 61 74  | 720 bits, creat|
0000b890  6f 72 20 69 64 20 22 2b  c2 53 24 2c 34 29 0d 38  |or id "+.S$,4).8|
0000b8a0  5e 0a c9 20 31 38 35 30  0d 38 68 0c cf 23 63 25  |^.. 1850.8h..#c%|
0000b8b0  3d 35 35 32 0d 38 72 0b  64 6f 6e 65 25 3d a3 0d  |=552.8r.done%=..|
0000b8c0  38 7c 05 f5 0d 38 86 1a  63 6f 64 65 25 3d a4 62  |8|...8..code%=.b|
0000b8d0  65 48 57 3a c8 8e 20 63  6f 64 65 25 20 ca 0d 38  |eHW:.. code% ..8|
0000b8e0  90 19 c9 20 26 30 31 3a  cf 23 63 25 3d 8f 23 63  |... &01:.#c%=.#c|
0000b8f0  25 2b a4 62 65 48 57 0d  38 9a 09 c9 20 26 31 45  |%+.beHW.8... &1E|
0000b900  0d 38 a4 09 c9 20 26 39  38 0d 38 ae 43 72 6f 77  |.8... &98.8.Crow|
0000b910  62 79 74 65 73 25 3d a4  62 65 48 57 3a e7 28 72  |bytes%=.beHW:.(r|
0000b920  6f 77 62 79 74 65 73 25  20 80 26 38 30 30 30 29  |owbytes% .&8000)|
0000b930  3d 30 20 85 34 32 2c 22  50 49 43 54 20 77 69 74  |=0 .42,"PICT wit|
0000b940  68 6f 75 74 20 50 69 78  6d 61 70 22 0d 38 b8 33  |hout Pixmap".8.3|
0000b950  73 79 25 3d a4 62 65 48  57 3a 73 78 25 3d a4 62  |sy%=.beHW:sx%=.b|
0000b960  65 48 57 3a 73 79 25 3d  a4 62 65 48 57 2d 73 79  |eHW:sy%=.beHW-sy|
0000b970  25 3a 73 78 25 3d a4 62  65 48 57 2d 73 78 25 0d  |%:sx%=.beHW-sx%.|
0000b980  38 c2 3c 6a 75 6e 6b 25  3d a4 48 57 3a 70 61 63  |8.<junk%=.HW:pac|
0000b990  6b 74 79 70 65 25 3d a4  62 65 48 57 3a 6a 75 6e  |ktype%=.beHW:jun|
0000b9a0  6b 25 3d a4 57 3a 72 65  73 78 25 3d a4 62 65 57  |k%=.W:resx%=.beW|
0000b9b0  3a 72 65 73 79 25 3d a4  62 65 57 0d 38 cc 46 e7  |:resy%=.beW.8.F.|
0000b9c0  a4 62 65 48 57 3c 3e 30  20 d9 23 63 25 3a 85 34  |.beHW<>0 .#c%:.4|
0000b9d0  32 2c 22 43 68 61 6e 67  65 46 53 49 20 65 78 70  |2,"ChangeFSI exp|
0000b9e0  65 63 74 65 64 20 4d 61  63 20 50 49 43 54 32 20  |ected Mac PICT2 |
0000b9f0  70 69 78 65 6c 74 79 70  65 3d 43 68 75 6e 6b 79  |pixeltype=Chunky|
0000ba00  22 0d 38 d6 26 62 70 70  25 3d a4 62 65 48 57 3a  |".8.&bpp%=.beHW:|
0000ba10  6a 75 6e 6b 25 3d a4 62  65 48 57 3a 6a 75 6e 6b  |junk%=.beHW:junk|
0000ba20  25 3d a4 62 65 48 57 0d  38 e0 24 6a 75 6e 6b 25  |%=.beHW.8.$junk%|
0000ba30  3d a4 62 65 57 3a 6a 75  6e 6b 25 3d a4 62 65 57  |=.beW:junk%=.beW|
0000ba40  3a 6a 75 6e 6b 25 3d a4  62 65 57 0d 38 ea 1a 6a  |:junk%=.beW.8..j|
0000ba50  75 6e 6b 25 3d a4 62 65  57 3a 6a 75 6e 6b 25 3d  |unk%=.beW:junk%=|
0000ba60  a4 62 65 48 57 0d 38 f4  5f 43 25 3d a4 62 65 48  |.beHW.8._C%=.beH|
0000ba70  57 3a e3 49 25 3d 30 b8  43 25 3a 4a 25 3d a4 62  |W:.I%=0.C%:J%=.b|
0000ba80  65 48 57 3a 72 25 28 4a  25 29 3d a4 62 65 48 57  |eHW:r%(J%)=.beHW|
0000ba90  2f 36 35 35 33 35 2a 46  3a 67 25 28 4a 25 29 3d  |/65535*F:g%(J%)=|
0000baa0  a4 62 65 48 57 2f 36 35  35 33 35 2a 46 3a 62 25  |.beHW/65535*F:b%|
0000bab0  28 4a 25 29 3d a4 62 65  48 57 2f 36 35 35 33 35  |(J%)=.beHW/65535|
0000bac0  2a 46 3a ed 0d 38 fe 0b  64 6f 6e 65 25 3d b9 0d  |*F:..8..done%=..|
0000bad0  39 08 52 c9 20 26 39 41  3a 6a 75 6e 6b 25 3d a4  |9.R. &9A:junk%=.|
0000bae0  57 3a 72 6f 77 62 79 74  65 73 25 3d a4 62 65 48  |W:rowbytes%=.beH|
0000baf0  57 3a e7 28 72 6f 77 62  79 74 65 73 25 20 80 26  |W:.(rowbytes% .&|
0000bb00  38 30 30 30 29 3d 30 20  85 34 32 2c 22 50 49 43  |8000)=0 .42,"PIC|
0000bb10  54 20 77 69 74 68 6f 75  74 20 50 69 78 6d 61 70  |T without Pixmap|
0000bb20  22 0d 39 12 33 73 79 25  3d a4 62 65 48 57 3a 73  |".9.3sy%=.beHW:s|
0000bb30  78 25 3d a4 62 65 48 57  3a 73 79 25 3d a4 62 65  |x%=.beHW:sy%=.be|
0000bb40  48 57 2d 73 79 25 3a 73  78 25 3d a4 62 65 48 57  |HW-sy%:sx%=.beHW|
0000bb50  2d 73 78 25 0d 39 1c 3c  6a 75 6e 6b 25 3d a4 48  |-sx%.9.<junk%=.H|
0000bb60  57 3a 70 61 63 6b 74 79  70 65 25 3d a4 62 65 48  |W:packtype%=.beH|
0000bb70  57 3a 6a 75 6e 6b 25 3d  a4 57 3a 72 65 73 78 25  |W:junk%=.W:resx%|
0000bb80  3d a4 62 65 57 3a 72 65  73 79 25 3d a4 62 65 57  |=.beW:resy%=.beW|
0000bb90  0d 39 26 4a e7 a4 62 65  48 57 3c 3e 31 36 20 d9  |.9&J..beHW<>16 .|
0000bba0  23 63 25 3a 85 34 32 2c  22 43 68 61 6e 67 65 46  |#c%:.42,"ChangeF|
0000bbb0  53 49 20 65 78 70 65 63  74 65 64 20 4d 61 63 20  |SI expected Mac |
0000bbc0  50 49 43 54 32 20 70 69  78 65 6c 74 79 70 65 3d  |PICT2 pixeltype=|
0000bbd0  52 47 42 44 69 72 65 63  74 22 0d 39 30 27 62 70  |RGBDirect".90'bp|
0000bbe0  70 25 3d a4 62 65 48 57  3a 63 6f 6d 70 73 25 3d  |p%=.beHW:comps%=|
0000bbf0  a4 62 65 48 57 3a 6a 75  6e 6b 25 3d a4 62 65 48  |.beHW:junk%=.beH|
0000bc00  57 0d 39 3a 19 6a 75 6e  6b 25 3d a4 62 65 57 3a  |W.9:.junk%=.beW:|
0000bc10  6a 75 6e 6b 25 3d a4 62  65 57 0d 39 44 1b 6a 75  |junk%=.beW.9D.ju|
0000bc20  6e 6b 25 3d a4 62 65 48  57 3a 6a 75 6e 6b 25 3d  |nk%=.beHW:junk%=|
0000bc30  a4 62 65 48 57 0d 39 4e  56 e7 62 70 70 25 3e 31  |.beHW.9NV.bpp%>1|
0000bc40  36 20 f2 6e 6f 70 61 6c  20 8b 4a 25 3d 32 5e 28  |6 .nopal .J%=2^(|
0000bc50  62 70 70 25 81 33 29 3a  e3 49 25 3d 30 b8 4a 25  |bpp%.3):.I%=0.J%|
0000bc60  2d 31 3a 72 25 28 49 25  29 3d 49 25 2f 28 4a 25  |-1:r%(I%)=I%/(J%|
0000bc70  2d 31 29 2a 46 3a ed 3a  67 25 28 29 3d 72 25 28  |-1)*F:.:g%()=r%(|
0000bc80  29 3a 62 25 28 29 3d 72  25 28 29 0d 39 58 2f e7  |):b%()=r%().9X/.|
0000bc90  62 70 70 25 3d 33 32 20  80 20 63 6f 6d 70 73 25  |bpp%=32 . comps%|
0000bca0  3d 33 20 62 70 70 25 3d  32 34 3a 72 6f 77 62 79  |=3 bpp%=24:rowby|
0000bcb0  74 65 73 25 3d 33 2a 73  78 25 0d 39 62 0b 64 6f  |tes%=3*sx%.9b.do|
0000bcc0  6e 65 25 3d b9 0d 39 6c  43 7f 3a d9 23 63 25 3a  |ne%=..9lC.:.#c%:|
0000bcd0  85 34 32 2c 22 43 68 61  6e 67 65 46 53 49 20 63  |.42,"ChangeFSI c|
0000bce0  61 6e 27 74 20 75 6e 64  65 72 73 74 61 6e 64 20  |an't understand |
0000bcf0  4d 61 63 20 50 49 43 54  32 20 63 6f 64 65 20 22  |Mac PICT2 code "|
0000bd00  2b c3 7e 63 6f 64 65 25  0d 39 76 05 cb 0d 39 80  |+.~code%.9v...9.|
0000bd10  0b fd 20 64 6f 6e 65 25  0d 39 8a 33 6a 75 6e 6b  |.. done%.9.3junk|
0000bd20  25 3d a4 62 65 48 57 3a  6a 75 6e 6b 25 3d a4 62  |%=.beHW:junk%=.b|
0000bd30  65 48 57 3a 6a 75 6e 6b  25 3d a4 62 65 48 57 3a  |eHW:junk%=.beHW:|
0000bd40  6a 75 6e 6b 25 3d a4 62  65 48 57 0d 39 94 33 6a  |junk%=.beHW.9.3j|
0000bd50  75 6e 6b 25 3d a4 62 65  48 57 3a 6a 75 6e 6b 25  |unk%=.beHW:junk%|
0000bd60  3d a4 62 65 48 57 3a 6a  75 6e 6b 25 3d a4 62 65  |=.beHW:junk%=.be|
0000bd70  48 57 3a 6a 75 6e 6b 25  3d a4 62 65 48 57 0d 39  |HW:junk%=.beHW.9|
0000bd80  9e 0f 6a 75 6e 6b 25 3d  a4 62 65 48 57 0d 39 a8  |..junk%=.beHW.9.|
0000bd90  4e 63 61 63 68 65 25 3d  b9 3a 63 61 63 68 65 62  |Ncache%=.:cacheb|
0000bda0  79 74 65 73 25 3d b9 3a  62 69 67 65 6e 64 69 61  |ytes%=.:bigendia|
0000bdb0  6e 62 69 74 73 3d b9 3a  73 74 25 3d 8f 23 63 25  |nbits=.:st%=.#c%|
0000bdc0  3a 72 6f 77 62 79 74 65  73 25 3d 72 6f 77 62 79  |:rowbytes%=rowby|
0000bdd0  74 65 73 25 80 ac 26 38  30 30 30 0d 39 b2 59 e7  |tes%..&8000.9.Y.|
0000bde0  73 63 61 6c 65 25 20 78  6d 75 6c 25 3d 78 6d 75  |scale% xmul%=xmu|
0000bdf0  6c 25 2a 39 30 2a 36 35  35 33 36 3a 78 64 69 76  |l%*90*65536:xdiv|
0000be00  25 3d 78 64 69 76 25 2a  72 65 73 78 25 3a 79 6d  |%=xdiv%*resx%:ym|
0000be10  75 6c 25 3d 79 6d 75 6c  25 2a 39 30 2a 36 35 35  |ul%=ymul%*90*655|
0000be20  33 36 3a 79 64 69 76 25  3d 79 64 69 76 25 2a 72  |36:ydiv%=ydiv%*r|
0000be30  65 73 79 25 0d 39 bc 40  69 6e 66 6f 24 3d 22 4d  |esy%.9.@info$="M|
0000be40  61 63 20 50 49 43 54 32  2c 20 22 2b c3 73 78 25  |ac PICT2, "+.sx%|
0000be50  2b 22 20 62 79 20 22 2b  c3 73 79 25 2b 22 20 70  |+" by "+.sy%+" p|
0000be60  69 78 65 6c 73 2c 20 22  2b a4 62 69 74 73 28 62  |ixels, "+.bits(b|
0000be70  70 70 25 29 0d 39 c6 25  70 6c 62 75 66 66 25 3d  |pp%).9.%plbuff%=|
0000be80  a4 64 69 6d 28 72 6f 77  62 79 74 65 73 25 29 3a  |.dim(rowbytes%):|
0000be90  e7 62 70 70 25 3e 38 20  8c 0d 39 d0 54 72 62 6f  |.bpp%>8 ..9.Trbo|
0000bea0  25 3d 2d 31 3a 72 62 25  3d 70 6c 62 75 66 66 25  |%=-1:rb%=plbuff%|
0000beb0  2b 73 78 25 3a 67 62 25  3d 70 6c 62 75 66 66 25  |+sx%:gb%=plbuff%|
0000bec0  2b 73 78 25 2a 32 3a 62  62 25 3d 70 6c 62 75 66  |+sx%*2:bb%=plbuf|
0000bed0  66 25 2b 73 78 25 2a 33  3a 72 24 3d 22 46 4e 31  |f%+sx%*3:r$="FN1|
0000bee0  38 35 31 22 3a 69 6e 70  75 74 3d 32 34 0d 39 da  |851":input=24.9.|
0000bef0  3b e7 63 6f 6d 70 73 25  3d 33 20 72 62 25 3d 70  |;.comps%=3 rb%=p|
0000bf00  6c 62 75 66 66 25 3a 67  62 25 3d 70 6c 62 75 66  |lbuff%:gb%=plbuf|
0000bf10  66 25 2b 73 78 25 3a 62  62 25 3d 70 6c 62 75 66  |f%+sx%:bb%=plbuf|
0000bf20  66 25 2b 73 78 25 2a 32  0d 39 e4 05 cd 0d 39 ee  |f%+sx%*2.9....9.|
0000bf30  0a c9 20 31 39 30 30 0d  39 f8 12 cf 23 63 25 3d  |.. 1900.9...#c%=|
0000bf40  31 3a 43 25 3d 9a 23 63  25 0d 3a 02 3f 45 25 3d  |1:C%=.#c%.:.?E%=|
0000bf50  9a 23 63 25 3a e7 45 25  3c 3e 31 20 85 20 34 32  |.#c%:.E%<>1 . 42|
0000bf60  2c 22 5a 53 6f 66 74 20  2e 50 43 58 20 66 69 6c  |,"ZSoft .PCX fil|
0000bf70  65 20 77 69 74 68 20 75  6e 6b 6e 6f 77 6e 20 65  |e with unknown e|
0000bf80  6e 63 6f 64 69 6e 67 22  0d 3a 0c 37 45 25 3d 9a  |ncoding".:.7E%=.|
0000bf90  23 63 25 3a 73 78 25 3d  a4 48 57 3a 73 79 25 3d  |#c%:sx%=.HW:sy%=|
0000bfa0  a4 48 57 3a 73 78 25 3d  a4 48 57 2b 31 2d 73 78  |.HW:sx%=.HW+1-sx|
0000bfb0  25 3a 73 79 25 3d a4 48  57 2b 31 2d 73 79 25 0d  |%:sy%=.HW+1-sy%.|
0000bfc0  3a 16 4e e7 73 63 61 6c  65 25 20 78 6d 75 6c 25  |:.N.scale% xmul%|
0000bfd0  3d 78 6d 75 6c 25 2a 39  30 3a 78 64 69 76 25 3d  |=xmul%*90:xdiv%=|
0000bfe0  78 64 69 76 25 2a a4 48  57 3a 79 6d 75 6c 25 3d  |xdiv%*.HW:ymul%=|
0000bff0  79 6d 75 6c 25 2a 39 30  3a 79 64 69 76 25 3d 79  |ymul%*90:ydiv%=y|
0000c000  64 69 76 25 2a a4 48 57  20 8b e7 a4 57 0d 3a 20  |div%*.HW ...W.: |
0000c010  48 cf 23 63 25 3d 36 35  3a 70 6c 61 6e 65 73 25  |H.#c%=65:planes%|
0000c020  3d 9a 23 63 25 3a 70 6c  61 6e 61 72 25 3d 70 6c  |=.#c%:planar%=pl|
0000c030  61 6e 65 73 25 3e 31 3a  72 6f 77 62 79 74 65 73  |anes%>1:rowbytes|
0000c040  25 3d a4 48 57 3a 62 70  70 25 3d 45 25 2a 70 6c  |%=.HW:bpp%=E%*pl|
0000c050  61 6e 65 73 25 0d 3a 2a  1e 70 63 78 70 61 6c 3d  |anes%.:*.pcxpal=|
0000c060  31 36 3a e7 62 70 70 25  3e 34 20 80 20 43 25 3d  |16:.bpp%>4 . C%=|
0000c070  35 20 8c 0d 3a 34 2a cf  23 63 25 3d a2 23 63 25  |5 ..:4*.#c%=.#c%|
0000c080  2d 37 36 39 3a e7 9a 23  63 25 3d 31 32 20 70 63  |-769:..#c%=12 pc|
0000c090  78 70 61 6c 3d a2 23 63  25 2d 37 36 38 0d 3a 3e  |xpal=.#c%-768.:>|
0000c0a0  05 cd 0d 3a 48 35 cf 23  63 25 3d 70 63 78 70 61  |...:H5.#c%=pcxpa|
0000c0b0  6c 3a 45 25 3d 30 3a e3  43 25 3d 30 b8 28 31 3c  |l:E%=0:.C%=0.(1<|
0000c0c0  3c 62 70 70 25 29 2a 33  2d 31 3a 45 25 3d 45 25  |<bpp%)*3-1:E%=E%|
0000c0d0  84 9a 23 63 25 3a ed 0d  3a 52 33 e7 69 6e 66 6f  |..#c%:..:R3.info|
0000c0e0  25 20 f1 22 2e 50 43 58  20 70 61 6c 65 74 74 65  |% .".PCX palette|
0000c0f0  20 6d 61 73 6b 20 65 73  74 61 62 6c 69 73 68 65  | mask establishe|
0000c100  64 20 61 74 20 22 3b 7e  45 25 0d 3a 5c 0b e7 45  |d at ";~E%.:\..E|
0000c110  25 3d 30 20 8c 0d 3a 66  45 e3 43 25 3d 30 b8 28  |%=0 ..:fE.C%=0.(|
0000c120  31 3c 3c 62 70 70 25 29  2d 31 3a 72 25 28 43 25  |1<<bpp%)-1:r%(C%|
0000c130  29 3d 43 25 2f 28 28 31  3c 3c 62 70 70 25 29 2d  |)=C%/((1<<bpp%)-|
0000c140  31 29 2a 46 3a ed 3a 67  25 28 29 3d 72 25 28 29  |1)*F:.:g%()=r%()|
0000c150  3a 62 25 28 29 3d 72 25  28 29 0d 3a 70 05 cc 0d  |:b%()=r%().:p...|
0000c160  3a 7a 21 cf 23 63 25 3d  70 63 78 70 61 6c 3a e3  |:z!.#c%=pcxpal:.|
0000c170  43 25 3d 30 b8 28 31 3c  3c 62 70 70 25 29 2d 31  |C%=0.(1<<bpp%)-1|
0000c180  0d 3a 84 45 72 25 28 43  25 29 3d 28 9a 23 63 25  |.:.Er%(C%)=(.#c%|
0000c190  80 45 25 29 2f 45 25 2a  46 3a 67 25 28 43 25 29  |.E%)/E%*F:g%(C%)|
0000c1a0  3d 28 9a 23 63 25 80 45  25 29 2f 45 25 2a 46 3a  |=(.#c%.E%)/E%*F:|
0000c1b0  62 25 28 43 25 29 3d 28  9a 23 63 25 80 45 25 29  |b%(C%)=(.#c%.E%)|
0000c1c0  2f 45 25 2a 46 0d 3a 8e  05 ed 0d 3a 98 05 cd 0d  |/E%*F.:....:....|
0000c1d0  3a a2 0b f2 72 65 77 69  6e 64 0d 3a ac 4c 70 6c  |:...rewind.:.Lpl|
0000c1e0  62 79 74 65 73 25 3d 72  6f 77 62 79 74 65 73 25  |bytes%=rowbytes%|
0000c1f0  2a 70 6c 61 6e 65 73 25  3a 70 6c 62 75 66 66 25  |*planes%:plbuff%|
0000c200  3d a4 64 69 6d 28 70 6c  62 79 74 65 73 25 29 3a  |=.dim(plbytes%):|
0000c210  63 61 63 68 65 25 3d b9  3a 63 61 63 68 65 62 79  |cache%=.:cacheby|
0000c220  74 65 73 25 3d b9 0d 3a  b6 45 e7 70 6c 61 6e 61  |tes%=..:.E.plana|
0000c230  72 25 20 70 62 75 66 66  25 3d a4 64 69 6d 28 73  |r% pbuff%=.dim(s|
0000c240  78 25 29 20 8b 69 6e 70  75 74 3d 62 70 70 25 3a  |x%) .input=bpp%:|
0000c250  62 69 67 65 6e 64 69 61  6e 62 69 74 73 3d b9 3a  |bigendianbits=.:|
0000c260  72 24 3d 22 46 4e 31 31  30 30 22 0d 3a c0 46 69  |r$="FN1100".:.Fi|
0000c270  6e 66 6f 24 3d 22 5a 53  6f 66 74 20 2e 50 43 58  |nfo$="ZSoft .PCX|
0000c280  20 66 69 6c 65 2c 20 22  2b c3 73 78 25 2b 22 20  | file, "+.sx%+" |
0000c290  62 79 20 22 2b c3 73 79  25 2b 22 20 70 69 78 65  |by "+.sy%+" pixe|
0000c2a0  6c 73 2c 20 22 2b a4 62  69 74 73 28 62 70 70 25  |ls, "+.bits(bpp%|
0000c2b0  29 0d 3a ca 0a c9 20 32  30 30 30 0d 3a d4 38 cf  |).:... 2000.:.8.|
0000c2c0  23 63 25 3d 30 3a 4c 25  3d 9a 23 63 25 3a 43 25  |#c%=0:L%=.#c%:C%|
0000c2d0  3d 9a 23 63 25 3a 49 25  3d 9a 23 63 25 3a 4a 25  |=.#c%:I%=.#c%:J%|
0000c2e0  3d a4 48 57 3a 4b 25 3d  a4 48 57 3a 4d 25 3d 9a  |=.HW:K%=.HW:M%=.|
0000c2f0  23 63 25 0d 3a de 43 73  78 25 3d a4 57 3a 73 78  |#c%.:.Csx%=.W:sx|
0000c300  25 3d a4 48 57 3a 73 79  25 3d a4 48 57 3a 42 25  |%=.HW:sy%=.HW:B%|
0000c310  3d 9a 23 63 25 3a 49 44  25 3d 9a 23 63 25 3a e7  |=.#c%:ID%=.#c%:.|
0000c320  49 44 25 80 26 31 30 20  68 66 6c 69 70 25 3d ac  |ID%.&10 hflip%=.|
0000c330  68 66 6c 69 70 25 0d 3a  e8 20 e7 28 49 44 25 20  |hflip%.:. .(ID% |
0000c340  80 26 32 30 29 3d 30 20  76 66 6c 69 70 25 3d ac  |.&20)=0 vflip%=.|
0000c350  76 66 6c 69 70 25 0d 3a  f2 18 cf 23 63 25 3d 8f  |vflip%.:...#c%=.|
0000c360  23 63 25 2b 4c 25 3a c8  8e 20 43 25 20 ca 0d 3a  |#c%+L%:.. C% ..:|
0000c370  fc 11 c9 20 31 3a e7 4d  25 3d 26 31 38 20 8c 0d  |... 1:.M%=&18 ..|
0000c380  3b 06 0f e3 43 25 3d 4a  25 b8 4b 25 2d 31 0d 3b  |;...C%=J%.K%-1.;|
0000c390  10 39 62 25 28 43 25 29  3d 9a 23 63 25 2f 32 35  |.9b%(C%)=.#c%/25|
0000c3a0  35 2a 46 3a 67 25 28 43  25 29 3d 9a 23 63 25 2f  |5*F:g%(C%)=.#c%/|
0000c3b0  32 35 35 2a 46 3a 72 25  28 43 25 29 3d 9a 23 63  |255*F:r%(C%)=.#c|
0000c3c0  25 2f 32 35 35 2a 46 0d  3b 1a 05 ed 0d 3b 24 05  |%/255*F.;....;$.|
0000c3d0  cc 0d 3b 2e 05 cd 0d 3b  38 0c 7f 20 f2 6e 6f 70  |..;....;8.. .nop|
0000c3e0  61 6c 0d 3b 42 05 cb 0d  3b 4c 0c 73 74 25 3d 8f  |al.;B...;L.st%=.|
0000c3f0  23 63 25 0d 3b 56 0b c8  8e 20 49 25 20 ca 0d 3b  |#c%.;V... I% ..;|
0000c400  60 1c c9 20 31 2c 32 2c  33 3a 63 61 63 68 65 25  |`.. 1,2,3:cache%|
0000c410  3d b9 3a e7 42 25 3e 38  20 8c 0d 3b 6a 0c e7 42  |=.:.B%>8 ..;j..B|
0000c420  25 3e 31 36 20 8c 0d 3b  74 4c 69 6e 70 75 74 3d  |%>16 ..;tLinput=|
0000c430  32 34 3a 62 62 6f 25 3d  30 3a 67 62 6f 25 3d 31  |24:bbo%=0:gbo%=1|
0000c440  3a 72 62 6f 25 3d 32 3a  73 74 65 70 32 34 3d 42  |:rbo%=2:step24=B|
0000c450  25 81 38 3a 72 24 3d 22  46 4e 32 34 22 3a 72 6f  |%.8:r$="FN24":ro|
0000c460  77 62 79 74 65 73 25 3d  73 74 65 70 32 34 2a 73  |wbytes%=step24*s|
0000c470  78 25 0d 3b 7e 05 cc 0d  3b 88 13 72 6f 77 62 79  |x%.;~...;..rowby|
0000c480  74 65 73 25 3d 73 78 25  2a 32 0d 3b 92 37 de 20  |tes%=sx%*2.;.7. |
0000c490  72 70 61 6c 25 28 32 35  35 29 2c 67 70 61 6c 25  |rpal%(255),gpal%|
0000c4a0  28 32 35 35 29 3a 69 6e  70 75 74 3d 31 36 3a 73  |(255):input=16:s|
0000c4b0  74 65 70 32 34 3d 32 3a  72 24 3d 22 46 4e 31 36  |tep24=2:r$="FN16|
0000c4c0  22 0d 3b 9c 0d e3 43 25  3d 30 b8 32 35 35 0d 3b  |".;...C%=0.255.;|
0000c4d0  a6 26 67 70 61 6c 25 28  43 25 29 3d 28 43 25 3e  |.&gpal%(C%)=(C%>|
0000c4e0  3e 35 29 3c 3c 38 20 84  20 28 43 25 80 33 31 29  |>5)<<8 . (C%.31)|
0000c4f0  3c 3c 31 36 0d 3b b0 25  72 70 61 6c 25 28 43 25  |<<16.;.%rpal%(C%|
0000c500  29 3d 28 43 25 3e 3e 32  29 80 33 31 20 84 20 28  |)=(C%>>2).31 . (|
0000c510  43 25 80 33 29 3c 3c 31  31 0d 3b ba 05 ed 0d 3b  |C%.3)<<11.;....;|
0000c520  c4 31 e3 43 25 3d 30 b8  33 31 3a 72 25 28 43 25  |.1.C%=0.31:r%(C%|
0000c530  29 3d 43 25 2f 33 31 2a  46 3a ed 3a 67 25 28 29  |)=C%/31*F:.:g%()|
0000c540  3d 72 25 28 29 3a 62 25  28 29 3d 72 25 28 29 0d  |=r%():b%()=r%().|
0000c550  3b ce 05 cd 0d 3b d8 05  cc 0d 3b e2 1a 72 24 3d  |;....;....;..r$=|
0000c560  22 46 4e 38 22 3a 72 6f  77 62 79 74 65 73 25 3d  |"FN8":rowbytes%=|
0000c570  73 78 25 0d 3b ec 05 cd  0d 3b f6 49 69 6e 66 6f  |sx%.;....;.Iinfo|
0000c580  24 3d 22 54 72 75 65 76  69 73 69 6f 6e 20 54 47  |$="Truevision TG|
0000c590  41 20 69 6d 61 67 65 2c  20 22 2b c3 73 78 25 2b  |A image, "+.sx%+|
0000c5a0  22 20 62 79 20 22 2b c3  73 79 25 2b 22 20 70 69  |" by "+.sy%+" pi|
0000c5b0  78 65 6c 73 2c 20 22 2b  a4 62 69 74 73 28 42 25  |xels, "+.bits(B%|
0000c5c0  29 0d 3c 00 44 c9 20 39  2c 31 30 2c 31 31 3a 73  |).<.D. 9,10,11:s|
0000c5d0  74 65 70 32 34 3d 42 25  81 38 3a 72 6f 77 62 79  |tep24=B%.8:rowby|
0000c5e0  74 65 73 25 3d 73 74 65  70 32 34 2a 73 78 25 3a  |tes%=step24*sx%:|
0000c5f0  62 75 66 66 25 3d a4 64  69 6d 28 72 6f 77 62 79  |buff%=.dim(rowby|
0000c600  74 65 73 25 29 0d 3c 0a  0b e7 42 25 3e 38 20 8c  |tes%).<...B%>8 .|
0000c610  0d 3c 14 0c e7 42 25 3e  31 36 20 8c 0d 3c 1e 3a  |.<...B%>16 ..<.:|
0000c620  69 6e 70 75 74 3d 32 34  3a 62 62 25 3d 62 75 66  |input=24:bb%=buf|
0000c630  66 25 3a 67 62 25 3d 62  75 66 66 25 2b 31 3a 72  |f%:gb%=buff%+1:r|
0000c640  62 25 3d 62 75 66 66 25  2b 32 3a 72 24 3d 22 46  |b%=buff%+2:r$="F|
0000c650  4e 32 30 30 32 22 0d 3c  28 05 cc 0d 3c 32 39 de  |N2002".<(...<29.|
0000c660  20 72 70 61 6c 25 28 32  35 35 29 2c 67 70 61 6c  | rpal%(255),gpal|
0000c670  25 28 32 35 35 29 3a 69  6e 70 75 74 3d 31 36 3a  |%(255):input=16:|
0000c680  73 74 65 70 32 34 3d 32  3a 72 24 3d 22 46 4e 32  |step24=2:r$="FN2|
0000c690  30 30 31 22 0d 3c 3c 0d  e3 43 25 3d 30 b8 32 35  |001".<<..C%=0.25|
0000c6a0  35 0d 3c 46 26 67 70 61  6c 25 28 43 25 29 3d 28  |5.<F&gpal%(C%)=(|
0000c6b0  43 25 3e 3e 35 29 3c 3c  38 20 84 20 28 43 25 80  |C%>>5)<<8 . (C%.|
0000c6c0  33 31 29 3c 3c 31 36 0d  3c 50 25 72 70 61 6c 25  |31)<<16.<P%rpal%|
0000c6d0  28 43 25 29 3d 28 43 25  3e 3e 32 29 80 33 31 20  |(C%)=(C%>>2).31 |
0000c6e0  84 20 28 43 25 80 33 29  3c 3c 31 31 0d 3c 5a 05  |. (C%.3)<<11.<Z.|
0000c6f0  ed 0d 3c 64 31 e3 43 25  3d 30 b8 33 31 3a 72 25  |..<d1.C%=0.31:r%|
0000c700  28 43 25 29 3d 43 25 2f  33 31 2a 46 3a ed 3a 67  |(C%)=C%/31*F:.:g|
0000c710  25 28 29 3d 72 25 28 29  3a 62 25 28 29 3d 72 25  |%()=r%():b%()=r%|
0000c720  28 29 0d 3c 6e 05 cd 0d  3c 78 05 cd 0d 3c 82 4d  |().<n...<x...<.M|
0000c730  69 6e 66 6f 24 3d 22 54  72 75 65 76 69 73 69 6f  |info$="Truevisio|
0000c740  6e 20 54 47 41 20 52 4c  45 20 69 6d 61 67 65 2c  |n TGA RLE image,|
0000c750  20 22 2b c3 73 78 25 2b  22 20 62 79 20 22 2b c3  | "+.sx%+" by "+.|
0000c760  73 79 25 2b 22 20 70 69  78 65 6c 73 2c 20 22 2b  |sy%+" pixels, "+|
0000c770  a4 62 69 74 73 28 42 25  29 0d 3c 8c 05 cb 0d 3c  |.bits(B%).<....<|
0000c780  96 0a c9 20 32 31 30 30  0d 3c a0 3f 71 75 61 6e  |... 2100.<.?quan|
0000c790  74 25 3d 36 3a 73 78 25  3d 35 31 32 3a 72 6f 77  |t%=6:sx%=512:row|
0000c7a0  62 79 74 65 73 25 3d 32  2a 73 78 25 3a 73 79 25  |bytes%=2*sx%:sy%|
0000c7b0  3d 32 35 36 3a 63 61 63  68 65 25 3d b9 3a 72 24  |=256:cache%=.:r$|
0000c7c0  3d 22 46 4e 31 36 22 0d  3c aa 2d de 20 72 70 61  |="FN16".<.-. rpa|
0000c7d0  6c 25 28 32 35 35 29 2c  67 70 61 6c 25 28 32 35  |l%(255),gpal%(25|
0000c7e0  35 29 3a 69 6e 70 75 74  3d 31 36 3a 73 74 65 70  |5):input=16:step|
0000c7f0  32 34 3d 32 0d 3c b4 0d  e3 43 25 3d 30 b8 32 35  |24=2.<...C%=0.25|
0000c800  35 0d 3c be 20 67 70 61  6c 25 28 43 25 29 3d 43  |5.<. gpal%(C%)=C|
0000c810  25 3e 3e 33 20 84 20 28  43 25 80 37 29 3c 3c 31  |%>>3 . (C%.7)<<1|
0000c820  31 0d 3c c8 25 72 70 61  6c 25 28 43 25 29 3d 28  |1.<.%rpal%(C%)=(|
0000c830  43 25 80 37 29 3c 3c 38  20 84 20 28 43 25 3e 3e  |C%.7)<<8 . (C%>>|
0000c840  33 29 3c 3c 31 36 0d 3c  d2 05 ed 0d 3c dc 27 e3  |3)<<16.<....<.'.|
0000c850  43 25 3d 30 b8 33 31 3a  72 25 28 43 25 29 3d 43  |C%=0.31:r%(C%)=C|
0000c860  25 2f 33 31 2a 46 3a ed  3a 62 25 28 29 3d 72 25  |%/31*F:.:b%()=r%|
0000c870  28 29 0d 3c e6 1d e3 43  25 3d 30 b8 36 33 3a 67  |().<...C%=0.63:g|
0000c880  25 28 43 25 29 3d 43 25  2f 36 33 2a 46 3a ed 0d  |%(C%)=C%/63*F:..|
0000c890  3c f0 19 e7 73 63 61 6c  65 25 20 79 6d 75 6c 25  |<...scale% ymul%|
0000c8a0  3d 79 6d 75 6c 25 2a 32  0d 3c fa 48 69 6e 66 6f  |=ymul%*2.<.Hinfo|
0000c8b0  24 3d 22 50 69 6e 65 61  70 70 6c 65 20 69 6d 61  |$="Pineapple ima|
0000c8c0  67 65 2c 20 35 31 32 20  62 79 20 32 35 36 20 70  |ge, 512 by 256 p|
0000c8d0  69 78 65 6c 73 2c 20 31  36 20 62 69 74 73 20 70  |ixels, 16 bits p|
0000c8e0  65 72 20 70 69 78 65 6c  22 3a cf 23 63 25 3d 37  |er pixel":.#c%=7|
0000c8f0  0d 3d 04 0a c9 20 32 32  30 30 0d 3d 0e 39 71 75  |.=... 2200.=.9qu|
0000c900  61 6e 74 25 3d 38 3a 73  74 65 70 32 34 3d 31 3a  |ant%=8:step24=1:|
0000c910  cf 23 63 25 3d 30 3a 73  24 3d be 23 63 25 3a 45  |.#c%=0:s$=.#c%:E|
0000c920  25 3d a7 73 24 2c 22 3a  22 29 3a 73 74 25 3d 8f  |%=.s$,":"):st%=.|
0000c930  23 63 25 0d 3d 18 37 73  78 25 3d bb c1 73 24 2c  |#c%.=.7sx%=..s$,|
0000c940  45 25 2b 31 29 3a 73 79  25 3d bb c1 73 24 2c 45  |E%+1):sy%=..s$,E|
0000c950  25 2b 32 2b a9 c3 73 78  25 29 3a f2 6e 6f 70 61  |%+2+..sx%):.nopa|
0000c960  6c 3a 69 6e 70 75 74 3d  32 34 0d 3d 22 41 72 6f  |l:input=24.="Aro|
0000c970  77 62 79 74 65 73 25 3d  73 78 25 2a 33 3a 72 62  |wbytes%=sx%*3:rb|
0000c980  6f 25 3d 30 3a 67 62 6f  25 3d 73 78 25 3a 62 62  |o%=0:gbo%=sx%:bb|
0000c990  6f 25 3d 32 2a 73 78 25  3a 63 61 63 68 65 25 3d  |o%=2*sx%:cache%=|
0000c9a0  b9 3a 72 24 3d 22 46 4e  32 34 22 0d 3d 2c 47 69  |.:r$="FN24".=,Gi|
0000c9b0  6e 66 6f 24 3d 22 49 72  6c 61 6d 20 69 6d 61 67  |nfo$="Irlam imag|
0000c9c0  65 2c 20 22 2b c3 73 78  25 2b 22 20 62 79 20 22  |e, "+.sx%+" by "|
0000c9d0  2b c3 73 79 25 2b 22 20  70 69 78 65 6c 73 2c 20  |+.sy%+" pixels, |
0000c9e0  32 34 20 62 69 74 73 20  70 65 72 20 70 69 78 65  |24 bits per pixe|
0000c9f0  6c 22 0d 3d 36 0a c9 20  32 32 35 30 0d 3d 40 48  |l".=6.. 2250.=@H|
0000ca00  cf 23 63 25 3d 31 36 3a  73 78 25 3d a4 57 3a 73  |.#c%=16:sx%=.W:s|
0000ca10  79 25 3d a4 57 3a de 20  72 70 61 6c 25 28 32 35  |y%=.W:. rpal%(25|
0000ca20  35 29 2c 67 70 61 6c 25  28 32 35 35 29 2c 62 70  |5),gpal%(255),bp|
0000ca30  61 6c 25 28 32 35 35 29  2c 74 61 62 6c 65 25 28  |al%(255),table%(|
0000ca40  32 35 35 29 0d 3d 4a 15  e3 43 25 3d 30 b8 32 35  |255).=J..C%=0.25|
0000ca50  35 3a 44 25 3d 43 25 84  31 0d 3d 54 1c 74 61 62  |5:D%=C%.1.=T.tab|
0000ca60  6c 65 25 28 43 25 29 3d  28 44 25 2d 31 36 29 2f  |le%(C%)=(D%-16)/|
0000ca70  32 31 39 2a 46 0d 3d 5e  13 e7 44 25 80 31 32 38  |219*F.=^..D%.128|
0000ca80  20 44 25 2d 3d 32 35 36  0d 3d 68 29 72 25 28 43  | D%-=256.=h)r%(C|
0000ca90  25 29 3d a8 28 44 25 2f  31 36 30 2a 46 29 3a 62  |%)=.(D%/160*F):b|
0000caa0  25 28 43 25 29 3d a8 28  44 25 2f 31 32 36 2a 46  |%(C%)=.(D%/126*F|
0000cab0  29 0d 3d 72 3e 67 25 28  43 25 29 3d a8 28 2d 44  |).=r>g%(C%)=.(-D|
0000cac0  25 2f 31 36 30 2a 72 77  74 2f 67 77 74 2a 46 29  |%/160*rwt/gwt*F)|
0000cad0  3a 67 70 61 6c 25 28 43  25 29 3d a8 28 2d 44 25  |:gpal%(C%)=.(-D%|
0000cae0  2f 31 32 36 2a 62 77 74  2f 67 77 74 2a 46 29 0d  |/126*bwt/gwt*F).|
0000caf0  3d 7c 05 ed 0d 3d 86 2c  74 61 62 6c 65 25 28 29  |=|...=.,table%()|
0000cb00  3d 30 2c 30 2c 30 2c 30  2c 30 2c 30 2c 30 2c 30  |=0,0,0,0,0,0,0,0|
0000cb10  2c 30 2c 30 2c 30 2c 30  2c 30 2c 30 2c 30 2c 30  |,0,0,0,0,0,0,0,0|
0000cb20  0d 3d 90 35 73 74 25 3d  33 32 3a cf 23 63 25 3d  |.=.5st%=32:.#c%=|
0000cb30  33 32 3a 63 61 63 68 65  25 3d b9 3a 72 6f 77 62  |32:cache%=.:rowb|
0000cb40  79 74 65 73 25 3d 32 2a  73 78 25 3a 69 6e 70 75  |ytes%=2*sx%:inpu|
0000cb50  74 3d 34 31 31 0d 3d 9a  3c 69 6e 66 6f 24 3d 22  |t=411.=.<info$="|
0000cb60  49 72 6c 61 6d 20 59 55  56 20 34 3a 31 3a 31 20  |Irlam YUV 4:1:1 |
0000cb70  66 69 6c 65 20 22 2b c3  73 78 25 2b 22 20 62 79  |file "+.sx%+" by|
0000cb80  20 22 2b c3 73 79 25 2b  22 20 70 69 78 65 6c 73  | "+.sy%+" pixels|
0000cb90  22 0d 3d a4 0a c9 20 32  33 30 30 0d 3d ae 39 cf  |".=... 2300.=.9.|
0000cba0  23 63 25 3d 36 3a 73 78  25 3d a4 48 57 3a 73 79  |#c%=6:sx%=.HW:sy|
0000cbb0  25 3d a4 48 57 3a 44 25  3d 9a 23 63 25 3a 6e 63  |%=.HW:D%=.#c%:nc|
0000cbc0  6f 6c 6f 72 73 25 3d 9a  23 63 25 3a 69 6e 70 75  |olors%=.#c%:inpu|
0000cbd0  74 3d 32 34 0d 3d b8 3b  76 66 6c 69 70 25 3d ac  |t=24.=.;vflip%=.|
0000cbe0  76 66 6c 69 70 25 3a 71  75 61 6e 74 25 3d 9a 23  |vflip%:quant%=.#|
0000cbf0  63 25 3a 6e 63 6d 61 70  25 3d 9a 23 63 25 3a 63  |c%:ncmap%=.#c%:c|
0000cc00  6d 61 70 6c 65 6e 25 3d  31 3c 3c 9a 23 63 25 0d  |maplen%=1<<.#c%.|
0000cc10  3d c2 21 f2 6e 6f 70 61  6c 3a 62 61 63 6b 25 3d  |=.!.nopal:back%=|
0000cc20  a4 64 69 6d 28 34 29 3a  21 62 61 63 6b 25 3d 30  |.dim(4):!back%=0|
0000cc30  0d 3d cc 12 63 6c 72 66  69 72 73 74 25 3d 44 25  |.=..clrfirst%=D%|
0000cc40  80 31 0d 3d d6 0f e7 28  44 25 80 32 29 3d 30 20  |.1.=...(D%.2)=0 |
0000cc50  8c 0d 3d e0 24 e3 49 25  3d 30 b8 6e 63 6f 6c 6f  |..=.$.I%=0.ncolo|
0000cc60  72 73 25 2d 31 3a 62 61  63 6b 25 3f 49 25 3d 9a  |rs%-1:back%?I%=.|
0000cc70  23 63 25 3a ed 0d 3d ea  19 e7 28 6e 63 6f 6c 6f  |#c%:..=...(ncolo|
0000cc80  72 73 25 80 31 29 3d 30  20 e7 9a 23 63 25 0d 3d  |rs%.1)=0 ..#c%.=|
0000cc90  f4 05 cd 0d 3d fe 1a e7  44 25 80 34 20 61 6c 70  |....=...D%.4 alp|
0000cca0  68 61 25 3d a4 64 69 6d  28 73 78 25 29 0d 3e 08  |ha%=.dim(sx%).>.|
0000ccb0  0f e7 6e 63 6d 61 70 25  3e 30 20 8c 0d 3e 12 29  |..ncmap%>0 ..>.)|
0000ccc0  e3 49 25 3d 30 b8 63 6d  61 70 6c 65 6e 25 2d 31  |.I%=0.cmaplen%-1|
0000ccd0  3a 72 25 28 49 25 29 3d  a4 48 57 2f 26 46 46 30  |:r%(I%)=.HW/&FF0|
0000cce0  30 2a 46 3a ed 0d 3e 1c  29 e3 49 25 3d 30 b8 63  |0*F:..>.).I%=0.c|
0000ccf0  6d 61 70 6c 65 6e 25 2d  31 3a 67 25 28 49 25 29  |maplen%-1:g%(I%)|
0000cd00  3d a4 48 57 2f 26 46 46  30 30 2a 46 3a ed 0d 3e  |=.HW/&FF00*F:..>|
0000cd10  26 29 e3 49 25 3d 30 b8  63 6d 61 70 6c 65 6e 25  |&).I%=0.cmaplen%|
0000cd20  2d 31 3a 62 25 28 49 25  29 3d a4 48 57 2f 26 46  |-1:b%(I%)=.HW/&F|
0000cd30  46 30 30 2a 46 3a ed 0d  3e 30 05 cd 0d 3e 3a 0b  |F00*F:..>0...>:.|
0000cd40  e7 44 25 80 38 20 8c 0d  3e 44 25 cf 23 63 25 3d  |.D%.8 ..>D%.#c%=|
0000cd50  a4 48 57 2b 8f 23 63 25  3a e7 8f 23 63 25 80 31  |.HW+.#c%:..#c%.1|
0000cd60  20 8f 23 63 25 3d 8f 23  63 25 2b 31 0d 3e 4e 05  | .#c%=.#c%+1.>N.|
0000cd70  cd 0d 3e 58 48 73 74 25  3d 8f 23 63 25 3a 62 75  |..>XHst%=.#c%:bu|
0000cd80  66 66 25 3d a4 64 69 6d  28 73 78 25 2a 33 29 3a  |ff%=.dim(sx%*3):|
0000cd90  72 62 25 3d 62 75 66 66  25 3a 67 62 25 3d 62 75  |rb%=buff%:gb%=bu|
0000cda0  66 66 25 2b 31 2a 73 78  25 3a 62 62 25 3d 62 75  |ff%+1*sx%:bb%=bu|
0000cdb0  66 66 25 2b 32 2a 73 78  25 0d 3e 62 0b f2 72 65  |ff%+2*sx%.>b..re|
0000cdc0  77 69 6e 64 0d 3e 6c 50  69 6e 66 6f 24 3d 22 55  |wind.>lPinfo$="U|
0000cdd0  74 61 68 20 72 6c 65 20  69 6d 61 67 65 2c 20 22  |tah rle image, "|
0000cde0  2b c3 73 78 25 2b 22 20  62 79 20 22 2b c3 73 79  |+.sx%+" by "+.sy|
0000cdf0  25 2b 22 20 70 69 78 65  6c 73 2c 20 22 2b a4 62  |%+" pixels, "+.b|
0000ce00  69 74 73 28 6e 63 6f 6c  6f 72 73 25 2a 71 75 61  |its(ncolors%*qua|
0000ce10  6e 74 25 29 0d 3e 76 0a  c9 20 32 34 30 30 0d 3e  |nt%).>v.. 2400.>|
0000ce20  80 32 cf 23 63 25 3d 72  69 66 66 6f 66 66 25 2b  |.2.#c%=riffoff%+|
0000ce30  26 30 61 3a 73 74 25 3d  a4 57 3a 70 61 6c 25 3d  |&0a:st%=.W:pal%=|
0000ce40  a4 57 3a 73 78 25 3d a4  57 3a 73 79 25 3d a4 57  |.W:sx%=.W:sy%=.W|
0000ce50  0d 3e 8a 0d c8 8e 20 70  61 6c 25 20 ca 0d 3e 94  |.>.... pal% ..>.|
0000ce60  08 c9 20 31 32 0d 3e 9e  2d cf 23 63 25 3d 72 69  |.. 12.>.-.#c%=ri|
0000ce70  66 66 6f 66 66 25 2b 26  31 38 3a 69 6e 70 75 74  |ffoff%+&18:input|
0000ce80  3d a4 48 57 3a 63 6f 6d  70 72 65 73 73 69 6f 6e  |=.HW:compression|
0000ce90  3d 30 0d 3e a8 08 c9 20  34 30 0d 3e b2 2e cf 23  |=0.>... 40.>...#|
0000cea0  63 25 3d 72 69 66 66 6f  66 66 25 2b 26 31 63 3a  |c%=riffoff%+&1c:|
0000ceb0  69 6e 70 75 74 3d a4 48  57 3a 63 6f 6d 70 72 65  |input=.HW:compre|
0000cec0  73 73 69 6f 6e 3d a4 57  0d 3e bc 25 cf 23 63 25  |ssion=.W.>.%.#c%|
0000ced0  3d 72 69 66 66 6f 66 66  25 2b 26 32 36 3a 78 70  |=riffoff%+&26:xp|
0000cee0  70 6d 3d a4 57 3a 79 70  70 6d 3d a4 57 0d 3e c6  |pm=.W:yppm=.W.>.|
0000cef0  25 e7 20 78 70 70 6d 3c  3e 30 20 80 20 79 70 70  |%. xppm<>0 . ypp|
0000cf00  6d 3c 3e 30 20 80 20 73  63 61 6c 65 25 3c 3e 30  |m<>0 . scale%<>0|
0000cf10  20 8c 0d 3e d0 25 78 64  69 76 25 3d 78 64 69 76  | ..>.%xdiv%=xdiv|
0000cf20  25 2a 78 70 70 6d 3a 78  6d 75 6c 25 3d 78 6d 75  |%*xppm:xmul%=xmu|
0000cf30  6c 25 2a 33 35 34 33 0d  3e da 25 79 64 69 76 25  |l%*3543.>.%ydiv%|
0000cf40  3d 79 64 69 76 25 2a 79  70 70 6d 3a 79 6d 75 6c  |=ydiv%*yppm:ymul|
0000cf50  25 3d 79 6d 75 6c 25 2a  33 35 34 33 0d 3e e4 05  |%=ymul%*3543.>..|
0000cf60  cd 0d 3e ee 05 7f 0d 3e  f8 2b 85 20 34 32 2c 22  |..>....>.+. 42,"|
0000cf70  55 6e 6b 6e 6f 77 6e 20  2e 42 4d 50 20 76 61 72  |Unknown .BMP var|
0000cf80  69 61 6e 74 20 28 22 2b  c3 70 61 6c 25 2b 22 29  |iant ("+.pal%+")|
0000cf90  22 0d 3f 02 05 cb 0d 3f  0c 22 62 69 67 65 6e 64  |".?....?."bigend|
0000cfa0  69 61 6e 62 69 74 73 3d  b9 3a 76 66 6c 69 70 25  |ianbits=.:vflip%|
0000cfb0  3d ac 76 66 6c 69 70 25  0d 3f 16 0e c8 8e 20 69  |=.vflip%.?.... i|
0000cfc0  6e 70 75 74 20 ca 0d 3f  20 1a c9 20 31 3a 72 6f  |nput ..? .. 1:ro|
0000cfd0  77 62 79 74 65 73 25 3d  73 78 25 2b 37 3e 3e 33  |wbytes%=sx%+7>>3|
0000cfe0  0d 3f 2a 1a c9 20 34 3a  72 6f 77 62 79 74 65 73  |.?*.. 4:rowbytes|
0000cff0  25 3d 73 78 25 2b 31 3e  3e 31 0d 3f 34 15 c9 20  |%=sx%+1>>1.?4.. |
0000d000  38 3a 72 6f 77 62 79 74  65 73 25 3d 73 78 25 0d  |8:rowbytes%=sx%.|
0000d010  3f 3e 2b c9 20 31 36 3a  72 6f 77 62 79 74 65 73  |?>+. 16:rowbytes|
0000d020  25 3d 73 78 25 2a 32 3a  72 24 3d 22 46 4e 31 36  |%=sx%*2:r$="FN16|
0000d030  22 3a 73 74 65 70 32 34  3d 32 0d 3f 48 1b de 20  |":step24=2.?H.. |
0000d040  72 70 61 6c 25 28 32 35  35 29 2c 67 70 61 6c 25  |rpal%(255),gpal%|
0000d050  28 32 35 35 29 0d 3f 52  25 72 6d 61 73 6b 25 3d  |(255).?R%rmask%=|
0000d060  26 37 63 30 30 3a 67 6d  61 73 6b 25 3d 34 32 3a  |&7c00:gmask%=42:|
0000d070  62 6d 61 73 6b 25 3d 2d  34 32 0d 3f 5c 54 e7 63  |bmask%=-42.?\T.c|
0000d080  6f 6d 70 72 65 73 73 69  6f 6e 3d 33 20 8f 23 63  |ompression=3 .#c|
0000d090  25 3d 72 69 66 66 6f 66  66 25 2b 31 34 2b 70 61  |%=riffoff%+14+pa|
0000d0a0  6c 25 3a 72 6d 61 73 6b  25 3d a4 57 3a 67 6d 61  |l%:rmask%=.W:gma|
0000d0b0  73 6b 25 3d a4 57 3a 62  6d 61 73 6b 25 3d a4 57  |sk%=.W:bmask%=.W|
0000d0c0  3a 63 6f 6d 70 72 65 73  73 69 6f 6e 3d 30 0d 3f  |:compression=0.?|
0000d0d0  66 13 e7 72 6d 61 73 6b  25 3d 26 37 63 30 30 20  |f..rmask%=&7c00 |
0000d0e0  8c 0d 3f 70 0d e3 43 25  3d 30 b8 32 35 35 0d 3f  |..?p..C%=0.255.?|
0000d0f0  7a 26 67 70 61 6c 25 28  43 25 29 3d 28 43 25 3e  |z&gpal%(C%)=(C%>|
0000d100  3e 35 29 3c 3c 38 20 84  20 28 43 25 80 33 31 29  |>5)<<8 . (C%.31)|
0000d110  3c 3c 31 36 0d 3f 84 25  72 70 61 6c 25 28 43 25  |<<16.?.%rpal%(C%|
0000d120  29 3d 28 43 25 3e 3e 32  29 80 33 31 20 84 20 28  |)=(C%>>2).31 . (|
0000d130  43 25 80 33 29 3c 3c 31  31 0d 3f 8e 05 ed 0d 3f  |C%.3)<<11.?....?|
0000d140  98 31 e3 43 25 3d 30 b8  33 31 3a 72 25 28 43 25  |.1.C%=0.31:r%(C%|
0000d150  29 3d 43 25 2f 33 31 2a  46 3a ed 3a 67 25 28 29  |)=C%/31*F:.:g%()|
0000d160  3d 72 25 28 29 3a 62 25  28 29 3d 72 25 28 29 0d  |=r%():b%()=r%().|
0000d170  3f a2 05 cd 0d 3f ac 13  e7 72 6d 61 73 6b 25 3d  |?....?...rmask%=|
0000d180  26 66 38 30 30 20 8c 0d  3f b6 0d e3 43 25 3d 30  |&f800 ..?...C%=0|
0000d190  b8 32 35 35 0d 3f c0 26  67 70 61 6c 25 28 43 25  |.255.?.&gpal%(C%|
0000d1a0  29 3d 28 43 25 3e 3e 35  29 3c 3c 38 20 84 20 28  |)=(C%>>5)<<8 . (|
0000d1b0  43 25 80 33 31 29 3c 3c  31 36 0d 3f ca 25 72 70  |C%.31)<<16.?.%rp|
0000d1c0  61 6c 25 28 43 25 29 3d  28 43 25 3e 3e 33 29 80  |al%(C%)=(C%>>3).|
0000d1d0  33 31 20 84 20 28 43 25  80 37 29 3c 3c 31 31 0d  |31 . (C%.7)<<11.|
0000d1e0  3f d4 05 ed 0d 3f de 27  e3 43 25 3d 30 b8 33 31  |?....?.'.C%=0.31|
0000d1f0  3a 72 25 28 43 25 29 3d  43 25 2f 33 31 2a 46 3a  |:r%(C%)=C%/31*F:|
0000d200  ed 3a 62 25 28 29 3d 72  25 28 29 0d 3f e8 1d e3  |.:b%()=r%().?...|
0000d210  43 25 3d 30 b8 36 33 3a  67 25 28 43 25 29 3d 43  |C%=0.63:g%(C%)=C|
0000d220  25 2f 36 33 2a 46 3a ed  0d 3f f2 05 cd 0d 3f fc  |%/63*F:..?....?.|
0000d230  0b c9 20 32 34 2c 33 32  0d 40 06 22 72 62 6f 25  |.. 24,32.@."rbo%|
0000d240  3d 32 3a 67 62 6f 25 3d  31 3a 62 62 6f 25 3d 30  |=2:gbo%=1:bbo%=0|
0000d250  3a 72 24 3d 22 46 4e 32  34 22 0d 40 10 33 e3 43  |:r$="FN24".@.3.C|
0000d260  25 3d 30 b8 32 35 35 3a  72 25 28 43 25 29 3d 43  |%=0.255:r%(C%)=C|
0000d270  25 2f 32 35 35 2a 46 3a  ed 3a 67 25 28 29 3d 72  |%/255*F:.:g%()=r|
0000d280  25 28 29 3a 62 25 28 29  3d 72 25 28 29 0d 40 1a  |%():b%()=r%().@.|
0000d290  31 72 24 3d 22 46 4e 32  34 22 3a 73 74 65 70 32  |1r$="FN24":step2|
0000d2a0  34 3d 69 6e 70 75 74 2f  38 3a 72 6f 77 62 79 74  |4=input/8:rowbyt|
0000d2b0  65 73 25 3d 73 78 25 2a  73 74 65 70 32 34 0d 40  |es%=sx%*step24.@|
0000d2c0  24 22 72 6d 61 73 6b 25  3d 2d 31 3a 67 6d 61 73  |$"rmask%=-1:gmas|
0000d2d0  6b 25 3d 34 32 3a 62 6d  61 73 6b 25 3d 2d 34 32  |k%=42:bmask%=-42|
0000d2e0  0d 40 2e 54 e7 63 6f 6d  70 72 65 73 73 69 6f 6e  |.@.T.compression|
0000d2f0  3d 33 20 8f 23 63 25 3d  72 69 66 66 6f 66 66 25  |=3 .#c%=riffoff%|
0000d300  2b 31 34 2b 70 61 6c 25  3a 72 6d 61 73 6b 25 3d  |+14+pal%:rmask%=|
0000d310  a4 57 3a 67 6d 61 73 6b  25 3d a4 57 3a 62 6d 61  |.W:gmask%=.W:bma|
0000d320  73 6b 25 3d a4 57 3a 63  6f 6d 70 72 65 73 73 69  |sk%=.W:compressi|
0000d330  6f 6e 3d 30 0d 40 38 25  e7 72 6d 61 73 6b 25 3d  |on=0.@8%.rmask%=|
0000d340  26 46 46 20 8c 72 62 6f  25 3d 30 3a 67 62 6f 25  |&FF .rbo%=0:gbo%|
0000d350  3d 31 3a 62 62 6f 25 3d  32 0d 40 42 25 e7 67 6d  |=1:bbo%=2.@B%.gm|
0000d360  61 73 6b 25 3d 26 46 46  20 8c 67 62 6f 25 3d 30  |ask%=&FF .gbo%=0|
0000d370  3a 62 62 6f 25 3d 31 3a  72 62 6f 25 3d 32 0d 40  |:bbo%=1:rbo%=2.@|
0000d380  4c 25 e7 62 6d 61 73 6b  25 3d 26 46 46 20 8c 62  |L%.bmask%=&FF .b|
0000d390  62 6f 25 3d 30 3a 67 62  6f 25 3d 31 3a 72 62 6f  |bo%=0:gbo%=1:rbo|
0000d3a0  25 3d 32 0d 40 56 0c 69  6e 70 75 74 3d 32 34 0d  |%=2.@V.input=24.|
0000d3b0  40 60 34 7f 20 85 20 34  32 2c 22 2e 42 4d 50 20  |@`4. . 42,".BMP |
0000d3c0  66 69 6c 65 20 6f 66 20  75 6e 75 73 75 61 6c 20  |file of unusual |
0000d3d0  64 65 70 74 68 20 28 22  2b c3 69 6e 70 75 74 2b  |depth ("+.input+|
0000d3e0  22 29 22 0d 40 6a 05 cb  0d 40 74 0f e7 69 6e 70  |")".@j...@t..inp|
0000d3f0  75 74 3c 3d 38 20 8c 0d  40 7e 22 cf 23 63 25 3d  |ut<=8 ..@~".#c%=|
0000d400  72 69 66 66 6f 66 66 25  2b 31 34 2b 70 61 6c 25  |riffoff%+14+pal%|
0000d410  3a 72 24 3d 22 46 4e 38  22 0d 40 88 13 e3 43 25  |:r$="FN8".@...C%|
0000d420  3d 30 b8 32 5e 69 6e 70  75 74 2d 31 0d 40 92 3f  |=0.2^input-1.@.?|
0000d430  62 25 28 43 25 29 3d 9a  23 63 25 2f 32 35 35 2a  |b%(C%)=.#c%/255*|
0000d440  46 3a 67 25 28 43 25 29  3d 9a 23 63 25 2f 32 35  |F:g%(C%)=.#c%/25|
0000d450  35 2a 46 3a 72 25 28 43  25 29 3d 9a 23 63 25 2f  |5*F:r%(C%)=.#c%/|
0000d460  32 35 35 2a 46 3a e7 9a  23 63 25 0d 40 9c 05 ed  |255*F:..#c%.@...|
0000d470  0d 40 a6 05 cd 0d 40 b0  14 c8 8e 20 63 6f 6d 70  |.@....@.... comp|
0000d480  72 65 73 73 69 6f 6e 20  ca 0d 40 ba 1d c9 20 30  |ression ..@... 0|
0000d490  3a 69 6e 66 6f 24 3d 22  55 6e 63 6f 6d 70 72 65  |:info$="Uncompre|
0000d4a0  73 73 65 64 20 22 0d 40  c4 2c c9 20 31 3a 69 6e  |ssed ".@.,. 1:in|
0000d4b0  66 6f 24 3d 22 52 4c 45  38 20 63 6f 6d 70 72 65  |fo$="RLE8 compre|
0000d4c0  73 73 65 64 20 22 3a 72  24 3d 22 46 4e 32 34 30  |ssed ":r$="FN240|
0000d4d0  31 22 0d 40 ce 2c c9 20  32 3a 69 6e 66 6f 24 3d  |1".@.,. 2:info$=|
0000d4e0  22 52 4c 45 34 20 63 6f  6d 70 72 65 73 73 65 64  |"RLE4 compressed|
0000d4f0  20 22 3a 72 24 3d 22 46  4e 32 34 30 32 22 0d 40  | ":r$="FN2402".@|
0000d500  d8 43 7f 20 85 20 34 32  2c 22 2e 42 4d 50 20 63  |.C. . 42,".BMP c|
0000d510  6f 6d 70 72 65 73 73 69  6f 6e 20 74 79 70 65 20  |ompression type |
0000d520  6e 6f 74 20 73 75 70 70  6f 72 74 65 64 20 28 22  |not supported ("|
0000d530  2b c3 63 6f 6d 70 72 65  73 73 69 6f 6e 2b 22 29  |+.compression+")|
0000d540  22 0d 40 e2 05 cb 0d 40  ec 1c 72 6f 77 62 79 74  |".@....@..rowbyt|
0000d550  65 73 25 3d 72 6f 77 62  79 74 65 73 25 2b 33 80  |es%=rowbytes%+3.|
0000d560  ac 33 0d 40 f6 3a e7 20  63 6f 6d 70 72 65 73 73  |.3.@.:. compress|
0000d570  69 6f 6e 3c 3e 30 20 63  61 63 68 65 62 79 74 65  |ion<>0 cachebyte|
0000d580  73 25 3d b9 3a 70 6c 62  75 66 66 25 3d a4 64 69  |s%=.:plbuff%=.di|
0000d590  6d 28 72 6f 77 62 79 74  65 73 25 29 0d 41 00 1e  |m(rowbytes%).A..|
0000d5a0  63 61 63 68 65 25 3d b9  3a cf 23 63 25 3d 72 69  |cache%=.:.#c%=ri|
0000d5b0  66 66 6f 66 66 25 2b 73  74 25 0d 41 0a 4f 69 6e  |ffoff%+st%.A.Oin|
0000d5c0  66 6f 24 2b 3d 22 57 69  6e 64 6f 77 73 20 33 2e  |fo$+="Windows 3.|
0000d5d0  30 20 2e 42 4d 50 20 69  6d 61 67 65 2c 20 22 2b  |0 .BMP image, "+|
0000d5e0  c3 73 78 25 2b 22 20 62  79 20 22 2b c3 73 79 25  |.sx%+" by "+.sy%|
0000d5f0  2b 22 20 70 69 78 65 6c  73 2c 20 22 2b a4 62 69  |+" pixels, "+.bi|
0000d600  74 73 28 69 6e 70 75 74  29 0d 41 14 0a c9 20 32  |ts(input).A... 2|
0000d610  35 30 30 0d 41 1e 32 cf  23 63 25 3d 30 3a 73 24  |500.A.2.#c%=0:s$|
0000d620  3d 22 22 3a 43 25 3d 9a  23 63 25 3a c8 95 43 25  |="":C%=.#c%:..C%|
0000d630  3c 3e 30 20 73 24 2b 3d  bd 43 25 3a 43 25 3d 9a  |<>0 s$+=.C%:C%=.|
0000d640  23 63 25 3a ce 0d 41 28  37 73 24 2b 3d 22 20 76  |#c%:..A(7s$+=" v|
0000d650  65 72 73 69 6f 6e 20 22  2b c3 a4 57 3a 73 78 25  |ersion "+..W:sx%|
0000d660  3d a4 57 3a 73 79 25 3d  a4 57 3a 69 6e 70 75 74  |=.W:sy%=.W:input|
0000d670  3d a4 57 3a 63 61 63 68  65 25 3d b9 0d 41 32 5f  |=.W:cache%=..A2_|
0000d680  69 6e 66 6f 24 3d 22 21  54 72 61 6e 73 6c 61 74  |info$="!Translat|
0000d690  6f 72 20 43 6c 65 61 72  20 66 6f 72 6d 61 74 20  |or Clear format |
0000d6a0  6d 61 64 65 20 62 79 20  22 2b 73 24 2b 22 2c 20  |made by "+s$+", |
0000d6b0  22 2b c3 73 78 25 2b 22  20 62 79 20 22 2b c3 73  |"+.sx%+" by "+.s|
0000d6c0  79 25 2b 22 20 70 69 78  65 6c 73 2c 20 22 2b a4  |y%+" pixels, "+.|
0000d6d0  62 69 74 73 28 69 6e 70  75 74 29 0d 41 3c 0e e7  |bits(input).A<..|
0000d6e0  69 6e 70 75 74 3e 38 20  8c 0d 41 46 4b f2 6e 6f  |input>8 ..AFK.no|
0000d6f0  70 61 6c 3a 69 6e 70 75  74 3d 32 34 3a 73 74 65  |pal:input=24:ste|
0000d700  70 32 34 3d 33 3a 72 6f  77 62 79 74 65 73 25 3d  |p24=3:rowbytes%=|
0000d710  33 2a 73 78 25 3a 72 62  6f 25 3d 30 3a 67 62 6f  |3*sx%:rbo%=0:gbo|
0000d720  25 3d 31 3a 62 62 6f 25  3d 32 3a 72 24 3d 22 46  |%=1:bbo%=2:r$="F|
0000d730  4e 32 34 22 0d 41 50 05  cc 0d 41 5a 13 e3 43 25  |N24".AP...AZ..C%|
0000d740  3d 30 b8 32 5e 69 6e 70  75 74 2d 31 0d 41 64 39  |=0.2^input-1.Ad9|
0000d750  72 25 28 43 25 29 3d 9a  23 63 25 2f 32 35 35 2a  |r%(C%)=.#c%/255*|
0000d760  46 3a 67 25 28 43 25 29  3d 9a 23 63 25 2f 32 35  |F:g%(C%)=.#c%/25|
0000d770  35 2a 46 3a 62 25 28 43  25 29 3d 9a 23 63 25 2f  |5*F:b%(C%)=.#c%/|
0000d780  32 35 35 2a 46 0d 41 6e  05 ed 0d 41 78 22 69 6e  |255*F.An...Ax"in|
0000d790  70 75 74 3d 38 3a 72 24  3d 22 46 4e 38 22 3a 72  |put=8:r$="FN8":r|
0000d7a0  6f 77 62 79 74 65 73 25  3d 73 78 25 0d 41 82 05  |owbytes%=sx%.A..|
0000d7b0  cd 0d 41 8c 0c 73 74 25  3d 8f 23 63 25 0d 41 96  |..A..st%=.#c%.A.|
0000d7c0  0a c9 20 32 36 30 30 0d  41 a0 12 cf 23 63 25 3d  |.. 2600.A...#c%=|
0000d7d0  30 3a 43 25 3d 9a 23 63  25 0d 41 aa 13 44 25 3d  |0:C%=.#c%.A..D%=|
0000d7e0  9a 23 63 25 3a c8 8e 20  44 25 20 ca 0d 41 b4 21  |.#c%:.. D% ..A.!|
0000d7f0  c9 20 30 3a 73 78 25 3d  33 32 30 3a 73 79 25 3d  |. 0:sx%=320:sy%=|
0000d800  32 30 30 3a 70 6c 61 6e  65 73 25 3d 34 0d 41 be  |200:planes%=4.A.|
0000d810  21 c9 20 31 3a 73 78 25  3d 36 34 30 3a 73 79 25  |!. 1:sx%=640:sy%|
0000d820  3d 32 30 30 3a 70 6c 61  6e 65 73 25 3d 32 0d 41  |=200:planes%=2.A|
0000d830  c8 21 c9 20 32 3a 73 78  25 3d 36 34 30 3a 73 79  |.!. 2:sx%=640:sy|
0000d840  25 3d 34 30 30 3a 70 6c  61 6e 65 73 25 3d 31 0d  |%=400:planes%=1.|
0000d850  41 d2 3f 7f 20 85 34 32  2c 22 43 68 61 6e 67 65  |A.?. .42,"Change|
0000d860  46 53 49 20 6b 6e 6f 77  73 20 6e 6f 74 68 69 6e  |FSI knows nothin|
0000d870  67 20 6f 66 20 22 2b c3  43 25 2b 22 20 74 79 70  |g of "+.C%+" typ|
0000d880  65 20 44 65 67 61 73 20  66 69 6c 65 73 22 0d 41  |e Degas files".A|
0000d890  dc 05 cb 0d 41 e6 5d e3  49 25 3d 30 b8 28 31 3c  |....A.].I%=0.(1<|
0000d8a0  3c 69 6e 70 75 74 29 2d  31 3a 44 25 3d a4 62 65  |<input)-1:D%=.be|
0000d8b0  48 57 3a 72 25 28 49 25  29 3d 28 44 25 3e 3e 38  |HW:r%(I%)=(D%>>8|
0000d8c0  80 37 29 2f 37 2a 46 3a  67 25 28 49 25 29 3d 28  |.7)/7*F:g%(I%)=(|
0000d8d0  44 25 3e 3e 34 80 37 29  2f 37 2a 46 3a 62 25 28  |D%>>4.7)/7*F:b%(|
0000d8e0  49 25 29 3d 28 44 25 80  37 29 2f 37 2a 46 3a ed  |I%)=(D%.7)/7*F:.|
0000d8f0  0d 41 f0 3c 63 61 63 68  65 25 3d b9 3a 70 6c 61  |.A.<cache%=.:pla|
0000d900  6e 61 72 25 3d b9 3a 6d  61 73 6b 69 6e 67 25 3d  |nar%=.:masking%=|
0000d910  a3 3a 73 74 25 3d 33 34  3a cf 23 63 25 3d 33 34  |.:st%=34:.#c%=34|
0000d920  3a 72 24 3d 22 46 4e 31  36 30 30 22 0d 41 fa 48  |:r$="FN1600".A.H|
0000d930  72 6f 77 62 79 74 65 73  25 3d 28 73 78 25 2b 31  |rowbytes%=(sx%+1|
0000d940  35 3e 3e 34 29 3c 3c 31  3a 70 6c 62 79 74 65 73  |5>>4)<<1:plbytes|
0000d950  25 3d 72 6f 77 62 79 74  65 73 25 2a 70 6c 61 6e  |%=rowbytes%*plan|
0000d960  65 73 25 3a 70 62 75 66  66 25 3d a4 64 69 6d 28  |es%:pbuff%=.dim(|
0000d970  73 78 25 29 0d 42 04 6a  e7 43 25 80 31 32 38 20  |sx%).B.j.C%.128 |
0000d980  72 24 3d 22 46 4e 31 36  30 31 22 3a 66 6c 61 67  |r$="FN1601":flag|
0000d990  3d 31 36 30 30 3a 63 61  63 68 65 62 79 74 65 73  |=1600:cachebytes|
0000d9a0  25 3d b9 3a 70 6c 62 75  66 66 25 3d a4 64 69 6d  |%=.:plbuff%=.dim|
0000d9b0  28 70 6c 62 79 74 65 73  25 29 20 8b 72 65 61 6c  |(plbytes%) .real|
0000d9c0  72 6f 77 62 79 74 65 73  25 3d 32 3a 72 6f 77 62  |rowbytes%=2:rowb|
0000d9d0  79 74 65 73 25 3d 70 6c  62 79 74 65 73 25 0d 42  |ytes%=plbytes%.B|
0000d9e0  0e 43 69 6e 66 6f 24 3d  22 44 65 67 61 73 20 66  |.Cinfo$="Degas f|
0000d9f0  69 6c 65 20 22 2b c3 73  78 25 2b 22 20 62 79 20  |ile "+.sx%+" by |
0000da00  22 2b c3 73 79 25 2b 22  20 70 69 78 65 6c 73 2c  |"+.sy%+" pixels,|
0000da10  20 22 2b a4 62 69 74 73  28 70 6c 61 6e 65 73 25  | "+.bits(planes%|
0000da20  29 0d 42 18 0a c9 20 32  37 30 30 0d 42 22 1a cf  |).B... 2700.B"..|
0000da30  23 63 25 3d 34 3a 73 78  25 3d a4 48 57 3a 73 79  |#c%=4:sx%=.HW:sy|
0000da40  25 3d a4 48 57 0d 42 2c  0c c8 8e 20 a4 48 57 20  |%=.HW.B,... .HW |
0000da50  ca 0d 42 36 32 c9 20 26  41 46 3a 72 6f 77 62 79  |..B62. &AF:rowby|
0000da60  74 65 73 25 3d 73 78 25  3a 63 61 63 68 65 25 3d  |tes%=sx%:cache%=|
0000da70  b9 3a 72 24 3d 22 46 4e  38 22 3a 73 74 25 3d 26  |.:r$="FN8":st%=&|
0000da80  33 30 41 0d 42 40 52 7f  20 d9 23 63 25 3a 85 20  |30A.B@R. .#c%:. |
0000da90  34 32 2c 22 50 61 6e 69  63 20 69 6e 20 43 6f 6c  |42,"Panic in Col|
0000daa0  6f 52 49 58 20 72 65 61  64 69 6e 67 20 2d 20 43  |oRIX reading - C|
0000dab0  68 61 6e 67 65 46 53 49  20 6c 61 72 67 65 6c 79  |hangeFSI largely|
0000dac0  20 69 67 6e 6f 72 61 6e  74 20 6f 66 20 66 6f 72  | ignorant of for|
0000dad0  6d 61 74 21 22 0d 42 4a  05 cb 0d 42 54 13 e3 43  |mat!".BJ...BT..C|
0000dae0  25 3d 30 b8 32 5e 69 6e  70 75 74 2d 31 0d 42 5e  |%=0.2^input-1.B^|
0000daf0  36 72 25 28 43 25 29 3d  9a 23 63 25 2f 36 33 2a  |6r%(C%)=.#c%/63*|
0000db00  46 3a 67 25 28 43 25 29  3d 9a 23 63 25 2f 36 33  |F:g%(C%)=.#c%/63|
0000db10  2a 46 3a 62 25 28 43 25  29 3d 9a 23 63 25 2f 36  |*F:b%(C%)=.#c%/6|
0000db20  33 2a 46 0d 42 68 05 ed  0d 42 72 0c cf 23 63 25  |3*F.Bh...Br..#c%|
0000db30  3d 73 74 25 0d 42 7c 43  69 6e 66 6f 24 3d 22 43  |=st%.B|Cinfo$="C|
0000db40  6f 6c 6f 52 49 58 20 66  69 6c 65 20 22 2b c3 73  |oloRIX file "+.s|
0000db50  78 25 2b 22 20 62 79 20  22 2b c3 73 79 25 2b 22  |x%+" by "+.sy%+"|
0000db60  20 70 69 78 65 6c 73 2c  20 22 2b a4 62 69 74 73  | pixels, "+.bits|
0000db70  28 69 6e 70 75 74 29 0d  42 86 0a c9 20 32 38 30  |(input).B... 280|
0000db80  30 0d 42 90 21 cf 23 63  25 3d 30 3a f5 20 73 24  |0.B.!.#c%=0:. s$|
0000db90  3d a4 66 69 74 73 3a c8  8e 20 c0 73 24 2c 38 29  |=.fits:.. .s$,8)|
0000dba0  20 ca 0d 42 9a 51 c9 20  22 53 49 4d 50 4c 45 20  | ..B.Q. "SIMPLE |
0000dbb0  20 22 3a e7 c1 73 24 2c  33 30 2c 31 29 3c 3e 22  | ":..s$,30,1)<>"|
0000dbc0  54 22 20 85 34 32 2c 22  43 68 61 6e 67 65 46 53  |T" .42,"ChangeFS|
0000dbd0  49 20 63 61 6e 20 6f 6e  6c 79 20 72 65 61 64 20  |I can only read |
0000dbe0  53 69 6d 70 6c 65 20 46  49 54 53 20 66 6f 72 6d  |Simple FITS form|
0000dbf0  61 74 22 0d 42 a4 1f c9  20 22 42 49 54 50 49 58  |at".B... "BITPIX|
0000dc00  20 20 22 3a 69 6e 70 75  74 3d bb c1 73 24 2c 31  |  ":input=..s$,1|
0000dc10  30 29 0d 42 ae 4a c9 20  22 4e 41 58 49 53 20 20  |0).B.J. "NAXIS  |
0000dc20  20 22 3a e7 bb c1 73 24  2c 31 30 29 3c 3e 32 20  | ":...s$,10)<>2 |
0000dc30  85 34 32 2c 22 43 68 61  6e 67 65 46 53 49 20 63  |.42,"ChangeFSI c|
0000dc40  61 6e 20 6f 6e 6c 79 20  72 65 61 64 20 32 64 20  |an only read 2d |
0000dc50  46 49 54 53 20 69 6d 61  67 65 73 22 0d 42 b8 1d  |FITS images".B..|
0000dc60  c9 20 22 4e 41 58 49 53  31 20 20 22 3a 73 78 25  |. "NAXIS1  ":sx%|
0000dc70  3d bb c1 73 24 2c 31 30  29 0d 42 c2 1d c9 20 22  |=..s$,10).B... "|
0000dc80  4e 41 58 49 53 32 20 20  22 3a 73 79 25 3d bb c1  |NAXIS2  ":sy%=..|
0000dc90  73 24 2c 31 30 29 0d 42  cc 10 c9 20 22 45 4e 44  |s$,10).B... "END|
0000dca0  20 20 20 20 20 22 0d 42  d6 27 7f 20 e7 69 6e 66  |     ".B.'. .inf|
0000dcb0  6f 25 20 f1 22 49 67 6e  6f 72 69 6e 67 20 46 49  |o% ."Ignoring FI|
0000dcc0  54 53 20 72 65 63 6f 72  64 20 22 73 24 0d 42 e0  |TS record "s$.B.|
0000dcd0  05 cb 0d 42 ea 16 fd c0  73 24 2c 38 29 3d 22 45  |...B....s$,8)="E|
0000dce0  4e 44 20 20 20 20 20 22  0d 42 f4 2e 73 74 25 3d  |ND     ".B..st%=|
0000dcf0  28 8f 23 63 25 81 32 38  38 30 20 2b 20 31 29 2a  |(.#c%.2880 + 1)*|
0000dd00  32 38 38 30 3a 63 61 63  68 65 25 3d b9 3a cf 23  |2880:cache%=.:.#|
0000dd10  63 25 3d 73 74 25 0d 42  fe 0e c8 8e 20 69 6e 70  |c%=st%.B.... inp|
0000dd20  75 74 20 ca 0d 43 08 25  c9 20 38 3a 72 24 3d 22  |ut ..C.%. 8:r$="|
0000dd30  46 4e 38 22 3a 72 6f 77  62 79 74 65 73 25 3d 73  |FN8":rowbytes%=s|
0000dd40  78 25 3a f2 6e 6f 70 61  6c 0d 43 12 43 c9 20 31  |x%:.nopal.C.C. 1|
0000dd50  36 3a 72 6f 77 62 79 74  65 73 25 3d 32 2a 73 78  |6:rowbytes%=2*sx|
0000dd60  25 3a de 20 72 70 61 6c  25 28 32 35 35 29 2c 67  |%:. rpal%(255),g|
0000dd70  70 61 6c 25 28 32 35 35  29 3a 73 74 65 70 32 34  |pal%(255):step24|
0000dd80  3d 32 3a 72 24 3d 22 46  4e 31 36 22 0d 43 1c 0d  |=2:r$="FN16".C..|
0000dd90  e3 43 25 3d 30 b8 32 35  35 0d 43 26 13 67 70 61  |.C%=0.255.C&.gpa|
0000dda0  6c 25 28 43 25 29 3d 43  25 3c 3c 38 0d 43 30 10  |l%(C%)=C%<<8.C0.|
0000ddb0  72 70 61 6c 25 28 43 25  29 3d 43 25 0d 43 3a 20  |rpal%(C%)=C%.C: |
0000ddc0  ed 3a 63 68 65 61 74 25  3d 30 3a e7 69 6e 76 65  |.:cheat%=0:.inve|
0000ddd0  72 74 25 20 63 68 65 61  74 25 3d 46 0d 43 44 65  |rt% cheat%=F.CDe|
0000dde0  e3 43 25 3d 30 b8 32 35  35 3a 72 25 28 43 25 29  |.C%=0.255:r%(C%)|
0000ddf0  3d 63 68 65 61 74 25 2b  43 25 2f 36 35 35 33 35  |=cheat%+C%/65535|
0000de00  2a 46 3a 67 25 28 43 25  29 3d 28 28 43 25 82 26  |*F:g%(C%)=((C%.&|
0000de10  38 30 29 3c 3c 38 29 2f  36 35 35 33 35 2a 46 3a  |80)<<8)/65535*F:|
0000de20  62 25 28 43 25 29 3d 63  68 65 61 74 25 3a ed 3a  |b%(C%)=cheat%:.:|
0000de30  72 77 74 3d 31 3a 67 77  74 3d 31 3a 62 77 74 3d  |rwt=1:gwt=1:bwt=|
0000de40  31 0d 43 4e 51 7f 20 85  20 34 32 2c 22 43 68 61  |1.CNQ. . 42,"Cha|
0000de50  6e 67 65 46 53 49 20 63  61 6e 27 74 20 72 65 61  |ngeFSI can't rea|
0000de60  64 20 61 20 46 49 54 53  20 69 6d 61 67 65 20 77  |d a FITS image w|
0000de70  69 74 68 20 74 68 69 73  20 6e 75 6d 62 65 72 20  |ith this number |
0000de80  6f 66 20 62 69 74 73 20  70 65 72 20 70 69 78 65  |of bits per pixe|
0000de90  6c 22 0d 43 58 05 cb 0d  43 62 40 69 6e 66 6f 24  |l".CX...Cb@info$|
0000dea0  3d 22 46 49 54 53 20 66  69 6c 65 20 22 2b c3 73  |="FITS file "+.s|
0000deb0  78 25 2b 22 20 62 79 20  22 2b c3 73 79 25 2b 22  |x%+" by "+.sy%+"|
0000dec0  20 70 69 78 65 6c 73 2c  20 22 2b a4 62 69 74 73  | pixels, "+.bits|
0000ded0  28 69 6e 70 75 74 29 0d  43 6c 0a c9 20 32 39 30  |(input).Cl.. 290|
0000dee0  30 0d 43 76 3c cf 23 63  25 3d 34 3a 73 78 25 3d  |0.Cv<.#c%=4:sx%=|
0000def0  a4 62 65 48 57 3a 73 79  25 3d a4 62 65 48 57 3a  |.beHW:sy%=.beHW:|
0000df00  cf 23 63 25 3d 26 34 32  3a 69 6e 70 75 74 3d a4  |.#c%=&42:input=.|
0000df10  62 65 48 57 3a 43 25 3d  a4 62 65 48 57 0d 43 80  |beHW:C%=.beHW.C.|
0000df20  3d 72 6f 77 62 79 74 65  73 25 3d a4 62 65 48 57  |=rowbytes%=.beHW|
0000df30  3a 43 25 3d a4 62 65 57  3a 73 74 25 3d a4 62 65  |:C%=.beW:st%=.be|
0000df40  57 3a cf 23 63 25 3d 73  74 25 3a 72 24 3d 22 46  |W:.#c%=st%:r$="F|
0000df50  4e 38 22 3a f2 6e 6f 70  61 6c 0d 43 8a 23 de 20  |N8":.nopal.C.#. |
0000df60  72 70 61 6c 25 28 31 35  29 2c 67 70 61 6c 25 28  |rpal%(15),gpal%(|
0000df70  31 35 29 2c 62 70 61 6c  25 28 31 35 29 0d 43 94  |15),bpal%(15).C.|
0000df80  49 72 70 61 6c 25 28 29  3d 26 65 36 2c 26 32 33  |Irpal%()=&e6,&23|
0000df90  2c 26 65 36 2c 26 37 66  2c 26 31 37 2c 26 30 30  |,&e6,&7f,&17,&00|
0000dfa0  2c 26 61 31 2c 26 34 35  2c 26 65 36 2c 26 34 61  |,&a1,&45,&e6,&4a|
0000dfb0  2c 26 65 36 2c 26 37 33  2c 26 36 65 2c 26 34 37  |,&e6,&73,&6e,&47|
0000dfc0  2c 26 38 61 2c 30 0d 43  9e 49 67 70 61 6c 25 28  |,&8a,0.C.Igpal%(|
0000dfd0  29 3d 26 65 36 2c 26 37  38 2c 26 30 30 2c 26 32  |)=&e6,&78,&00,&2|
0000dfe0  33 2c 26 61 31 2c 26 37  33 2c 26 32 65 2c 26 32  |3,&a1,&73,&2e,&2|
0000dff0  65 2c 26 63 38 2c 26 61  36 2c 26 37 35 2c 26 34  |e,&c8,&a6,&75,&4|
0000e000  30 2c 26 62 38 2c 26 37  38 2c 26 35 35 2c 30 0d  |0,&b8,&78,&55,0.|
0000e010  43 a8 49 62 70 61 6c 25  28 29 3d 26 62 38 2c 26  |C.Ibpal%()=&b8,&|
0000e020  65 36 2c 26 30 30 2c 26  61 31 2c 26 31 37 2c 26  |e6,&00,&a1,&17,&|
0000e030  32 65 2c 26 30 63 2c 26  32 65 2c 26 30 30 2c 26  |2e,&0c,&2e,&00,&|
0000e040  63 36 2c 26 30 30 2c 26  65 36 2c 26 30 30 2c 26  |c6,&00,&e6,&00,&|
0000e050  30 30 2c 26 30 30 2c 30  0d 43 b2 6b e3 43 25 3d  |00,&00,0.C.k.C%=|
0000e060  26 38 30 b8 26 38 46 3a  72 25 28 43 25 29 3d 72  |&80.&8F:r%(C%)=r|
0000e070  70 61 6c 25 28 43 25 2d  26 38 30 29 2f 32 35 35  |pal%(C%-&80)/255|
0000e080  2a 46 3a 67 25 28 43 25  29 3d 67 70 61 6c 25 28  |*F:g%(C%)=gpal%(|
0000e090  43 25 2d 26 38 30 29 2f  32 35 35 2a 46 3a 62 25  |C%-&80)/255*F:b%|
0000e0a0  28 43 25 29 3d 62 70 61  6c 25 28 43 25 2d 26 38  |(C%)=bpal%(C%-&8|
0000e0b0  30 29 2f 32 35 35 2a 46  3a ed 3a 63 61 63 68 65  |0)/255*F:.:cache|
0000e0c0  25 3d b9 0d 43 bc 46 69  6e 66 6f 24 3d 22 41 70  |%=..C.Finfo$="Ap|
0000e0d0  6f 6c 6c 6f 20 47 50 52  20 66 69 6c 65 20 22 2b  |ollo GPR file "+|
0000e0e0  c3 73 78 25 2b 22 20 62  79 20 22 2b c3 73 79 25  |.sx%+" by "+.sy%|
0000e0f0  2b 22 20 70 69 78 65 6c  73 2c 20 22 2b a4 62 69  |+" pixels, "+.bi|
0000e100  74 73 28 69 6e 70 75 74  29 0d 43 c6 0a c9 20 33  |ts(input).C... 3|
0000e110  30 30 30 0d 43 d0 48 73  78 25 3d 37 32 30 3a 73  |000.C.Hsx%=720:s|
0000e120  79 25 3d a2 23 63 25 2f  31 34 34 30 3a de 20 72  |y%=.#c%/1440:. r|
0000e130  70 61 6c 25 28 32 35 35  29 2c 67 70 61 6c 25 28  |pal%(255),gpal%(|
0000e140  32 35 35 29 2c 62 70 61  6c 25 28 32 35 35 29 2c  |255),bpal%(255),|
0000e150  74 61 62 6c 65 25 28 32  35 35 29 0d 43 e4 08 e7  |table%(255).C...|
0000e160  a3 20 8c 0d 43 ee 0d e3  43 25 3d 30 b8 32 35 35  |. ..C...C%=0.255|
0000e170  0d 43 f8 1c 74 61 62 6c  65 25 28 43 25 29 3d 28  |.C..table%(C%)=(|
0000e180  43 25 2d 31 36 29 2f 32  31 39 2a 46 0d 44 02 3e  |C%-16)/219*F.D.>|
0000e190  72 25 28 43 25 29 3d 28  43 25 2d 31 32 38 29 2f  |r%(C%)=(C%-128)/|
0000e1a0  31 38 36 2a 30 2e 36 32  34 2a 46 3a 72 70 61 6c  |186*0.624*F:rpal|
0000e1b0  25 28 43 25 29 3d 28 43  25 2d 31 32 38 29 2f 31  |%(C%)=(C%-128)/1|
0000e1c0  36 30 2a 30 2e 39 35 32  2a 46 0d 44 0c 3f 67 25  |60*0.952*F.D.?g%|
0000e1d0  28 43 25 29 3d 2d 28 43  25 2d 31 32 38 29 2f 31  |(C%)=-(C%-128)/1|
0000e1e0  38 36 2a 30 2e 36 34 2a  46 3a 67 70 61 6c 25 28  |86*0.64*F:gpal%(|
0000e1f0  43 25 29 3d 2d 28 43 25  2d 31 32 38 29 2f 31 36  |C%)=-(C%-128)/16|
0000e200  30 2a 30 2e 32 37 37 2a  46 0d 44 16 3d 62 25 28  |0*0.277*F.D.=b%(|
0000e210  43 25 29 3d 28 43 25 2d  31 32 38 29 2f 31 38 36  |C%)=(C%-128)/186|
0000e220  2a 31 2e 37 33 2a 46 3a  62 70 61 6c 25 28 43 25  |*1.73*F:bpal%(C%|
0000e230  29 3d 2d 28 43 25 2d 31  32 38 29 2f 31 36 30 2a  |)=-(C%-128)/160*|
0000e240  31 2e 31 31 2a 46 0d 44  20 05 ed 0d 44 2a 05 cc  |1.11*F.D ...D*..|
0000e250  0d 44 3e 0d e3 43 25 3d  30 b8 32 35 35 0d 44 48  |.D>..C%=0.255.DH|
0000e260  1c 74 61 62 6c 65 25 28  43 25 29 3d 28 43 25 2d  |.table%(C%)=(C%-|
0000e270  31 36 29 2f 32 31 39 2a  46 0d 44 52 35 72 25 28  |16)/219*F.DR5r%(|
0000e280  43 25 29 3d a8 28 28 43  25 2d 31 32 38 29 2f 31  |C%)=.((C%-128)/1|
0000e290  36 30 2a 46 29 3a 62 25  28 43 25 29 3d a8 28 28  |60*F):b%(C%)=.((|
0000e2a0  43 25 2d 31 32 38 29 2f  31 32 36 2a 46 29 0d 44  |C%-128)/126*F).D|
0000e2b0  5c 4a 67 25 28 43 25 29  3d a8 28 2d 28 43 25 2d  |\Jg%(C%)=.(-(C%-|
0000e2c0  31 32 38 29 2f 31 36 30  2a 72 77 74 2f 67 77 74  |128)/160*rwt/gwt|
0000e2d0  2a 46 29 3a 67 70 61 6c  25 28 43 25 29 3d a8 28  |*F):gpal%(C%)=.(|
0000e2e0  2d 28 43 25 2d 31 32 38  29 2f 31 32 36 2a 62 77  |-(C%-128)/126*bw|
0000e2f0  74 2f 67 77 74 2a 46 29  0d 44 66 05 ed 0d 44 70  |t/gwt*F).Df...Dp|
0000e300  05 cd 0d 44 7a 3c 74 61  62 6c 65 25 28 29 3d 2d  |...Dz<table%()=-|
0000e310  31 2c 2d 31 2c 2d 31 2c  2d 31 2c 2d 31 2c 2d 31  |1,-1,-1,-1,-1,-1|
0000e320  2c 2d 31 2c 2d 31 2c 2d  31 2c 2d 31 2c 2d 31 2c  |,-1,-1,-1,-1,-1,|
0000e330  2d 31 2c 2d 31 2c 2d 31  2c 2d 31 2c 2d 31 0d 44  |-1,-1,-1,-1,-1.D|
0000e340  84 3a 73 74 25 3d 30 3a  cf 23 63 25 3d 30 3a 63  |.:st%=0:.#c%=0:c|
0000e350  61 63 68 65 25 3d b9 3a  72 6f 77 62 79 74 65 73  |ache%=.:rowbytes|
0000e360  25 3d 31 34 34 30 3a 69  6e 70 75 74 3d 34 32 32  |%=1440:input=422|
0000e370  3a 67 61 6d 6d 61 3d 31  0d 44 8e 19 e7 73 63 61  |:gamma=1.D...sca|
0000e380  6c 65 25 20 79 6d 75 6c  25 3d 79 6d 75 6c 25 2a  |le% ymul%=ymul%*|
0000e390  32 0d 44 98 3a 69 6e 66  6f 24 3d 22 43 43 49 52  |2.D.:info$="CCIR|
0000e3a0  36 30 31 20 34 3a 32 3a  32 20 66 69 6c 65 20 22  |601 4:2:2 file "|
0000e3b0  2b c3 73 78 25 2b 22 20  62 79 20 22 2b c3 73 79  |+.sx%+" by "+.sy|
0000e3c0  25 2b 22 20 70 69 78 65  6c 73 22 0d 44 a2 0a c9  |%+" pixels".D...|
0000e3d0  20 33 31 30 30 0d 44 ac  24 71 75 61 6e 74 25 3d  | 3100.D.$quant%=|
0000e3e0  38 3a cf 23 63 25 3d 30  3a 61 24 3d be 23 63 25  |8:.#c%=0:a$=.#c%|
0000e3f0  3a 73 74 25 3d 8f 23 63  25 0d 44 b6 20 73 78 25  |:st%=.#c%.D. sx%|
0000e400  3d bb 61 24 3a 73 79 25  3d bb 28 c1 61 24 2c a7  |=.a$:sy%=.(.a$,.|
0000e410  61 24 2c 22 20 22 29 29  29 0d 44 c0 2c f2 6e 6f  |a$," "))).D.,.no|
0000e420  70 61 6c 3a 69 6e 70 75  74 3d 32 34 3a 73 74 65  |pal:input=24:ste|
0000e430  70 32 34 3d 33 3a 72 6f  77 62 79 74 65 73 25 3d  |p24=3:rowbytes%=|
0000e440  73 78 25 2a 33 0d 44 ca  34 72 62 6f 25 3d 30 3a  |sx%*3.D.4rbo%=0:|
0000e450  67 62 6f 25 3d 31 3a 62  62 6f 25 3d 32 3a 63 61  |gbo%=1:bbo%=2:ca|
0000e460  63 68 65 25 3d b9 3a 66  6c 61 67 3d 37 30 30 3a  |che%=.:flag=700:|
0000e470  72 24 3d 22 46 4e 32 34  22 0d 44 d4 51 69 6e 66  |r$="FN24".D.Qinf|
0000e480  6f 24 3d 22 21 52 61 79  53 68 61 64 65 20 27 52  |o$="!RayShade 'R|
0000e490  47 42 27 20 69 6d 61 67  65 2c 20 22 2b c3 73 78  |GB' image, "+.sx|
0000e4a0  25 2b 22 20 62 79 20 22  2b c3 73 79 25 2b 22 20  |%+" by "+.sy%+" |
0000e4b0  70 69 78 65 6c 73 2c 20  32 34 20 62 69 74 73 20  |pixels, 24 bits |
0000e4c0  70 65 72 20 70 69 78 65  6c 22 0d 44 de 0a c9 20  |per pixel".D... |
0000e4d0  33 32 30 30 0d 44 e8 19  71 75 61 6e 74 25 3d 38  |3200.D..quant%=8|
0000e4e0  3a cf 23 63 25 3d 30 3a  73 74 25 3d 30 0d 44 f2  |:.#c%=0:st%=0.D.|
0000e4f0  1a 73 78 25 3d bb c1 73  24 2c a7 73 24 2c 22 5f  |.sx%=..s$,.s$,"_|
0000e500  22 29 2b 31 2c 31 29 0d  44 fc 0c c8 8e 20 73 78  |")+1,1).D.... sx|
0000e510  25 20 ca 0d 45 06 17 c9  20 35 3a 73 78 25 3d 37  |% ..E... 5:sx%=7|
0000e520  36 38 3a 73 79 25 3d 35  31 32 0d 45 10 19 c9 20  |68:sy%=512.E... |
0000e530  32 3a 73 78 25 3d 33 30  37 32 3a 73 79 25 3d 32  |2:sx%=3072:sy%=2|
0000e540  30 34 38 0d 45 1a 19 c9  20 31 3a 73 78 25 3d 31  |048.E... 1:sx%=1|
0000e550  35 33 36 3a 73 79 25 3d  31 30 32 34 0d 45 24 05  |536:sy%=1024.E$.|
0000e560  cb 0d 45 2e 2c f2 6e 6f  70 61 6c 3a 69 6e 70 75  |..E.,.nopal:inpu|
0000e570  74 3d 32 34 3a 73 74 65  70 32 34 3d 33 3a 72 6f  |t=24:step24=3:ro|
0000e580  77 62 79 74 65 73 25 3d  73 78 25 2a 33 0d 45 38  |wbytes%=sx%*3.E8|
0000e590  34 72 62 6f 25 3d 30 3a  67 62 6f 25 3d 31 3a 62  |4rbo%=0:gbo%=1:b|
0000e5a0  62 6f 25 3d 32 3a 63 61  63 68 65 25 3d b9 3a 66  |bo%=2:cache%=.:f|
0000e5b0  6c 61 67 3d 37 30 30 3a  72 24 3d 22 46 4e 32 34  |lag=700:r$="FN24|
0000e5c0  22 0d 45 42 4c 69 6e 66  6f 24 3d 22 4b 6f 64 61  |".EBLinfo$="Koda|
0000e5d0  6b 20 2f 52 47 42 20 69  6d 61 67 65 2c 20 22 2b  |k /RGB image, "+|
0000e5e0  c3 73 78 25 2b 22 20 62  79 20 22 2b c3 73 79 25  |.sx%+" by "+.sy%|
0000e5f0  2b 22 20 70 69 78 65 6c  73 2c 20 32 34 20 62 69  |+" pixels, 24 bi|
0000e600  74 73 20 70 65 72 20 70  69 78 65 6c 22 0d 45 4c  |ts per pixel".EL|
0000e610  0a c9 20 33 33 30 30 0d  45 56 1a cf 23 63 25 3d  |.. 3300.EV..#c%=|
0000e620  30 3a 69 6e 70 75 74 3d  bb c1 a4 47 45 54 2c 32  |0:input=...GET,2|
0000e630  29 0d 45 60 37 73 24 3d  a4 47 45 54 3a 73 78 25  |).E`7s$=.GET:sx%|
0000e640  3d bb 73 24 3a 73 79 25  3d bb c1 73 24 2c a7 73  |=.s$:sy%=..s$,.s|
0000e650  24 2c 22 20 22 29 29 3a  e7 73 79 25 3d 30 20 73  |$," ")):.sy%=0 s|
0000e660  79 25 3d bb a4 47 45 54  0d 45 6a 17 63 61 63 68  |y%=..GET.Ej.cach|
0000e670  65 25 3d b9 3a c8 8e 20  69 6e 70 75 74 20 ca 0d  |e%=.:.. input ..|
0000e680  45 74 44 c9 20 34 3a 69  6e 70 75 74 3d 31 3a 72  |EtD. 4:input=1:r|
0000e690  24 3d 22 46 4e 38 22 3a  72 25 28 30 29 3d 46 3a  |$="FN8":r%(0)=F:|
0000e6a0  67 25 28 29 3d 72 25 28  29 3a 62 25 28 29 3d 72  |g%()=r%():b%()=r|
0000e6b0  25 28 29 3a 62 69 67 65  6e 64 69 61 6e 62 69 74  |%():bigendianbit|
0000e6c0  73 3d b9 0d 45 7e 17 72  6f 77 62 79 74 65 73 25  |s=..E~.rowbytes%|
0000e6d0  3d 28 73 78 25 2b 37 29  81 38 0d 45 88 21 c9 20  |=(sx%+7).8.E.!. |
0000e6e0  35 3a 69 6e 70 75 74 3d  38 3a 72 24 3d 22 46 4e  |5:input=8:r$="FN|
0000e6f0  38 22 3a 45 25 3d bb a4  47 45 54 0d 45 92 31 e3  |8":E%=..GET.E.1.|
0000e700  43 25 3d 30 b8 45 25 3a  72 25 28 43 25 29 3d 43  |C%=0.E%:r%(C%)=C|
0000e710  25 2f 45 25 2a 46 3a ed  3a 67 25 28 29 3d 72 25  |%/E%*F:.:g%()=r%|
0000e720  28 29 3a 62 25 28 29 3d  72 25 28 29 0d 45 9c 11  |():b%()=r%().E..|
0000e730  72 6f 77 62 79 74 65 73  25 3d 73 78 25 0d 45 a6  |rowbytes%=sx%.E.|
0000e740  41 c9 20 36 3a 69 6e 70  75 74 3d 32 34 3a 72 24  |A. 6:input=24:r$|
0000e750  3d 22 46 4e 32 34 22 3a  45 25 3d bb a4 47 45 54  |="FN24":E%=..GET|
0000e760  3a 73 74 65 70 32 34 3d  33 3a 72 62 6f 25 3d 30  |:step24=3:rbo%=0|
0000e770  3a 67 62 6f 25 3d 31 3a  62 62 6f 25 3d 32 0d 45  |:gbo%=1:bbo%=2.E|
0000e780  b0 31 e3 43 25 3d 30 b8  45 25 3a 72 25 28 43 25  |.1.C%=0.E%:r%(C%|
0000e790  29 3d 43 25 2f 45 25 2a  46 3a ed 3a 67 25 28 29  |)=C%/E%*F:.:g%()|
0000e7a0  3d 72 25 28 29 3a 62 25  28 29 3d 72 25 28 29 0d  |=r%():b%()=r%().|
0000e7b0  45 ba 13 72 6f 77 62 79  74 65 73 25 3d 73 78 25  |E..rowbytes%=sx%|
0000e7c0  2a 33 0d 45 c4 05 cb 0d  45 ce 15 73 74 25 3d 8f  |*3.E....E..st%=.|
0000e7d0  23 63 25 3a 66 6c 61 67  3d 37 30 30 0d 45 d8 42  |#c%:flag=700.E.B|
0000e7e0  69 6e 66 6f 24 2b 3d 22  70 62 6d 20 69 6d 61 67  |info$+="pbm imag|
0000e7f0  65 2c 20 22 2b c3 73 78  25 2b 22 20 62 79 20 22  |e, "+.sx%+" by "|
0000e800  2b c3 73 79 25 2b 22 20  70 69 78 65 6c 73 2c 20  |+.sy%+" pixels, |
0000e810  22 2b a4 62 69 74 73 28  69 6e 70 75 74 29 0d 45  |"+.bits(input).E|
0000e820  e2 24 dd 20 a4 47 45 54  20 f5 73 24 3d be 23 63  |.$. .GET .s$=.#c|
0000e830  25 3a fd c0 73 24 2c 31  29 3c 3e 22 23 22 3a 3d  |%:..s$,1)<>"#":=|
0000e840  73 24 0d 45 ec 0a c9 20  33 34 30 30 0d 45 f6 24  |s$.E... 3400.E.$|
0000e850  cf 23 63 25 3d 30 3a 73  24 3d a4 47 45 54 3a 69  |.#c%=0:s$=.GET:i|
0000e860  6e 70 75 74 3d 31 36 3a  71 75 61 6e 74 25 3d 35  |nput=16:quant%=5|
0000e870  0d 46 00 2e 73 24 3d a4  47 45 54 3a 73 78 25 3d  |.F..s$=.GET:sx%=|
0000e880  bb 73 24 3a 73 79 25 3d  bb c1 73 24 2c a7 73 24  |.s$:sy%=..s$,.s$|
0000e890  2c 22 20 22 29 29 3a 73  24 3d a4 47 45 54 0d 46  |," ")):s$=.GET.F|
0000e8a0  0a 2d de 20 72 70 61 6c  25 28 32 35 35 29 2c 67  |.-. rpal%(255),g|
0000e8b0  70 61 6c 25 28 32 35 35  29 3a 69 6e 70 75 74 3d  |pal%(255):input=|
0000e8c0  31 36 3a 73 74 65 70 32  34 3d 32 0d 46 14 0d e3  |16:step24=2.F...|
0000e8d0  43 25 3d 30 b8 32 35 35  0d 46 1e 22 67 70 61 6c  |C%=0.255.F."gpal|
0000e8e0  25 28 43 25 29 3d 28 43  25 3e 3e 35 29 3c 3c 38  |%(C%)=(C%>>5)<<8|
0000e8f0  20 84 20 28 43 25 80 33  31 29 0d 46 28 2b 72 70  | . (C%.31).F(+rp|
0000e900  61 6c 25 28 43 25 29 3d  28 28 43 25 3e 3e 32 29  |al%(C%)=((C%>>2)|
0000e910  80 33 31 29 3c 3c 31 36  20 84 20 28 43 25 80 33  |.31)<<16 . (C%.3|
0000e920  29 3c 3c 31 31 0d 46 32  05 ed 0d 46 3c 16 63 61  |)<<11.F2...F<.ca|
0000e930  63 68 65 25 3d b9 3a 72  24 3d 22 46 4e 31 36 22  |che%=.:r$="FN16"|
0000e940  0d 46 46 31 e3 43 25 3d  30 b8 33 31 3a 72 25 28  |.FF1.C%=0.31:r%(|
0000e950  43 25 29 3d 43 25 2f 33  31 2a 46 3a ed 3a 67 25  |C%)=C%/31*F:.:g%|
0000e960  28 29 3d 72 25 28 29 3a  62 25 28 29 3d 72 25 28  |()=r%():b%()=r%(|
0000e970  29 0d 46 50 25 72 6f 77  62 79 74 65 73 25 3d 73  |).FP%rowbytes%=s|
0000e980  78 25 2a 32 3a 73 74 25  3d 8f 23 63 25 3a 66 6c  |x%*2:st%=.#c%:fl|
0000e990  61 67 3d 37 30 30 0d 46  5a 41 69 6e 66 6f 24 3d  |ag=700.FZAinfo$=|
0000e9a0  22 70 31 35 20 69 6d 61  67 65 2c 20 22 2b c3 73  |"p15 image, "+.s|
0000e9b0  78 25 2b 22 20 62 79 20  22 2b c3 73 79 25 2b 22  |x%+" by "+.sy%+"|
0000e9c0  20 70 69 78 65 6c 73 2c  20 22 2b a4 62 69 74 73  | pixels, "+.bits|
0000e9d0  28 69 6e 70 75 74 29 0d  46 64 0a c9 20 33 34 35  |(input).Fd.. 345|
0000e9e0  30 0d 46 6e 15 cf 23 63  25 3d 30 3a 69 6e 66 6f  |0.Fn..#c%=0:info|
0000e9f0  24 3d a4 47 45 54 0d 46  78 33 79 62 69 74 73 25  |$=.GET.Fx3ybits%|
0000ea00  3d bb c1 69 6e 66 6f 24  2c a7 69 6e 66 6f 24 2c  |=..info$,.info$,|
0000ea10  22 20 22 29 29 3a 79 6d  61 78 25 3d 28 31 3c 3c  |" ")):ymax%=(1<<|
0000ea20  79 62 69 74 73 25 29 2d  31 0d 46 82 3a 75 62 69  |ybits%)-1.F.:ubi|
0000ea30  74 73 25 3d bb c1 69 6e  66 6f 24 2c a7 69 6e 66  |ts%=..info$,.inf|
0000ea40  6f 24 2c 22 59 20 22 29  2b 31 29 3a 75 6d 61 78  |o$,"Y ")+1):umax|
0000ea50  25 3d 28 31 3c 3c 28 75  62 69 74 73 25 2d 31 29  |%=(1<<(ubits%-1)|
0000ea60  29 2d 31 0d 46 8c 3a 76  62 69 74 73 25 3d bb c1  |)-1.F.:vbits%=..|
0000ea70  69 6e 66 6f 24 2c a7 69  6e 66 6f 24 2c 22 55 20  |info$,.info$,"U |
0000ea80  22 29 2b 31 29 3a 76 6d  61 78 25 3d 28 31 3c 3c  |")+1):vmax%=(1<<|
0000ea90  28 76 62 69 74 73 25 2d  31 29 29 2d 31 0d 46 96  |(vbits%-1))-1.F.|
0000eaa0  26 73 24 3d a4 47 45 54  3a 73 78 25 3d bb 73 24  |&s$=.GET:sx%=.s$|
0000eab0  3a 73 79 25 3d bb c1 73  24 2c a7 73 24 2c 22 20  |:sy%=..s$,.s$," |
0000eac0  22 29 29 0d 46 a0 32 de  20 72 70 61 6c 25 28 32  |")).F.2. rpal%(2|
0000ead0  35 35 29 2c 67 70 61 6c  25 28 32 35 35 29 2c 62  |55),gpal%(255),b|
0000eae0  70 61 6c 25 28 32 35 35  29 2c 74 61 62 6c 65 25  |pal%(255),table%|
0000eaf0  28 32 35 35 29 0d 46 aa  27 e3 43 25 3d 30 b8 79  |(255).F.'.C%=0.y|
0000eb00  6d 61 78 25 3a 74 61 62  6c 65 25 28 43 25 29 3d  |max%:table%(C%)=|
0000eb10  43 25 2f 79 6d 61 78 25  2a 46 3a ed 0d 46 b4 14  |C%/ymax%*F:..F..|
0000eb20  44 25 3d 28 31 3c 3c 75  62 69 74 73 25 29 2d 31  |D%=(1<<ubits%)-1|
0000eb30  0d 46 be 2d e3 43 25 3d  30 b8 44 25 3a 64 3d 43  |.F.-.C%=0.D%:d=C|
0000eb40  25 2f 75 6d 61 78 25 3a  e7 64 3e 31 20 64 3d 2d  |%/umax%:.d>1 d=-|
0000eb50  28 44 25 2d 43 25 29 2f  75 6d 61 78 25 0d 46 c8  |(D%-C%)/umax%.F.|
0000eb60  3b 62 25 28 43 25 29 3d  a8 28 64 2a 28 31 2d 62  |;b%(C%)=.(d*(1-b|
0000eb70  77 74 29 2a 46 29 3a 67  70 61 6c 25 28 43 25 29  |wt)*F):gpal%(C%)|
0000eb80  3d a8 28 2d 64 2a 28 31  2d 62 77 74 29 2a 62 77  |=.(-d*(1-bwt)*bw|
0000eb90  74 2f 67 77 74 2a 46 29  0d 46 d2 05 ed 0d 46 dc  |t/gwt*F).F....F.|
0000eba0  14 44 25 3d 28 31 3c 3c  76 62 69 74 73 25 29 2d  |.D%=(1<<vbits%)-|
0000ebb0  31 0d 46 e6 2d e3 43 25  3d 30 b8 44 25 3a 64 3d  |1.F.-.C%=0.D%:d=|
0000ebc0  43 25 2f 76 6d 61 78 25  3a e7 64 3e 31 20 64 3d  |C%/vmax%:.d>1 d=|
0000ebd0  2d 28 44 25 2d 43 25 29  2f 76 6d 61 78 25 0d 46  |-(D%-C%)/vmax%.F|
0000ebe0  f0 38 72 25 28 43 25 29  3d a8 28 64 2a 28 31 2d  |.8r%(C%)=.(d*(1-|
0000ebf0  72 77 74 29 2a 46 29 3a  67 25 28 43 25 29 3d a8  |rwt)*F):g%(C%)=.|
0000ec00  28 2d 64 2a 28 31 2d 72  77 74 29 2a 72 77 74 2f  |(-d*(1-rwt)*rwt/|
0000ec10  67 77 74 2a 46 29 0d 46  fa 05 ed 0d 47 04 3b 72  |gwt*F).F....G.;r|
0000ec20  6f 77 62 79 74 65 73 25  3d 73 78 25 2a 32 3a 73  |owbytes%=sx%*2:s|
0000ec30  74 25 3d 8f 23 63 25 3a  63 61 63 68 65 25 3d b9  |t%=.#c%:cache%=.|
0000ec40  3a 72 24 3d 22 46 4e 32  32 35 30 22 3a 69 6e 70  |:r$="FN2250":inp|
0000ec50  75 74 3d 35 35 35 0d 47  0e 2a 69 6e 66 6f 24 2b  |ut=555.G.*info$+|
0000ec60  3d 22 2c 20 22 2b c3 73  78 25 2b 22 20 62 79 20  |=", "+.sx%+" by |
0000ec70  22 2b c3 73 79 25 2b 22  20 70 69 78 65 6c 73 22  |"+.sy%+" pixels"|
0000ec80  0d 47 18 0a c9 20 33 35  30 30 0d 47 22 41 71 75  |.G... 3500.G"Aqu|
0000ec90  61 6e 74 25 3d 31 3a cf  23 63 25 3d 36 3a 45 25  |ant%=1:.#c%=6:E%|
0000eca0  3d a4 48 57 3a 73 78 25  3d a4 48 57 3a 73 78 25  |=.HW:sx%=.HW:sx%|
0000ecb0  3d a4 48 57 3a 73 79 25  3d a4 48 57 3a 73 74 25  |=.HW:sy%=.HW:st%|
0000ecc0  3d a4 48 57 3a 73 74 25  3d a4 57 0d 47 2c 34 72  |=.HW:st%=.W.G,4r|
0000ecd0  6f 77 62 79 74 65 73 25  3d 73 78 25 2f 38 2b 31  |owbytes%=sx%/8+1|
0000ece0  80 ac 31 3a 63 61 63 68  65 25 3d b9 3a 73 74 25  |..1:cache%=.:st%|
0000ecf0  2b 3d 8f 23 63 25 3a cf  23 63 25 3d 73 74 25 0d  |+=.#c%:.#c%=st%.|
0000ed00  47 36 0b c8 8e 20 45 25  20 ca 0d 47 40 07 c9 20  |G6... E% ..G@.. |
0000ed10  31 0d 47 4a 2c 72 24 3d  22 46 4e 38 22 3a 69 6e  |1.GJ,r$="FN8":in|
0000ed20  70 75 74 3d 31 3a 72 25  28 30 29 3d 46 3a 67 25  |put=1:r%(0)=F:g%|
0000ed30  28 30 29 3d 46 3a 62 25  28 30 29 3d 46 0d 47 54  |(0)=F:b%(0)=F.GT|
0000ed40  4b 69 6e 66 6f 24 3d 22  50 6f 63 6b 65 74 62 6f  |Kinfo$="Pocketbo|
0000ed50  6f 6b 20 62 69 74 6d 61  70 2c 20 22 2b c3 73 78  |ok bitmap, "+.sx|
0000ed60  25 2b 22 20 62 79 20 22  2b c3 73 79 25 2b 22 20  |%+" by "+.sy%+" |
0000ed70  70 69 78 65 6c 73 2c 20  31 20 62 69 74 20 70 65  |pixels, 1 bit pe|
0000ed80  72 20 70 69 78 65 6c 22  0d 47 5e 07 c9 20 32 0d  |r pixel".G^.. 2.|
0000ed90  47 68 39 70 6c 61 6e 61  72 25 3d b9 3a 70 6c 61  |Gh9planar%=.:pla|
0000eda0  6e 65 73 25 3d 32 3a 72  24 3d 22 46 4e 31 36 30  |nes%=2:r$="FN160|
0000edb0  30 22 3a 69 6e 70 75 74  3d 38 3a 63 61 63 68 65  |0":input=8:cache|
0000edc0  62 79 74 65 73 25 3d b9  0d 47 72 3f 72 25 28 30  |bytes%=..Gr?r%(0|
0000edd0  29 3d 46 3a 72 25 28 31  29 3d 28 46 2f 33 29 2a  |)=F:r%(1)=(F/3)*|
0000ede0  32 3a 72 25 28 32 29 3d  46 2f 33 3a 72 25 28 33  |2:r%(2)=F/3:r%(3|
0000edf0  29 3d 30 3a 67 25 28 29  3d 72 25 28 29 3a 62 25  |)=0:g%()=r%():b%|
0000ee00  28 29 3d 72 25 28 29 0d  47 7c 48 70 6c 62 79 74  |()=r%().G|Hplbyt|
0000ee10  65 73 25 3d 72 6f 77 62  79 74 65 73 25 2a 70 6c  |es%=rowbytes%*pl|
0000ee20  61 6e 65 73 25 3a 62 75  66 66 25 3d a4 64 69 6d  |anes%:buff%=.dim|
0000ee30  28 70 6c 62 79 74 65 73  25 2a 73 79 25 29 3a 70  |(plbytes%*sy%):p|
0000ee40  62 75 66 66 25 3d a4 64  69 6d 28 73 78 25 29 0d  |buff%=.dim(sx%).|
0000ee50  47 86 1f 72 65 61 6c 72  6f 77 62 79 74 65 73 25  |G..realrowbytes%|
0000ee60  3d 72 6f 77 62 79 74 65  73 25 2a 73 79 25 0d 47  |=rowbytes%*sy%.G|
0000ee70  90 4e 69 6e 66 6f 24 3d  22 50 6f 63 6b 65 74 62  |.Ninfo$="Pocketb|
0000ee80  6f 6f 6b 49 49 20 62 69  74 6d 61 70 2c 20 22 2b  |ookII bitmap, "+|
0000ee90  c3 73 78 25 2b 22 20 62  79 20 22 2b c3 73 79 25  |.sx%+" by "+.sy%|
0000eea0  2b 22 20 70 69 78 65 6c  73 2c 20 32 20 62 69 74  |+" pixels, 2 bit|
0000eeb0  73 20 70 65 72 20 70 69  78 65 6c 22 0d 47 9a 05  |s per pixel".G..|
0000eec0  7f 0d 47 a4 28 85 20 34  32 2c 22 55 6e 6b 6e 6f  |..G.(. 42,"Unkno|
0000eed0  77 6e 20 50 6f 63 6b 65  74 62 6f 6f 6b 20 50 49  |wn Pocketbook PI|
0000eee0  43 20 66 6f 72 6d 61 74  22 0d 47 ae 05 cb 0d 47  |C format".G....G|
0000eef0  b8 0a c9 20 33 36 30 30  0d 47 c2 42 70 63 64 62  |... 3600.G.Bpcdb|
0000ef00  6c 6b 25 3d a4 64 69 6d  28 34 30 29 3a c8 99 26  |lk%=.dim(40):..&|
0000ef10  32 30 30 32 33 2c 22 43  68 61 6e 67 65 46 53 49  |20023,"ChangeFSI|
0000ef20  24 50 43 44 69 6e 64 65  78 22 2c 70 63 64 62 6c  |$PCDindex",pcdbl|
0000ef30  6b 25 2c 32 30 20 b8 2c  2c 5a 0d 47 cc 35 e7 5a  |k%,20 .,,Z.G.5.Z|
0000ef40  20 8c 70 63 64 62 6c 6b  25 3f 5a 3d 31 33 3a 70  | .pcdblk%?Z=13:p|
0000ef50  63 64 69 6e 64 65 78 25  3d bb 24 70 63 64 62 6c  |cdindex%=.$pcdbl|
0000ef60  6b 25 20 8b 70 63 64 69  6e 64 65 78 25 3d 33 0d  |k% .pcdindex%=3.|
0000ef70  47 d6 42 c8 99 22 50 68  6f 74 6f 43 44 5f 4f 70  |G.B.."PhotoCD_Op|
0000ef80  65 6e 22 2c 31 2c 63 25  2c 31 20 b8 20 70 63 64  |en",1,c%,1 . pcd|
0000ef90  68 25 3a c8 99 22 50 68  6f 74 6f 43 44 5f 47 65  |h%:.."PhotoCD_Ge|
0000efa0  74 43 6f 75 6e 74 22 2c  70 63 64 68 25 20 b8 2c  |tCount",pcdh% .,|
0000efb0  5a 0d 47 e0 3f e7 28 5a  3e 3e 70 63 64 69 6e 64  |Z.G.?.(Z>>pcdind|
0000efc0  65 78 25 29 3d 30 20 d9  23 63 25 3a 85 34 32 2c  |ex%)=0 .#c%:.42,|
0000efd0  22 44 65 73 69 72 65 64  20 72 65 73 6f 6c 75 74  |"Desired resolut|
0000efe0  69 6f 6e 20 75 6e 61 76  61 69 6c 61 62 6c 65 22  |ion unavailable"|
0000eff0  0d 47 ea 2b c8 99 22 50  68 6f 74 6f 43 44 5f 47  |.G.+.."PhotoCD_G|
0000f000  65 74 52 6f 74 61 74 69  6f 6e 22 2c 70 63 64 68  |etRotation",pcdh|
0000f010  25 20 b8 2c 2c 70 63 64  74 72 25 0d 47 f4 35 c8  |% .,,pcdtr%.G.5.|
0000f020  99 22 50 68 6f 74 6f 43  44 5f 47 65 74 53 69 7a  |."PhotoCD_GetSiz|
0000f030  65 22 2c 70 63 64 68 25  2c 2c 70 63 64 69 6e 64  |e",pcdh%,,pcdind|
0000f040  65 78 25 20 b8 2c 2c 2c  2c 73 78 25 2c 73 79 25  |ex% .,,,,sx%,sy%|
0000f050  0d 47 fe 29 70 63 64 62  6c 6b 25 21 30 3d 30 3a  |.G.)pcdblk%!0=0:|
0000f060  70 63 64 62 6c 6b 25 21  38 3d 73 78 25 3a 70 63  |pcdblk%!8=sx%:pc|
0000f070  64 62 6c 6b 25 21 34 3d  30 0d 48 08 37 70 63 64  |dblk%!4=0.H.7pcd|
0000f080  62 6c 6b 25 21 31 36 3d  30 3a 70 63 64 62 6c 6b  |blk%!16=0:pcdblk|
0000f090  25 21 32 30 3d 32 3a 70  63 64 62 6c 6b 25 21 32  |%!20=2:pcdblk%!2|
0000f0a0  34 3d 31 3a 70 63 64 62  6c 6b 25 21 32 38 3d 33  |4=1:pcdblk%!28=3|
0000f0b0  0d 48 1c 0f c8 8e 20 70  63 64 74 72 25 20 ca 0d  |.H.... pcdtr% ..|
0000f0c0  48 26 07 c9 20 30 0d 48  30 1e c9 20 26 38 30 30  |H&.. 0.H0.. &800|
0000f0d0  30 30 30 30 30 3a 68 66  6c 69 70 25 3d ac 68 66  |00000:hflip%=.hf|
0000f0e0  6c 69 70 25 0d 48 3a 08  c9 20 39 30 0d 48 44 10  |lip%.H:.. 90.HD.|
0000f0f0  c8 8e 20 72 6f 74 61 74  65 25 20 ca 0d 48 4e 11  |.. rotate% ..HN.|
0000f100  c9 20 30 3a 72 6f 74 61  74 65 25 3d 31 0d 48 58  |. 0:rotate%=1.HX|
0000f110  12 c9 20 2d 31 3a 72 6f  74 61 74 65 25 3d 30 0d  |.. -1:rotate%=0.|
0000f120  48 62 2f c9 20 31 3a 72  6f 74 61 74 65 25 3d 30  |Hb/. 1:rotate%=0|
0000f130  3a 76 66 6c 69 70 25 3d  ac 76 66 6c 69 70 25 3a  |:vflip%=.vflip%:|
0000f140  68 66 6c 69 70 25 3d ac  68 66 6c 69 70 25 0d 48  |hflip%=.hflip%.H|
0000f150  6c 05 cb 0d 48 76 0f c9  20 26 38 30 30 30 30 30  |l...Hv.. &800000|
0000f160  35 41 0d 48 80 10 c8 8e  20 72 6f 74 61 74 65 25  |5A.H.... rotate%|
0000f170  20 ca 0d 48 8a 20 c9 20  30 3a 72 6f 74 61 74 65  | ..H. . 0:rotate|
0000f180  25 3d 31 3a 76 66 6c 69  70 25 3d ac 76 66 6c 69  |%=1:vflip%=.vfli|
0000f190  70 25 0d 48 94 21 c9 20  2d 31 3a 72 6f 74 61 74  |p%.H.!. -1:rotat|
0000f1a0  65 25 3d 30 3a 76 66 6c  69 70 25 3d ac 76 66 6c  |e%=0:vflip%=.vfl|
0000f1b0  69 70 25 0d 48 9e 20 c9  20 31 3a 72 6f 74 61 74  |ip%.H. . 1:rotat|
0000f1c0  65 25 3d 30 3a 68 66 6c  69 70 25 3d ac 68 66 6c  |e%=0:hflip%=.hfl|
0000f1d0  69 70 25 0d 48 a8 05 cb  0d 48 b2 27 c9 20 31 38  |ip%.H....H.'. 18|
0000f1e0  30 3a 68 66 6c 69 70 25  3d ac 68 66 6c 69 70 25  |0:hflip%=.hflip%|
0000f1f0  3a 76 66 6c 69 70 25 3d  ac 76 66 6c 69 70 25 0d  |:vflip%=.vflip%.|
0000f200  48 bc 1e c9 20 26 38 30  30 30 30 30 42 34 3a 76  |H... &800000B4:v|
0000f210  66 6c 69 70 25 3d ac 76  66 6c 69 70 25 0d 48 c6  |flip%=.vflip%.H.|
0000f220  09 c9 20 32 37 30 0d 48  d0 10 c8 8e 20 72 6f 74  |.. 270.H.... rot|
0000f230  61 74 65 25 20 ca 0d 48  da 12 c9 20 30 3a 72 6f  |ate% ..H... 0:ro|
0000f240  74 61 74 65 25 3d 2d 31  0d 48 e4 11 c9 20 31 3a  |tate%=-1.H... 1:|
0000f250  72 6f 74 61 74 65 25 3d  30 0d 48 ee 30 c9 20 2d  |rotate%=0.H.0. -|
0000f260  31 3a 72 6f 74 61 74 65  25 3d 30 3a 76 66 6c 69  |1:rotate%=0:vfli|
0000f270  70 25 3d ac 76 66 6c 69  70 25 3a 68 66 6c 69 70  |p%=.vflip%:hflip|
0000f280  25 3d ac 68 66 6c 69 70  25 0d 48 f8 05 cb 0d 49  |%=.hflip%.H....I|
0000f290  02 0f c9 20 26 38 30 30  30 30 31 30 45 0d 49 0c  |... &8000010E.I.|
0000f2a0  10 c8 8e 20 72 6f 74 61  74 65 25 20 ca 0d 49 16  |... rotate% ..I.|
0000f2b0  21 c9 20 30 3a 72 6f 74  61 74 65 25 3d 2d 31 3a  |!. 0:rotate%=-1:|
0000f2c0  76 66 6c 69 70 25 3d ac  76 66 6c 69 70 25 0d 49  |vflip%=.vflip%.I|
0000f2d0  20 20 c9 20 31 3a 72 6f  74 61 74 65 25 3d 30 3a  |  . 1:rotate%=0:|
0000f2e0  76 66 6c 69 70 25 3d ac  76 66 6c 69 70 25 0d 49  |vflip%=.vflip%.I|
0000f2f0  2a 21 c9 20 2d 31 3a 72  6f 74 61 74 65 25 3d 30  |*!. -1:rotate%=0|
0000f300  3a 68 66 6c 69 70 25 3d  ac 68 66 6c 69 70 25 0d  |:hflip%=.hflip%.|
0000f310  49 34 05 cb 0d 49 3e 0b  7f 20 50 41 4e 49 43 0d  |I4...I>.. PANIC.|
0000f320  49 48 05 cb 0d 49 5c 40  69 6e 70 75 74 3d 32 34  |IH...I\@input=24|
0000f330  3a 73 74 65 70 32 34 3d  33 3a 72 62 6f 25 3d 30  |:step24=3:rbo%=0|
0000f340  3a 67 62 6f 25 3d 31 3a  62 62 6f 25 3d 32 3a 70  |:gbo%=1:bbo%=2:p|
0000f350  63 64 63 61 63 68 65 73  69 7a 65 25 3d 33 32 2a  |cdcachesize%=32*|
0000f360  31 30 32 34 0d 49 66 41  72 6f 77 62 79 74 65 73  |1024.IfArowbytes|
0000f370  25 3d 73 78 25 2a 33 3a  f2 6e 6f 70 61 6c 3a 63  |%=sx%*3:.nopal:c|
0000f380  61 63 68 65 25 3d b9 3a  70 63 64 63 61 63 68 65  |ache%=.:pcdcache|
0000f390  25 3d a4 64 69 6d 28 70  63 64 63 61 63 68 65 73  |%=.dim(pcdcaches|
0000f3a0  69 7a 65 25 29 0d 49 70  49 69 6e 66 6f 24 3d 22  |ize%).IpIinfo$="|
0000f3b0  50 68 6f 74 6f 43 44 20  69 6d 61 67 65 2c 20 22  |PhotoCD image, "|
0000f3c0  2b c3 73 78 25 2b 22 20  62 79 20 22 2b c3 73 79  |+.sx%+" by "+.sy|
0000f3d0  25 2b 22 20 70 69 78 65  6c 73 2c 20 32 34 20 62  |%+" pixels, 24 b|
0000f3e0  69 74 73 20 70 65 72 20  70 69 78 65 6c 22 0d 49  |its per pixel".I|
0000f3f0  7a 0a c9 20 33 37 30 30  0d 49 84 33 41 25 3d 8e  |z.. 3700.I.3A%=.|
0000f400  22 3c 43 68 61 6e 67 65  46 53 49 24 44 69 72 3e  |"<ChangeFSI$Dir>|
0000f410  2e 43 46 53 49 6a 70 65  67 22 3a 6a 70 65 67 25  |.CFSIjpeg":jpeg%|
0000f420  3d a4 64 69 6d 28 a2 23  41 25 29 0d 49 8e 1d c8  |=.dim(.#A%).I...|
0000f430  99 31 32 2c 34 2c 41 25  2c 6a 70 65 67 25 2c a2  |.12,4,A%,jpeg%,.|
0000f440  23 41 25 3a d9 23 41 25  0d 49 98 43 64 61 74 61  |#A%:.#A%.I.Cdata|
0000f450  63 61 63 68 65 25 3d a4  63 61 63 68 65 64 69 6d  |cache%=.cachedim|
0000f460  28 a2 23 63 25 29 3a e7  64 61 74 61 63 61 63 68  |(.#c%):.datacach|
0000f470  65 25 3d 2d 31 20 64 61  74 61 63 61 63 68 65 25  |e%=-1 datacache%|
0000f480  3d a4 64 69 6d 28 a2 23  63 25 29 0d 49 a2 24 cf  |=.dim(.#c%).I.$.|
0000f490  23 63 25 3d 30 3a c8 99  31 32 2c 34 2c 63 25 2c  |#c%=0:..12,4,c%,|
0000f4a0  64 61 74 61 63 61 63 68  65 25 2c a2 23 63 25 0d  |datacache%,.#c%.|
0000f4b0  49 ac 51 41 25 3d 64 61  74 61 63 61 63 68 65 25  |I.QA%=datacache%|
0000f4c0  3a 42 25 3d 6a 70 65 67  62 6c 6b 25 3a 43 25 3d  |:B%=jpegblk%:C%=|
0000f4d0  6a 70 65 67 62 6c 6b 25  2b 34 3a 44 25 3d 6a 70  |jpegblk%+4:D%=jp|
0000f4e0  65 67 62 6c 6b 25 2b 38  3a 45 25 3d 6a 70 65 67  |egblk%+8:E%=jpeg|
0000f4f0  62 6c 6b 25 2b 31 32 3a  d6 6a 70 65 67 25 2b 38  |blk%+12:.jpeg%+8|
0000f500  0d 49 b6 26 42 25 3d 6a  70 65 67 62 6c 6b 25 21  |.I.&B%=jpegblk%!|
0000f510  31 32 3a 6a 70 65 67 73  70 61 63 65 25 3d a4 64  |12:jpegspace%=.d|
0000f520  69 6d 28 42 25 29 0d 49  c0 27 43 25 3d 64 61 74  |im(B%).I.'C%=dat|
0000f530  61 63 61 63 68 65 25 3a  41 25 3d 6a 70 65 67 73  |acache%:A%=jpegs|
0000f540  70 61 63 65 25 3a 44 25  3d a2 23 63 25 0d 49 ca  |pace%:D%=.#c%.I.|
0000f550  35 d6 6a 70 65 67 25 3a  63 61 63 68 65 25 3d a3  |5.jpeg%:cache%=.|
0000f560  3a e7 21 41 25 20 85 34  32 2c 22 4a 50 45 47 20  |:.!A% .42,"JPEG |
0000f570  63 6f 64 65 20 65 72 72  6f 72 3a 20 22 2b c3 21  |code error: "+.!|
0000f580  41 25 0d 49 d4 35 73 78  25 3d 41 25 21 32 30 3a  |A%.I.5sx%=A%!20:|
0000f590  73 79 25 3d 41 25 21 32  34 3a 69 6e 70 75 74 3d  |sy%=A%!24:input=|
0000f5a0  38 2a 41 25 3f 32 38 3a  f2 6e 6f 70 61 6c 3a 73  |8*A%?28:.nopal:s|
0000f5b0  74 65 70 32 34 3d 34 0d  49 de 42 69 6e 66 6f 24  |tep24=4.I.Binfo$|
0000f5c0  3d 22 4a 46 49 46 20 69  6d 61 67 65 2c 20 22 2b  |="JFIF image, "+|
0000f5d0  c3 73 78 25 2b 22 20 62  79 20 22 2b c3 73 79 25  |.sx%+" by "+.sy%|
0000f5e0  2b 22 20 70 69 78 65 6c  73 2c 20 22 2b a4 62 69  |+" pixels, "+.bi|
0000f5f0  74 73 28 69 6e 70 75 74  29 0d 49 e8 25 6a 70 65  |ts(input).I.%jpe|
0000f600  67 79 25 3d 73 79 25 3a  72 24 3d 22 46 4e 22 2b  |gy%=sy%:r$="FN"+|
0000f610  c3 a8 28 33 37 30 30 2b  69 6e 70 75 74 29 0d 49  |..(3700+input).I|
0000f620  f2 0a c9 20 33 38 30 30  0d 49 fc 19 cf 23 63 25  |... 3800.I...#c%|
0000f630  3d 32 34 3a 73 78 25 3d  a4 57 3a 73 79 25 3d a4  |=24:sx%=.W:sy%=.|
0000f640  57 0d 4a 06 19 e7 73 63  61 6c 65 25 20 79 6d 75  |W.J...scale% ymu|
0000f650  6c 25 3d 79 6d 75 6c 25  2a 32 0d 4a 10 32 de 20  |l%=ymul%*2.J.2. |
0000f660  72 70 61 6c 25 28 32 35  35 29 2c 67 70 61 6c 25  |rpal%(255),gpal%|
0000f670  28 32 35 35 29 2c 62 70  61 6c 25 28 32 35 35 29  |(255),bpal%(255)|
0000f680  2c 74 61 62 6c 65 25 28  32 35 35 29 0d 4a 1a 0d  |,table%(255).J..|
0000f690  e3 43 25 3d 30 b8 32 35  35 0d 4a 24 1f e7 43 25  |.C%=0.255.J$..C%|
0000f6a0  3c 31 32 38 20 74 61 62  6c 65 25 28 43 25 29 3d  |<128 table%(C%)=|
0000f6b0  43 25 2f 31 32 37 2a 46  0d 4a 2e 19 44 25 3d 43  |C%/127*F.J..D%=C|
0000f6c0  25 3a e7 44 25 80 31 32  38 20 44 25 2d 3d 32 35  |%:.D%.128 D%-=25|
0000f6d0  36 0d 4a 38 29 72 25 28  43 25 29 3d a8 28 44 25  |6.J8)r%(C%)=.(D%|
0000f6e0  2f 31 36 30 2a 46 29 3a  62 25 28 43 25 29 3d a8  |/160*F):b%(C%)=.|
0000f6f0  28 44 25 2f 31 32 36 2a  46 29 0d 4a 42 3e 67 25  |(D%/126*F).JB>g%|
0000f700  28 43 25 29 3d a8 28 2d  44 25 2f 31 36 30 2a 72  |(C%)=.(-D%/160*r|
0000f710  77 74 2f 67 77 74 2a 46  29 3a 67 70 61 6c 25 28  |wt/gwt*F):gpal%(|
0000f720  43 25 29 3d a8 28 2d 44  25 2f 31 32 36 2a 62 77  |C%)=.(-D%/126*bw|
0000f730  74 2f 67 77 74 2a 46 29  0d 4a 4c 05 ed 0d 4a 60  |t/gwt*F).JL...J`|
0000f740  3d cf 23 63 25 3d 35 32  3a 73 74 25 3d a4 57 3a  |=.#c%=52:st%=.W:|
0000f750  cf 23 63 25 3d 36 34 3a  63 61 63 68 65 25 3d b9  |.#c%=64:cache%=.|
0000f760  3a 72 6f 77 62 79 74 65  73 25 3d 32 2a 73 78 25  |:rowbytes%=2*sx%|
0000f770  3a 69 6e 70 75 74 3d 34  31 31 0d 4a 6a 46 69 6e  |:input=411.JjFin|
0000f780  66 6f 24 3d 22 55 6e 63  6f 6d 70 72 65 73 73 65  |fo$="Uncompresse|
0000f790  64 20 54 65 63 68 6e 6f  2d 49 20 59 55 56 20 66  |d Techno-I YUV f|
0000f7a0  69 6c 65 20 22 2b c3 73  78 25 2b 22 20 62 79 20  |ile "+.sx%+" by |
0000f7b0  22 2b c3 73 79 25 2b 22  20 70 69 78 65 6c 73 22  |"+.sy%+" pixels"|
0000f7c0  0d 4a 74 0a c9 20 33 39  30 30 0d 4a 7e 32 cf 23  |.Jt.. 3900.J~2.#|
0000f7d0  63 25 3d 38 3a 73 78 25  3d a4 57 3a 73 79 25 3d  |c%=8:sx%=.W:sy%=|
0000f7e0  a4 57 3a 73 74 25 3d 31  36 3a 71 75 61 6e 74 25  |.W:st%=16:quant%|
0000f7f0  3d 31 32 3a 73 74 65 70  32 34 3d 36 0d 4a 88 35  |=12:step24=6.J.5|
0000f800  e3 43 25 3d 30 b8 34 30  39 35 3a 72 25 28 43 25  |.C%=0.4095:r%(C%|
0000f810  29 3d 43 25 2f 34 30 39  35 2a 46 3a ed 3a 67 25  |)=C%/4095*F:.:g%|
0000f820  28 29 3d 72 25 28 29 3a  62 25 28 29 3d 72 25 28  |()=r%():b%()=r%(|
0000f830  29 0d 4a 92 44 69 6e 70  75 74 3d 34 38 3a 72 6f  |).J.Dinput=48:ro|
0000f840  77 62 79 74 65 73 25 3d  73 78 25 2a 36 3a 63 61  |wbytes%=sx%*6:ca|
0000f850  63 68 65 25 3d b9 3a 72  24 3d 22 46 4e 32 34 22  |che%=.:r$="FN24"|
0000f860  3a 72 62 6f 25 3d 30 3a  67 62 6f 25 3d 32 3a 62  |:rbo%=0:gbo%=2:b|
0000f870  62 6f 25 3d 34 0d 4a 9c  50 69 6e 66 6f 24 3d 22  |bo%=4.J.Pinfo$="|
0000f880  52 6f 6e 61 6c 64 20 41  6c 70 69 61 72 20 66 6f  |Ronald Alpiar fo|
0000f890  72 6d 61 74 2c 20 22 2b  c3 73 78 25 2b 22 20 62  |rmat, "+.sx%+" b|
0000f8a0  79 20 22 2b c3 73 79 25  2b 22 20 70 69 78 65 6c  |y "+.sy%+" pixel|
0000f8b0  73 2c 20 33 36 20 62 69  74 73 20 70 65 72 20 70  |s, 36 bits per p|
0000f8c0  69 78 65 6c 22 0d 4a a6  0a c9 20 33 39 30 35 0d  |ixel".J... 3905.|
0000f8d0  4a b0 32 cf 23 63 25 3d  38 3a 73 78 25 3d a4 57  |J.2.#c%=8:sx%=.W|
0000f8e0  3a 73 79 25 3d a4 57 3a  73 74 25 3d 31 36 3a 71  |:sy%=.W:st%=16:q|
0000f8f0  75 61 6e 74 25 3d 31 36  3a 73 74 65 70 32 34 3d  |uant%=16:step24=|
0000f900  36 0d 4a ba 37 e3 43 25  3d 30 b8 36 35 35 33 35  |6.J.7.C%=0.65535|
0000f910  3a 72 25 28 43 25 29 3d  43 25 2f 36 35 35 33 35  |:r%(C%)=C%/65535|
0000f920  2a 46 3a ed 3a 67 25 28  29 3d 72 25 28 29 3a 62  |*F:.:g%()=r%():b|
0000f930  25 28 29 3d 72 25 28 29  0d 4a c4 44 69 6e 70 75  |%()=r%().J.Dinpu|
0000f940  74 3d 34 38 3a 72 6f 77  62 79 74 65 73 25 3d 73  |t=48:rowbytes%=s|
0000f950  78 25 2a 36 3a 63 61 63  68 65 25 3d b9 3a 72 24  |x%*6:cache%=.:r$|
0000f960  3d 22 46 4e 32 34 22 3a  72 62 6f 25 3d 30 3a 67  |="FN24":rbo%=0:g|
0000f970  62 6f 25 3d 32 3a 62 62  6f 25 3d 34 0d 4a ce 50  |bo%=2:bbo%=4.J.P|
0000f980  69 6e 66 6f 24 3d 22 52  6f 6e 61 6c 64 20 41 6c  |info$="Ronald Al|
0000f990  70 69 61 72 20 66 6f 72  6d 61 74 2c 20 22 2b c3  |piar format, "+.|
0000f9a0  73 78 25 2b 22 20 62 79  20 22 2b c3 73 79 25 2b  |sx%+" by "+.sy%+|
0000f9b0  22 20 70 69 78 65 6c 73  2c 20 34 38 20 62 69 74  |" pixels, 48 bit|
0000f9c0  73 20 70 65 72 20 70 69  78 65 6c 22 0d 4a d8 09  |s per pixel".J..|
0000f9d0  c9 20 36 36 36 0d 4b 46  3f 73 74 25 3d 30 3a cf  |. 666.KF?st%=0:.|
0000f9e0  23 63 25 3d 30 3a 73 78  25 3d 31 36 30 3a 73 79  |#c%=0:sx%=160:sy|
0000f9f0  25 3d 31 32 38 3a 69 6e  70 75 74 3d 38 3a 63 61  |%=128:input=8:ca|
0000fa00  63 68 65 25 3d b9 3a 72  6f 77 62 79 74 65 73 25  |che%=.:rowbytes%|
0000fa10  3d 73 78 25 0d 4b 50 3c  e3 43 25 3d 30 b8 32 35  |=sx%.KP<.C%=0.25|
0000fa20  35 3a 72 25 28 43 25 29  3d 43 25 2f 32 35 35 2a  |5:r%(C%)=C%/255*|
0000fa30  46 3a ed 3a 67 25 28 29  3d 72 25 28 29 3a 62 25  |F:.:g%()=r%():b%|
0000fa40  28 29 3d 72 25 28 29 3a  72 24 3d 22 46 4e 38 22  |()=r%():r$="FN8"|
0000fa50  0d 4b 5a 4d 69 6e 66 6f  24 3d 22 54 68 65 20 6e  |.KZMinfo$="The n|
0000fa60  75 6d 62 65 72 20 6f 66  20 74 68 65 20 62 65 61  |umber of the bea|
0000fa70  73 74 2c 20 31 36 30 20  62 79 20 22 2b c3 73 79  |st, 160 by "+.sy|
0000fa80  25 2b 22 20 70 69 78 65  6c 73 2c 20 38 20 62 69  |%+" pixels, 8 bi|
0000fa90  74 73 20 70 65 72 20 70  69 78 65 6c 22 0d 4b 64  |ts per pixel".Kd|
0000faa0  05 cb 0d 4b 6e 11 e7 69  6e 66 6f 25 20 f1 69 6e  |...Kn..info% .in|
0000fab0  66 6f 24 0d 4b 78 23 c8  99 22 48 6f 75 72 67 6c  |fo$.Kx#.."Hourgl|
0000fac0  61 73 73 5f 4f 6e 22 2c  31 3a 68 6f 75 72 25 3d  |ass_On",1:hour%=|
0000fad0  26 34 30 36 63 34 0d 4b  82 13 e7 6d 3d 2d 39 20  |&406c4.K...m=-9 |
0000fae0  84 20 6d 3d 2d 31 30 20  8c 0d 4b 8c 48 c8 99 22  |. m=-10 ..K.H.."|
0000faf0  58 4f 53 5f 43 4c 49 22  2c 22 72 6d 65 6e 73 75  |XOS_CLI","rmensu|
0000fb00  72 65 20 43 6f 6d 70 72  65 73 73 4a 50 45 47 20  |re CompressJPEG |
0000fb10  30 20 72 6d 6c 6f 61 64  20 53 79 73 74 65 6d 3a  |0 rmload System:|
0000fb20  4d 6f 64 75 6c 65 73 2e  6a 63 6f 6d 70 6d 6f 64  |Modules.jcompmod|
0000fb30  22 0d 4b 96 6d c8 99 22  58 4f 53 5f 43 4c 49 22  |".K.m.."XOS_CLI"|
0000fb40  2c 22 72 6d 65 6e 73 75  72 65 20 43 6f 6d 70 72  |,"rmensure Compr|
0000fb50  65 73 73 4a 50 45 47 20  30 20 49 46 20 22 22 3c  |essJPEG 0 IF ""<|
0000fb60  43 68 61 6e 67 65 46 53  49 24 44 69 72 3e 22 22  |ChangeFSI$Dir>""|
0000fb70  20 3c 3e 20 22 22 22 22  20 54 48 45 4e 20 72 6d  | <> """" THEN rm|
0000fb80  6c 6f 61 64 20 3c 43 68  61 6e 67 65 46 53 49 24  |load <ChangeFSI$|
0000fb90  44 69 72 3e 2e 6a 63 6f  6d 70 6d 6f 64 22 0d 4b  |Dir>.jcompmod".K|
0000fba0  a0 42 2a 72 6d 65 6e 73  75 72 65 20 43 6f 6d 70  |.B*rmensure Comp|
0000fbb0  72 65 73 73 4a 50 45 47  20 30 20 45 52 52 4f 52  |ressJPEG 0 ERROR|
0000fbc0  20 43 61 6e 27 74 20 66  69 6e 64 20 43 6f 6d 70  | Can't find Comp|
0000fbd0  72 65 73 73 4a 50 45 47  20 6d 6f 64 75 6c 65 2e  |ressJPEG module.|
0000fbe0  0d 4b aa 05 cd 0d 4b b4  30 e7 69 6e 76 65 72 74  |.K....K.0.invert|
0000fbf0  25 20 72 25 28 29 3d 46  2d 72 25 28 29 3a 67 25  |% r%()=F-r%():g%|
0000fc00  28 29 3d 46 2d 67 25 28  29 3a 62 25 28 29 3d 46  |()=F-g%():b%()=F|
0000fc10  2d 62 25 28 29 0d 4b be  1f e7 78 64 69 76 25 20  |-b%().K...xdiv% |
0000fc20  f2 72 65 64 75 63 65 28  78 6d 75 6c 25 2c 78 64  |.reduce(xmul%,xd|
0000fc30  69 76 25 29 0d 4b c8 1f  e7 79 64 69 76 25 20 f2  |iv%).K...ydiv% .|
0000fc40  72 65 64 75 63 65 28 79  6d 75 6c 25 2c 79 64 69  |reduce(ymul%,ydi|
0000fc50  76 25 29 0d 4b d2 0a c8  8e 20 6d 20 ca 0d 4b dc  |v%).K.... m ..K.|
0000fc60  44 c9 20 2d 31 3a 78 25  3d 32 35 36 3a 79 25 3d  |D. -1:x%=256:y%=|
0000fc70  32 35 36 3a 6e 63 6f 6c  3d 32 35 36 3a e7 73 63  |256:ncol=256:.sc|
0000fc80  61 6c 65 6f 25 20 78 64  69 76 25 3d 78 64 69 76  |aleo% xdiv%=xdiv|
0000fc90  25 2a 32 3a 79 64 69 76  25 3d 79 64 69 76 25 2a  |%*2:ydiv%=ydiv%*|
0000fca0  32 0d 4b e6 2e c9 20 2d  32 3a 78 25 3d 73 78 25  |2.K... -2:x%=sx%|
0000fcb0  3a 79 25 3d 73 79 25 3a  e7 73 70 6d 3d 31 38 20  |:y%=sy%:.spm=18 |
0000fcc0  6e 63 6f 6c 3d 31 20 8b  6e 63 6f 6c 3d 31 35 0d  |ncol=1 .ncol=15.|
0000fcd0  4b f0 28 c9 20 2d 33 2c  2d 35 2c 2d 36 3a 78 25  |K.(. -3,-5,-6:x%|
0000fce0  3d 73 78 25 3a 79 25 3d  73 79 25 3a 6e 63 6f 6c  |=sx%:y%=sy%:ncol|
0000fcf0  3d 32 5e 31 35 2d 31 0d  4b fa 28 c9 20 2d 34 2c  |=2^15-1.K.(. -4,|
0000fd00  2d 37 2c 2d 38 3a 78 25  3d 73 78 25 3a 79 25 3d  |-7,-8:x%=sx%:y%=|
0000fd10  73 79 25 3a 6e 63 6f 6c  3d 32 5e 32 34 2d 31 0d  |sy%:ncol=2^24-1.|
0000fd20  4c 04 35 c9 20 2d 39 2c  2d 31 30 3a 78 25 3d 73  |L.5. -9,-10:x%=s|
0000fd30  78 25 3a 79 25 3d 73 79  25 3a 6e 63 6f 6c 3d 32  |x%:y%=sy%:ncol=2|
0000fd40  5e 32 34 2d 31 3a e7 6d  3d 2d 39 20 6e 63 6f 6c  |^24-1:.m=-9 ncol|
0000fd50  3d 32 35 36 0d 4c 0e 05  7f 0d 4c 18 35 c8 99 35  |=256.L....L.5..5|
0000fd60  33 2c 6d 2c 34 20 b8 20  2c 2c 6e 78 3a c8 99 35  |3,m,4 . ,,nx:..5|
0000fd70  33 2c 6d 2c 35 20 b8 20  2c 2c 6e 79 3a 6e 78 3d  |3,m,5 . ,,ny:nx=|
0000fd80  31 3c 3c 6e 78 3a 6e 79  3d 31 3c 3c 6e 79 0d 4c  |1<<nx:ny=1<<ny.L|
0000fd90  22 31 c8 99 35 33 2c 6d  2c 31 31 20 b8 20 2c 2c  |"1..53,m,11 . ,,|
0000fda0  78 25 3a c8 99 35 33 2c  6d 2c 31 32 20 b8 20 2c  |x%:..53,m,12 . ,|
0000fdb0  2c 79 25 3a 78 25 2b 3d  31 3a 79 25 2b 3d 31 0d  |,y%:x%+=1:y%+=1.|
0000fdc0  4c 2c 20 c8 99 35 33 2c  6d 2c 33 20 b8 20 2c 2c  |L, ..53,m,3 . ,,|
0000fdd0  6e 63 6f 6c 3a e7 73 63  61 6c 65 6f 25 20 8c 0d  |ncol:.scaleo% ..|
0000fde0  4c 36 0e e7 72 6f 74 61  74 65 25 20 8c 0d 4c 40  |L6..rotate% ..L@|
0000fdf0  21 78 64 69 76 25 3d 78  64 69 76 25 2a 6e 79 3a  |!xdiv%=xdiv%*ny:|
0000fe00  79 64 69 76 25 3d 79 64  69 76 25 2a 6e 78 0d 4c  |ydiv%=ydiv%*nx.L|
0000fe10  4a 18 e7 78 64 69 76 25  20 79 6d 75 6c 25 3d 79  |J..xdiv% ymul%=y|
0000fe20  6d 75 6c 25 2a 32 0d 4c  54 18 e7 79 64 69 76 25  |mul%*2.LT..ydiv%|
0000fe30  20 78 6d 75 6c 25 3d 78  6d 75 6c 25 2a 32 0d 4c  | xmul%=xmul%*2.L|
0000fe40  5e 05 cc 0d 4c 68 21 78  64 69 76 25 3d 78 64 69  |^...Lh!xdiv%=xdi|
0000fe50  76 25 2a 6e 78 3a 79 64  69 76 25 3d 79 64 69 76  |v%*nx:ydiv%=ydiv|
0000fe60  25 2a 6e 79 0d 4c 72 18  e7 78 64 69 76 25 20 78  |%*ny.Lr..xdiv% x|
0000fe70  6d 75 6c 25 3d 78 6d 75  6c 25 2a 32 0d 4c 7c 18  |mul%=xmul%*2.L|.|
0000fe80  e7 79 64 69 76 25 20 79  6d 75 6c 25 3d 79 6d 75  |.ydiv% ymul%=ymu|
0000fe90  6c 25 2a 32 0d 4c 86 05  cd 0d 4c 90 05 cd 0d 4c  |l%*2.L....L....L|
0000fea0  9a 21 c8 99 26 36 32 41  35 31 2c 6d 20 b8 20 72  |.!..&62A51,m . r|
0000feb0  30 3b 56 3a e7 28 56 20  80 31 29 3d 30 20 8c 0d  |0;V:.(V .1)=0 ..|
0000fec0  4c ae 0b e7 72 30 3d 31  20 8c 0d 4c b8 1c 6e 63  |L...r0=1 ..L..nc|
0000fed0  6f 6c 3d 32 35 35 3a e7  6d 24 3c 3e 22 44 22 20  |ol=255:.m$<>"D" |
0000fee0  6d 24 3d 22 52 22 0d 4c  c2 05 cd 0d 4c cc 05 cd  |m$="R".L....L...|
0000fef0  0d 4c d6 05 cb 0d 4c e0  19 e7 6d 3d 2d 36 20 84  |.L....L...m=-6 .|
0000ff00  20 6d 3d 2d 37 20 84 20  6d 3d 2d 38 20 8c 0d 4c  | m=-7 . m=-8 ..L|
0000ff10  ea 2a 6e 78 3d bb c1 70  6e 6d 24 2c 35 29 3a 6e  |.*nx=..pnm$,5):n|
0000ff20  79 3d bb c1 70 6e 6d 24  2c a7 70 6e 6d 24 2c 22  |y=..pnm$,.pnm$,"|
0000ff30  2c 22 2c 35 29 2b 31 29  0d 4c f4 0e e7 73 63 61  |,",5)+1).L...sca|
0000ff40  6c 65 6f 25 20 8c 0d 4c  fe 0e e7 72 6f 74 61 74  |leo% ..L...rotat|
0000ff50  65 25 20 8c 0d 4d 08 19  e7 78 64 69 76 25 20 79  |e% ..M...xdiv% y|
0000ff60  6d 75 6c 25 3d 79 6d 75  6c 25 2a 6e 78 0d 4d 12  |mul%=ymul%*nx.M.|
0000ff70  19 e7 79 64 69 76 25 20  78 6d 75 6c 25 3d 78 6d  |..ydiv% xmul%=xm|
0000ff80  75 6c 25 2a 6e 79 0d 4d  1c 05 cc 0d 4d 26 19 e7  |ul%*ny.M....M&..|
0000ff90  78 64 69 76 25 20 78 6d  75 6c 25 3d 78 6d 75 6c  |xdiv% xmul%=xmul|
0000ffa0  25 2a 6e 78 0d 4d 30 19  e7 79 64 69 76 25 20 79  |%*nx.M0..ydiv% y|
0000ffb0  6d 75 6c 25 3d 79 6d 75  6c 25 2a 6e 79 0d 4d 3a  |mul%=ymul%*ny.M:|
0000ffc0  05 cd 0d 4d 44 21 78 64  69 76 25 3d 78 64 69 76  |...MD!xdiv%=xdiv|
0000ffd0  25 2a 39 30 3a 79 64 69  76 25 3d 79 64 69 76 25  |%*90:ydiv%=ydiv%|
0000ffe0  2a 39 30 0d 4d 4e 05 cd  0d 4d 58 05 cd 0d 4d 62  |*90.MN...MX...Mb|
0000fff0  15 e7 72 6f 74 61 74 65  25 20 c8 94 20 78 25 2c  |..rotate% .. x%,|
00010000  79 25 0d 4d 76 16 e7 78  64 69 76 25 3d 30 20 78  |y%.Mv..xdiv%=0 x|
00010010  64 69 76 25 3d 73 78 25  0d 4d 80 16 e7 79 64 69  |div%=sx%.M...ydi|
00010020  76 25 3d 30 20 79 64 69  76 25 3d 73 79 25 0d 4d  |v%=0 ydiv%=sy%.M|
00010030  8a 1f e7 78 73 24 3d 22  3d 22 20 78 6d 75 6c 25  |...xs$="=" xmul%|
00010040  3d 78 25 3a 78 64 69 76  25 3d 73 78 25 0d 4d 94  |=x%:xdiv%=sx%.M.|
00010050  1f e7 79 73 24 3d 22 3d  22 20 79 6d 75 6c 25 3d  |..ys$="=" ymul%=|
00010060  79 25 3a 79 64 69 76 25  3d 73 79 25 0d 4d 9e 0c  |y%:ydiv%=sy%.M..|
00010070  e7 6c 6f 63 6b 25 20 8c  0d 4d a8 4d e7 78 6d 75  |.lock% ..M.M.xmu|
00010080  6c 25 2f 78 64 69 76 25  3e 79 6d 75 6c 25 2f 79  |l%/xdiv%>ymul%/y|
00010090  64 69 76 25 20 78 6d 75  6c 25 3d 79 6d 75 6c 25  |div% xmul%=ymul%|
000100a0  3a 78 64 69 76 25 3d 79  64 69 76 25 20 8b 79 6d  |:xdiv%=ydiv% .ym|
000100b0  75 6c 25 3d 78 6d 75 6c  25 3a 79 64 69 76 25 3d  |ul%=xmul%:ydiv%=|
000100c0  78 64 69 76 25 0d 4d b2  05 cd 0d 4d bc 0d e7 6e  |xdiv%.M....M...n|
000100d0  63 6f 6c 3d 31 20 8c 0d  4d c6 0b c8 8e 20 6d 24  |col=1 ..M.... m$|
000100e0  20 ca 0d 4d d0 24 c9 22  43 22 3a 78 64 69 76 25  | ..M.$."C":xdiv%|
000100f0  3d 78 64 69 76 25 2a 34  3a 79 64 69 76 25 3d 79  |=xdiv%*4:ydiv%=y|
00010100  64 69 76 25 2a 34 0d 4d  da 13 de 20 41 25 28 31  |div%*4.M... A%(1|
00010110  36 29 2c 42 25 28 31 36  29 0d 4d e4 aa 41 25 28  |6),B%(16).M..A%(|
00010120  29 3d 30 2c 26 30 30 30  30 30 30 30 31 2c 26 30  |)=0,&00000001,&0|
00010130  38 30 30 30 30 30 31 2c  26 30 38 30 30 30 31 30  |8000001,&0800010|
00010140  31 2c 26 30 38 30 38 30  31 30 31 2c 26 30 38 30  |1,&08080101,&080|
00010150  38 30 31 30 33 2c 26 30  43 30 38 30 31 30 33 2c  |80103,&0C080103,|
00010160  26 30 43 30 38 30 33 30  33 2c 26 30 43 30 43 30  |&0C080303,&0C0C0|
00010170  33 30 33 2c 26 30 43 30  45 30 33 30 33 2c 26 30  |303,&0C0E0303,&0|
00010180  43 30 45 30 37 30 33 2c  26 30 45 30 45 30 37 30  |C0E0703,&0E0E070|
00010190  33 2c 26 30 45 30 45 30  37 30 37 2c 26 30 45 30  |3,&0E0E0707,&0E0|
000101a0  46 30 37 30 37 2c 26 30  45 30 46 30 46 30 37 2c  |F0707,&0E0F0F07,|
000101b0  26 30 46 30 46 30 46 30  37 2c 26 30 46 30 46 30  |&0F0F0F07,&0F0F0|
000101c0  46 30 46 0d 4d ee aa 42  25 28 29 3d 30 2c 26 30  |F0F.M..B%()=0,&0|
000101d0  30 30 30 30 30 30 38 2c  26 30 31 30 30 30 30 30  |0000008,&0100000|
000101e0  38 2c 26 30 31 30 30 30  38 30 38 2c 26 30 31 30  |8,&01000808,&010|
000101f0  31 30 38 30 38 2c 26 30  31 30 31 30 38 30 43 2c  |10808,&0101080C,|
00010200  26 30 33 30 31 30 38 30  43 2c 26 30 33 30 31 30  |&0301080C,&03010|
00010210  43 30 43 2c 26 30 33 30  33 30 43 30 43 2c 26 30  |C0C,&03030C0C,&0|
00010220  33 30 37 30 43 30 43 2c  26 30 33 30 37 30 45 30  |3070C0C,&03070E0|
00010230  43 2c 26 30 37 30 37 30  45 30 43 2c 26 30 37 30  |C,&07070E0C,&070|
00010240  37 30 45 30 45 2c 26 30  37 30 46 30 45 30 45 2c  |70E0E,&070F0E0E,|
00010250  26 30 37 30 46 30 46 30  45 2c 26 30 46 30 46 30  |&070F0F0E,&0F0F0|
00010260  46 30 45 2c 26 30 46 30  46 30 46 30 46 0d 4d f8  |F0E,&0F0F0F0F.M.|
00010270  32 65 76 65 6e 5f 67 61  72 64 3d a4 64 69 6d 28  |2even_gard=.dim(|
00010280  31 37 2a 33 32 2a 34 29  3a 6f 64 64 5f 67 61 72  |17*32*4):odd_gar|
00010290  64 3d a4 64 69 6d 28 31  37 2a 33 32 2a 34 29 0d  |d=.dim(17*32*4).|
000102a0  4e 02 43 e3 49 25 3d 30  b8 31 36 3a e3 4a 25 3d  |N.C.I%=0.16:.J%=|
000102b0  30 b8 31 36 3a 65 76 65  6e 5f 67 61 72 64 21 28  |0.16:even_gard!(|
000102c0  4a 25 2a 33 32 2a 34 2b  49 25 2a 34 29 3d 41 25  |J%*32*4+I%*4)=A%|
000102d0  28 49 25 29 84 42 25 28  4a 25 29 3c 3c 34 3a ed  |(I%).B%(J%)<<4:.|
000102e0  3a ed 0d 4e 0c 42 e3 49  25 3d 30 b8 31 36 3a e3  |:..N.B.I%=0.16:.|
000102f0  4a 25 3d 30 b8 31 36 3a  6f 64 64 5f 67 61 72 64  |J%=0.16:odd_gard|
00010300  21 28 49 25 2a 33 32 2a  34 2b 4a 25 2a 34 29 3d  |!(I%*32*4+J%*4)=|
00010310  42 25 28 49 25 29 84 41  25 28 4a 25 29 3c 3c 34  |B%(I%).A%(J%)<<4|
00010320  3a ed 3a ed 0d 4e 16 24  c9 22 54 22 3a 78 64 69  |:.:..N.$."T":xdi|
00010330  76 25 3d 78 64 69 76 25  2a 33 3a 79 64 69 76 25  |v%=xdiv%*3:ydiv%|
00010340  3d 79 64 69 76 25 2a 33  0d 4e 20 11 de 20 41 25  |=ydiv%*3.N .. A%|
00010350  28 39 29 2c 42 25 28 39  29 0d 4e 2a 40 41 25 28  |(9),B%(9).N*@A%(|
00010360  29 3d 30 2c 26 30 30 30  31 2c 26 34 30 30 31 2c  |)=0,&0001,&4001,|
00010370  26 34 30 34 31 2c 26 34  30 34 33 2c 26 34 30 43  |&4041,&4043,&40C|
00010380  33 2c 26 36 30 43 33 2c  26 36 31 43 33 2c 26 37  |3,&60C3,&61C3,&7|
00010390  31 43 33 2c 26 37 31 43  37 0d 4e 34 40 42 25 28  |1C3,&71C7.N4@B%(|
000103a0  29 3d 30 2c 26 30 30 30  34 2c 26 31 30 30 34 2c  |)=0,&0004,&1004,|
000103b0  26 31 31 30 34 2c 26 31  31 30 36 2c 26 31 31 38  |&1104,&1106,&118|
000103c0  36 2c 26 33 31 38 36 2c  26 33 31 43 36 2c 26 37  |6,&3186,&31C6,&7|
000103d0  31 43 36 2c 26 37 31 43  37 0d 4e 3e 32 65 76 65  |1C6,&71C7.N>2eve|
000103e0  6e 5f 67 61 72 64 3d a4  64 69 6d 28 31 30 2a 31  |n_gard=.dim(10*1|
000103f0  36 2a 34 29 3a 6f 64 64  5f 67 61 72 64 3d a4 64  |6*4):odd_gard=.d|
00010400  69 6d 28 31 30 2a 31 36  2a 34 29 0d 4e 48 41 e3  |im(10*16*4).NHA.|
00010410  49 25 3d 30 b8 39 3a e3  4a 25 3d 30 b8 39 3a 65  |I%=0.9:.J%=0.9:e|
00010420  76 65 6e 5f 67 61 72 64  21 28 4a 25 2a 31 36 2a  |ven_gard!(J%*16*|
00010430  34 2b 49 25 2a 34 29 3d  41 25 28 49 25 29 84 42  |4+I%*4)=A%(I%).B|
00010440  25 28 4a 25 29 3c 3c 33  3a ed 3a ed 0d 4e 52 40  |%(J%)<<3:.:..NR@|
00010450  e3 49 25 3d 30 b8 39 3a  e3 4a 25 3d 30 b8 39 3a  |.I%=0.9:.J%=0.9:|
00010460  6f 64 64 5f 67 61 72 64  21 28 49 25 2a 31 36 2a  |odd_gard!(I%*16*|
00010470  34 2b 4a 25 2a 34 29 3d  42 25 28 49 25 29 84 41  |4+J%*4)=B%(I%).A|
00010480  25 28 4a 25 29 3c 3c 33  3a ed 3a ed 0d 4e 5c 24  |%(J%)<<3:.:..N\$|
00010490  c9 22 44 22 3a 78 64 69  76 25 3d 78 64 69 76 25  |."D":xdiv%=xdiv%|
000104a0  2a 32 3a 79 64 69 76 25  3d 79 64 69 76 25 2a 32  |*2:ydiv%=ydiv%*2|
000104b0  0d 4e 66 11 de 20 41 25  28 34 29 2c 42 25 28 34  |.Nf.. A%(4),B%(4|
000104c0  29 0d 4e 70 19 41 25 28  29 3d 30 2c 26 31 2c 26  |).Np.A%()=0,&1,&|
000104d0  32 31 2c 26 33 31 2c 26  33 33 0d 4e 7a 19 42 25  |21,&31,&33.Nz.B%|
000104e0  28 29 3d 30 2c 26 32 2c  26 31 32 2c 26 33 32 2c  |()=0,&2,&12,&32,|
000104f0  26 33 33 0d 4e 84 2a 65  76 65 6e 5f 67 61 72 64  |&33.N.*even_gard|
00010500  3d a4 64 69 6d 28 35 2a  38 29 3a 6f 64 64 5f 67  |=.dim(5*8):odd_g|
00010510  61 72 64 3d a4 64 69 6d  28 35 2a 38 29 0d 4e 8e  |ard=.dim(5*8).N.|
00010520  3c e3 49 25 3d 30 b8 34  3a e3 4a 25 3d 30 b8 34  |<.I%=0.4:.J%=0.4|
00010530  3a 65 76 65 6e 5f 67 61  72 64 3f 28 4a 25 2a 38  |:even_gard?(J%*8|
00010540  2b 49 25 29 3d 41 25 28  49 25 29 84 42 25 28 4a  |+I%)=A%(I%).B%(J|
00010550  25 29 3c 3c 32 3a ed 3a  ed 0d 4e 98 3b e3 49 25  |%)<<2:.:..N.;.I%|
00010560  3d 30 b8 34 3a e3 4a 25  3d 30 b8 34 3a 6f 64 64  |=0.4:.J%=0.4:odd|
00010570  5f 67 61 72 64 3f 28 49  25 2a 38 2b 4a 25 29 3d  |_gard?(I%*8+J%)=|
00010580  42 25 28 49 25 29 84 41  25 28 4a 25 29 3c 3c 32  |B%(I%).A%(J%)<<2|
00010590  3a ed 3a ed 0d 4e a2 05  cb 0d 4e ac 05 cd 0d 4e  |:.:..N....N....N|
000105a0  b6 05 f5 0d 4e c0 2d f2  72 65 64 75 63 65 28 78  |....N.-.reduce(x|
000105b0  6d 75 6c 25 2c 78 64 69  76 25 29 3a f2 72 65 64  |mul%,xdiv%):.red|
000105c0  75 63 65 28 79 6d 75 6c  25 2c 79 64 69 76 25 29  |uce(ymul%,ydiv%)|
000105d0  0d 4e ca 55 e7 78 64 69  76 25 2a 79 64 69 76 25  |.N.U.xdiv%*ydiv%|
000105e0  2a 32 35 35 3e 32 5e 33  32 20 78 64 69 76 25 3d  |*255>2^32 xdiv%=|
000105f0  78 64 69 76 25 80 ac 31  3a 79 64 69 76 25 3d 79  |xdiv%..1:ydiv%=y|
00010600  64 69 76 25 80 ac 31 3a  78 6d 75 6c 25 3d 78 6d  |div%..1:xmul%=xm|
00010610  75 6c 25 80 ac 31 3a 79  6d 75 6c 25 3d 79 6d 75  |ul%..1:ymul%=ymu|
00010620  6c 25 80 ac 31 0d 4e d4  19 fd 78 64 69 76 25 2a  |l%..1.N...xdiv%*|
00010630  79 64 69 76 25 2a 32 35  35 3c 32 5e 33 32 0d 4e  |ydiv%*255<2^32.N|
00010640  de 40 e7 69 6e 66 6f 25  20 f1 22 53 69 7a 65 20  |.@.info% ."Size |
00010650  72 61 74 69 6f 73 20 61  72 65 20 78 20 22 3b 78  |ratios are x ";x|
00010660  6d 75 6c 25 22 3a 22 78  64 69 76 25 22 20 79 20  |mul%":"xdiv%" y |
00010670  22 79 6d 75 6c 25 22 3a  22 79 64 69 76 25 0d 4e  |"ymul%":"ydiv%.N|
00010680  e8 3f 78 25 3d 73 78 25  2a 78 6d 75 6c 25 2f 78  |.?x%=sx%*xmul%/x|
00010690  64 69 76 25 2b 2e 39 39  39 39 3a 79 25 3d 73 79  |div%+.9999:y%=sy|
000106a0  25 2a 79 6d 75 6c 25 2f  79 64 69 76 25 2b 2e 39  |%*ymul%/ydiv%+.9|
000106b0  39 39 39 3a 72 6f 77 73  25 3d 73 79 25 0d 4e f2  |999:rows%=sy%.N.|
000106c0  18 6f 72 64 65 72 25 3d  78 25 2a 79 25 3e 73 78  |.order%=x%*y%>sx|
000106d0  25 2a 73 79 25 0d 4e fc  1a 63 6f 64 65 25 3d a4  |%*sy%.N..code%=.|
000106e0  64 69 6d 28 38 31 39 32  29 3a 53 50 3d 31 33 0d  |dim(8192):SP=13.|
000106f0  4f 06 0d e7 63 61 63 68  65 25 20 8c 0d 4f 10 15  |O...cache% ..O..|
00010700  f2 63 61 63 68 65 73 69  7a 65 28 63 6f 64 65 25  |.cachesize(code%|
00010710  29 0d 4f 1a 12 e7 63 61  63 68 65 62 79 74 65 73  |).O...cachebytes|
00010720  25 20 8c 0d 4f 24 3a 66  69 6c 65 73 69 7a 65 25  |% ..O$:filesize%|
00010730  3d a2 23 63 25 2d 8f 23  63 25 3a e7 63 61 63 68  |=.#c%-.#c%:.cach|
00010740  65 25 3e 66 69 6c 65 73  69 7a 65 25 20 63 61 63  |e%>filesize% cac|
00010750  68 65 25 3d 66 69 6c 65  73 69 7a 65 25 0d 4f 2e  |he%=filesize%.O.|
00010760  39 e7 63 61 63 68 65 62  79 74 65 73 25 3e 30 20  |9.cachebytes%>0 |
00010770  e7 63 61 63 68 65 25 3e  63 61 63 68 65 62 79 74  |.cache%>cachebyt|
00010780  65 73 25 20 63 61 63 68  65 25 3d 63 61 63 68 65  |es% cache%=cache|
00010790  62 79 74 65 73 25 0d 4f  38 15 63 61 63 68 65 72  |bytes%.O8.cacher|
000107a0  6f 77 73 25 3d 63 61 63  68 65 25 0d 4f 42 05 cc  |ows%=cache%.OB..|
000107b0  0d 4f 4c 3e 66 69 6c 65  73 69 7a 65 25 3d 73 79  |.OL>filesize%=sy|
000107c0  25 2a 72 6f 77 62 79 74  65 73 25 3a e7 63 61 63  |%*rowbytes%:.cac|
000107d0  68 65 25 3c 72 6f 77 62  79 74 65 73 25 20 63 61  |he%<rowbytes% ca|
000107e0  63 68 65 25 3d 72 6f 77  62 79 74 65 73 25 0d 4f  |che%=rowbytes%.O|
000107f0  56 26 e7 63 61 63 68 65  25 3e 66 69 6c 65 73 69  |V&.cache%>filesi|
00010800  7a 65 25 20 63 61 63 68  65 25 3d 66 69 6c 65 73  |ze% cache%=files|
00010810  69 7a 65 25 0d 4f 60 43  63 61 63 68 65 72 6f 77  |ize%.O`Ccacherow|
00010820  73 25 3d 73 74 72 69 70  72 6f 77 73 25 3a e7 63  |s%=striprows%:.c|
00010830  61 63 68 65 72 6f 77 73  25 3c 31 20 63 61 63 68  |acherows%<1 cach|
00010840  65 72 6f 77 73 25 3d 63  61 63 68 65 25 81 72 6f  |erows%=cache%.ro|
00010850  77 62 79 74 65 73 25 0d  4f 6a 1f 63 61 63 68 65  |wbytes%.Oj.cache|
00010860  25 3d 63 61 63 68 65 72  6f 77 73 25 2a 72 6f 77  |%=cacherows%*row|
00010870  62 79 74 65 73 25 0d 4f  74 05 cd 0d 4f 7e 47 64  |bytes%.Ot...O~Gd|
00010880  61 74 61 63 61 63 68 65  25 3d a4 63 61 63 68 65  |atacache%=.cache|
00010890  64 69 6d 28 63 61 63 68  65 25 29 3a e7 64 61 74  |dim(cache%):.dat|
000108a0  61 63 61 63 68 65 25 3d  2d 31 20 64 61 74 61 63  |acache%=-1 datac|
000108b0  61 63 68 65 25 3d a4 64  69 6d 28 63 61 63 68 65  |ache%=.dim(cache|
000108c0  25 29 0d 4f 88 05 cd 0d  4f 92 1d e7 6e 63 6f 6c  |%).O....O...ncol|
000108d0  3d 32 35 35 20 e7 6d 24  3c 3e 22 44 22 20 6d 24  |=255 .m$<>"D" m$|
000108e0  3d 22 52 22 0d 4f 9c 1f  e7 6d 24 3d 22 52 22 20  |="R".O...m$="R" |
000108f0  84 28 6e 63 6f 6c 3d 36  33 20 80 6d 24 3d 22 22  |.(ncol=63 .m$=""|
00010900  29 20 8c 0d 4f a6 2b c8  99 35 33 2c 2d 31 2c 33  |) ..O.+..53,-1,3|
00010910  20 b8 2c 2c 4a 25 3a e7  6e 63 6f 6c 3d 32 35 35  | .,,J%:.ncol=255|
00010920  20 80 20 eb 3d 6d 20 4a  25 3d 6e 63 6f 6c 0d 4f  | . .=m J%=ncol.O|
00010930  b0 24 e7 6e 63 6f 6c 3d  36 33 20 80 28 6d 24 3d  |.$.ncol=63 .(m$=|
00010940  22 22 84 6d 24 3d 22 52  22 29 20 4a 25 3d 6e 63  |"".m$="R") J%=nc|
00010950  6f 6c 0d 4f ba 50 e7 4a  25 3c 3e 6e 63 6f 6c 20  |ol.O.P.J%<>ncol |
00010960  f2 63 6c 6f 73 65 3a 85  34 32 2c 22 59 6f 75 20  |.close:.42,"You |
00010970  6d 75 73 74 20 62 65 20  69 6e 20 61 20 22 2b c3  |must be in a "+.|
00010980  28 6e 63 6f 6c 2b 31 29  2b 22 20 63 6f 6c 6f 75  |(ncol+1)+" colou|
00010990  72 20 6d 6f 64 65 20 74  6f 20 64 6f 20 74 68 69  |r mode to do thi|
000109a0  73 22 0d 4f c4 19 4a 25  3d 6e 63 6f 6c 3a e7 4a  |s".O..J%=ncol:.J|
000109b0  25 3d 36 33 20 4a 25 3d  32 35 35 0d 4f ce 1b 70  |%=63 J%=255.O..p|
000109c0  61 6c 65 74 74 65 25 3d  a4 64 69 6d 28 28 4a 25  |alette%=.dim((J%|
000109d0  2b 31 29 2a 34 29 0d 4f  d8 0f e7 6e 63 6f 6c 3d  |+1)*4).O...ncol=|
000109e0  32 35 35 20 8c 0d 4f e2  34 c8 99 22 43 6f 6c 6f  |255 ..O.4.."Colo|
000109f0  75 72 54 72 61 6e 73 5f  52 65 61 64 50 61 6c 65  |urTrans_ReadPale|
00010a00  74 74 65 22 2c 2d 31 2c  2d 31 2c 70 61 6c 65 74  |tte",-1,-1,palet|
00010a10  74 65 25 2c 32 35 36 2a  34 0d 4f ec 35 e3 49 25  |te%,256*4.O.5.I%|
00010a20  3d 30 b8 32 35 35 3a 70  61 6c 65 74 74 65 25 21  |=0.255:palette%!|
00010a30  28 49 25 3c 3c 32 29 3d  70 61 6c 65 74 74 65 25  |(I%<<2)=palette%|
00010a40  21 28 49 25 3c 3c 32 29  3e 3e 3e 38 3a ed 0d 4f  |!(I%<<2)>>>8:..O|
00010a50  f6 05 cc 0d 50 00 0e e7  6e 63 6f 6c 3d 36 33 20  |....P...ncol=63 |
00010a60  8c 0d 50 0a 0d e3 49 25  3d 30 b8 32 35 35 0d 50  |..P...I%=0.255.P|
00010a70  14 2b 70 61 6c 65 74 74  65 25 21 28 49 25 3c 3c  |.+palette%!(I%<<|
00010a80  32 29 3d 28 49 25 80 37  20 84 20 28 49 25 80 31  |2)=(I%.7 . (I%.1|
00010a90  36 29 3e 3e 31 29 2a 31  37 0d 50 1e 2f 70 61 6c  |6)>>1)*17.P./pal|
00010aa0  65 74 74 65 25 3f 28 49  25 3c 3c 32 20 84 31 29  |ette%?(I%<<2 .1)|
00010ab0  3d 28 49 25 80 33 20 84  20 28 49 25 80 26 36 30  |=(I%.3 . (I%.&60|
00010ac0  29 3e 3e 33 29 2a 31 37  0d 50 28 3b 70 61 6c 65  |)>>3)*17.P(;pale|
00010ad0  74 74 65 25 3f 28 49 25  3c 3c 32 20 84 32 29 3d  |tte%?(I%<<2 .2)=|
00010ae0  28 49 25 80 33 20 84 20  28 49 25 80 38 29 3e 3e  |(I%.3 . (I%.8)>>|
00010af0  31 20 84 20 28 49 25 80  31 32 38 29 3e 3e 34 29  |1 . (I%.128)>>4)|
00010b00  2a 31 37 0d 50 32 05 ed  0d 50 3c 05 cc 0d 50 46  |*17.P2...P<...PF|
00010b10  48 e3 49 25 3d 30 b8 6e  63 6f 6c 3a c8 99 22 4f  |H.I%=0.ncol:.."O|
00010b20  53 5f 52 65 61 64 50 61  6c 65 74 74 65 22 2c 49  |S_ReadPalette",I|
00010b30  25 2c 31 36 20 b8 20 2c  2c 69 25 3a 70 61 6c 65  |%,16 . ,,i%:pale|
00010b40  74 74 65 25 21 28 49 25  3c 3c 32 29 3d 69 25 3e  |tte%!(I%<<2)=i%>|
00010b50  3e 3e 38 3a ed 0d 50 50  05 cd 0d 50 5a 05 cd 0d  |>>8:..PP...PZ...|
00010b60  50 64 25 74 25 3d b9 3a  6b 25 3d 70 61 6c 65 74  |Pd%t%=.:k%=palet|
00010b70  74 65 25 2b 31 3a 6e 6b  25 3d 70 61 6c 65 74 74  |te%+1:nk%=palett|
00010b80  65 25 2b 32 0d 50 6e 12  e3 49 25 3d 30 b8 6e 63  |e%+2.Pn..I%=0.nc|
00010b90  6f 6c 2a 34 88 34 0d 50  78 32 e7 70 61 6c 65 74  |ol*4.4.Px2.palet|
00010ba0  74 65 25 3f 49 25 3c 3e  6b 25 3f 49 25 20 84 20  |te%?I%<>k%?I% . |
00010bb0  70 61 6c 65 74 74 65 25  3f 49 25 3c 3e 6e 6b 25  |palette%?I%<>nk%|
00010bc0  3f 49 25 20 74 25 3d a3  0d 50 82 05 ed 0d 50 8c  |?I% t%=..P....P.|
00010bd0  17 e7 6e 63 6f 6c 3e 31  36 20 e7 74 25 20 6d 24  |..ncol>16 .t% m$|
00010be0  3d 22 44 22 0d 50 96 17  e7 6e 63 6f 6c 3d 31 35  |="D".P...ncol=15|
00010bf0  20 e7 74 25 20 6d 24 3d  22 54 22 0d 50 a0 0d e7  | .t% m$="T".P...|
00010c00  6d 24 3d 22 52 22 20 8c  0d 50 aa 37 e7 20 73 78  |m$="R" ..P.7. sx|
00010c10  25 2a 78 6d 75 6c 25 2f  78 64 69 76 25 2a 73 79  |%*xmul%/xdiv%*sy|
00010c20  25 2a 79 6d 75 6c 25 2f  79 64 69 76 25 3c 32 30  |%*ymul%/ydiv%<20|
00010c30  30 30 30 30 20 6b 25 3d  33 20 8b 6b 25 3d 34 0d  |0000 k%=3 .k%=4.|
00010c40  50 b4 0c 6e 6b 25 3d 38  2d 6b 25 0d 50 be 0d 74  |P..nk%=8-k%.P..t|
00010c50  25 3d 31 3c 3c 6e 6b 25  0d 50 c8 0e 6d 61 73 6b  |%=1<<nk%.P..mask|
00010c60  25 3d 74 25 2d 31 0d 50  d2 11 74 64 32 25 3d 31  |%=t%-1.P..td2%=1|
00010c70  3c 3c 6e 6b 25 2d 31 0d  50 dc 13 73 74 65 70 25  |<<nk%-1.P..step%|
00010c80  3d 31 3c 3c 28 38 2d 6b  25 29 0d 50 e6 24 6e 63  |=1<<(8-k%).P.$nc|
00010c90  6f 6c 25 3d 6e 63 6f 6c  2b 31 3a e7 6e 63 6f 6c  |ol%=ncol+1:.ncol|
00010ca0  25 3d 36 34 20 6e 63 6f  6c 25 3d 32 35 36 0d 50  |%=64 ncol%=256.P|
00010cb0  f0 1b 69 63 74 25 3d a4  64 69 6d 28 32 5e 28 6b  |..ict%=.dim(2^(k|
00010cc0  25 2a 33 29 2a 34 2d 31  29 0d 50 fa 61 e7 63 61  |%*3)*4-1).P.a.ca|
00010cd0  63 68 65 25 3c 38 31 39  32 2a 36 20 73 63 72 61  |che%<8192*6 scra|
00010ce0  74 63 68 25 3d a4 64 69  6d 28 38 31 39 32 2a 36  |tch%=.dim(8192*6|
00010cf0  29 3a 73 63 72 61 74 63  68 73 7a 25 3d 38 31 39  |):scratchsz%=819|
00010d00  32 2a 36 20 8b 73 63 72  61 74 63 68 25 3d 64 61  |2*6 .scratch%=da|
00010d10  74 61 63 61 63 68 65 25  3a 73 63 72 61 74 63 68  |tacache%:scratch|
00010d20  73 7a 25 3d 63 61 63 68  65 25 0d 51 04 3e e7 69  |sz%=cache%.Q.>.i|
00010d30  6e 66 6f 25 20 f1 22 42  65 67 69 6e 20 74 61 62  |nfo% ."Begin tab|
00010d40  6c 65 20 67 65 6e 65 72  61 74 69 6f 6e 20 77 69  |le generation wi|
00010d50  74 68 20 22 3b 73 63 72  61 74 63 68 73 7a 25 22  |th ";scratchsz%"|
00010d60  20 62 79 74 65 73 2e 22  0d 51 0e 0d e3 5a 25 3d  | bytes.".Q...Z%=|
00010d70  30 b8 32 88 32 0d 51 18  0c 50 25 3d 63 6f 64 65  |0.2.2.Q..P%=code|
00010d80  25 0d 51 22 0b 5b 4f 50  54 20 5a 25 0d 51 2c 0a  |%.Q".[OPT Z%.Q,.|
00010d90  2e 6d 61 6b 65 25 0d 51  36 14 53 54 4d 46 44 20  |.make%.Q6.STMFD |
00010da0  72 31 33 21 2c 7b 72 31  34 7d 0d 51 40 0e 4c 44  |r13!,{r14}.Q@.LD|
00010db0  52 20 72 34 2c 69 63 74  0d 51 4a 13 4d 4f 56 20  |R r4,ict.QJ.MOV |
00010dc0  72 32 2c 23 73 74 65 70  25 2f 32 0d 51 54 0d 2e  |r2,#step%/2.QT..|
00010dd0  62 6c 75 65 6c 6f 6f 70  0d 51 5e 13 4d 4f 56 20  |blueloop.Q^.MOV |
00010de0  72 31 2c 23 73 74 65 70  25 2f 32 0d 51 68 0e 2e  |r1,#step%/2.Qh..|
00010df0  67 72 65 65 6e 6c 6f 6f  70 0d 51 72 13 4d 4f 56  |greenloop.Qr.MOV|
00010e00  20 72 30 2c 23 73 74 65  70 25 2f 32 0d 51 7c 0c  | r0,#step%/2.Q|.|
00010e10  2e 72 65 64 6c 6f 6f 70  0d 51 90 16 4d 4f 56 20  |.redloop.Q..MOV |
00010e20  72 33 2c 72 30 2c 4c 53  52 20 23 6e 6b 25 0d 51  |r3,r0,LSR #nk%.Q|
00010e30  9a 17 4d 4f 56 20 72 31  34 2c 72 31 2c 4c 53 52  |..MOV r14,r1,LSR|
00010e40  20 23 6e 6b 25 0d 51 a4  16 4d 4f 56 20 72 35 2c  | #nk%.Q..MOV r5,|
00010e50  72 32 2c 4c 53 52 20 23  6e 6b 25 0d 51 ae 18 84  |r2,LSR #nk%.Q...|
00010e60  52 20 72 33 2c 72 33 2c  72 31 34 2c 4c 53 4c 20  |R r3,r3,r14,LSL |
00010e70  23 6b 25 0d 51 b8 19 84  52 20 72 33 2c 72 33 2c  |#k%.Q...R r3,r3,|
00010e80  72 35 2c 4c 53 4c 20 23  6b 25 2a 32 0d 51 c2 0e  |r5,LSL #k%*2.Q..|
00010e90  42 4c 20 64 65 76 69 6f  75 73 0d 51 cc 16 41 44  |BL devious.Q..AD|
00010ea0  44 20 72 30 2c 72 30 2c  23 73 74 65 70 25 2a 32  |D r0,r0,#step%*2|
00010eb0  0d 51 d6 0f 43 4d 50 20  72 30 2c 23 32 35 36 0d  |.Q..CMP r0,#256.|
00010ec0  51 e0 0f 42 43 43 20 72  65 64 6c 6f 6f 70 0d 51  |Q..BCC redloop.Q|
00010ed0  ea 14 41 44 44 20 72 31  2c 72 31 2c 23 73 74 65  |..ADD r1,r1,#ste|
00010ee0  70 25 0d 51 f4 0f 43 4d  50 20 72 31 2c 23 32 35  |p%.Q..CMP r1,#25|
00010ef0  36 0d 51 fe 11 42 43 43  20 67 72 65 65 6e 6c 6f  |6.Q..BCC greenlo|
00010f00  6f 70 0d 52 08 14 41 44  44 20 72 32 2c 72 32 2c  |op.R..ADD r2,r2,|
00010f10  23 73 74 65 70 25 0d 52  12 0f 43 4d 50 20 72 32  |#step%.R..CMP r2|
00010f20  2c 23 32 35 36 0d 52 1c  10 42 43 43 20 62 6c 75  |,#256.R..BCC blu|
00010f30  65 6c 6f 6f 70 0d 52 26  14 4c 44 4d 46 44 20 72  |eloop.R&.LDMFD r|
00010f40  31 33 21 2c 7b 70 63 7d  5e 0d 52 30 14 2e 63 74  |13!,{pc}^.R0..ct|
00010f50  20 44 43 44 20 70 61 6c  65 74 74 65 25 0d 52 3a  | DCD palette%.R:|
00010f60  1f 2e 6d 69 6e 20 44 43  44 20 63 6f 64 65 25 2b  |..min DCD code%+|
00010f70  38 31 39 32 2d 32 35 36  2a 32 2a 34 0d 52 44 11  |8192-256*2*4.RD.|
00010f80  2e 69 63 74 20 44 43 44  20 69 63 74 25 0d 52 4e  |.ict DCD ict%.RN|
00010f90  17 2e 66 73 61 61 64 20  44 43 44 20 73 63 72 61  |..fsaad DCD scra|
00010fa0  74 63 68 25 0d 52 58 23  2e 66 73 61 6c 69 6d 20  |tch%.RX#.fsalim |
00010fb0  44 43 44 20 73 63 72 61  74 63 68 25 2b 73 63 72  |DCD scratch%+scr|
00010fc0  61 74 63 68 73 7a 25 0d  52 62 0c 2e 64 65 76 69  |atchsz%.Rb..devi|
00010fd0  6f 75 73 0d 52 6c 26 53  54 4d 46 44 20 72 31 33  |ous.Rl&STMFD r13|
00010fe0  21 2c 7b 72 30 2c 72 31  2c 72 32 2c 72 33 2c 72  |!,{r0,r1,r2,r3,r|
00010ff0  34 2c 72 38 2c 72 31 34  7d 0d 52 76 1b 42 49 43  |4,r8,r14}.Rv.BIC|
00011000  20 72 30 2c 72 30 2c 23  28 6d 61 73 6b 25 3c 3c  | r0,r0,#(mask%<<|
00011010  31 29 2b 31 0d 52 80 14  42 49 43 20 72 31 2c 72  |1)+1.R..BIC r1,r|
00011020  31 2c 23 6d 61 73 6b 25  0d 52 8a 14 42 49 43 20  |1,#mask%.R..BIC |
00011030  72 32 2c 72 32 2c 23 6d  61 73 6b 25 0d 52 a8 0d  |r2,r2,#mask%.R..|
00011040  4d 4f 56 20 72 35 2c 23  30 0d 52 b2 0d 4c 44 52  |MOV r5,#0.R..LDR|
00011050  20 72 36 2c 63 74 0d 52  bc 13 4d 4f 56 20 72 39  | r6,ct.R..MOV r9|
00011060  2c 23 26 66 66 30 30 30  30 0d 52 c6 14 4d 4f 56  |,#&ff0000.R..MOV|
00011070  20 72 31 34 2c 23 26 66  66 30 30 30 30 0d 52 d0  | r14,#&ff0000.R.|
00011080  0f 4c 44 52 20 72 31 32  2c 6d 69 6e 0d 52 da 0c  |.LDR r12,min.R..|
00011090  2e 64 65 76 6c 6f 6f 70  0d 52 e4 19 4c 44 52 20  |.devloop.R..LDR |
000110a0  72 37 2c 5b 72 36 2c 72  35 2c 4c 53 4c 20 23 32  |r7,[r6,r5,LSL #2|
000110b0  5d 0d 52 ee 15 4d 4f 56  20 72 38 2c 72 37 2c 6c  |].R..MOV r8,r7,l|
000110c0  73 72 20 23 31 36 0d 52  f8 15 42 49 43 20 72 31  |sr #16.R..BIC r1|
000110d0  30 2c 72 38 2c 23 6d 61  73 6b 25 0d 53 02 12 41  |0,r8,#mask%.S..A|
000110e0  44 44 20 72 31 31 2c 72  32 2c 23 74 25 0d 53 0c  |DD r11,r2,#t%.S.|
000110f0  0e 43 4d 50 20 72 31 30  2c 72 32 0d 53 16 11 42  |.CMP r10,r2.S..B|
00011100  45 51 20 62 6c 75 65 65  71 75 61 6c 0d 53 20 13  |EQ blueequal.S .|
00011110  53 55 42 43 43 20 72 31  30 2c 72 32 2c 72 38 0d  |SUBCC r10,r2,r8.|
00011120  53 2a 14 53 55 42 43 43  20 72 31 31 2c 72 31 31  |S*.SUBCC r11,r11|
00011130  2c 72 38 0d 53 34 14 53  55 42 43 53 20 72 31 30  |,r8.S4.SUBCS r10|
00011140  2c 72 38 2c 72 31 31 0d  53 3e 13 53 55 42 43 53  |,r8,r11.S>.SUBCS|
00011150  20 72 31 31 2c 72 38 2c  72 32 0d 53 48 12 4d 55  | r11,r8,r2.SH.MU|
00011160  4c 20 72 33 2c 72 31 30  2c 72 31 30 0d 53 52 0d  |L r3,r10,r10.SR.|
00011170  2e 64 6f 6e 65 62 6c 75  65 0d 53 5c 12 4d 55 4c  |.doneblue.S\.MUL|
00011180  20 72 34 2c 72 31 31 2c  72 31 31 0d 53 66 14 4d  | r4,r11,r11.Sf.M|
00011190  4f 56 20 72 38 2c 72 37  2c 6c 73 72 20 23 38 0d  |OV r8,r7,lsr #8.|
000111a0  53 70 10 80 20 72 38 2c  72 38 2c 23 32 35 35 0d  |Sp.. r8,r8,#255.|
000111b0  53 7a 15 42 49 43 20 72  31 30 2c 72 38 2c 23 6d  |Sz.BIC r10,r8,#m|
000111c0  61 73 6b 25 0d 53 84 12  41 44 44 20 72 31 31 2c  |ask%.S..ADD r11,|
000111d0  72 31 2c 23 74 25 0d 53  8e 0e 43 4d 50 20 72 31  |r1,#t%.S..CMP r1|
000111e0  30 2c 72 31 0d 53 98 12  42 45 51 20 67 72 65 65  |0,r1.S..BEQ gree|
000111f0  6e 65 71 75 61 6c 0d 53  a2 13 53 55 42 43 43 20  |nequal.S..SUBCC |
00011200  72 31 30 2c 72 31 2c 72  38 0d 53 ac 14 53 55 42  |r10,r1,r8.S..SUB|
00011210  43 43 20 72 31 31 2c 72  31 31 2c 72 38 0d 53 b6  |CC r11,r11,r8.S.|
00011220  14 53 55 42 43 53 20 72  31 30 2c 72 38 2c 72 31  |.SUBCS r10,r8,r1|
00011230  31 0d 53 c0 13 53 55 42  43 53 20 72 31 31 2c 72  |1.S..SUBCS r11,r|
00011240  38 2c 72 31 0d 53 d4 12  4d 55 4c 20 72 38 2c 72  |8,r1.S..MUL r8,r|
00011250  31 30 2c 72 31 30 0d 53  de 17 41 44 44 20 72 38  |10,r10.S..ADD r8|
00011260  2c 72 38 2c 72 38 2c 4c  53 4c 20 23 32 0d 53 e8  |,r8,r8,LSL #2.S.|
00011270  17 41 44 44 20 72 33 2c  72 33 2c 72 38 2c 4c 53  |.ADD r3,r3,r8,LS|
00011280  4c 20 23 31 0d 53 f2 0e  2e 64 6f 6e 65 67 72 65  |L #1.S...donegre|
00011290  65 6e 0d 53 fc 12 4d 55  4c 20 72 38 2c 72 31 31  |en.S..MUL r8,r11|
000112a0  2c 72 31 31 0d 54 06 17  41 44 44 20 72 38 2c 72  |,r11.T..ADD r8,r|
000112b0  38 2c 72 38 2c 4c 53 4c  20 23 32 0d 54 10 17 41  |8,r8,LSL #2.T..A|
000112c0  44 44 20 72 34 2c 72 34  2c 72 38 2c 4c 53 4c 20  |DD r4,r4,r8,LSL |
000112d0  23 31 0d 54 24 10 80 20  72 38 2c 72 37 2c 23 32  |#1.T$.. r8,r7,#2|
000112e0  35 35 0d 54 38 15 42 49  43 20 72 31 30 2c 72 38  |55.T8.BIC r10,r8|
000112f0  2c 23 6d 61 73 6b 25 0d  54 42 12 41 44 44 20 72  |,#mask%.TB.ADD r|
00011300  31 31 2c 72 30 2c 23 74  25 0d 54 4c 0e 43 4d 50  |11,r0,#t%.TL.CMP|
00011310  20 72 31 30 2c 72 30 0d  54 56 11 42 45 51 20 72  | r10,r0.TV.BEQ r|
00011320  65 64 65 71 75 61 6c 30  0d 54 60 13 53 55 42 43  |edequal0.T`.SUBC|
00011330  43 20 72 31 30 2c 72 30  2c 72 38 0d 54 6a 14 53  |C r10,r0,r8.Tj.S|
00011340  55 42 43 43 20 72 31 31  2c 72 31 31 2c 72 38 0d  |UBCC r11,r11,r8.|
00011350  54 74 14 53 55 42 43 53  20 72 31 30 2c 72 38 2c  |Tt.SUBCS r10,r8,|
00011360  72 31 31 0d 54 7e 13 53  55 42 43 53 20 72 31 31  |r11.T~.SUBCS r11|
00011370  2c 72 38 2c 72 30 0d 54  92 12 4d 55 4c 20 72 37  |,r8,r0.T..MUL r7|
00011380  2c 72 31 30 2c 72 31 30  0d 54 9c 17 41 44 44 20  |,r10,r10.T..ADD |
00011390  72 37 2c 72 37 2c 72 37  2c 4c 53 4c 20 23 31 0d  |r7,r7,r7,LSL #1.|
000113a0  54 a6 10 41 44 44 20 72  37 2c 72 33 2c 72 37 0d  |T..ADD r7,r3,r7.|
000113b0  54 b0 1a 53 54 52 20 72  37 2c 5b 72 31 32 2c 72  |T..STR r7,[r12,r|
000113c0  35 2c 4c 53 4c 20 23 32  5d 0d 54 ba 0d 2e 64 6f  |5,LSL #2].T...do|
000113d0  6e 65 72 65 64 30 0d 54  c4 12 4d 55 4c 20 72 37  |nered0.T..MUL r7|
000113e0  2c 72 31 31 2c 72 31 31  0d 54 ce 17 41 44 44 20  |,r11,r11.T..ADD |
000113f0  72 37 2c 72 37 2c 72 37  2c 4c 53 4c 20 23 31 0d  |r7,r7,r7,LSL #1.|
00011400  54 d8 10 41 44 44 20 72  37 2c 72 34 2c 72 37 0d  |T..ADD r7,r4,r7.|
00011410  54 ec 0d 43 4d 50 20 72  37 2c 72 39 0d 54 f6 0f  |T..CMP r7,r9.T..|
00011420  4d 4f 56 43 43 20 72 39  2c 72 37 0d 55 0a 11 41  |MOVCC r9,r7.U..A|
00011430  44 44 20 72 37 2c 72 30  2c 23 74 25 0d 55 14 15  |DD r7,r0,#t%.U..|
00011440  42 49 43 20 72 31 30 2c  72 38 2c 23 6d 61 73 6b  |BIC r10,r8,#mask|
00011450  25 0d 55 1e 12 41 44 44  20 72 31 31 2c 72 37 2c  |%.U..ADD r11,r7,|
00011460  23 74 25 0d 55 28 0e 43  4d 50 20 72 31 30 2c 72  |#t%.U(.CMP r10,r|
00011470  37 0d 55 32 11 42 45 51  20 72 65 64 65 71 75 61  |7.U2.BEQ redequa|
00011480  6c 31 0d 55 3c 13 53 55  42 43 43 20 72 31 30 2c  |l1.U<.SUBCC r10,|
00011490  72 37 2c 72 38 0d 55 46  14 53 55 42 43 43 20 72  |r7,r8.UF.SUBCC r|
000114a0  31 31 2c 72 31 31 2c 72  38 0d 55 50 14 53 55 42  |11,r11,r8.UP.SUB|
000114b0  43 53 20 72 31 30 2c 72  38 2c 72 31 31 0d 55 5a  |CS r10,r8,r11.UZ|
000114c0  13 53 55 42 43 53 20 72  31 31 2c 72 38 2c 72 37  |.SUBCS r11,r8,r7|
000114d0  0d 55 64 12 4d 55 4c 20  72 37 2c 72 31 30 2c 72  |.Ud.MUL r7,r10,r|
000114e0  31 30 0d 55 6e 17 41 44  44 20 72 37 2c 72 37 2c  |10.Un.ADD r7,r7,|
000114f0  72 37 2c 4c 53 4c 20 23  31 0d 55 78 10 41 44 44  |r7,LSL #1.Ux.ADD|
00011500  20 72 33 2c 72 33 2c 72  37 0d 55 8c 0d 2e 64 6f  | r3,r3,r7.U...do|
00011510  6e 65 72 65 64 31 0d 55  96 14 41 44 44 20 72 37  |nered1.U..ADD r7|
00011520  2c 72 35 2c 23 6e 63 6f  6c 25 0d 55 a0 1a 53 54  |,r5,#ncol%.U..ST|
00011530  52 20 72 33 2c 5b 72 31  32 2c 72 37 2c 4c 53 4c  |R r3,[r12,r7,LSL|
00011540  20 23 32 5d 0d 55 aa 12  4d 55 4c 20 72 37 2c 72  | #2].U..MUL r7,r|
00011550  31 31 2c 72 31 31 0d 55  b4 17 41 44 44 20 72 37  |11,r11.U..ADD r7|
00011560  2c 72 37 2c 72 37 2c 4c  53 4c 20 23 31 0d 55 be  |,r7,r7,LSL #1.U.|
00011570  10 41 44 44 20 72 37 2c  72 34 2c 72 37 0d 55 d2  |.ADD r7,r4,r7.U.|
00011580  0e 43 4d 50 20 72 37 2c  72 31 34 0d 55 dc 10 4d  |.CMP r7,r14.U..M|
00011590  4f 56 43 43 20 72 31 34  2c 72 37 0d 55 e6 10 41  |OVCC r14,r7.U..A|
000115a0  44 44 20 72 35 2c 72 35  2c 23 31 0d 55 f0 11 43  |DD r5,r5,#1.U..C|
000115b0  4d 50 20 72 35 2c 23 6e  63 6f 6c 25 0d 55 fa 0f  |MP r5,#ncol%.U..|
000115c0  42 43 43 20 64 65 76 6c  6f 6f 70 0d 56 04 1f 4c  |BCC devloop.V..L|
000115d0  44 4d 46 44 20 72 31 33  21 2c 7b 72 30 2c 72 31  |DMFD r13!,{r0,r1|
000115e0  2c 72 32 2c 72 33 2c 72  34 7d 0d 56 18 10 4c 44  |,r2,r3,r4}.V..LD|
000115f0  52 20 72 35 2c 66 73 61  61 64 0d 56 22 0d 4d 4f  |R r5,fsaad.V".MO|
00011600  56 20 72 37 2c 72 35 0d  56 2c 0e 4d 4f 56 20 72  |V r7,r5.V,.MOV r|
00011610  31 30 2c 23 30 0d 56 36  0d 2e 63 61 6c 63 6e 75  |10,#0.V6..calcnu|
00011620  6d 30 0d 56 40 17 4c 44  4d 49 41 20 72 31 32 21  |m0.V@.LDMIA r12!|
00011630  2c 7b 72 38 2c 72 31 31  7d 0d 56 4a 0d 43 4d 50  |,{r8,r11}.VJ.CMP|
00011640  20 72 38 2c 72 39 0d 56  54 16 53 54 52 4c 45 42  | r8,r9.VT.STRLEB|
00011650  20 72 31 30 2c 5b 72 37  5d 2c 23 31 0d 56 5e 12  | r10,[r7],#1.V^.|
00011660  41 44 44 20 72 31 30 2c  72 31 30 2c 23 31 0d 56  |ADD r10,r10,#1.V|
00011670  68 0e 43 4d 50 20 72 31  31 2c 72 39 0d 56 72 16  |h.CMP r11,r9.Vr.|
00011680  53 54 52 4c 45 42 20 72  31 30 2c 5b 72 37 5d 2c  |STRLEB r10,[r7],|
00011690  23 31 0d 56 7c 12 41 44  44 20 72 31 30 2c 72 31  |#1.V|.ADD r10,r1|
000116a0  30 2c 23 31 0d 56 86 17  4c 44 4d 49 41 20 72 31  |0,#1.V..LDMIA r1|
000116b0  32 21 2c 7b 72 38 2c 72  31 31 7d 0d 56 90 0d 43  |2!,{r8,r11}.V..C|
000116c0  4d 50 20 72 38 2c 72 39  0d 56 9a 16 53 54 52 4c  |MP r8,r9.V..STRL|
000116d0  45 42 20 72 31 30 2c 5b  72 37 5d 2c 23 31 0d 56  |EB r10,[r7],#1.V|
000116e0  a4 12 41 44 44 20 72 31  30 2c 72 31 30 2c 23 31  |..ADD r10,r10,#1|
000116f0  0d 56 ae 0e 43 4d 50 20  72 31 31 2c 72 39 0d 56  |.V..CMP r11,r9.V|
00011700  b8 16 53 54 52 4c 45 42  20 72 31 30 2c 5b 72 37  |..STRLEB r10,[r7|
00011710  5d 2c 23 31 0d 56 c2 12  41 44 44 20 72 31 30 2c  |],#1.V..ADD r10,|
00011720  72 31 30 2c 23 31 0d 56  cc 12 43 4d 50 20 72 31  |r10,#1.V..CMP r1|
00011730  30 2c 23 6e 63 6f 6c 25  0d 56 d6 10 42 43 43 20  |0,#ncol%.V..BCC |
00011740  63 61 6c 63 6e 75 6d 30  0d 56 e0 12 53 55 42 53  |calcnum0.V..SUBS|
00011750  20 72 31 30 2c 72 37 2c  72 35 0d 56 ea 12 53 57  | r10,r7,r5.V..SW|
00011760  49 45 51 20 32 35 36 2b  97 22 41 22 0d 56 f4 19  |IEQ 256+."A".V..|
00011770  43 4d 50 20 72 31 30 2c  23 34 20 3b 69 66 3c 34  |CMP r10,#4 ;if<4|
00011780  20 74 68 65 6e 0d 56 fe  23 4d 4f 56 43 43 20 72  | then.V.#MOVCC r|
00011790  37 2c 72 35 20 3b 72 65  73 65 74 20 6c 69 73 74  |7,r5 ;reset list|
000117a0  20 70 6f 69 6e 74 65 72  0d 57 08 22 4c 44 52 43  | pointer.W."LDRC|
000117b0  43 42 20 72 35 2c 5b 72  37 5d 20 3b 66 69 72 73  |CB r5,[r7] ;firs|
000117c0  74 20 70 6f 73 73 69 62  6c 65 0d 57 12 26 4c 44  |t possible.W.&LD|
000117d0  52 43 43 42 20 72 38 2c  5b 72 37 2c 23 31 5d 20  |RCCB r8,[r7,#1] |
000117e0  3b 73 65 63 6f 6e 64 20  70 6f 73 73 69 62 6c 65  |;second possible|
000117f0  0d 57 1c 18 84 52 43 43  20 72 35 2c 72 35 2c 72  |.W...RCC r5,r5,r|
00011800  38 2c 6c 73 6c 20 23 38  0d 57 26 25 4c 44 52 43  |8,lsl #8.W&%LDRC|
00011810  43 42 20 72 38 2c 5b 72  37 2c 23 32 5d 20 3b 74  |CB r8,[r7,#2] ;t|
00011820  68 69 72 64 20 70 6f 73  73 69 62 6c 65 0d 57 30  |hird possible.W0|
00011830  19 84 52 43 43 20 72 35  2c 72 35 2c 72 38 2c 6c  |..RCC r5,r5,r8,l|
00011840  73 6c 20 23 31 36 0d 57  3a 19 41 44 44 20 72 35  |sl #16.W:.ADD r5|
00011850  2c 72 35 2c 72 31 30 2c  6c 73 6c 20 23 32 34 0d  |,r5,r10,lsl #24.|
00011860  57 44 11 42 49 43 20 72  31 30 2c 72 33 2c 23 31  |WD.BIC r10,r3,#1|
00011870  0d 57 4e 1a 53 54 52 20  72 35 2c 5b 72 34 2c 72  |.WN.STR r5,[r4,r|
00011880  31 30 2c 4c 53 4c 20 23  32 5d 0d 57 58 0d 4d 4f  |10,LSL #2].WX.MO|
00011890  56 20 72 35 2c 72 37 0d  57 62 0e 4d 4f 56 20 72  |V r5,r7.Wb.MOV r|
000118a0  31 30 2c 23 30 0d 57 6c  0d 2e 63 61 6c 63 6e 75  |10,#0.Wl..calcnu|
000118b0  6d 31 0d 57 76 17 4c 44  4d 49 41 20 72 31 32 21  |m1.Wv.LDMIA r12!|
000118c0  2c 7b 72 38 2c 72 31 31  7d 0d 57 80 0e 43 4d 50  |,{r8,r11}.W..CMP|
000118d0  20 72 38 2c 72 31 34 0d  57 8a 16 53 54 52 4c 45  | r8,r14.W..STRLE|
000118e0  42 20 72 31 30 2c 5b 72  37 5d 2c 23 31 0d 57 94  |B r10,[r7],#1.W.|
000118f0  12 41 44 44 20 72 31 30  2c 72 31 30 2c 23 31 0d  |.ADD r10,r10,#1.|
00011900  57 9e 0f 43 4d 50 20 72  31 31 2c 72 31 34 0d 57  |W..CMP r11,r14.W|
00011910  a8 16 53 54 52 4c 45 42  20 72 31 30 2c 5b 72 37  |..STRLEB r10,[r7|
00011920  5d 2c 23 31 0d 57 b2 12  41 44 44 20 72 31 30 2c  |],#1.W..ADD r10,|
00011930  72 31 30 2c 23 31 0d 57  bc 17 4c 44 4d 49 41 20  |r10,#1.W..LDMIA |
00011940  72 31 32 21 2c 7b 72 38  2c 72 31 31 7d 0d 57 c6  |r12!,{r8,r11}.W.|
00011950  0e 43 4d 50 20 72 38 2c  72 31 34 0d 57 d0 16 53  |.CMP r8,r14.W..S|
00011960  54 52 4c 45 42 20 72 31  30 2c 5b 72 37 5d 2c 23  |TRLEB r10,[r7],#|
00011970  31 0d 57 da 12 41 44 44  20 72 31 30 2c 72 31 30  |1.W..ADD r10,r10|
00011980  2c 23 31 0d 57 e4 0f 43  4d 50 20 72 31 31 2c 72  |,#1.W..CMP r11,r|
00011990  31 34 0d 57 ee 16 53 54  52 4c 45 42 20 72 31 30  |14.W..STRLEB r10|
000119a0  2c 5b 72 37 5d 2c 23 31  0d 57 f8 12 41 44 44 20  |,[r7],#1.W..ADD |
000119b0  72 31 30 2c 72 31 30 2c  23 31 0d 58 02 12 43 4d  |r10,r10,#1.X..CM|
000119c0  50 20 72 31 30 2c 23 6e  63 6f 6c 25 0d 58 0c 10  |P r10,#ncol%.X..|
000119d0  42 43 43 20 63 61 6c 63  6e 75 6d 31 0d 58 16 12  |BCC calcnum1.X..|
000119e0  53 55 42 53 20 72 31 30  2c 72 37 2c 72 35 0d 58  |SUBS r10,r7,r5.X|
000119f0  20 12 53 57 49 45 51 20  32 35 36 2b 97 22 42 22  | .SWIEQ 256+."B"|
00011a00  0d 58 2a 19 43 4d 50 20  72 31 30 2c 23 34 20 3b  |.X*.CMP r10,#4 ;|
00011a10  69 66 3c 34 20 74 68 65  6e 0d 58 34 0f 4d 4f 56  |if<4 then.X4.MOV|
00011a20  43 43 20 72 37 2c 72 35  0d 58 3e 12 4c 44 52 43  |CC r7,r5.X>.LDRC|
00011a30  43 42 20 72 35 2c 5b 72  37 5d 0d 58 48 15 4c 44  |CB r5,[r7].XH.LD|
00011a40  52 43 43 42 20 72 38 2c  5b 72 37 2c 23 31 5d 0d  |RCCB r8,[r7,#1].|
00011a50  58 52 18 84 52 43 43 20  72 35 2c 72 35 2c 72 38  |XR..RCC r5,r5,r8|
00011a60  2c 6c 73 6c 20 23 38 0d  58 5c 15 4c 44 52 43 43  |,lsl #8.X\.LDRCC|
00011a70  42 20 72 38 2c 5b 72 37  2c 23 32 5d 0d 58 66 19  |B r8,[r7,#2].Xf.|
00011a80  84 52 43 43 20 72 35 2c  72 35 2c 72 38 2c 6c 73  |.RCC r5,r5,r8,ls|
00011a90  6c 20 23 31 36 0d 58 70  19 41 44 44 20 72 35 2c  |l #16.Xp.ADD r5,|
00011aa0  72 35 2c 72 31 30 2c 6c  73 6c 20 23 32 34 0d 58  |r5,r10,lsl #24.X|
00011ab0  7a 10 84 52 20 72 31 30  2c 72 33 2c 23 31 0d 58  |z..R r10,r3,#1.X|
00011ac0  84 1a 53 54 52 20 72 35  2c 5b 72 34 2c 72 31 30  |..STR r5,[r4,r10|
00011ad0  2c 4c 53 4c 20 23 32 5d  0d 58 8e 10 53 54 52 20  |,LSL #2].X..STR |
00011ae0  72 37 2c 66 73 61 61 64  0d 58 98 11 4c 44 52 20  |r7,fsaad.X..LDR |
00011af0  72 38 2c 66 73 61 6c 69  6d 0d 58 a2 0d 43 4d 50  |r8,fsalim.X..CMP|
00011b00  20 72 37 2c 72 38 0d 58  ac 12 53 57 49 43 53 20  | r7,r8.X..SWICS |
00011b10  32 35 36 2b 97 22 21 22  0d 58 b6 17 4c 44 4d 46  |256+."!".X..LDMF|
00011b20  44 20 72 31 33 21 2c 7b  72 38 2c 70 63 7d 5e 0d  |D r13!,{r8,pc}^.|
00011b30  58 c0 0e 2e 72 65 64 65  71 75 61 6c 30 0d 58 ca  |X...redequal0.X.|
00011b40  1a 53 54 52 20 72 33 2c  5b 72 31 32 2c 72 35 2c  |.STR r3,[r12,r5,|
00011b50  4c 53 4c 20 23 32 5d 0d  58 d4 10 54 53 54 20 72  |LSL #2].X..TST r|
00011b60  38 2c 23 74 64 32 25 0d  58 de 13 53 55 42 4e 45  |8,#td2%.X..SUBNE|
00011b70  20 72 31 31 2c 72 38 2c  72 30 0d 58 e8 14 53 55  | r11,r8,r0.X..SU|
00011b80  42 45 51 20 72 31 31 2c  72 31 31 2c 72 38 0d 58  |BEQ r11,r11,r8.X|
00011b90  f2 0e 42 20 64 6f 6e 65  72 65 64 30 0d 58 fc 0e  |..B donered0.X..|
00011ba0  2e 72 65 64 65 71 75 61  6c 31 0d 59 06 10 54 53  |.redequal1.Y..TS|
00011bb0  54 20 72 38 2c 23 74 64  32 25 0d 59 10 13 53 55  |T r8,#td2%.Y..SU|
00011bc0  42 4e 45 20 72 31 31 2c  72 38 2c 72 37 0d 59 1a  |BNE r11,r8,r7.Y.|
00011bd0  14 53 55 42 45 51 20 72  31 31 2c 72 31 31 2c 72  |.SUBEQ r11,r11,r|
00011be0  38 0d 59 24 0e 42 20 64  6f 6e 65 72 65 64 31 0d  |8.Y$.B donered1.|
00011bf0  59 2e 0f 2e 67 72 65 65  6e 65 71 75 61 6c 0d 59  |Y...greenequal.Y|
00011c00  38 10 54 53 54 20 72 38  2c 23 74 64 32 25 0d 59  |8.TST r8,#td2%.Y|
00011c10  42 13 53 55 42 4e 45 20  72 31 31 2c 72 38 2c 72  |B.SUBNE r11,r8,r|
00011c20  31 0d 59 4c 14 53 55 42  45 51 20 72 31 31 2c 72  |1.YL.SUBEQ r11,r|
00011c30  31 31 2c 72 38 0d 59 56  0f 42 20 64 6f 6e 65 67  |11,r8.YV.B doneg|
00011c40  72 65 65 6e 0d 59 60 0e  2e 62 6c 75 65 65 71 75  |reen.Y`..blueequ|
00011c50  61 6c 0d 59 6a 0d 4d 4f  56 20 72 33 2c 23 30 0d  |al.Yj.MOV r3,#0.|
00011c60  59 74 10 54 53 54 20 72  38 2c 23 74 64 32 25 0d  |Yt.TST r8,#td2%.|
00011c70  59 7e 13 53 55 42 4e 45  20 72 31 31 2c 72 38 2c  |Y~.SUBNE r11,r8,|
00011c80  72 32 0d 59 88 14 53 55  42 45 51 20 72 31 31 2c  |r2.Y..SUBEQ r11,|
00011c90  72 31 31 2c 72 38 0d 59  92 0e 42 20 64 6f 6e 65  |r11,r8.Y..B done|
00011ca0  62 6c 75 65 0d 59 9c 05  5d 0d 59 a6 05 ed 0d 59  |blue.Y..].Y....Y|
00011cb0  b0 0f 49 25 3d 91 3a d6  6d 61 6b 65 25 0d 59 ba  |..I%=.:.make%.Y.|
00011cc0  6d e7 69 6e 66 6f 25 20  f1 22 47 65 6e 65 72 61  |m.info% ."Genera|
00011cd0  74 65 64 20 27 72 27 22  3b 6b 25 22 20 74 61 62  |ted 'r'";k%" tab|
00011ce0  6c 65 73 20 66 6f 72 20  22 3b 6e 63 6f 6c 25 22  |les for ";ncol%"|
00011cf0  20 63 6f 6c 6f 75 72 73  20 75 73 69 6e 67 20 22  | colours using "|
00011d00  3b 21 66 73 61 61 64 2d  73 63 72 61 74 63 68 25  |;!fsaad-scratch%|
00011d10  22 20 62 79 74 65 73 2c  20 74 61 6b 69 6e 67 20  |" bytes, taking |
00011d20  22 91 2d 49 25 22 20 63  53 22 0d 59 c4 25 73 61  |".-I%" cS".Y.%sa|
00011d30  66 65 73 75 62 69 63 74  25 3d a4 64 69 6d 28 21  |fesubict%=.dim(!|
00011d40  66 73 61 61 64 2d 73 63  72 61 74 63 68 25 29 0d  |fsaad-scratch%).|
00011d50  59 ce 3a e3 49 25 3d 30  b8 21 66 73 61 61 64 2d  |Y.:.I%=0.!fsaad-|
00011d60  73 63 72 61 74 63 68 25  2b 34 88 34 3a 73 61 66  |scratch%+4.4:saf|
00011d70  65 73 75 62 69 63 74 25  21 49 25 3d 73 63 72 61  |esubict%!I%=scra|
00011d80  74 63 68 25 21 49 25 3a  ed 0d 59 d8 4f e3 49 25  |tch%!I%:..Y.O.I%|
00011d90  3d 30 b8 32 5e 28 6b 25  2a 33 29 2a 34 2d 31 88  |=0.2^(k%*3)*4-1.|
00011da0  34 3a e7 28 69 63 74 25  21 49 25 3e 3e 3e 32 34  |4:.(ict%!I%>>>24|
00011db0  29 3e 33 20 69 63 74 25  21 49 25 3d 69 63 74 25  |)>3 ict%!I%=ict%|
00011dc0  21 49 25 2d 73 63 72 61  74 63 68 25 2b 73 61 66  |!I%-scratch%+saf|
00011dd0  65 73 75 62 69 63 74 25  0d 59 e2 05 ed 0d 59 ec  |esubict%.Y....Y.|
00011de0  05 cd 0d 59 f6 05 cd 0d  5a 00 13 e7 66 61 73 74  |...Y....Z...fast|
00011df0  25 20 e7 eb 3c 3e 30 20  eb 30 0d 5a 14 0a c8 8e  |% ..<>0 .0.Z....|
00011e00  20 6d 20 ca 0d 5a 1e 11  c9 20 2d 31 2c 2d 39 3a  | m ..Z... -1,-9:|
00011e10  63 6f 6c 3d 30 0d 5a 28  21 c9 20 2d 33 2c 2d 34  |col=0.Z(!. -3,-4|
00011e20  2c 2d 35 2c 2d 36 2c 2d  37 2c 2d 38 2c 2d 31 30  |,-5,-6,-7,-8,-10|
00011e30  3a 63 6f 6c 3d 32 0d 5a  32 05 7f 0d 5a 3c 19 e7  |:col=2.Z2...Z<..|
00011e40  6d 24 3d 22 44 22 20 e7  6e 63 6f 6c 3d 33 20 6d  |m$="D" .ncol=3 m|
00011e50  24 3d 22 22 0d 5a 46 30  63 6f 6c 3d 30 3a e7 6e  |$="".ZF0col=0:.n|
00011e60  63 6f 6c 3e 31 35 20 84  6d 24 3d 22 43 22 20 84  |col>15 .m$="C" .|
00011e70  6d 24 3d 22 44 22 20 84  6d 24 3d 22 52 22 20 63  |m$="D" .m$="R" c|
00011e80  6f 6c 3d 32 0d 5a 50 2e  e7 6e 63 6f 6c 3d 36 33  |ol=2.ZP..ncol=63|
00011e90  20 84 20 6e 63 6f 6c 3d  32 35 35 20 e7 6d 24 3d  | . ncol=255 .m$=|
00011ea0  22 44 22 20 63 6f 6c 3d  30 3a 6e 63 6f 6c 3d 32  |"D" col=0:ncol=2|
00011eb0  35 36 0d 5a 5a 05 cb 0d  5a 64 0d e7 6e 63 6f 6c  |56.ZZ...Zd..ncol|
00011ec0  3d 31 20 8c 0d 5a 6e 0b  c8 8e 20 6d 24 20 ca 0d  |=1 ..Zn... m$ ..|
00011ed0  5a 78 19 c9 22 43 22 3a  63 6f 6c 3d 30 3a 78 25  |Zx.."C":col=0:x%|
00011ee0  3d 78 25 2b 31 80 ac 31  0d 5a 82 19 c9 22 44 22  |=x%+1..1.Z..."D"|
00011ef0  3a 63 6f 6c 3d 30 3a 78  25 3d 78 25 2b 33 80 ac  |:col=0:x%=x%+3..|
00011f00  33 0d 5a 8c 19 c9 22 54  22 3a 63 6f 6c 3d 30 3a  |3.Z..."T":col=0:|
00011f10  78 25 3d 78 25 2b 31 80  ac 31 0d 5a 96 05 cb 0d  |x%=x%+1..1.Z....|
00011f20  5a a0 05 cd 0d 5a aa 13  de 20 63 6c 25 28 78 25  |Z....Z... cl%(x%|
00011f30  2b 37 2c 63 6f 6c 29 0d  5a b4 22 de 20 78 6c 25  |+7,col).Z.". xl%|
00011f40  28 78 25 2b 37 2c 63 6f  6c 29 2c 78 70 25 28 73  |(x%+7,col),xp%(s|
00011f50  78 25 2b 37 2c 63 6f 6c  29 0d 5a be 14 de 20 78  |x%+7,col).Z... x|
00011f60  6c 32 25 28 78 25 2b 37  2c 63 6f 6c 29 0d 5a c8  |l2%(x%+7,col).Z.|
00011f70  0f e7 73 68 61 72 70 65  6e 25 20 8c 0d 5a d2 0d  |..sharpen% ..Z..|
00011f80  e7 6f 72 64 65 72 25 20  8c 0d 5a dc 34 de 20 72  |.order% ..Z.4. r|
00011f90  6d 25 28 73 78 25 2b 37  2c 63 6f 6c 29 2c 72 6d  |m%(sx%+7,col),rm|
00011fa0  31 25 28 73 78 25 2b 37  2c 63 6f 6c 29 2c 72 6d  |1%(sx%+7,col),rm|
00011fb0  32 25 28 73 78 25 2b 37  2c 63 6f 6c 29 0d 5a e6  |2%(sx%+7,col).Z.|
00011fc0  05 cc 0d 5a f0 31 de 20  72 6d 25 28 78 25 2b 37  |...Z.1. rm%(x%+7|
00011fd0  2c 63 6f 6c 29 2c 72 6d  31 25 28 78 25 2b 37 2c  |,col),rm1%(x%+7,|
00011fe0  63 6f 6c 29 2c 72 6d 32  25 28 78 25 2b 37 2c 63  |col),rm2%(x%+7,c|
00011ff0  6f 6c 29 0d 5a fa 05 cd  0d 5b 04 05 cd 0d 5b 0e  |ol).Z....[....[.|
00012000  22 e7 68 69 73 74 25 84  65 71 75 61 6c 25 20 de  |".hist%.equal% .|
00012010  20 76 61 6c 73 25 28 32  35 36 2c 63 6f 6c 29 0d  | vals%(256,col).|
00012020  5b 18 13 de 20 6e 6c 25  28 78 25 2b 37 2c 63 6f  |[... nl%(x%+7,co|
00012030  6c 29 0d 5b 22 17 74 6f  74 76 61 6c 73 25 3d 78  |l).[".totvals%=x|
00012040  25 2a 28 63 6f 6c 2b 31  29 0d 5b 2c 19 74 6f 74  |%*(col+1).[,.tot|
00012050  76 61 6c 73 32 25 3d 73  78 25 2a 28 63 6f 6c 2b  |vals2%=sx%*(col+|
00012060  31 29 0d 5b 36 15 e3 5a  3d 30 b8 32 88 32 3a 50  |1).[6..Z=0.2.2:P|
00012070  25 3d 63 6f 64 65 25 0d  5b 40 0d c8 8e 20 6e 63  |%=code%.[@... nc|
00012080  6f 6c 20 ca 0d 5b 4a 0c  c9 20 32 5e 32 34 2d 31  |ol ..[J.. 2^24-1|
00012090  0d 5b 54 0a 5b 4f 50 54  20 5a 0d 5b 5e 0b 2e 64  |.[T.[OPT Z.[^..d|
000120a0  69 76 32 35 35 0d 5b 68  05 5d 0d 5b 72 14 e3 49  |iv255.[h.].[r..I|
000120b0  25 3d 30 b8 32 5e 70 36  62 69 74 73 2d 31 0d 5b  |%=0.2^p6bits-1.[|
000120c0  7c 0a 5b 4f 50 54 20 5a  0d 5b 86 1a 45 51 55 44  ||.[OPT Z.[..EQUD|
000120d0  20 49 25 2f 28 32 5e 70  36 62 69 74 73 2d 31 29  | I%/(2^p6bits-1)|
000120e0  2a 46 0d 5b 90 05 5d 0d  5b 9a 05 ed 0d 5b a4 0a  |*F.[..].[....[..|
000120f0  5b 4f 50 54 20 5a 0d 5b  ae 08 2e 66 73 25 0d 5b  |[OPT Z.[...fs%.[|
00012100  b8 14 53 54 4d 46 44 20  53 50 20 21 2c 7b 52 31  |..STMFD SP !,{R1|
00012110  34 7d 0d 5b c2 20 4c 44  52 20 52 31 2c 5b 52 39  |4}.[. LDR R1,[R9|
00012120  2c 23 35 2a 38 5d 3a 4c  44 52 20 52 31 2c 5b 52  |,#5*8]:LDR R1,[R|
00012130  31 5d 0d 5b cc 15 4c 44  52 20 52 31 30 2c 5b 52  |1].[..LDR R10,[R|
00012140  39 2c 23 34 2a 38 5d 0d  5b d6 15 4c 44 52 20 52  |9,#4*8].[..LDR R|
00012150  31 31 2c 5b 52 39 2c 23  33 2a 38 5d 0d 5b e0 23  |11,[R9,#3*8].[.#|
00012160  4c 44 52 20 52 31 32 2c  5b 52 39 2c 23 32 2a 38  |LDR R12,[R9,#2*8|
00012170  5d 3a 4c 44 52 20 52 31  32 2c 5b 52 31 32 5d 0d  |]:LDR R12,[R12].|
00012180  5b ea 1e 4c 44 52 20 52  38 2c 5b 52 39 2c 23 38  |[..LDR R8,[R9,#8|
00012190  5d 3a 4c 44 52 20 52 38  2c 5b 52 38 5d 0d 5b f4  |]:LDR R8,[R8].[.|
000121a0  1b 4c 44 52 20 52 39 2c  5b 52 39 5d 3a 4c 44 52  |.LDR R9,[R9]:LDR|
000121b0  20 52 39 2c 5b 52 39 5d  0d 5b fe 10 4c 44 52 20  | R9,[R9].[..LDR |
000121c0  52 34 2c 5b 52 31 30 5d  0d 5c 08 13 4c 44 52 20  |R4,[R10].\..LDR |
000121d0  52 35 2c 5b 52 31 30 2c  23 34 5d 0d 5c 12 13 4c  |R5,[R10,#4].\..L|
000121e0  44 52 20 52 36 2c 5b 52  31 30 2c 23 38 5d 0d 5c  |DR R6,[R10,#8].\|
000121f0  1c 11 41 44 52 20 52 37  2c 64 69 76 32 35 35 0d  |..ADR R7,div255.|
00012200  5c 26 0b 2e 66 73 6c 6f  6f 70 0d 5c 30 12 41 44  |\&..fsloop.\0.AD|
00012210  44 20 52 31 30 2c 52 31  30 2c 52 38 0d 5c 3a 25  |D R10,R10,R8.\:%|
00012220  43 4d 50 20 52 34 2c 23  46 3a 4d 4f 56 43 53 20  |CMP R4,#F:MOVCS |
00012230  52 34 2c 23 30 3a 4d 4f  56 47 45 20 52 34 2c 23  |R4,#0:MOVGE R4,#|
00012240  46 0d 5c 44 57 53 55 42  20 52 30 2c 52 34 2c 52  |F.\DWSUB R0,R4,R|
00012250  34 2c 4c 53 52 20 23 70  36 62 69 74 73 3a 41 44  |4,LSR #p6bits:AD|
00012260  44 20 52 30 2c 52 30 2c  23 31 3c 3c 28 62 69 74  |D R0,R0,#1<<(bit|
00012270  73 2d 70 36 62 69 74 73  2d 31 29 3a 4d 4f 56 20  |s-p6bits-1):MOV |
00012280  52 30 2c 52 30 2c 4c 53  52 20 23 28 62 69 74 73  |R0,R0,LSR #(bits|
00012290  2d 70 36 62 69 74 73 29  0d 5c 4e 26 4c 44 52 20  |-p6bits).\N&LDR |
000122a0  52 32 2c 5b 52 37 2c 52  30 2c 4c 53 4c 20 23 32  |R2,[R7,R0,LSL #2|
000122b0  5d 3a 53 55 42 20 52 34  2c 52 34 2c 52 32 0d 5c  |]:SUB R4,R4,R2.\|
000122c0  58 25 43 4d 50 20 52 35  2c 23 46 3a 4d 4f 56 43  |X%CMP R5,#F:MOVC|
000122d0  53 20 52 35 2c 23 30 3a  4d 4f 56 47 45 20 52 35  |S R5,#0:MOVGE R5|
000122e0  2c 23 46 0d 5c 62 6a 53  55 42 20 52 33 2c 52 35  |,#F.\bjSUB R3,R5|
000122f0  2c 52 35 2c 4c 53 52 20  23 70 36 62 69 74 73 3a  |,R5,LSR #p6bits:|
00012300  41 44 44 20 52 33 2c 52  33 2c 23 31 3c 3c 28 62  |ADD R3,R3,#1<<(b|
00012310  69 74 73 2d 70 36 62 69  74 73 2d 31 29 3a 4d 4f  |its-p6bits-1):MO|
00012320  56 20 52 33 2c 52 33 2c  4c 53 52 20 23 28 62 69  |V R3,R3,LSR #(bi|
00012330  74 73 2d 70 36 62 69 74  73 29 3a 84 52 20 52 30  |ts-p6bits):.R R0|
00012340  2c 52 30 2c 52 33 2c 4c  53 4c 20 23 38 0d 5c 6c  |,R0,R3,LSL #8.\l|
00012350  26 4c 44 52 20 52 32 2c  5b 52 37 2c 52 33 2c 4c  |&LDR R2,[R7,R3,L|
00012360  53 4c 20 23 32 5d 3a 53  55 42 20 52 35 2c 52 35  |SL #2]:SUB R5,R5|
00012370  2c 52 32 0d 5c 76 25 43  4d 50 20 52 36 2c 23 46  |,R2.\v%CMP R6,#F|
00012380  3a 4d 4f 56 43 53 20 52  36 2c 23 30 3a 4d 4f 56  |:MOVCS R6,#0:MOV|
00012390  47 45 20 52 36 2c 23 46  0d 5c 80 6b 53 55 42 20  |GE R6,#F.\.kSUB |
000123a0  52 33 2c 52 36 2c 52 36  2c 4c 53 52 20 23 70 36  |R3,R6,R6,LSR #p6|
000123b0  62 69 74 73 3a 41 44 44  20 52 33 2c 52 33 2c 23  |bits:ADD R3,R3,#|
000123c0  31 3c 3c 28 62 69 74 73  2d 70 36 62 69 74 73 2d  |1<<(bits-p6bits-|
000123d0  31 29 3a 4d 4f 56 20 52  33 2c 52 33 2c 4c 53 52  |1):MOV R3,R3,LSR|
000123e0  20 23 28 62 69 74 73 2d  70 36 62 69 74 73 29 3a  | #(bits-p6bits):|
000123f0  84 52 20 52 30 2c 52 30  2c 52 33 2c 4c 53 4c 20  |.R R0,R0,R3,LSL |
00012400  23 31 36 0d 5c 8a 26 4c  44 52 20 52 32 2c 5b 52  |#16.\.&LDR R2,[R|
00012410  37 2c 52 33 2c 4c 53 4c  20 23 32 5d 3a 53 55 42  |7,R3,LSL #2]:SUB|
00012420  20 52 36 2c 52 36 2c 52  32 0d 5c 94 44 53 54 52  | R6,R6,R2.\.DSTR|
00012430  42 20 52 30 2c 5b 52 31  32 5d 3a 4d 4f 56 20 52  |B R0,[R12]:MOV R|
00012440  30 2c 52 30 2c 4c 53 52  20 23 38 3a 53 54 52 42  |0,R0,LSR #8:STRB|
00012450  20 52 30 2c 5b 52 31 32  2c 23 31 5d 3a 4d 4f 56  | R0,[R12,#1]:MOV|
00012460  20 52 30 2c 52 30 2c 4c  53 52 20 23 38 0d 5c 9e  | R0,R0,LSR #8.\.|
00012470  14 53 54 52 42 20 52 30  2c 5b 52 31 32 2c 23 32  |.STRB R0,[R12,#2|
00012480  5d 0d 5c a8 05 5d 0d 5c  b2 0b e7 6d 3d 2d 38 20  |].\..].\...m=-8 |
00012490  8c 0d 5c bc 0a 5b 4f 50  54 20 5a 0d 5c c6 19 41  |..\..[OPT Z.\..A|
000124a0  44 44 20 52 31 32 2c 52  31 32 2c 52 31 2c 4c 53  |DD R12,R12,R1,LS|
000124b0  4c 20 23 32 0d 5c d0 05  5d 0d 5c da 05 cc 0d 5c  |L #2.\..].\....\|
000124c0  e4 0a 5b 4f 50 54 20 5a  0d 5c ee 28 41 44 44 20  |..[OPT Z.\.(ADD |
000124d0  52 31 32 2c 52 31 32 2c  52 31 2c 4c 53 4c 20 23  |R12,R12,R1,LSL #|
000124e0  31 3a 41 44 44 20 52 31  32 2c 52 31 32 2c 52 31  |1:ADD R12,R12,R1|
000124f0  0d 5c f8 05 5d 0d 5d 02  05 cd 0d 5d 0c 0e e7 64  |.\..].]....]...d|
00012500  69 74 68 65 72 25 20 8c  0d 5d 16 0a 5b 4f 50 54  |ither% ..]..[OPT|
00012510  20 5a 0d 5d 20 11 41 44  44 20 52 30 2c 52 31 31  | Z.] .ADD R0,R11|
00012520  2c 23 34 0d 5d 2a 17 41  44 44 20 52 32 2c 52 34  |,#4.]*.ADD R2,R4|
00012530  2c 52 34 2c 4c 53 4c 20  23 31 0d 5d 34 28 4c 44  |,R4,LSL #1.]4(LD|
00012540  52 20 52 33 2c 5b 52 31  31 2c 2d 52 38 5d 3a 41  |R R3,[R11,-R8]:A|
00012550  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
00012560  23 34 0d 5d 3e 14 53 54  52 20 52 33 2c 5b 52 31  |#4.]>.STR R3,[R1|
00012570  31 2c 2d 52 38 5d 0d 5d  48 17 41 44 44 20 52 32  |1,-R8].]H.ADD R2|
00012580  2c 52 34 2c 52 34 2c 4c  53 4c 20 23 32 0d 5d 52  |,R4,R4,LSL #2.]R|
00012590  24 4c 44 52 20 52 33 2c  5b 52 31 31 5d 3a 41 44  |$LDR R3,[R11]:AD|
000125a0  44 20 52 33 2c 52 33 2c  52 32 2c 41 53 52 20 23  |D R3,R3,R2,ASR #|
000125b0  34 0d 5d 5c 10 53 54 52  20 52 33 2c 5b 52 31 31  |4.]\.STR R3,[R11|
000125c0  5d 0d 5d 66 14 4d 4f 56  20 52 33 2c 52 34 2c 41  |].]f.MOV R3,R4,A|
000125d0  53 52 20 23 34 0d 5d 70  14 53 54 52 20 52 33 2c  |SR #4.]p.STR R3,|
000125e0  5b 52 31 31 2c 52 38 5d  21 0d 5d 7a 17 52 53 42  |[R11,R8]!.]z.RSB|
000125f0  20 52 32 2c 52 34 2c 52  34 2c 4c 53 4c 20 23 33  | R2,R4,R4,LSL #3|
00012600  0d 5d 84 10 4c 44 52 20  52 34 2c 5b 52 31 30 5d  |.]..LDR R4,[R10]|
00012610  0d 5d 8e 17 41 44 44 20  52 34 2c 52 34 2c 52 32  |.]..ADD R4,R4,R2|
00012620  2c 41 53 52 20 23 34 0d  5d 98 17 41 44 44 20 52  |,ASR #4.]..ADD R|
00012630  32 2c 52 35 2c 52 35 2c  4c 53 4c 20 23 31 0d 5d  |2,R5,R5,LSL #1.]|
00012640  a2 27 4c 44 52 20 52 33  2c 5b 52 30 2c 2d 52 38  |.'LDR R3,[R0,-R8|
00012650  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 32 2c 41  |]:ADD R3,R3,R2,A|
00012660  53 52 20 23 34 0d 5d ac  13 53 54 52 20 52 33 2c  |SR #4.]..STR R3,|
00012670  5b 52 30 2c 2d 52 38 5d  0d 5d b6 14 4d 4f 56 20  |[R0,-R8].]..MOV |
00012680  52 33 2c 52 35 2c 41 53  52 20 23 34 0d 5d c0 12  |R3,R5,ASR #4.]..|
00012690  53 54 52 20 52 33 2c 5b  52 30 2c 52 38 5d 0d 5d  |STR R3,[R0,R8].]|
000126a0  ca 17 41 44 44 20 52 32  2c 52 35 2c 52 35 2c 4c  |..ADD R2,R5,R5,L|
000126b0  53 4c 20 23 32 0d 5d d4  23 4c 44 52 20 52 33 2c  |SL #2.].#LDR R3,|
000126c0  5b 52 30 5d 3a 41 44 44  20 52 33 2c 52 33 2c 52  |[R0]:ADD R3,R3,R|
000126d0  32 2c 41 53 52 20 23 34  0d 5d de 12 53 54 52 20  |2,ASR #4.]..STR |
000126e0  52 33 2c 5b 52 30 5d 2c  23 34 0d 5d e8 17 52 53  |R3,[R0],#4.]..RS|
000126f0  42 20 52 32 2c 52 35 2c  52 35 2c 4c 53 4c 20 23  |B R2,R5,R5,LSL #|
00012700  33 0d 5d f2 13 4c 44 52  20 52 35 2c 5b 52 31 30  |3.]..LDR R5,[R10|
00012710  2c 23 34 5d 0d 5d fc 17  41 44 44 20 52 35 2c 52  |,#4].]..ADD R5,R|
00012720  35 2c 52 32 2c 41 53 52  20 23 34 0d 5e 06 17 41  |5,R2,ASR #4.^..A|
00012730  44 44 20 52 32 2c 52 36  2c 52 36 2c 4c 53 4c 20  |DD R2,R6,R6,LSL |
00012740  23 31 0d 5e 10 27 4c 44  52 20 52 33 2c 5b 52 30  |#1.^.'LDR R3,[R0|
00012750  2c 2d 52 38 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |,-R8]:ADD R3,R3,|
00012760  52 32 2c 41 53 52 20 23  34 0d 5e 1a 13 53 54 52  |R2,ASR #4.^..STR|
00012770  20 52 33 2c 5b 52 30 2c  2d 52 38 5d 0d 5e 24 17  | R3,[R0,-R8].^$.|
00012780  41 44 44 20 52 32 2c 52  36 2c 52 36 2c 4c 53 4c  |ADD R2,R6,R6,LSL|
00012790  20 23 32 0d 5e 2e 23 4c  44 52 20 52 33 2c 5b 52  | #2.^.#LDR R3,[R|
000127a0  30 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |0]:ADD R3,R3,R2,|
000127b0  41 53 52 20 23 34 0d 5e  38 0f 53 54 52 20 52 33  |ASR #4.^8.STR R3|
000127c0  2c 5b 52 30 5d 0d 5e 42  14 4d 4f 56 20 52 33 2c  |,[R0].^B.MOV R3,|
000127d0  52 36 2c 41 53 52 20 23  34 0d 5e 4c 12 53 54 52  |R6,ASR #4.^L.STR|
000127e0  20 52 33 2c 5b 52 30 2c  52 38 5d 0d 5e 56 17 52  | R3,[R0,R8].^V.R|
000127f0  53 42 20 52 32 2c 52 36  2c 52 36 2c 4c 53 4c 20  |SB R2,R6,R6,LSL |
00012800  23 33 0d 5e 60 13 4c 44  52 20 52 36 2c 5b 52 31  |#3.^`.LDR R6,[R1|
00012810  30 2c 23 38 5d 0d 5e 6a  17 41 44 44 20 52 36 2c  |0,#8].^j.ADD R6,|
00012820  52 36 2c 52 32 2c 41 53  52 20 23 34 0d 5e 74 05  |R6,R2,ASR #4.^t.|
00012830  5d 0d 5e 7e 05 cc 0d 5e  88 0a 5b 4f 50 54 20 5a  |].^~...^..[OPT Z|
00012840  0d 5e 92 18 4c 44 4d 49  41 20 52 31 30 2c 7b 52  |.^..LDMIA R10,{R|
00012850  34 2c 52 35 2c 52 36 7d  0d 5e 9c 05 5d 0d 5e a6  |4,R5,R6}.^..].^.|
00012860  05 cd 0d 5e b0 0a 5b 4f  50 54 20 5a 0d 5e ba 1c  |...^..[OPT Z.^..|
00012870  53 55 42 53 20 52 39 2c  52 39 2c 23 31 3a 42 4e  |SUBS R9,R9,#1:BN|
00012880  45 20 66 73 6c 6f 6f 70  0d 5e c4 14 4c 44 4d 46  |E fsloop.^..LDMF|
00012890  44 20 53 50 20 21 2c 7b  50 43 7d 5e 0d 5e ce 05  |D SP !,{PC}^.^..|
000128a0  5d 0d 5e d8 0c c9 20 32  5e 31 35 2d 31 0d 5e e2  |].^... 2^15-1.^.|
000128b0  0a 5b 4f 50 54 20 5a 0d  5e ec 0a 2e 64 69 76 33  |.[OPT Z.^...div3|
000128c0  31 0d 5e f6 05 5d 0d 5f  00 0c e3 49 25 3d 30 b8  |1.^..]._...I%=0.|
000128d0  33 31 0d 5f 0a 0a 5b 4f  50 54 20 5a 0d 5f 14 10  |31._..[OPT Z._..|
000128e0  45 51 55 44 20 49 25 2f  33 31 2a 46 0d 5f 1e 05  |EQUD I%/31*F._..|
000128f0  5d 0d 5f 28 05 ed 0d 5f  32 0a 5b 4f 50 54 20 5a  |]._(..._2.[OPT Z|
00012900  0d 5f 3c 08 2e 66 73 25  0d 5f 46 14 53 54 4d 46  |._<..fs%._F.STMF|
00012910  44 20 53 50 20 21 2c 7b  52 31 34 7d 0d 5f 50 20  |D SP !,{R14}._P |
00012920  4c 44 52 20 52 31 2c 5b  52 39 2c 23 35 2a 38 5d  |LDR R1,[R9,#5*8]|
00012930  3a 4c 44 52 20 52 31 2c  5b 52 31 5d 0d 5f 5a 15  |:LDR R1,[R1]._Z.|
00012940  4c 44 52 20 52 31 30 2c  5b 52 39 2c 23 34 2a 38  |LDR R10,[R9,#4*8|
00012950  5d 0d 5f 64 15 4c 44 52  20 52 31 31 2c 5b 52 39  |]._d.LDR R11,[R9|
00012960  2c 23 33 2a 38 5d 0d 5f  6e 23 4c 44 52 20 52 31  |,#3*8]._n#LDR R1|
00012970  32 2c 5b 52 39 2c 23 32  2a 38 5d 3a 4c 44 52 20  |2,[R9,#2*8]:LDR |
00012980  52 31 32 2c 5b 52 31 32  5d 0d 5f 78 1e 4c 44 52  |R12,[R12]._x.LDR|
00012990  20 52 38 2c 5b 52 39 2c  23 38 5d 3a 4c 44 52 20  | R8,[R9,#8]:LDR |
000129a0  52 38 2c 5b 52 38 5d 0d  5f 82 1b 4c 44 52 20 52  |R8,[R8]._..LDR R|
000129b0  39 2c 5b 52 39 5d 3a 4c  44 52 20 52 39 2c 5b 52  |9,[R9]:LDR R9,[R|
000129c0  39 5d 0d 5f 8c 10 4c 44  52 20 52 34 2c 5b 52 31  |9]._..LDR R4,[R1|
000129d0  30 5d 0d 5f 96 13 4c 44  52 20 52 35 2c 5b 52 31  |0]._..LDR R5,[R1|
000129e0  30 2c 23 34 5d 0d 5f a0  13 4c 44 52 20 52 36 2c  |0,#4]._..LDR R6,|
000129f0  5b 52 31 30 2c 23 38 5d  0d 5f aa 10 41 44 52 20  |[R10,#8]._..ADR |
00012a00  52 37 2c 64 69 76 33 31  0d 5f b4 0b 2e 66 73 6c  |R7,div31._...fsl|
00012a10  6f 6f 70 0d 5f be 12 41  44 44 20 52 31 30 2c 52  |oop._..ADD R10,R|
00012a20  31 30 2c 52 38 0d 5f c8  25 43 4d 50 20 52 34 2c  |10,R8._.%CMP R4,|
00012a30  23 46 3a 4d 4f 56 43 53  20 52 34 2c 23 30 3a 4d  |#F:MOVCS R4,#0:M|
00012a40  4f 56 47 45 20 52 34 2c  23 46 0d 5f d2 46 53 55  |OVGE R4,#F._.FSU|
00012a50  42 20 52 30 2c 52 34 2c  52 34 2c 4c 53 52 20 23  |B R0,R4,R4,LSR #|
00012a60  35 3a 41 44 44 20 52 30  2c 52 30 2c 23 31 3c 3c  |5:ADD R0,R0,#1<<|
00012a70  28 62 69 74 73 2d 36 29  3a 4d 4f 56 20 52 30 2c  |(bits-6):MOV R0,|
00012a80  52 30 2c 4c 53 52 20 23  28 62 69 74 73 2d 35 29  |R0,LSR #(bits-5)|
00012a90  0d 5f dc 26 4c 44 52 20  52 32 2c 5b 52 37 2c 52  |._.&LDR R2,[R7,R|
00012aa0  30 2c 4c 53 4c 20 23 32  5d 3a 53 55 42 20 52 34  |0,LSL #2]:SUB R4|
00012ab0  2c 52 34 2c 52 32 0d 5f  e6 25 43 4d 50 20 52 35  |,R4,R2._.%CMP R5|
00012ac0  2c 23 46 3a 4d 4f 56 43  53 20 52 35 2c 23 30 3a  |,#F:MOVCS R5,#0:|
00012ad0  4d 4f 56 47 45 20 52 35  2c 23 46 0d 5f f0 59 53  |MOVGE R5,#F._.YS|
00012ae0  55 42 20 52 33 2c 52 35  2c 52 35 2c 4c 53 52 20  |UB R3,R5,R5,LSR |
00012af0  23 35 3a 41 44 44 20 52  33 2c 52 33 2c 23 31 3c  |#5:ADD R3,R3,#1<|
00012b00  3c 28 62 69 74 73 2d 36  29 3a 4d 4f 56 20 52 33  |<(bits-6):MOV R3|
00012b10  2c 52 33 2c 4c 53 52 20  23 28 62 69 74 73 2d 35  |,R3,LSR #(bits-5|
00012b20  29 3a 84 52 20 52 30 2c  52 30 2c 52 33 2c 4c 53  |):.R R0,R0,R3,LS|
00012b30  4c 20 23 35 0d 5f fa 26  4c 44 52 20 52 32 2c 5b  |L #5._.&LDR R2,[|
00012b40  52 37 2c 52 33 2c 4c 53  4c 20 23 32 5d 3a 53 55  |R7,R3,LSL #2]:SU|
00012b50  42 20 52 35 2c 52 35 2c  52 32 0d 60 04 25 43 4d  |B R5,R5,R2.`.%CM|
00012b60  50 20 52 36 2c 23 46 3a  4d 4f 56 43 53 20 52 36  |P R6,#F:MOVCS R6|
00012b70  2c 23 30 3a 4d 4f 56 47  45 20 52 36 2c 23 46 0d  |,#0:MOVGE R6,#F.|
00012b80  60 0e 5a 53 55 42 20 52  33 2c 52 36 2c 52 36 2c  |`.ZSUB R3,R6,R6,|
00012b90  4c 53 52 20 23 35 3a 41  44 44 20 52 33 2c 52 33  |LSR #5:ADD R3,R3|
00012ba0  2c 23 31 3c 3c 28 62 69  74 73 2d 36 29 3a 4d 4f  |,#1<<(bits-6):MO|
00012bb0  56 20 52 33 2c 52 33 2c  4c 53 52 20 23 28 62 69  |V R3,R3,LSR #(bi|
00012bc0  74 73 2d 35 29 3a 84 52  20 52 30 2c 52 30 2c 52  |ts-5):.R R0,R0,R|
00012bd0  33 2c 4c 53 4c 20 23 31  30 0d 60 18 26 4c 44 52  |3,LSL #10.`.&LDR|
00012be0  20 52 32 2c 5b 52 37 2c  52 33 2c 4c 53 4c 20 23  | R2,[R7,R3,LSL #|
00012bf0  32 5d 3a 53 55 42 20 52  36 2c 52 36 2c 52 32 0d  |2]:SUB R6,R6,R2.|
00012c00  60 22 49 53 54 52 42 20  52 30 2c 5b 52 31 32 5d  |`"ISTRB R0,[R12]|
00012c10  3a 4d 4f 56 20 52 30 2c  52 30 2c 4c 53 52 20 23  |:MOV R0,R0,LSR #|
00012c20  38 3a 53 54 52 42 20 52  30 2c 5b 52 31 32 2c 23  |8:STRB R0,[R12,#|
00012c30  31 5d 3a 41 44 44 20 52  31 32 2c 52 31 32 2c 52  |1]:ADD R12,R12,R|
00012c40  31 2c 4c 53 4c 20 23 31  0d 60 2c 05 5d 0d 60 36  |1,LSL #1.`,.].`6|
00012c50  0e e7 64 69 74 68 65 72  25 20 8c 0d 60 40 0a 5b  |..dither% ..`@.[|
00012c60  4f 50 54 20 5a 0d 60 4a  11 41 44 44 20 52 30 2c  |OPT Z.`J.ADD R0,|
00012c70  52 31 31 2c 23 34 0d 60  54 17 41 44 44 20 52 32  |R11,#4.`T.ADD R2|
00012c80  2c 52 34 2c 52 34 2c 4c  53 4c 20 23 31 0d 60 5e  |,R4,R4,LSL #1.`^|
00012c90  28 4c 44 52 20 52 33 2c  5b 52 31 31 2c 2d 52 38  |(LDR R3,[R11,-R8|
00012ca0  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 32 2c 41  |]:ADD R3,R3,R2,A|
00012cb0  53 52 20 23 34 0d 60 68  14 53 54 52 20 52 33 2c  |SR #4.`h.STR R3,|
00012cc0  5b 52 31 31 2c 2d 52 38  5d 0d 60 72 17 41 44 44  |[R11,-R8].`r.ADD|
00012cd0  20 52 32 2c 52 34 2c 52  34 2c 4c 53 4c 20 23 32  | R2,R4,R4,LSL #2|
00012ce0  0d 60 7c 24 4c 44 52 20  52 33 2c 5b 52 31 31 5d  |.`|$LDR R3,[R11]|
00012cf0  3a 41 44 44 20 52 33 2c  52 33 2c 52 32 2c 41 53  |:ADD R3,R3,R2,AS|
00012d00  52 20 23 34 0d 60 86 10  53 54 52 20 52 33 2c 5b  |R #4.`..STR R3,[|
00012d10  52 31 31 5d 0d 60 90 14  4d 4f 56 20 52 33 2c 52  |R11].`..MOV R3,R|
00012d20  34 2c 41 53 52 20 23 34  0d 60 9a 14 53 54 52 20  |4,ASR #4.`..STR |
00012d30  52 33 2c 5b 52 31 31 2c  52 38 5d 21 0d 60 a4 17  |R3,[R11,R8]!.`..|
00012d40  52 53 42 20 52 32 2c 52  34 2c 52 34 2c 4c 53 4c  |RSB R2,R4,R4,LSL|
00012d50  20 23 33 0d 60 ae 10 4c  44 52 20 52 34 2c 5b 52  | #3.`..LDR R4,[R|
00012d60  31 30 5d 0d 60 b8 17 41  44 44 20 52 34 2c 52 34  |10].`..ADD R4,R4|
00012d70  2c 52 32 2c 41 53 52 20  23 34 0d 60 c2 17 41 44  |,R2,ASR #4.`..AD|
00012d80  44 20 52 32 2c 52 35 2c  52 35 2c 4c 53 4c 20 23  |D R2,R5,R5,LSL #|
00012d90  31 0d 60 cc 27 4c 44 52  20 52 33 2c 5b 52 30 2c  |1.`.'LDR R3,[R0,|
00012da0  2d 52 38 5d 3a 41 44 44  20 52 33 2c 52 33 2c 52  |-R8]:ADD R3,R3,R|
00012db0  32 2c 41 53 52 20 23 34  0d 60 d6 13 53 54 52 20  |2,ASR #4.`..STR |
00012dc0  52 33 2c 5b 52 30 2c 2d  52 38 5d 0d 60 e0 14 4d  |R3,[R0,-R8].`..M|
00012dd0  4f 56 20 52 33 2c 52 35  2c 41 53 52 20 23 34 0d  |OV R3,R5,ASR #4.|
00012de0  60 ea 12 53 54 52 20 52  33 2c 5b 52 30 2c 52 38  |`..STR R3,[R0,R8|
00012df0  5d 0d 60 f4 17 41 44 44  20 52 32 2c 52 35 2c 52  |].`..ADD R2,R5,R|
00012e00  35 2c 4c 53 4c 20 23 32  0d 60 fe 23 4c 44 52 20  |5,LSL #2.`.#LDR |
00012e10  52 33 2c 5b 52 30 5d 3a  41 44 44 20 52 33 2c 52  |R3,[R0]:ADD R3,R|
00012e20  33 2c 52 32 2c 41 53 52  20 23 34 0d 61 08 12 53  |3,R2,ASR #4.a..S|
00012e30  54 52 20 52 33 2c 5b 52  30 5d 2c 23 34 0d 61 12  |TR R3,[R0],#4.a.|
00012e40  17 52 53 42 20 52 32 2c  52 35 2c 52 35 2c 4c 53  |.RSB R2,R5,R5,LS|
00012e50  4c 20 23 33 0d 61 1c 13  4c 44 52 20 52 35 2c 5b  |L #3.a..LDR R5,[|
00012e60  52 31 30 2c 23 34 5d 0d  61 26 17 41 44 44 20 52  |R10,#4].a&.ADD R|
00012e70  35 2c 52 35 2c 52 32 2c  41 53 52 20 23 34 0d 61  |5,R5,R2,ASR #4.a|
00012e80  30 17 41 44 44 20 52 32  2c 52 36 2c 52 36 2c 4c  |0.ADD R2,R6,R6,L|
00012e90  53 4c 20 23 31 0d 61 3a  27 4c 44 52 20 52 33 2c  |SL #1.a:'LDR R3,|
00012ea0  5b 52 30 2c 2d 52 38 5d  3a 41 44 44 20 52 33 2c  |[R0,-R8]:ADD R3,|
00012eb0  52 33 2c 52 32 2c 41 53  52 20 23 34 0d 61 44 13  |R3,R2,ASR #4.aD.|
00012ec0  53 54 52 20 52 33 2c 5b  52 30 2c 2d 52 38 5d 0d  |STR R3,[R0,-R8].|
00012ed0  61 4e 17 41 44 44 20 52  32 2c 52 36 2c 52 36 2c  |aN.ADD R2,R6,R6,|
00012ee0  4c 53 4c 20 23 32 0d 61  58 23 4c 44 52 20 52 33  |LSL #2.aX#LDR R3|
00012ef0  2c 5b 52 30 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |,[R0]:ADD R3,R3,|
00012f00  52 32 2c 41 53 52 20 23  34 0d 61 62 0f 53 54 52  |R2,ASR #4.ab.STR|
00012f10  20 52 33 2c 5b 52 30 5d  0d 61 6c 14 4d 4f 56 20  | R3,[R0].al.MOV |
00012f20  52 33 2c 52 36 2c 41 53  52 20 23 34 0d 61 76 12  |R3,R6,ASR #4.av.|
00012f30  53 54 52 20 52 33 2c 5b  52 30 2c 52 38 5d 0d 61  |STR R3,[R0,R8].a|
00012f40  80 17 52 53 42 20 52 32  2c 52 36 2c 52 36 2c 4c  |..RSB R2,R6,R6,L|
00012f50  53 4c 20 23 33 0d 61 8a  13 4c 44 52 20 52 36 2c  |SL #3.a..LDR R6,|
00012f60  5b 52 31 30 2c 23 38 5d  0d 61 94 17 41 44 44 20  |[R10,#8].a..ADD |
00012f70  52 36 2c 52 36 2c 52 32  2c 41 53 52 20 23 34 0d  |R6,R6,R2,ASR #4.|
00012f80  61 9e 05 5d 0d 61 a8 05  cc 0d 61 b2 0a 5b 4f 50  |a..].a....a..[OP|
00012f90  54 20 5a 0d 61 bc 18 4c  44 4d 49 41 20 52 31 30  |T Z.a..LDMIA R10|
00012fa0  2c 7b 52 34 2c 52 35 2c  52 36 7d 0d 61 c6 05 5d  |,{R4,R5,R6}.a..]|
00012fb0  0d 61 d0 05 cd 0d 61 da  0a 5b 4f 50 54 20 5a 0d  |.a....a..[OPT Z.|
00012fc0  61 e4 1c 53 55 42 53 20  52 39 2c 52 39 2c 23 31  |a..SUBS R9,R9,#1|
00012fd0  3a 42 4e 45 20 66 73 6c  6f 6f 70 0d 61 ee 14 4c  |:BNE fsloop.a..L|
00012fe0  44 4d 46 44 20 53 50 20  21 2c 7b 50 43 7d 5e 0d  |DMFD SP !,{PC}^.|
00012ff0  61 f8 05 5d 0d 62 02 09  c9 20 32 35 36 0d 62 0c  |a..].b... 256.b.|
00013000  0a 5b 4f 50 54 20 5a 0d  62 16 0b 2e 64 69 76 32  |.[OPT Z.b...div2|
00013010  35 35 0d 62 20 05 5d 0d  62 2a 0d e3 49 25 3d 30  |55.b .].b*..I%=0|
00013020  b8 32 35 35 0d 62 34 0a  5b 4f 50 54 20 5a 0d 62  |.255.b4.[OPT Z.b|
00013030  3e 11 45 51 55 44 20 49  25 2f 32 35 35 2a 46 0d  |>.EQUD I%/255*F.|
00013040  62 48 05 5d 0d 62 52 05  ed 0d 62 5c 0a 5b 4f 50  |bH.].bR...b\.[OP|
00013050  54 20 5a 0d 62 70 08 2e  66 73 25 0d 62 7a 14 53  |T Z.bp..fs%.bz.S|
00013060  54 4d 46 44 20 53 50 20  21 2c 7b 52 31 34 7d 0d  |TMFD SP !,{R14}.|
00013070  62 84 15 4c 44 52 20 52  31 30 2c 5b 52 39 2c 23  |b..LDR R10,[R9,#|
00013080  34 2a 38 5d 0d 62 8e 11  41 44 52 20 52 37 2c 64  |4*8].b..ADR R7,d|
00013090  69 76 32 35 35 0d 62 98  20 4c 44 52 20 52 31 2c  |iv255.b. LDR R1,|
000130a0  5b 52 39 2c 23 35 2a 38  5d 3a 4c 44 52 20 52 31  |[R9,#5*8]:LDR R1|
000130b0  2c 5b 52 31 5d 0d 62 a2  15 4c 44 52 20 52 31 31  |,[R1].b..LDR R11|
000130c0  2c 5b 52 39 2c 23 33 2a  38 5d 0d 62 ac 23 4c 44  |,[R9,#3*8].b.#LD|
000130d0  52 20 52 31 32 2c 5b 52  39 2c 23 32 2a 38 5d 3a  |R R12,[R9,#2*8]:|
000130e0  4c 44 52 20 52 31 32 2c  5b 52 31 32 5d 0d 62 b6  |LDR R12,[R12].b.|
000130f0  1e 4c 44 52 20 52 38 2c  5b 52 39 2c 23 38 5d 3a  |.LDR R8,[R9,#8]:|
00013100  4c 44 52 20 52 38 2c 5b  52 38 5d 0d 62 c0 1b 4c  |LDR R8,[R8].b..L|
00013110  44 52 20 52 39 2c 5b 52  39 5d 3a 4c 44 52 20 52  |DR R9,[R9]:LDR R|
00013120  39 2c 5b 52 39 5d 0d 62  ca 13 4c 44 52 20 52 34  |9,[R9].b..LDR R4|
00013130  2c 5b 52 31 30 5d 2c 52  38 0d 62 d4 0b 2e 66 73  |,[R10],R8.b...fs|
00013140  6c 6f 6f 70 0d 62 de 25  43 4d 50 20 52 34 2c 23  |loop.b.%CMP R4,#|
00013150  46 3a 4d 4f 56 43 53 20  52 34 2c 23 30 3a 4d 4f  |F:MOVCS R4,#0:MO|
00013160  56 47 45 20 52 34 2c 23  46 0d 62 e8 57 53 55 42  |VGE R4,#F.b.WSUB|
00013170  20 52 30 2c 52 34 2c 52  34 2c 4c 53 52 20 23 38  | R0,R4,R4,LSR #8|
00013180  3a 41 44 44 20 52 30 2c  52 30 2c 23 31 3c 3c 28  |:ADD R0,R0,#1<<(|
00013190  62 69 74 73 2d 39 29 3a  4d 4f 56 20 52 30 2c 52  |bits-9):MOV R0,R|
000131a0  30 2c 4c 53 52 20 23 28  62 69 74 73 2d 38 29 3a  |0,LSR #(bits-8):|
000131b0  53 54 52 42 20 52 30 2c  5b 52 31 32 5d 2c 52 31  |STRB R0,[R12],R1|
000131c0  0d 62 f2 19 4c 44 52 20  52 32 2c 5b 52 37 2c 52  |.b..LDR R2,[R7,R|
000131d0  30 2c 4c 53 4c 20 23 32  5d 0d 62 fc 05 5d 0d 63  |0,LSL #2].b..].c|
000131e0  06 0e e7 64 69 74 68 65  72 25 20 8c 0d 63 10 0a  |...dither% ..c..|
000131f0  5b 4f 50 54 20 5a 0d 63  1a 10 53 55 42 20 52 34  |[OPT Z.c..SUB R4|
00013200  2c 52 34 2c 52 32 0d 63  24 0f 4d 4f 56 43 53 20  |,R4,R2.c$.MOVCS |
00013210  52 34 2c 23 30 0d 63 2e  17 41 44 44 20 52 32 2c  |R4,#0.c..ADD R2,|
00013220  52 34 2c 52 34 2c 4c 53  4c 20 23 31 0d 63 38 28  |R4,R4,LSL #1.c8(|
00013230  4c 44 52 20 52 33 2c 5b  52 31 31 2c 2d 52 38 5d  |LDR R3,[R11,-R8]|
00013240  3a 41 44 44 20 52 33 2c  52 33 2c 52 32 2c 41 53  |:ADD R3,R3,R2,AS|
00013250  52 20 23 34 0d 63 42 14  53 54 52 20 52 33 2c 5b  |R #4.cB.STR R3,[|
00013260  52 31 31 2c 2d 52 38 5d  0d 63 4c 17 41 44 44 20  |R11,-R8].cL.ADD |
00013270  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 32 0d  |R2,R4,R4,LSL #2.|
00013280  63 56 24 4c 44 52 20 52  33 2c 5b 52 31 31 5d 3a  |cV$LDR R3,[R11]:|
00013290  41 44 44 20 52 33 2c 52  33 2c 52 32 2c 41 53 52  |ADD R3,R3,R2,ASR|
000132a0  20 23 34 0d 63 60 10 53  54 52 20 52 33 2c 5b 52  | #4.c`.STR R3,[R|
000132b0  31 31 5d 0d 63 6a 14 4d  4f 56 20 52 33 2c 52 34  |11].cj.MOV R3,R4|
000132c0  2c 41 53 52 20 23 34 0d  63 74 14 53 54 52 20 52  |,ASR #4.ct.STR R|
000132d0  33 2c 5b 52 31 31 2c 52  38 5d 21 0d 63 7e 17 52  |3,[R11,R8]!.c~.R|
000132e0  53 42 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |SB R2,R4,R4,LSL |
000132f0  23 33 0d 63 88 13 4c 44  52 20 52 34 2c 5b 52 31  |#3.c..LDR R4,[R1|
00013300  30 5d 2c 52 38 0d 63 92  17 41 44 44 20 52 34 2c  |0],R8.c..ADD R4,|
00013310  52 34 2c 52 32 2c 41 53  52 20 23 34 0d 63 9c 05  |R4,R2,ASR #4.c..|
00013320  5d 0d 63 a6 05 cc 0d 63  b0 0a 5b 4f 50 54 20 5a  |].c....c..[OPT Z|
00013330  0d 63 ba 13 4c 44 52 20  52 34 2c 5b 52 31 30 5d  |.c..LDR R4,[R10]|
00013340  2c 52 38 0d 63 c4 05 5d  0d 63 ce 05 cd 0d 63 d8  |,R8.c..].c....c.|
00013350  0a 5b 4f 50 54 20 5a 0d  63 e2 1c 53 55 42 53 20  |.[OPT Z.c..SUBS |
00013360  52 39 2c 52 39 2c 23 31  3a 42 4e 45 20 66 73 6c  |R9,R9,#1:BNE fsl|
00013370  6f 6f 70 0d 63 ec 14 4c  44 4d 46 44 20 53 50 20  |oop.c..LDMFD SP |
00013380  21 2c 7b 50 43 7d 5e 0d  63 f6 05 5d 0d 64 00 0c  |!,{PC}^.c..].d..|
00013390  c9 20 36 33 2c 32 35 35  0d 64 0a 1a 64 69 76 31  |. 63,255.d..div1|
000133a0  35 3d 50 25 3a e3 49 25  3d 30 b8 32 35 35 2a 34  |5=P%:.I%=0.255*4|
000133b0  88 34 0d 64 14 0a 5b 4f  50 54 20 5a 0d 64 1e 20  |.4.d..[OPT Z.d. |
000133c0  45 51 55 44 20 28 70 61  6c 65 74 74 65 25 21 49  |EQUD (palette%!I|
000133d0  25 80 26 46 46 29 2f 32  35 35 2a 46 0d 64 28 23  |%.&FF)/255*F.d(#|
000133e0  45 51 55 44 20 28 70 61  6c 65 74 74 65 25 21 49  |EQUD (palette%!I|
000133f0  25 3e 3e 38 80 26 46 46  29 2f 32 35 35 2a 46 0d  |%>>8.&FF)/255*F.|
00013400  64 32 24 45 51 55 44 20  28 70 61 6c 65 74 74 65  |d2$EQUD (palette|
00013410  25 21 49 25 3e 3e 31 36  80 26 46 46 29 2f 32 35  |%!I%>>16.&FF)/25|
00013420  35 2a 46 0d 64 3c 05 5d  0d 64 46 05 ed 0d 64 50  |5*F.d<.].dF...dP|
00013430  0d e7 6d 24 3d 22 52 22  20 8c 0d 64 5a 0a 5b 4f  |..m$="R" ..dZ.[O|
00013440  50 54 20 5a 0d 64 64 15  2e 69 63 74 6c 6f 63 20  |PT Z.dd..ictloc |
00013450  45 51 55 44 20 69 63 74  25 0d 64 6e 05 5d 0d 64  |EQUD ict%.dn.].d|
00013460  78 05 cd 0d 64 82 0a 5b  4f 50 54 20 5a 0d 64 8c  |x...d..[OPT Z.d.|
00013470  0e 45 51 55 44 20 64 69  76 31 35 0d 64 96 08 2e  |.EQUD div15.d...|
00013480  66 73 25 0d 64 a0 14 53  54 4d 46 44 20 53 50 20  |fs%.d..STMFD SP |
00013490  21 2c 7b 52 31 34 7d 0d  64 aa 20 4c 44 52 20 52  |!,{R14}.d. LDR R|
000134a0  31 2c 5b 52 39 2c 23 35  2a 38 5d 3a 4c 44 52 20  |1,[R9,#5*8]:LDR |
000134b0  52 31 2c 5b 52 31 5d 0d  64 b4 15 4c 44 52 20 52  |R1,[R1].d..LDR R|
000134c0  31 30 2c 5b 52 39 2c 23  34 2a 38 5d 0d 64 be 15  |10,[R9,#4*8].d..|
000134d0  4c 44 52 20 52 31 31 2c  5b 52 39 2c 23 33 2a 38  |LDR R11,[R9,#3*8|
000134e0  5d 0d 64 c8 23 4c 44 52  20 52 31 32 2c 5b 52 39  |].d.#LDR R12,[R9|
000134f0  2c 23 32 2a 38 5d 3a 4c  44 52 20 52 31 32 2c 5b  |,#2*8]:LDR R12,[|
00013500  52 31 32 5d 0d 64 d2 1e  4c 44 52 20 52 38 2c 5b  |R12].d..LDR R8,[|
00013510  52 39 2c 23 38 5d 3a 4c  44 52 20 52 38 2c 5b 52  |R9,#8]:LDR R8,[R|
00013520  38 5d 0d 64 dc 1b 4c 44  52 20 52 39 2c 5b 52 39  |8].d..LDR R9,[R9|
00013530  5d 3a 4c 44 52 20 52 39  2c 5b 52 39 5d 0d 64 e6  |]:LDR R9,[R9].d.|
00013540  10 4c 44 52 20 52 34 2c  5b 52 31 30 5d 0d 64 f0  |.LDR R4,[R10].d.|
00013550  13 4c 44 52 20 52 35 2c  5b 52 31 30 2c 23 34 5d  |.LDR R5,[R10,#4]|
00013560  0d 64 fa 13 4c 44 52 20  52 36 2c 5b 52 31 30 2c  |.d..LDR R6,[R10,|
00013570  23 38 5d 0d 65 04 10 4c  44 52 20 52 37 2c 66 73  |#8].e..LDR R7,fs|
00013580  25 2d 34 0d 65 0e 0b 2e  66 73 6c 6f 6f 70 0d 65  |%-4.e...fsloop.e|
00013590  18 12 41 44 44 20 52 31  30 2c 52 31 30 2c 52 38  |..ADD R10,R10,R8|
000135a0  0d 65 22 05 5d 0d 65 2c  0b c8 8e 20 6d 24 20 ca  |.e".].e,... m$ .|
000135b0  0d 65 36 08 c9 22 54 22  0d 65 40 0a 5b 4f 50 54  |.e6.."T".e@.[OPT|
000135c0  20 5a 0d 65 4a 25 43 4d  50 20 52 34 2c 23 46 3a  | Z.eJ%CMP R4,#F:|
000135d0  4d 4f 56 43 53 20 52 34  2c 23 30 3a 4d 4f 56 47  |MOVCS R4,#0:MOVG|
000135e0  45 20 52 34 2c 23 46 0d  65 54 33 4d 4f 56 20 52  |E R4,#F.eT3MOV R|
000135f0  30 2c 52 34 2c 4c 53 52  20 23 28 62 69 74 73 2d  |0,R4,LSR #(bits-|
00013600  34 29 3a 43 4d 50 20 52  30 2c 23 31 35 3a 4d 4f  |4):CMP R0,#15:MO|
00013610  56 43 53 20 52 30 2c 23  31 35 0d 65 5e 25 43 4d  |VCS R0,#15.e^%CM|
00013620  50 20 52 35 2c 23 46 3a  4d 4f 56 43 53 20 52 35  |P R5,#F:MOVCS R5|
00013630  2c 23 30 3a 4d 4f 56 47  45 20 52 35 2c 23 46 0d  |,#0:MOVGE R5,#F.|
00013640  65 68 46 4d 4f 56 20 52  33 2c 52 35 2c 4c 53 52  |ehFMOV R3,R5,LSR|
00013650  20 23 28 62 69 74 73 2d  34 29 3a 43 4d 50 20 52  | #(bits-4):CMP R|
00013660  33 2c 23 31 35 3a 4d 4f  56 43 53 20 52 33 2c 23  |3,#15:MOVCS R3,#|
00013670  31 35 3a 84 52 20 52 30  2c 52 30 2c 52 33 2c 4c  |15:.R R0,R0,R3,L|
00013680  53 4c 20 23 34 0d 65 72  25 43 4d 50 20 52 36 2c  |SL #4.er%CMP R6,|
00013690  23 46 3a 4d 4f 56 43 53  20 52 36 2c 23 30 3a 4d  |#F:MOVCS R6,#0:M|
000136a0  4f 56 47 45 20 52 36 2c  23 46 0d 65 7c 46 4d 4f  |OVGE R6,#F.e|FMO|
000136b0  56 20 52 33 2c 52 36 2c  4c 53 52 20 23 28 62 69  |V R3,R6,LSR #(bi|
000136c0  74 73 2d 34 29 3a 43 4d  50 20 52 33 2c 23 31 35  |ts-4):CMP R3,#15|
000136d0  3a 4d 4f 56 43 53 20 52  33 2c 23 31 35 3a 84 52  |:MOVCS R3,#15:.R|
000136e0  20 52 30 2c 52 30 2c 52  33 2c 4c 53 4c 20 23 38  | R0,R0,R3,LSL #8|
000136f0  0d 65 86 16 4c 44 52 20  52 33 2c 63 6f 6c 6d 61  |.e..LDR R3,colma|
00013700  74 63 68 6c 6f 63 0d 65  90 13 4c 44 52 42 20 52  |tchloc.e..LDRB R|
00013710  30 2c 5b 52 33 2c 52 30  5d 0d 65 9a 2b 41 44 44  |0,[R3,R0].e.+ADD|
00013720  20 52 33 2c 52 30 2c 52  30 2c 4c 53 4c 20 23 31  | R3,R0,R0,LSL #1|
00013730  3a 41 44 44 20 52 33 2c  52 37 2c 52 33 2c 4c 53  |:ADD R3,R7,R3,LS|
00013740  4c 20 23 32 0d 65 a4 1f  4c 44 52 20 52 32 2c 5b  |L #2.e..LDR R2,[|
00013750  52 33 5d 2c 23 34 3a 53  55 42 20 52 34 2c 52 34  |R3],#4:SUB R4,R4|
00013760  2c 52 32 0d 65 ae 2e 4c  44 4d 49 41 20 52 33 2c  |,R2.e..LDMIA R3,|
00013770  7b 52 32 2c 52 33 7d 3a  53 55 42 20 52 35 2c 52  |{R2,R3}:SUB R5,R|
00013780  35 2c 52 32 3a 53 55 42  20 52 36 2c 52 36 2c 52  |5,R2:SUB R6,R6,R|
00013790  33 0d 65 b8 05 5d 0d 65  c2 08 c9 22 52 22 0d 65  |3.e..].e..."R".e|
000137a0  cc 10 f2 73 72 63 68 64  65 76 6c 69 73 74 0d 65  |...srchdevlist.e|
000137b0  d6 05 7f 0d 65 e0 0a 5b  4f 50 54 20 5a 0d 65 ea  |....e..[OPT Z.e.|
000137c0  25 43 4d 50 20 52 34 2c  23 46 3a 4d 4f 56 43 53  |%CMP R4,#F:MOVCS|
000137d0  20 52 34 2c 23 30 3a 4d  4f 56 47 45 20 52 34 2c  | R4,#0:MOVGE R4,|
000137e0  23 46 0d 65 f4 25 43 4d  50 20 52 35 2c 23 46 3a  |#F.e.%CMP R5,#F:|
000137f0  4d 4f 56 43 53 20 52 35  2c 23 30 3a 4d 4f 56 47  |MOVCS R5,#0:MOVG|
00013800  45 20 52 35 2c 23 46 0d  65 fe 25 43 4d 50 20 52  |E R5,#F.e.%CMP R|
00013810  36 2c 23 46 3a 4d 4f 56  43 53 20 52 36 2c 23 30  |6,#F:MOVCS R6,#0|
00013820  3a 4d 4f 56 47 45 20 52  36 2c 23 46 0d 66 08 19  |:MOVGE R6,#F.f..|
00013830  53 54 4d 46 44 20 53 50  20 21 2c 7b 52 37 2c 52  |STMFD SP !,{R7,R|
00013840  38 2c 52 39 7d 0d 66 12  0d 4d 56 4e 20 52 32 2c  |8,R9}.f..MVN R2,|
00013850  23 30 0d 66 1c 13 4d 4f  56 20 52 33 2c 23 26 33  |#0.f..MOV R3,#&3|
00013860  30 3c 3c 32 33 0d 66 26  1c 2e 73 72 63 68 20 52  |0<<23.f&..srch R|
00013870  53 42 20 52 37 2c 52 33  2c 23 26 32 30 3c 3c 32  |SB R7,R3,#&20<<2|
00013880  33 0d 66 30 19 4d 4f 56  20 52 38 2c 52 36 2c 4c  |3.f0.MOV R8,R6,L|
00013890  53 52 20 23 62 69 74 73  2d 38 0d 66 3a 17 53 55  |SR #bits-8.f:.SU|
000138a0  42 20 52 38 2c 52 38 2c  52 38 2c 4c 53 52 20 23  |B R8,R8,R8,LSR #|
000138b0  34 0d 66 44 19 41 44 44  53 20 52 37 2c 52 37 2c  |4.fD.ADDS R7,R7,|
000138c0  52 38 2c 4c 53 4c 20 23  32 33 0d 66 4e 18 4d 4f  |R8,LSL #23.fN.MO|
000138d0  56 56 53 53 20 52 37 2c  23 26 37 46 30 30 30 30  |VVSS R7,#&7F0000|
000138e0  30 30 0d 66 58 0f 4d 4f  56 4d 49 20 52 37 2c 23  |00.fX.MOVMI R7,#|
000138f0  30 0d 66 62 16 80 20 52  37 2c 52 37 2c 23 26 36  |0.fb.. R7,R7,#&6|
00013900  30 30 30 30 30 30 30 0d  66 6c 10 41 44 44 20 52  |0000000.fl.ADD R|
00013910  37 2c 52 37 2c 52 33 0d  66 76 18 41 44 44 20 52  |7,R7,R3.fv.ADD R|
00013920  31 34 2c 52 37 2c 52 37  2c 4c 53 52 20 23 34 0d  |14,R7,R7,LSR #4.|
00013930  66 80 19 41 44 44 20 52  37 2c 52 31 34 2c 52 31  |f..ADD R7,R14,R1|
00013940  34 2c 4c 53 52 20 23 38  0d 66 8a 18 41 44 44 20  |4,LSR #8.f..ADD |
00013950  52 37 2c 52 37 2c 52 37  2c 4c 53 52 20 23 31 36  |R7,R7,R7,LSR #16|
00013960  0d 66 94 1e 53 55 42 53  20 52 38 2c 52 36 2c 52  |.f..SUBS R8,R6,R|
00013970  37 2c 4c 53 52 20 23 33  31 2d 62 69 74 73 0d 66  |7,LSR #31-bits.f|
00013980  9e 12 52 53 42 4c 54 20  52 38 2c 52 38 2c 23 30  |..RSBLT R8,R8,#0|
00013990  0d 66 a8 19 4d 4f 56 20  52 38 2c 52 38 2c 4c 53  |.f..MOV R8,R8,LS|
000139a0  52 20 23 62 69 74 73 2f  32 0d 66 b2 10 4d 55 4c  |R #bits/2.f..MUL|
000139b0  20 52 39 2c 52 38 2c 52  38 0d 66 bc 16 52 53 42  | R9,R8,R8.f..RSB|
000139c0  20 52 37 2c 52 33 2c 23  26 32 30 3c 3c 32 33 0d  | R7,R3,#&20<<23.|
000139d0  66 c6 19 4d 4f 56 20 52  38 2c 52 35 2c 4c 53 52  |f..MOV R8,R5,LSR|
000139e0  20 23 62 69 74 73 2d 38  0d 66 d0 17 53 55 42 20  | #bits-8.f..SUB |
000139f0  52 38 2c 52 38 2c 52 38  2c 4c 53 52 20 23 34 0d  |R8,R8,R8,LSR #4.|
00013a00  66 da 19 41 44 44 53 20  52 37 2c 52 37 2c 52 38  |f..ADDS R7,R7,R8|
00013a10  2c 4c 53 4c 20 23 32 33  0d 66 e4 18 4d 4f 56 56  |,LSL #23.f..MOVV|
00013a20  53 53 20 52 37 2c 23 26  37 46 30 30 30 30 30 30  |SS R7,#&7F000000|
00013a30  0d 66 ee 0f 4d 4f 56 4d  49 20 52 37 2c 23 30 0d  |.f..MOVMI R7,#0.|
00013a40  66 f8 16 80 20 52 37 2c  52 37 2c 23 26 36 30 30  |f... R7,R7,#&600|
00013a50  30 30 30 30 30 0d 67 02  10 41 44 44 20 52 37 2c  |00000.g..ADD R7,|
00013a60  52 33 2c 52 37 0d 67 0c  17 41 44 44 20 52 37 2c  |R3,R7.g..ADD R7,|
00013a70  52 37 2c 52 37 2c 4c 53  52 20 23 34 0d 67 16 18  |R7,R7,LSR #4.g..|
00013a80  84 52 20 52 31 34 2c 52  31 34 2c 52 37 2c 4c 53  |.R R14,R14,R7,LS|
00013a90  52 20 23 38 0d 67 20 17  41 44 44 20 52 37 2c 52  |R #8.g .ADD R7,R|
00013aa0  37 2c 52 37 2c 4c 53 52  20 23 38 0d 67 2a 18 41  |7,R7,LSR #8.g*.A|
00013ab0  44 44 20 52 37 2c 52 37  2c 52 37 2c 4c 53 52 20  |DD R7,R7,R7,LSR |
00013ac0  23 31 36 0d 67 34 1e 53  55 42 53 20 52 38 2c 52  |#16.g4.SUBS R8,R|
00013ad0  35 2c 52 37 2c 4c 53 52  20 23 33 31 2d 62 69 74  |5,R7,LSR #31-bit|
00013ae0  73 0d 67 3e 12 52 53 42  4c 54 20 52 38 2c 52 38  |s.g>.RSBLT R8,R8|
00013af0  2c 23 30 0d 67 48 19 4d  4f 56 20 52 38 2c 52 38  |,#0.gH.MOV R8,R8|
00013b00  2c 4c 53 52 20 23 62 69  74 73 2f 32 0d 67 52 10  |,LSR #bits/2.gR.|
00013b10  4d 55 4c 20 52 37 2c 52  38 2c 52 38 0d 67 5c 17  |MUL R7,R8,R8.g\.|
00013b20  41 44 44 20 52 37 2c 52  37 2c 52 37 2c 4c 53 4c  |ADD R7,R7,R7,LSL|
00013b30  20 23 32 0d 67 66 17 41  44 44 20 52 39 2c 52 39  | #2.gf.ADD R9,R9|
00013b40  2c 52 37 2c 4c 53 4c 20  23 31 0d 67 70 16 52 53  |,R7,LSL #1.gp.RS|
00013b50  42 20 52 37 2c 52 33 2c  23 26 32 30 3c 3c 32 33  |B R7,R3,#&20<<23|
00013b60  0d 67 7a 19 4d 4f 56 20  52 38 2c 52 34 2c 4c 53  |.gz.MOV R8,R4,LS|
00013b70  52 20 23 62 69 74 73 2d  38 0d 67 84 17 53 55 42  |R #bits-8.g..SUB|
00013b80  20 52 38 2c 52 38 2c 52  38 2c 4c 53 52 20 23 34  | R8,R8,R8,LSR #4|
00013b90  0d 67 8e 19 41 44 44 53  20 52 37 2c 52 37 2c 52  |.g..ADDS R7,R7,R|
00013ba0  38 2c 4c 53 4c 20 23 32  33 0d 67 98 18 4d 4f 56  |8,LSL #23.g..MOV|
00013bb0  56 53 53 20 52 37 2c 23  26 37 46 30 30 30 30 30  |VSS R7,#&7F00000|
00013bc0  30 0d 67 a2 0f 4d 4f 56  4d 49 20 52 37 2c 23 30  |0.g..MOVMI R7,#0|
00013bd0  0d 67 ac 16 80 20 52 37  2c 52 37 2c 23 26 36 30  |.g... R7,R7,#&60|
00013be0  30 30 30 30 30 30 0d 67  b6 10 41 44 44 20 52 37  |000000.g..ADD R7|
00013bf0  2c 52 33 2c 52 37 0d 67  c0 17 41 44 44 20 52 37  |,R3,R7.g..ADD R7|
00013c00  2c 52 37 2c 52 37 2c 4c  53 52 20 23 34 0d 67 ca  |,R7,R7,LSR #4.g.|
00013c10  19 84 52 20 52 31 34 2c  52 31 34 2c 52 37 2c 4c  |..R R14,R14,R7,L|
00013c20  53 52 20 23 31 36 0d 67  d4 17 41 44 44 20 52 37  |SR #16.g..ADD R7|
00013c30  2c 52 37 2c 52 37 2c 4c  53 52 20 23 38 0d 67 de  |,R7,R7,LSR #8.g.|
00013c40  18 41 44 44 20 52 37 2c  52 37 2c 52 37 2c 4c 53  |.ADD R7,R7,R7,LS|
00013c50  52 20 23 31 36 0d 67 e8  1e 53 55 42 53 20 52 38  |R #16.g..SUBS R8|
00013c60  2c 52 34 2c 52 37 2c 4c  53 52 20 23 33 31 2d 62  |,R4,R7,LSR #31-b|
00013c70  69 74 73 0d 67 f2 12 52  53 42 4c 54 20 52 38 2c  |its.g..RSBLT R8,|
00013c80  52 38 2c 23 30 0d 67 fc  19 4d 4f 56 20 52 38 2c  |R8,#0.g..MOV R8,|
00013c90  52 38 2c 4c 53 52 20 23  62 69 74 73 2f 32 0d 68  |R8,LSR #bits/2.h|
00013ca0  06 10 4d 55 4c 20 52 37  2c 52 38 2c 52 38 0d 68  |..MUL R7,R8,R8.h|
00013cb0  10 17 41 44 44 20 52 37  2c 52 37 2c 52 37 2c 4c  |..ADD R7,R7,R7,L|
00013cc0  53 4c 20 23 31 0d 68 1a  10 41 44 44 20 52 39 2c  |SL #1.h..ADD R9,|
00013cd0  52 39 2c 52 37 0d 68 24  0d 43 4d 50 20 52 39 2c  |R9,R7.h$.CMP R9,|
00013ce0  52 32 0d 68 2e 0f 4d 4f  56 4c 53 20 52 32 2c 52  |R2.h..MOVLS R2,R|
00013cf0  39 0d 68 38 10 4d 4f 56  4c 53 20 52 30 2c 52 31  |9.h8.MOVLS R0,R1|
00013d00  34 0d 68 42 17 53 55 42  53 20 52 33 2c 52 33 2c  |4.hB.SUBS R3,R3,|
00013d10  23 26 31 30 3c 3c 32 33  0d 68 4c 0c 42 47 45 20  |#&10<<23.hL.BGE |
00013d20  73 72 63 68 0d 68 56 16  80 20 52 37 2c 52 30 2c  |srch.hV.. R7,R0,|
00013d30  23 26 34 30 30 30 30 30  30 30 0d 68 60 15 4d 4f  |#&40000000.h`.MO|
00013d40  56 20 52 38 2c 52 37 2c  4c 53 52 20 23 32 33 0d  |V R8,R7,LSR #23.|
00013d50  68 6a 14 80 20 52 37 2c  52 30 2c 23 26 36 30 30  |hj.. R7,R0,#&600|
00013d60  30 30 30 0d 68 74 17 84  52 20 52 38 2c 52 38 2c  |000.ht..R R8,R8,|
00013d70  52 37 2c 4c 53 52 20 23  31 36 0d 68 7e 12 80 20  |R7,LSR #16.h~.. |
00013d80  52 37 2c 52 30 2c 23 26  34 30 30 30 0d 68 88 17  |R7,R0,#&4000.h..|
00013d90  84 52 20 52 38 2c 52 38  2c 52 37 2c 4c 53 52 20  |.R R8,R8,R7,LSR |
00013da0  23 31 30 0d 68 92 16 80  20 52 37 2c 52 30 2c 23  |#10.h... R7,R0,#|
00013db0  26 32 30 30 30 30 30 30  30 0d 68 9c 17 84 52 20  |&20000000.h...R |
00013dc0  52 38 2c 52 38 2c 52 37  2c 4c 53 52 20 23 32 36  |R8,R8,R7,LSR #26|
00013dd0  0d 68 a6 12 80 20 52 37  2c 52 30 2c 23 26 33 38  |.h... R7,R0,#&38|
00013de0  30 30 0d 68 b0 17 84 52  20 52 30 2c 52 38 2c 52  |00.h...R R0,R8,R|
00013df0  37 2c 4c 53 52 20 23 31  31 0d 68 ba 19 4c 44 4d  |7,LSR #11.h..LDM|
00013e00  46 44 20 53 50 20 21 2c  7b 52 37 2c 52 38 2c 52  |FD SP !,{R7,R8,R|
00013e10  39 7d 0d 68 c4 2b 41 44  44 20 52 33 2c 52 30 2c  |9}.h.+ADD R3,R0,|
00013e20  52 30 2c 4c 53 4c 20 23  31 3a 41 44 44 20 52 33  |R0,LSL #1:ADD R3|
00013e30  2c 52 37 2c 52 33 2c 4c  53 4c 20 23 32 0d 68 ce  |,R7,R3,LSL #2.h.|
00013e40  1f 4c 44 52 20 52 32 2c  5b 52 33 5d 2c 23 34 3a  |.LDR R2,[R3],#4:|
00013e50  53 55 42 20 52 34 2c 52  34 2c 52 32 0d 68 d8 2e  |SUB R4,R4,R2.h..|
00013e60  4c 44 4d 49 41 20 52 33  2c 7b 52 32 2c 52 33 7d  |LDMIA R3,{R2,R3}|
00013e70  3a 53 55 42 20 52 35 2c  52 35 2c 52 32 3a 53 55  |:SUB R5,R5,R2:SU|
00013e80  42 20 52 36 2c 52 36 2c  52 33 0d 68 e2 05 5d 0d  |B R6,R6,R3.h..].|
00013e90  68 ec 05 cb 0d 68 f6 0a  5b 4f 50 54 20 5a 0d 69  |h....h..[OPT Z.i|
00013ea0  00 14 53 54 52 42 20 52  30 2c 5b 52 31 32 5d 2c  |..STRB R0,[R12],|
00013eb0  52 31 0d 69 0a 05 5d 0d  69 14 0e e7 64 69 74 68  |R1.i..].i...dith|
00013ec0  65 72 25 20 8c 0d 69 1e  0a 5b 4f 50 54 20 5a 0d  |er% ..i..[OPT Z.|
00013ed0  69 28 11 41 44 44 20 52  30 2c 52 31 31 2c 23 34  |i(.ADD R0,R11,#4|
00013ee0  0d 69 32 17 41 44 44 20  52 32 2c 52 34 2c 52 34  |.i2.ADD R2,R4,R4|
00013ef0  2c 4c 53 4c 20 23 31 0d  69 3c 28 4c 44 52 20 52  |,LSL #1.i<(LDR R|
00013f00  33 2c 5b 52 31 31 2c 2d  52 38 5d 3a 41 44 44 20  |3,[R11,-R8]:ADD |
00013f10  52 33 2c 52 33 2c 52 32  2c 41 53 52 20 23 34 0d  |R3,R3,R2,ASR #4.|
00013f20  69 46 14 53 54 52 20 52  33 2c 5b 52 31 31 2c 2d  |iF.STR R3,[R11,-|
00013f30  52 38 5d 0d 69 50 17 41  44 44 20 52 32 2c 52 34  |R8].iP.ADD R2,R4|
00013f40  2c 52 34 2c 4c 53 4c 20  23 32 0d 69 5a 24 4c 44  |,R4,LSL #2.iZ$LD|
00013f50  52 20 52 33 2c 5b 52 31  31 5d 3a 41 44 44 20 52  |R R3,[R11]:ADD R|
00013f60  33 2c 52 33 2c 52 32 2c  41 53 52 20 23 34 0d 69  |3,R3,R2,ASR #4.i|
00013f70  64 10 53 54 52 20 52 33  2c 5b 52 31 31 5d 0d 69  |d.STR R3,[R11].i|
00013f80  6e 14 4d 4f 56 20 52 33  2c 52 34 2c 41 53 52 20  |n.MOV R3,R4,ASR |
00013f90  23 34 0d 69 78 14 53 54  52 20 52 33 2c 5b 52 31  |#4.ix.STR R3,[R1|
00013fa0  31 2c 52 38 5d 21 0d 69  82 17 52 53 42 20 52 32  |1,R8]!.i..RSB R2|
00013fb0  2c 52 34 2c 52 34 2c 4c  53 4c 20 23 33 0d 69 8c  |,R4,R4,LSL #3.i.|
00013fc0  10 4c 44 52 20 52 34 2c  5b 52 31 30 5d 0d 69 96  |.LDR R4,[R10].i.|
00013fd0  17 41 44 44 20 52 34 2c  52 34 2c 52 32 2c 41 53  |.ADD R4,R4,R2,AS|
00013fe0  52 20 23 34 0d 69 a0 17  41 44 44 20 52 32 2c 52  |R #4.i..ADD R2,R|
00013ff0  35 2c 52 35 2c 4c 53 4c  20 23 31 0d 69 aa 27 4c  |5,R5,LSL #1.i.'L|
00014000  44 52 20 52 33 2c 5b 52  30 2c 2d 52 38 5d 3a 41  |DR R3,[R0,-R8]:A|
00014010  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
00014020  23 34 0d 69 b4 13 53 54  52 20 52 33 2c 5b 52 30  |#4.i..STR R3,[R0|
00014030  2c 2d 52 38 5d 0d 69 be  14 4d 4f 56 20 52 33 2c  |,-R8].i..MOV R3,|
00014040  52 35 2c 41 53 52 20 23  34 0d 69 c8 12 53 54 52  |R5,ASR #4.i..STR|
00014050  20 52 33 2c 5b 52 30 2c  52 38 5d 0d 69 d2 17 41  | R3,[R0,R8].i..A|
00014060  44 44 20 52 32 2c 52 35  2c 52 35 2c 4c 53 4c 20  |DD R2,R5,R5,LSL |
00014070  23 32 0d 69 dc 23 4c 44  52 20 52 33 2c 5b 52 30  |#2.i.#LDR R3,[R0|
00014080  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 32 2c 41  |]:ADD R3,R3,R2,A|
00014090  53 52 20 23 34 0d 69 e6  12 53 54 52 20 52 33 2c  |SR #4.i..STR R3,|
000140a0  5b 52 30 5d 2c 23 34 0d  69 f0 17 52 53 42 20 52  |[R0],#4.i..RSB R|
000140b0  32 2c 52 35 2c 52 35 2c  4c 53 4c 20 23 33 0d 69  |2,R5,R5,LSL #3.i|
000140c0  fa 13 4c 44 52 20 52 35  2c 5b 52 31 30 2c 23 34  |..LDR R5,[R10,#4|
000140d0  5d 0d 6a 04 17 41 44 44  20 52 35 2c 52 35 2c 52  |].j..ADD R5,R5,R|
000140e0  32 2c 41 53 52 20 23 34  0d 6a 0e 17 41 44 44 20  |2,ASR #4.j..ADD |
000140f0  52 32 2c 52 36 2c 52 36  2c 4c 53 4c 20 23 31 0d  |R2,R6,R6,LSL #1.|
00014100  6a 18 27 4c 44 52 20 52  33 2c 5b 52 30 2c 2d 52  |j.'LDR R3,[R0,-R|
00014110  38 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |8]:ADD R3,R3,R2,|
00014120  41 53 52 20 23 34 0d 6a  22 13 53 54 52 20 52 33  |ASR #4.j".STR R3|
00014130  2c 5b 52 30 2c 2d 52 38  5d 0d 6a 2c 17 41 44 44  |,[R0,-R8].j,.ADD|
00014140  20 52 32 2c 52 36 2c 52  36 2c 4c 53 4c 20 23 32  | R2,R6,R6,LSL #2|
00014150  0d 6a 36 23 4c 44 52 20  52 33 2c 5b 52 30 5d 3a  |.j6#LDR R3,[R0]:|
00014160  41 44 44 20 52 33 2c 52  33 2c 52 32 2c 41 53 52  |ADD R3,R3,R2,ASR|
00014170  20 23 34 0d 6a 40 0f 53  54 52 20 52 33 2c 5b 52  | #4.j@.STR R3,[R|
00014180  30 5d 0d 6a 4a 14 4d 4f  56 20 52 33 2c 52 36 2c  |0].jJ.MOV R3,R6,|
00014190  41 53 52 20 23 34 0d 6a  54 12 53 54 52 20 52 33  |ASR #4.jT.STR R3|
000141a0  2c 5b 52 30 2c 52 38 5d  0d 6a 5e 17 52 53 42 20  |,[R0,R8].j^.RSB |
000141b0  52 32 2c 52 36 2c 52 36  2c 4c 53 4c 20 23 33 0d  |R2,R6,R6,LSL #3.|
000141c0  6a 68 13 4c 44 52 20 52  36 2c 5b 52 31 30 2c 23  |jh.LDR R6,[R10,#|
000141d0  38 5d 0d 6a 72 17 41 44  44 20 52 36 2c 52 36 2c  |8].jr.ADD R6,R6,|
000141e0  52 32 2c 41 53 52 20 23  34 0d 6a 7c 05 5d 0d 6a  |R2,ASR #4.j|.].j|
000141f0  86 05 cc 0d 6a 90 0a 5b  4f 50 54 20 5a 0d 6a 9a  |....j..[OPT Z.j.|
00014200  18 4c 44 4d 49 41 20 52  31 30 2c 7b 52 34 2c 52  |.LDMIA R10,{R4,R|
00014210  35 2c 52 36 7d 0d 6a a4  05 5d 0d 6a ae 05 cd 0d  |5,R6}.j..].j....|
00014220  6a b8 0a 5b 4f 50 54 20  5a 0d 6a c2 1c 53 55 42  |j..[OPT Z.j..SUB|
00014230  53 20 52 39 2c 52 39 2c  23 31 3a 42 4e 45 20 66  |S R9,R9,#1:BNE f|
00014240  73 6c 6f 6f 70 0d 6a cc  14 4c 44 4d 46 44 20 53  |sloop.j..LDMFD S|
00014250  50 20 21 2c 7b 50 43 7d  5e 0d 6a d6 05 5d 0d 6a  |P !,{PC}^.j..].j|
00014260  e0 08 c9 20 31 35 0d 6a  ea 17 64 69 76 74 61 62  |... 15.j..divtab|
00014270  6c 65 3d 50 25 3a c8 8e  20 6d 24 20 ca 0d 6a f4  |le=P%:.. m$ ..j.|
00014280  09 c9 20 22 44 22 0d 6a  fe 09 c9 20 22 52 22 0d  |.. "D".j... "R".|
00014290  6b 08 10 e3 49 25 3d 30  b8 31 35 2a 34 88 34 0d  |k...I%=0.15*4.4.|
000142a0  6b 12 0a 5b 4f 50 54 20  5a 0d 6b 1c 26 45 51 55  |k..[OPT Z.k.&EQU|
000142b0  44 20 28 70 61 6c 65 74  74 65 25 21 49 25 3e 3e  |D (palette%!I%>>|
000142c0  34 80 26 46 29 2f 62 72  69 67 68 74 25 2a 46 0d  |4.&F)/bright%*F.|
000142d0  6b 26 27 45 51 55 44 20  28 70 61 6c 65 74 74 65  |k&'EQUD (palette|
000142e0  25 21 49 25 3e 3e 31 32  80 26 46 29 2f 62 72 69  |%!I%>>12.&F)/bri|
000142f0  67 68 74 25 2a 46 0d 6b  30 27 45 51 55 44 20 28  |ght%*F.k0'EQUD (|
00014300  70 61 6c 65 74 74 65 25  21 49 25 3e 3e 32 30 80  |palette%!I%>>20.|
00014310  26 46 29 2f 62 72 69 67  68 74 25 2a 46 0d 6b 3a  |&F)/bright%*F.k:|
00014320  05 5d 0d 6b 44 05 ed 0d  6b 4e 0a 5b 4f 50 54 20  |.].kD...kN.[OPT |
00014330  5a 0d 6b 58 15 2e 69 63  74 6c 6f 63 20 45 51 55  |Z.kX..ictloc EQU|
00014340  44 20 69 63 74 25 0d 6b  62 05 5d 0d 6b 6c 09 c9  |D ict%.kb.].kl..|
00014350  20 22 54 22 0d 6b 76 0c  e3 49 25 3d 30 b8 31 35  | "T".kv..I%=0.15|
00014360  0d 6b 80 0a 5b 4f 50 54  20 5a 0d 6b 8a 15 45 51  |.k..[OPT Z.k..EQ|
00014370  55 44 20 49 25 2f 62 72  69 67 68 74 25 2a 46 0d  |UD I%/bright%*F.|
00014380  6b 94 05 5d 0d 6b 9e 05  ed 0d 6b a8 05 7f 0d 6b  |k..].k....k....k|
00014390  b2 0b e3 49 25 3d 30 b8  37 0d 6b bc 0a 5b 4f 50  |...I%=0.7.k..[OP|
000143a0  54 20 5a 0d 6b c6 19 45  51 55 44 20 49 25 2f 28  |T Z.k..EQUD I%/(|
000143b0  62 72 69 67 68 74 25 81  32 29 2a 46 0d 6b d0 05  |bright%.2)*F.k..|
000143c0  5d 0d 6b da 05 ed 0d 6b  e4 05 cb 0d 6b ee 0a 5b  |].k....k....k..[|
000143d0  4f 50 54 20 5a 0d 6b f8  08 2e 66 73 25 0d 6c 02  |OPT Z.k...fs%.l.|
000143e0  14 53 54 4d 46 44 20 53  50 20 21 2c 7b 52 31 34  |.STMFD SP !,{R14|
000143f0  7d 0d 6c 0c 20 4c 44 52  20 52 31 2c 5b 52 39 2c  |}.l. LDR R1,[R9,|
00014400  23 35 2a 38 5d 3a 4c 44  52 20 52 31 2c 5b 52 31  |#5*8]:LDR R1,[R1|
00014410  5d 0d 6c 16 15 4c 44 52  20 52 31 30 2c 5b 52 39  |].l..LDR R10,[R9|
00014420  2c 23 34 2a 38 5d 0d 6c  20 15 4c 44 52 20 52 31  |,#4*8].l .LDR R1|
00014430  31 2c 5b 52 39 2c 23 33  2a 38 5d 0d 6c 2a 23 4c  |1,[R9,#3*8].l*#L|
00014440  44 52 20 52 31 32 2c 5b  52 39 2c 23 32 2a 38 5d  |DR R12,[R9,#2*8]|
00014450  3a 4c 44 52 20 52 31 32  2c 5b 52 31 32 5d 0d 6c  |:LDR R12,[R12].l|
00014460  34 1e 4c 44 52 20 52 38  2c 5b 52 39 2c 23 38 5d  |4.LDR R8,[R9,#8]|
00014470  3a 4c 44 52 20 52 38 2c  5b 52 38 5d 0d 6c 3e 1b  |:LDR R8,[R8].l>.|
00014480  4c 44 52 20 52 39 2c 5b  52 39 5d 3a 4c 44 52 20  |LDR R9,[R9]:LDR |
00014490  52 39 2c 5b 52 39 5d 0d  6c 48 05 5d 0d 6c 52 15  |R9,[R9].lH.].lR.|
000144a0  e7 6d 24 3d 22 44 22 20  84 6d 24 3d 22 52 22 20  |.m$="D" .m$="R" |
000144b0  8c 0d 6c 5c 0a 5b 4f 50  54 20 5a 0d 6c 66 10 4c  |..l\.[OPT Z.lf.L|
000144c0  44 52 20 52 34 2c 5b 52  31 30 5d 0d 6c 70 13 4c  |DR R4,[R10].lp.L|
000144d0  44 52 20 52 35 2c 5b 52  31 30 2c 23 34 5d 0d 6c  |DR R5,[R10,#4].l|
000144e0  7a 13 4c 44 52 20 52 36  2c 5b 52 31 30 2c 23 38  |z.LDR R6,[R10,#8|
000144f0  5d 0d 6c 84 05 5d 0d 6c  8e 05 cc 0d 6c 98 0a 5b  |].l..].l....l..[|
00014500  4f 50 54 20 5a 0d 6c a2  13 4c 44 52 20 52 34 2c  |OPT Z.l..LDR R4,|
00014510  5b 52 31 30 5d 2c 52 38  0d 6c ac 05 5d 0d 6c b6  |[R10],R8.l..].l.|
00014520  05 cd 0d 6c c0 0e e7 6d  24 3c 3e 22 44 22 20 8c  |...l...m$<>"D" .|
00014530  0d 6c ca 0a 5b 4f 50 54  20 5a 0d 6c d4 13 41 44  |.l..[OPT Z.l..AD|
00014540  52 20 52 37 2c 64 69 76  74 61 62 6c 65 0d 6c de  |R R7,divtable.l.|
00014550  05 5d 0d 6c e8 05 cd 0d  6c f2 0a 5b 4f 50 54 20  |.].l....l..[OPT |
00014560  5a 0d 6c fc 0b 2e 66 73  6c 6f 6f 70 0d 6d 06 05  |Z.l...fsloop.m..|
00014570  5d 0d 6d 10 0b c8 8e 20  6d 24 20 ca 0d 6d 1a 08  |].m.... m$ ..m..|
00014580  c9 22 52 22 0d 6d 24 0a  5b 4f 50 54 20 5a 0d 6d  |."R".m$.[OPT Z.m|
00014590  2e 12 41 44 44 20 52 31  30 2c 52 31 30 2c 52 38  |..ADD R10,R10,R8|
000145a0  0d 6d 38 05 5d 0d 6d 42  10 f2 73 72 63 68 64 65  |.m8.].mB..srchde|
000145b0  76 6c 69 73 74 0d 6d 4c  0a 5b 4f 50 54 20 5a 0d  |vlist.mL.[OPT Z.|
000145c0  6d 56 0d 4d 4f 56 20 72  33 2c 72 30 0d 6d 60 05  |mV.MOV r3,r0.m`.|
000145d0  5d 0d 6d 6a 09 c9 20 22  44 22 0d 6d 74 0a 5b 4f  |].mj.. "D".mt.[O|
000145e0  50 54 20 5a 0d 6d 7e 12  41 44 44 20 52 31 30 2c  |PT Z.m~.ADD R10,|
000145f0  52 31 30 2c 52 38 0d 6d  88 0d 4d 4f 56 20 52 33  |R10,R8.m..MOV R3|
00014600  2c 23 30 0d 6d 92 25 43  4d 50 20 52 34 2c 23 46  |,#0.m.%CMP R4,#F|
00014610  3a 4d 4f 56 43 53 20 52  34 2c 23 30 3a 4d 4f 56  |:MOVCS R4,#0:MOV|
00014620  47 45 20 52 34 2c 23 46  0d 6d 9c 10 43 4d 50 20  |GE R4,#F.m..CMP |
00014630  52 34 2c 23 46 3e 3e 31  0d 6d a6 20 53 55 42 43  |R4,#F>>1.m. SUBC|
00014640  53 20 52 34 2c 52 34 2c  23 46 3a 84 52 43 53 20  |S R4,R4,#F:.RCS |
00014650  52 33 2c 52 33 2c 23 31  0d 6d b0 25 43 4d 50 20  |R3,R3,#1.m.%CMP |
00014660  52 35 2c 23 46 3a 4d 4f  56 43 53 20 52 35 2c 23  |R5,#F:MOVCS R5,#|
00014670  30 3a 4d 4f 56 47 45 20  52 35 2c 23 46 0d 6d ba  |0:MOVGE R5,#F.m.|
00014680  10 43 4d 50 20 52 35 2c  23 46 3e 3e 31 0d 6d c4  |.CMP R5,#F>>1.m.|
00014690  20 53 55 42 43 53 20 52  35 2c 52 35 2c 23 46 3a  | SUBCS R5,R5,#F:|
000146a0  84 52 43 53 20 52 33 2c  52 33 2c 23 32 0d 6d ce  |.RCS R3,R3,#2.m.|
000146b0  25 43 4d 50 20 52 36 2c  23 46 3a 4d 4f 56 43 53  |%CMP R6,#F:MOVCS|
000146c0  20 52 36 2c 23 30 3a 4d  4f 56 47 45 20 52 36 2c  | R6,#0:MOVGE R6,|
000146d0  23 46 0d 6d d8 10 43 4d  50 20 52 36 2c 23 46 3e  |#F.m..CMP R6,#F>|
000146e0  3e 31 0d 6d e2 20 53 55  42 43 53 20 52 36 2c 52  |>1.m. SUBCS R6,R|
000146f0  36 2c 23 46 3a 84 52 43  53 20 52 33 2c 52 33 2c  |6,#F:.RCS R3,R3,|
00014700  23 34 0d 6d ec 05 5d 0d  6d f6 09 c9 20 22 54 22  |#4.m..].m... "T"|
00014710  0d 6e 00 0a 5b 4f 50 54  20 5a 0d 6e 0a 25 43 4d  |.n..[OPT Z.n.%CM|
00014720  50 20 52 34 2c 23 46 3a  4d 4f 56 43 53 20 52 34  |P R4,#F:MOVCS R4|
00014730  2c 23 30 3a 4d 4f 56 47  45 20 52 34 2c 23 46 0d  |,#0:MOVGE R4,#F.|
00014740  6e 14 3b 52 53 42 20 52  33 2c 52 34 2c 52 34 2c  |n.;RSB R3,R4,R4,|
00014750  4c 53 4c 20 23 34 3a 41  44 44 20 52 33 2c 52 33  |LSL #4:ADD R3,R3|
00014760  2c 23 46 3e 3e 31 3a 4d  4f 56 20 52 33 2c 52 33  |,#F>>1:MOV R3,R3|
00014770  2c 4c 53 52 20 23 62 69  74 73 0d 6e 1e 19 4c 44  |,LSR #bits.n..LD|
00014780  52 20 52 32 2c 5b 52 37  2c 52 33 2c 4c 53 4c 20  |R R2,[R7,R3,LSL |
00014790  23 32 5d 0d 6e 28 10 53  55 42 20 52 34 2c 52 34  |#2].n(.SUB R4,R4|
000147a0  2c 52 32 0d 6e 32 05 5d  0d 6e 3c 05 7f 0d 6e 46  |,R2.n2.].n<...nF|
000147b0  0a 5b 4f 50 54 20 5a 0d  6e 50 25 43 4d 50 20 52  |.[OPT Z.nP%CMP R|
000147c0  34 2c 23 46 3a 4d 4f 56  43 53 20 52 34 2c 23 30  |4,#F:MOVCS R4,#0|
000147d0  3a 4d 4f 56 47 45 20 52  34 2c 23 46 0d 6e 5a 3b  |:MOVGE R4,#F.nZ;|
000147e0  52 53 42 20 52 33 2c 52  34 2c 52 34 2c 4c 53 4c  |RSB R3,R4,R4,LSL|
000147f0  20 23 33 3a 41 44 44 20  52 33 2c 52 33 2c 23 46  | #3:ADD R3,R3,#F|
00014800  3e 3e 31 3a 4d 4f 56 20  52 33 2c 52 33 2c 4c 53  |>>1:MOV R3,R3,LS|
00014810  52 20 23 62 69 74 73 0d  6e 64 19 4c 44 52 20 52  |R #bits.nd.LDR R|
00014820  32 2c 5b 52 37 2c 52 33  2c 4c 53 4c 20 23 32 5d  |2,[R7,R3,LSL #2]|
00014830  0d 6e 6e 10 53 55 42 20  52 34 2c 52 34 2c 52 32  |.nn.SUB R4,R4,R2|
00014840  0d 6e 78 05 5d 0d 6e 82  05 cb 0d 6e 8c 0a 5b 4f  |.nx.].n....n..[O|
00014850  50 54 20 5a 0d 6e 96 15  4d 4f 56 20 52 32 2c 52  |PT Z.n..MOV R2,R|
00014860  31 32 2c 4c 53 52 20 23  31 0d 6e a0 0e 54 53 54  |12,LSR #1.n..TST|
00014870  20 52 31 32 2c 23 31 0d  6e aa 10 4c 44 52 42 20  | R12,#1.n..LDRB |
00014880  52 30 2c 5b 52 32 5d 0d  6e b4 20 80 45 51 20 52  |R0,[R2].n. .EQ R|
00014890  30 2c 52 30 2c 23 26 46  30 3a 84 52 45 51 20 52  |0,R0,#&F0:.REQ R|
000148a0  30 2c 52 30 2c 52 33 0d  6e be 27 80 4e 45 20 52  |0,R0,R3.n.'.NE R|
000148b0  30 2c 52 30 2c 23 26 30  46 3a 84 52 4e 45 20 52  |0,R0,#&0F:.RNE R|
000148c0  30 2c 52 30 2c 52 33 2c  4c 53 4c 20 23 34 0d 6e  |0,R0,R3,LSL #4.n|
000148d0  c8 10 53 54 52 42 20 52  30 2c 5b 52 32 5d 0d 6e  |..STRB R0,[R2].n|
000148e0  d2 12 41 44 44 20 52 31  32 2c 52 31 32 2c 52 31  |..ADD R12,R12,R1|
000148f0  0d 6e dc 05 5d 0d 6e e6  15 e7 6d 24 3d 22 44 22  |.n..].n...m$="D"|
00014900  20 84 6d 24 3d 22 52 22  20 8c 0d 6e f0 0e e7 64  | .m$="R" ..n...d|
00014910  69 74 68 65 72 25 20 8c  0d 6e fa 0a 5b 4f 50 54  |ither% ..n..[OPT|
00014920  20 5a 0d 6f 04 11 41 44  44 20 52 30 2c 52 31 31  | Z.o..ADD R0,R11|
00014930  2c 23 34 0d 6f 0e 17 41  44 44 20 52 32 2c 52 34  |,#4.o..ADD R2,R4|
00014940  2c 52 34 2c 4c 53 4c 20  23 31 0d 6f 18 28 4c 44  |,R4,LSL #1.o.(LD|
00014950  52 20 52 33 2c 5b 52 31  31 2c 2d 52 38 5d 3a 41  |R R3,[R11,-R8]:A|
00014960  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
00014970  23 34 0d 6f 22 14 53 54  52 20 52 33 2c 5b 52 31  |#4.o".STR R3,[R1|
00014980  31 2c 2d 52 38 5d 0d 6f  2c 17 41 44 44 20 52 32  |1,-R8].o,.ADD R2|
00014990  2c 52 34 2c 52 34 2c 4c  53 4c 20 23 32 0d 6f 36  |,R4,R4,LSL #2.o6|
000149a0  24 4c 44 52 20 52 33 2c  5b 52 31 31 5d 3a 41 44  |$LDR R3,[R11]:AD|
000149b0  44 20 52 33 2c 52 33 2c  52 32 2c 41 53 52 20 23  |D R3,R3,R2,ASR #|
000149c0  34 0d 6f 40 10 53 54 52  20 52 33 2c 5b 52 31 31  |4.o@.STR R3,[R11|
000149d0  5d 0d 6f 4a 14 4d 4f 56  20 52 33 2c 52 34 2c 41  |].oJ.MOV R3,R4,A|
000149e0  53 52 20 23 34 0d 6f 54  14 53 54 52 20 52 33 2c  |SR #4.oT.STR R3,|
000149f0  5b 52 31 31 2c 52 38 5d  21 0d 6f 5e 17 52 53 42  |[R11,R8]!.o^.RSB|
00014a00  20 52 32 2c 52 34 2c 52  34 2c 4c 53 4c 20 23 33  | R2,R4,R4,LSL #3|
00014a10  0d 6f 68 10 4c 44 52 20  52 34 2c 5b 52 31 30 5d  |.oh.LDR R4,[R10]|
00014a20  0d 6f 72 17 41 44 44 20  52 34 2c 52 34 2c 52 32  |.or.ADD R4,R4,R2|
00014a30  2c 41 53 52 20 23 34 0d  6f 7c 17 41 44 44 20 52  |,ASR #4.o|.ADD R|
00014a40  32 2c 52 35 2c 52 35 2c  4c 53 4c 20 23 31 0d 6f  |2,R5,R5,LSL #1.o|
00014a50  86 27 4c 44 52 20 52 33  2c 5b 52 30 2c 2d 52 38  |.'LDR R3,[R0,-R8|
00014a60  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 32 2c 41  |]:ADD R3,R3,R2,A|
00014a70  53 52 20 23 34 0d 6f 90  13 53 54 52 20 52 33 2c  |SR #4.o..STR R3,|
00014a80  5b 52 30 2c 2d 52 38 5d  0d 6f 9a 14 4d 4f 56 20  |[R0,-R8].o..MOV |
00014a90  52 33 2c 52 35 2c 41 53  52 20 23 34 0d 6f a4 12  |R3,R5,ASR #4.o..|
00014aa0  53 54 52 20 52 33 2c 5b  52 30 2c 52 38 5d 0d 6f  |STR R3,[R0,R8].o|
00014ab0  ae 17 41 44 44 20 52 32  2c 52 35 2c 52 35 2c 4c  |..ADD R2,R5,R5,L|
00014ac0  53 4c 20 23 32 0d 6f b8  23 4c 44 52 20 52 33 2c  |SL #2.o.#LDR R3,|
00014ad0  5b 52 30 5d 3a 41 44 44  20 52 33 2c 52 33 2c 52  |[R0]:ADD R3,R3,R|
00014ae0  32 2c 41 53 52 20 23 34  0d 6f c2 12 53 54 52 20  |2,ASR #4.o..STR |
00014af0  52 33 2c 5b 52 30 5d 2c  23 34 0d 6f cc 17 52 53  |R3,[R0],#4.o..RS|
00014b00  42 20 52 32 2c 52 35 2c  52 35 2c 4c 53 4c 20 23  |B R2,R5,R5,LSL #|
00014b10  33 0d 6f d6 13 4c 44 52  20 52 35 2c 5b 52 31 30  |3.o..LDR R5,[R10|
00014b20  2c 23 34 5d 0d 6f e0 17  41 44 44 20 52 35 2c 52  |,#4].o..ADD R5,R|
00014b30  35 2c 52 32 2c 41 53 52  20 23 34 0d 6f ea 17 41  |5,R2,ASR #4.o..A|
00014b40  44 44 20 52 32 2c 52 36  2c 52 36 2c 4c 53 4c 20  |DD R2,R6,R6,LSL |
00014b50  23 31 0d 6f f4 27 4c 44  52 20 52 33 2c 5b 52 30  |#1.o.'LDR R3,[R0|
00014b60  2c 2d 52 38 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |,-R8]:ADD R3,R3,|
00014b70  52 32 2c 41 53 52 20 23  34 0d 6f fe 13 53 54 52  |R2,ASR #4.o..STR|
00014b80  20 52 33 2c 5b 52 30 2c  2d 52 38 5d 0d 70 08 17  | R3,[R0,-R8].p..|
00014b90  41 44 44 20 52 32 2c 52  36 2c 52 36 2c 4c 53 4c  |ADD R2,R6,R6,LSL|
00014ba0  20 23 32 0d 70 12 23 4c  44 52 20 52 33 2c 5b 52  | #2.p.#LDR R3,[R|
00014bb0  30 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |0]:ADD R3,R3,R2,|
00014bc0  41 53 52 20 23 34 0d 70  1c 0f 53 54 52 20 52 33  |ASR #4.p..STR R3|
00014bd0  2c 5b 52 30 5d 0d 70 26  14 4d 4f 56 20 52 33 2c  |,[R0].p&.MOV R3,|
00014be0  52 36 2c 41 53 52 20 23  34 0d 70 30 12 53 54 52  |R6,ASR #4.p0.STR|
00014bf0  20 52 33 2c 5b 52 30 2c  52 38 5d 0d 70 3a 17 52  | R3,[R0,R8].p:.R|
00014c00  53 42 20 52 32 2c 52 36  2c 52 36 2c 4c 53 4c 20  |SB R2,R6,R6,LSL |
00014c10  23 33 0d 70 44 13 4c 44  52 20 52 36 2c 5b 52 31  |#3.pD.LDR R6,[R1|
00014c20  30 2c 23 38 5d 0d 70 4e  17 41 44 44 20 52 36 2c  |0,#8].pN.ADD R6,|
00014c30  52 36 2c 52 32 2c 41 53  52 20 23 34 0d 70 58 05  |R6,R2,ASR #4.pX.|
00014c40  5d 0d 70 62 05 cc 0d 70  6c 0a 5b 4f 50 54 20 5a  |].pb...pl.[OPT Z|
00014c50  0d 70 76 18 4c 44 4d 49  41 20 52 31 30 2c 7b 52  |.pv.LDMIA R10,{R|
00014c60  34 2c 52 35 2c 52 36 7d  0d 70 80 05 5d 0d 70 8a  |4,R5,R6}.p..].p.|
00014c70  05 cd 0d 70 94 05 cc 0d  70 9e 0e e7 64 69 74 68  |...p....p...dith|
00014c80  65 72 25 20 8c 0d 70 a8  0a 5b 4f 50 54 20 5a 0d  |er% ..p..[OPT Z.|
00014c90  70 b2 17 41 44 44 20 52  32 2c 52 34 2c 52 34 2c  |p..ADD R2,R4,R4,|
00014ca0  4c 53 4c 20 23 31 0d 70  bc 28 4c 44 52 20 52 33  |LSL #1.p.(LDR R3|
00014cb0  2c 5b 52 31 31 2c 2d 52  38 5d 3a 41 44 44 20 52  |,[R11,-R8]:ADD R|
00014cc0  33 2c 52 33 2c 52 32 2c  41 53 52 20 23 34 0d 70  |3,R3,R2,ASR #4.p|
00014cd0  c6 14 53 54 52 20 52 33  2c 5b 52 31 31 2c 2d 52  |..STR R3,[R11,-R|
00014ce0  38 5d 0d 70 d0 17 41 44  44 20 52 32 2c 52 34 2c  |8].p..ADD R2,R4,|
00014cf0  52 34 2c 4c 53 4c 20 23  32 0d 70 da 24 4c 44 52  |R4,LSL #2.p.$LDR|
00014d00  20 52 33 2c 5b 52 31 31  5d 3a 41 44 44 20 52 33  | R3,[R11]:ADD R3|
00014d10  2c 52 33 2c 52 32 2c 41  53 52 20 23 34 0d 70 e4  |,R3,R2,ASR #4.p.|
00014d20  10 53 54 52 20 52 33 2c  5b 52 31 31 5d 0d 70 ee  |.STR R3,[R11].p.|
00014d30  14 4d 4f 56 20 52 33 2c  52 34 2c 41 53 52 20 23  |.MOV R3,R4,ASR #|
00014d40  34 0d 70 f8 14 53 54 52  20 52 33 2c 5b 52 31 31  |4.p..STR R3,[R11|
00014d50  2c 52 38 5d 21 0d 71 02  17 52 53 42 20 52 32 2c  |,R8]!.q..RSB R2,|
00014d60  52 34 2c 52 34 2c 4c 53  4c 20 23 33 0d 71 0c 13  |R4,R4,LSL #3.q..|
00014d70  4c 44 52 20 52 34 2c 5b  52 31 30 5d 2c 52 38 0d  |LDR R4,[R10],R8.|
00014d80  71 16 17 41 44 44 20 52  34 2c 52 34 2c 52 32 2c  |q..ADD R4,R4,R2,|
00014d90  41 53 52 20 23 34 0d 71  20 05 5d 0d 71 2a 05 cc  |ASR #4.q .].q*..|
00014da0  0d 71 34 0a 5b 4f 50 54  20 5a 0d 71 3e 13 4c 44  |.q4.[OPT Z.q>.LD|
00014db0  52 20 52 34 2c 5b 52 31  30 5d 2c 52 38 0d 71 48  |R R4,[R10],R8.qH|
00014dc0  05 5d 0d 71 52 05 cd 0d  71 5c 05 cd 0d 71 66 0a  |.].qR...q\...qf.|
00014dd0  5b 4f 50 54 20 5a 0d 71  70 1c 53 55 42 53 20 52  |[OPT Z.qp.SUBS R|
00014de0  39 2c 52 39 2c 23 31 3a  42 4e 45 20 66 73 6c 6f  |9,R9,#1:BNE fslo|
00014df0  6f 70 0d 71 7a 14 4c 44  4d 46 44 20 53 50 20 21  |op.qz.LDMFD SP !|
00014e00  2c 7b 50 43 7d 5e 0d 71  84 05 5d 0d 71 8e 07 c9  |,{PC}^.q..].q...|
00014e10  20 33 0d 71 98 17 64 69  76 74 61 62 6c 65 3d 50  | 3.q..divtable=P|
00014e20  25 3a c8 8e 20 6d 24 20  ca 0d 71 a2 09 c9 20 22  |%:.. m$ ..q... "|
00014e30  43 22 0d 71 ac 09 c9 20  22 52 22 0d 71 b6 0f e3  |C".q... "R".q...|
00014e40  49 25 3d 30 b8 33 2a 34  88 34 0d 71 c0 0a 5b 4f  |I%=0.3*4.4.q..[O|
00014e50  50 54 20 5a 0d 71 ca 26  45 51 55 44 20 28 70 61  |PT Z.q.&EQUD (pa|
00014e60  6c 65 74 74 65 25 21 49  25 3e 3e 34 80 26 46 29  |lette%!I%>>4.&F)|
00014e70  2f 62 72 69 67 68 74 25  2a 46 0d 71 d4 27 45 51  |/bright%*F.q.'EQ|
00014e80  55 44 20 28 70 61 6c 65  74 74 65 25 21 49 25 3e  |UD (palette%!I%>|
00014e90  3e 31 32 80 26 46 29 2f  62 72 69 67 68 74 25 2a  |>12.&F)/bright%*|
00014ea0  46 0d 71 de 27 45 51 55  44 20 28 70 61 6c 65 74  |F.q.'EQUD (palet|
00014eb0  74 65 25 21 49 25 3e 3e  32 30 80 26 46 29 2f 62  |te%!I%>>20.&F)/b|
00014ec0  72 69 67 68 74 25 2a 46  0d 71 e8 05 5d 0d 71 f2  |right%*F.q..].q.|
00014ed0  05 ed 0d 71 fc 05 7f 0d  72 06 0a 5b 4f 50 54 20  |...q....r..[OPT |
00014ee0  5a 0d 72 10 0a 45 51 55  44 20 30 0d 72 1a 18 45  |Z.r..EQUD 0.r..E|
00014ef0  51 55 44 20 31 2f 28 62  72 69 67 68 74 25 81 34  |QUD 1/(bright%.4|
00014f00  29 2a 46 0d 72 24 18 45  51 55 44 20 32 2f 28 62  |)*F.r$.EQUD 2/(b|
00014f10  72 69 67 68 74 25 81 34  29 2a 46 0d 72 2e 0a 45  |right%.4)*F.r..E|
00014f20  51 55 44 20 46 0d 72 38  05 5d 0d 72 42 05 cb 0d  |QUD F.r8.].rB...|
00014f30  72 4c 0a 5b 4f 50 54 20  5a 0d 72 56 08 2e 66 73  |rL.[OPT Z.rV..fs|
00014f40  25 0d 72 60 14 53 54 4d  46 44 20 53 50 20 21 2c  |%.r`.STMFD SP !,|
00014f50  7b 52 31 34 7d 0d 72 6a  20 4c 44 52 20 52 31 2c  |{R14}.rj LDR R1,|
00014f60  5b 52 39 2c 23 35 2a 38  5d 3a 4c 44 52 20 52 31  |[R9,#5*8]:LDR R1|
00014f70  2c 5b 52 31 5d 0d 72 74  15 4c 44 52 20 52 31 30  |,[R1].rt.LDR R10|
00014f80  2c 5b 52 39 2c 23 34 2a  38 5d 0d 72 7e 15 4c 44  |,[R9,#4*8].r~.LD|
00014f90  52 20 52 31 31 2c 5b 52  39 2c 23 33 2a 38 5d 0d  |R R11,[R9,#3*8].|
00014fa0  72 88 15 4c 44 52 20 52  31 32 2c 5b 52 39 2c 23  |r..LDR R12,[R9,#|
00014fb0  32 2a 38 5d 0d 72 92 11  4c 44 52 20 52 31 32 2c  |2*8].r..LDR R12,|
00014fc0  5b 52 31 32 5d 0d 72 9c  12 4c 44 52 20 52 38 2c  |[R12].r..LDR R8,|
00014fd0  5b 52 39 2c 23 38 5d 0d  72 a6 0f 4c 44 52 20 52  |[R9,#8].r..LDR R|
00014fe0  38 2c 5b 52 38 5d 0d 72  b0 0f 4c 44 52 20 52 39  |8,[R8].r..LDR R9|
00014ff0  2c 5b 52 39 5d 0d 72 ba  0f 4c 44 52 20 52 39 2c  |,[R9].r..LDR R9,|
00015000  5b 52 39 5d 0d 72 c4 05  5d 0d 72 ce 15 e7 6d 24  |[R9].r..].r...m$|
00015010  3d 22 43 22 20 84 6d 24  3d 22 52 22 20 8c 0d 72  |="C" .m$="R" ..r|
00015020  d8 0a 5b 4f 50 54 20 5a  0d 72 e2 10 4c 44 52 20  |..[OPT Z.r..LDR |
00015030  52 34 2c 5b 52 31 30 5d  0d 72 ec 13 4c 44 52 20  |R4,[R10].r..LDR |
00015040  52 35 2c 5b 52 31 30 2c  23 34 5d 0d 72 f6 13 4c  |R5,[R10,#4].r..L|
00015050  44 52 20 52 36 2c 5b 52  31 30 2c 23 38 5d 0d 73  |DR R6,[R10,#8].s|
00015060  00 05 5d 0d 73 0a 05 cc  0d 73 14 0a 5b 4f 50 54  |..].s....s..[OPT|
00015070  20 5a 0d 73 1e 13 4c 44  52 20 52 34 2c 5b 52 31  | Z.s..LDR R4,[R1|
00015080  30 5d 2c 52 38 0d 73 28  05 5d 0d 73 32 05 cd 0d  |0],R8.s(.].s2...|
00015090  73 3c 0a 5b 4f 50 54 20  5a 0d 73 46 0b 2e 66 73  |s<.[OPT Z.sF..fs|
000150a0  6c 6f 6f 70 0d 73 50 05  5d 0d 73 5a 0d e7 6d 24  |loop.sP.].sZ..m$|
000150b0  3c 3e 22 43 22 8c 0d 73  64 0a 5b 4f 50 54 20 5a  |<>"C"..sd.[OPT Z|
000150c0  0d 73 6e 13 41 44 52 20  52 37 2c 64 69 76 74 61  |.sn.ADR R7,divta|
000150d0  62 6c 65 0d 73 78 05 5d  0d 73 82 05 cd 0d 73 8c  |ble.sx.].s....s.|
000150e0  0b c8 8e 20 6d 24 20 ca  0d 73 96 08 c9 22 43 22  |... m$ ..s..."C"|
000150f0  0d 73 a0 0a 5b 4f 50 54  20 5a 0d 73 aa 12 41 44  |.s..[OPT Z.s..AD|
00015100  44 20 52 31 30 2c 52 31  30 2c 52 38 0d 73 b4 25  |D R10,R10,R8.s.%|
00015110  43 4d 50 20 52 34 2c 23  46 3a 4d 4f 56 43 53 20  |CMP R4,#F:MOVCS |
00015120  52 34 2c 23 30 3a 4d 4f  56 47 45 20 52 34 2c 23  |R4,#0:MOVGE R4,#|
00015130  46 0d 73 be 25 43 4d 50  20 52 35 2c 23 46 3a 4d  |F.s.%CMP R5,#F:M|
00015140  4f 56 43 53 20 52 35 2c  23 30 3a 4d 4f 56 47 45  |OVCS R5,#0:MOVGE|
00015150  20 52 35 2c 23 46 0d 73  c8 25 43 4d 50 20 52 36  | R5,#F.s.%CMP R6|
00015160  2c 23 46 3a 4d 4f 56 43  53 20 52 36 2c 23 30 3a  |,#F:MOVCS R6,#0:|
00015170  4d 4f 56 47 45 20 52 36  2c 23 46 0d 73 d2 0d 4d  |MOVGE R6,#F.s..M|
00015180  4f 56 20 52 33 2c 23 30  0d 73 dc 1e 43 4d 50 20  |OV R3,#0.s..CMP |
00015190  52 34 2c 23 46 3e 3e 31  3a 84 52 43 53 20 52 33  |R4,#F>>1:.RCS R3|
000151a0  2c 52 33 2c 23 31 0d 73  e6 1e 43 4d 50 20 52 35  |,R3,#1.s..CMP R5|
000151b0  2c 23 46 3e 3e 31 3a 84  52 43 53 20 52 33 2c 52  |,#F>>1:.RCS R3,R|
000151c0  33 2c 23 32 0d 73 f0 1e  43 4d 50 20 52 36 2c 23  |3,#2.s..CMP R6,#|
000151d0  46 3e 3e 31 3a 84 52 43  53 20 52 33 2c 52 33 2c  |F>>1:.RCS R3,R3,|
000151e0  23 34 0d 73 fa 22 43 4d  50 20 52 33 2c 23 36 3a  |#4.s."CMP R3,#6:|
000151f0  ec 51 20 52 33 2c 23 31  3a 42 45 51 20 6f 63 74  |.Q R3,#1:BEQ oct|
00015200  63 79 61 6e 0d 74 04 10  42 43 53 20 6f 63 74 77  |cyan.t..BCS octw|
00015210  68 69 74 65 0d 74 0e 19  43 4d 50 20 52 33 2c 23  |hite.t..CMP R3,#|
00015220  34 3a 42 45 51 20 6f 63  74 62 6c 75 65 0d 74 18  |4:BEQ octblue.t.|
00015230  1e 4d 4f 56 43 53 20 52  33 2c 23 32 3a 42 43 53  |.MOVCS R3,#2:BCS|
00015240  20 6f 63 74 6d 61 67 65  6e 74 61 0d 74 22 1a 43  | octmagenta.t".C|
00015250  4d 50 20 52 33 2c 23 32  3a 42 45 51 20 6f 63 74  |MP R3,#2:BEQ oct|
00015260  67 72 65 65 6e 0d 74 2c  11 42 43 53 20 6f 63 74  |green.t,.BCS oct|
00015270  79 65 6c 6c 6f 77 0d 74  36 1a 43 4d 50 20 52 33  |yellow.t6.CMP R3|
00015280  2c 23 30 3a 42 45 51 20  6f 63 74 62 6c 61 63 6b  |,#0:BEQ octblack|
00015290  0d 74 40 0b 2e 6f 63 74  72 65 64 0d 74 4a 10 52  |.t@..octred.tJ.R|
000152a0  53 42 20 52 30 2c 52 34  2c 23 46 0d 74 54 0d 43  |SB R0,R4,#F.tT.C|
000152b0  4d 50 20 52 35 2c 52 30  0d 74 5e 0f 42 4c 54 20  |MP R5,R0.t^.BLT |
000152c0  6f 63 74 72 65 64 31 0d  74 68 0d 43 4d 50 20 52  |octred1.th.CMP R|
000152d0  35 2c 52 36 0d 74 72 0f  4d 4f 56 47 45 20 52 33  |5,R6.tr.MOVGE R3|
000152e0  2c 23 33 0d 74 7c 0f 4d  4f 56 4c 54 20 52 33 2c  |,#3.t|.MOVLT R3,|
000152f0  23 32 0d 74 86 10 42 20  6f 63 74 63 6f 6e 76 65  |#2.t..B octconve|
00015300  72 74 0d 74 90 0c 2e 6f  63 74 72 65 64 31 0d 74  |rt.t...octred1.t|
00015310  9a 0d 43 4d 50 20 52 30  2c 52 36 0d 74 a4 0f 4d  |..CMP R0,R6.t..M|
00015320  4f 56 47 45 20 52 33 2c  23 30 0d 74 ae 0f 4d 4f  |OVGE R3,#0.t..MO|
00015330  56 4c 54 20 52 33 2c 23  32 0d 74 b8 10 42 20 6f  |VLT R3,#2.t..B o|
00015340  63 74 63 6f 6e 76 65 72  74 0d 74 c2 0d 2e 6f 63  |ctconvert.t...oc|
00015350  74 67 72 65 65 6e 0d 74  cc 10 52 53 42 20 52 30  |tgreen.t..RSB R0|
00015360  2c 52 35 2c 23 46 0d 74  d6 0d 43 4d 50 20 52 30  |,R5,#F.t..CMP R0|
00015370  2c 52 34 0d 74 e0 11 42  4c 54 20 6f 63 74 67 72  |,R4.t..BLT octgr|
00015380  65 65 6e 31 0d 74 ea 0d  43 4d 50 20 52 30 2c 52  |een1.t..CMP R0,R|
00015390  36 0d 74 f4 0f 4d 4f 56  47 45 20 52 33 2c 23 30  |6.t..MOVGE R3,#0|
000153a0  0d 74 fe 0f 4d 4f 56 4c  54 20 52 33 2c 23 31 0d  |.t..MOVLT R3,#1.|
000153b0  75 08 10 42 20 6f 63 74  63 6f 6e 76 65 72 74 0d  |u..B octconvert.|
000153c0  75 12 0e 2e 6f 63 74 67  72 65 65 6e 31 0d 75 1c  |u...octgreen1.u.|
000153d0  0d 43 4d 50 20 52 34 2c  52 36 0d 75 26 0f 4d 4f  |.CMP R4,R6.u&.MO|
000153e0  56 47 45 20 52 33 2c 23  33 0d 75 30 0f 4d 4f 56  |VGE R3,#3.u0.MOV|
000153f0  4c 54 20 52 33 2c 23 31  0d 75 3a 10 42 20 6f 63  |LT R3,#1.u:.B oc|
00015400  74 63 6f 6e 76 65 72 74  0d 75 44 0c 2e 6f 63 74  |tconvert.uD..oct|
00015410  62 6c 75 65 0d 75 4e 10  52 53 42 20 52 30 2c 52  |blue.uN.RSB R0,R|
00015420  36 2c 23 46 0d 75 58 0d  43 4d 50 20 52 30 2c 52  |6,#F.uX.CMP R0,R|
00015430  34 0d 75 62 10 42 4c 54  20 6f 63 74 62 6c 75 65  |4.ub.BLT octblue|
00015440  31 0d 75 6c 0d 43 4d 50  20 52 30 2c 52 35 0d 75  |1.ul.CMP R0,R5.u|
00015450  76 0f 4d 4f 56 47 45 20  52 33 2c 23 30 0d 75 80  |v.MOVGE R3,#0.u.|
00015460  0f 4d 4f 56 4c 54 20 52  33 2c 23 31 0d 75 8a 10  |.MOVLT R3,#1.u..|
00015470  42 20 6f 63 74 63 6f 6e  76 65 72 74 0d 75 94 0d  |B octconvert.u..|
00015480  2e 6f 63 74 62 6c 75 65  31 0d 75 9e 0d 43 4d 50  |.octblue1.u..CMP|
00015490  20 52 34 2c 52 35 0d 75  a8 0f 4d 4f 56 47 45 20  | R4,R5.u..MOVGE |
000154a0  52 33 2c 23 32 0d 75 b2  0f 4d 4f 56 4c 54 20 52  |R3,#2.u..MOVLT R|
000154b0  33 2c 23 31 0d 75 bc 10  42 20 6f 63 74 63 6f 6e  |3,#1.u..B octcon|
000154c0  76 65 72 74 0d 75 c6 0d  2e 6f 63 74 77 68 69 74  |vert.u...octwhit|
000154d0  65 0d 75 d0 0d 43 4d 50  20 52 34 2c 52 35 0d 75  |e.u..CMP R4,R5.u|
000154e0  da 11 42 4c 54 20 6f 63  74 77 68 69 74 65 31 0d  |..BLT octwhite1.|
000154f0  75 e4 0d 43 4d 50 20 52  35 2c 52 36 0d 75 ee 0f  |u..CMP R5,R6.u..|
00015500  4d 4f 56 47 45 20 52 33  2c 23 33 0d 75 f8 0f 4d  |MOVGE R3,#3.u..M|
00015510  4f 56 4c 54 20 52 33 2c  23 32 0d 76 02 10 42 20  |OVLT R3,#2.v..B |
00015520  6f 63 74 63 6f 6e 76 65  72 74 0d 76 0c 0e 2e 6f  |octconvert.v...o|
00015530  63 74 77 68 69 74 65 31  0d 76 16 0d 43 4d 50 20  |ctwhite1.v..CMP |
00015540  52 34 2c 52 36 0d 76 20  0f 4d 4f 56 47 45 20 52  |R4,R6.v .MOVGE R|
00015550  33 2c 23 33 0d 76 2a 0f  4d 4f 56 4c 54 20 52 33  |3,#3.v*.MOVLT R3|
00015560  2c 23 31 0d 76 34 0f 2e  6f 63 74 63 6f 6e 76 65  |,#1.v4..octconve|
00015570  72 74 0d 76 3e 0d 43 4d  50 20 52 33 2c 23 31 0d  |rt.v>.CMP R3,#1.|
00015580  76 48 0c 2e 6f 63 74 63  79 61 6e 0d 76 52 12 53  |vH..octcyan.vR.S|
00015590  55 42 45 51 20 52 35 2c  52 35 2c 23 46 0d 76 5c  |UBEQ R5,R5,#F.v\|
000155a0  12 53 55 42 45 51 20 52  36 2c 52 36 2c 23 46 0d  |.SUBEQ R6,R6,#F.|
000155b0  76 66 0f 2e 6f 63 74 6d  61 67 65 6e 74 61 0d 76  |vf..octmagenta.v|
000155c0  70 0d 43 4d 50 20 52 33  2c 23 32 0d 76 7a 12 53  |p.CMP R3,#2.vz.S|
000155d0  55 42 45 51 20 52 34 2c  52 34 2c 23 46 0d 76 84  |UBEQ R4,R4,#F.v.|
000155e0  12 53 55 42 45 51 20 52  36 2c 52 36 2c 23 46 0d  |.SUBEQ R6,R6,#F.|
000155f0  76 8e 0e 2e 6f 63 74 79  65 6c 6c 6f 77 0d 76 98  |v...octyellow.v.|
00015600  0d 43 4d 50 20 52 33 2c  23 33 0d 76 a2 12 53 55  |.CMP R3,#3.v..SU|
00015610  42 45 51 20 52 34 2c 52  34 2c 23 46 0d 76 ac 12  |BEQ R4,R4,#F.v..|
00015620  53 55 42 45 51 20 52 35  2c 52 35 2c 23 46 0d 76  |SUBEQ R5,R5,#F.v|
00015630  b6 0d 2e 6f 63 74 62 6c  61 63 6b 0d 76 c0 15 4d  |...octblack.v..M|
00015640  4f 56 20 52 32 2c 52 31  32 2c 4c 53 52 20 23 32  |OV R2,R12,LSR #2|
00015650  0d 76 ca 20 80 20 52 37  2c 52 31 32 2c 23 33 3a  |.v. . R7,R12,#3:|
00015660  4d 4f 56 20 52 37 2c 52  37 2c 4c 53 4c 20 23 31  |MOV R7,R7,LSL #1|
00015670  0d 76 d4 0e 4d 4f 56 20  52 31 34 2c 23 33 0d 76  |.v..MOV R14,#3.v|
00015680  de 45 4c 44 52 42 20 52  30 2c 5b 52 32 5d 3a 42  |.ELDRB R0,[R2]:B|
00015690  49 43 20 52 30 2c 52 30  2c 52 31 34 2c 4c 53 4c  |IC R0,R0,R14,LSL|
000156a0  20 52 37 3a 84 52 20 52  30 2c 52 30 2c 52 33 2c  | R7:.R R0,R0,R3,|
000156b0  4c 53 4c 20 52 37 3a 53  54 52 42 20 52 30 2c 5b  |LSL R7:STRB R0,[|
000156c0  52 32 5d 0d 76 e8 12 41  44 44 20 52 31 32 2c 52  |R2].v..ADD R12,R|
000156d0  31 32 2c 52 31 0d 76 f2  05 5d 0d 76 fc 08 c9 22  |12,R1.v..].v..."|
000156e0  52 22 0d 77 06 0a 5b 4f  50 54 20 5a 0d 77 10 12  |R".w..[OPT Z.w..|
000156f0  41 44 44 20 52 31 30 2c  52 31 30 2c 52 38 0d 77  |ADD R10,R10,R8.w|
00015700  1a 25 43 4d 50 20 52 34  2c 23 46 3a 4d 4f 56 43  |.%CMP R4,#F:MOVC|
00015710  53 20 52 34 2c 23 30 3a  4d 4f 56 47 45 20 52 34  |S R4,#0:MOVGE R4|
00015720  2c 23 46 0d 77 24 25 43  4d 50 20 52 35 2c 23 46  |,#F.w$%CMP R5,#F|
00015730  3a 4d 4f 56 43 53 20 52  35 2c 23 30 3a 4d 4f 56  |:MOVCS R5,#0:MOV|
00015740  47 45 20 52 35 2c 23 46  0d 77 2e 25 43 4d 50 20  |GE R5,#F.w.%CMP |
00015750  52 36 2c 23 46 3a 4d 4f  56 43 53 20 52 36 2c 23  |R6,#F:MOVCS R6,#|
00015760  30 3a 4d 4f 56 47 45 20  52 36 2c 23 46 0d 77 38  |0:MOVGE R6,#F.w8|
00015770  1a 53 54 4d 46 44 20 53  50 20 21 2c 7b 52 38 2c  |.STMFD SP !,{R8,|
00015780  52 39 2c 52 31 30 7d 0d  77 42 0d 4d 56 4e 20 52  |R9,R10}.wB.MVN R|
00015790  32 2c 23 30 0d 77 4c 0d  4d 4f 56 20 52 33 2c 23  |2,#0.wL.MOV R3,#|
000157a0  33 0d 77 56 1e 2e 73 72  63 68 20 41 44 44 20 52  |3.wV..srch ADD R|
000157b0  31 34 2c 52 33 2c 52 33  2c 4c 53 4c 20 23 31 0d  |14,R3,R3,LSL #1.|
000157c0  77 60 19 41 44 44 20 52  31 34 2c 52 37 2c 52 31  |w`.ADD R14,R7,R1|
000157d0  34 2c 4c 53 4c 20 23 32  0d 77 6a 19 4c 44 4d 49  |4,LSL #2.wj.LDMI|
000157e0  41 20 52 31 34 2c 7b 52  38 2c 52 39 2c 52 31 30  |A R14,{R8,R9,R10|
000157f0  7d 0d 77 74 11 53 55 42  53 20 52 38 2c 52 34 2c  |}.wt.SUBS R8,R4,|
00015800  52 38 0d 77 7e 12 52 53  42 4d 49 20 52 38 2c 52  |R8.w~.RSBMI R8,R|
00015810  38 2c 23 30 0d 77 88 11  53 55 42 53 20 52 39 2c  |8,#0.w..SUBS R9,|
00015820  52 35 2c 52 39 0d 77 92  12 52 53 42 4d 49 20 52  |R5,R9.w..RSBMI R|
00015830  39 2c 52 39 2c 23 30 0d  77 9c 13 53 55 42 53 20  |9,R9,#0.w..SUBS |
00015840  52 31 30 2c 52 36 2c 52  31 30 0d 77 a6 14 52 53  |R10,R6,R10.w..RS|
00015850  42 4d 49 20 52 31 30 2c  52 31 30 2c 23 30 0d 77  |BMI R10,R10,#0.w|
00015860  b0 1a 4d 4f 56 20 52 31  34 2c 52 38 2c 4c 53 52  |..MOV R14,R8,LSR|
00015870  20 23 62 69 74 73 2f 32  0d 77 ba 12 4d 55 4c 20  | #bits/2.w..MUL |
00015880  52 38 2c 52 31 34 2c 52  31 34 0d 77 c4 1a 4d 4f  |R8,R14,R14.w..MO|
00015890  56 20 52 31 34 2c 52 39  2c 4c 53 52 20 23 62 69  |V R14,R9,LSR #bi|
000158a0  74 73 2f 32 0d 77 ce 12  4d 55 4c 20 52 39 2c 52  |ts/2.w..MUL R9,R|
000158b0  31 34 2c 52 31 34 0d 77  d8 1b 4d 4f 56 20 52 31  |14,R14.w..MOV R1|
000158c0  34 2c 52 31 30 2c 4c 53  52 20 23 62 69 74 73 2f  |4,R10,LSR #bits/|
000158d0  32 0d 77 e2 13 4d 55 4c  20 52 31 30 2c 52 31 34  |2.w..MUL R10,R14|
000158e0  2c 52 31 34 0d 77 ec 17  41 44 44 20 52 39 2c 52  |,R14.w..ADD R9,R|
000158f0  39 2c 52 39 2c 4c 53 4c  20 23 32 0d 77 f6 17 41  |9,R9,LSL #2.w..A|
00015900  44 44 20 52 38 2c 52 38  2c 52 38 2c 4c 53 4c 20  |DD R8,R8,R8,LSL |
00015910  23 31 0d 78 00 18 41 44  44 20 52 31 34 2c 52 38  |#1.x..ADD R14,R8|
00015920  2c 52 39 2c 4c 53 4c 20  23 31 0d 78 0a 13 41 44  |,R9,LSL #1.x..AD|
00015930  44 20 52 31 34 2c 52 31  34 2c 52 31 30 0d 78 14  |D R14,R14,R10.x.|
00015940  0e 43 4d 50 20 52 31 34  2c 52 32 0d 78 1e 10 4d  |.CMP R14,R2.x..M|
00015950  4f 56 43 43 20 52 32 2c  52 31 34 0d 78 28 0f 4d  |OVCC R2,R14.x(.M|
00015960  4f 56 43 43 20 52 30 2c  52 33 0d 78 32 11 53 55  |OVCC R0,R3.x2.SU|
00015970  42 53 20 52 33 2c 52 33  2c 23 31 0d 78 3c 0c 42  |BS R3,R3,#1.x<.B|
00015980  50 4c 20 73 72 63 68 0d  78 46 1a 4c 44 4d 46 44  |PL srch.xF.LDMFD|
00015990  20 53 50 20 21 2c 7b 52  38 2c 52 39 2c 52 31 30  | SP !,{R8,R9,R10|
000159a0  7d 0d 78 50 2b 41 44 44  20 52 33 2c 52 30 2c 52  |}.xP+ADD R3,R0,R|
000159b0  30 2c 4c 53 4c 20 23 31  3a 41 44 44 20 52 33 2c  |0,LSL #1:ADD R3,|
000159c0  52 37 2c 52 33 2c 4c 53  4c 20 23 32 0d 78 5a 1f  |R7,R3,LSL #2.xZ.|
000159d0  4c 44 52 20 52 32 2c 5b  52 33 5d 2c 23 34 3a 53  |LDR R2,[R3],#4:S|
000159e0  55 42 20 52 34 2c 52 34  2c 52 32 0d 78 64 2e 4c  |UB R4,R4,R2.xd.L|
000159f0  44 4d 49 41 20 52 33 2c  7b 52 32 2c 52 33 7d 3a  |DMIA R3,{R2,R3}:|
00015a00  53 55 42 20 52 35 2c 52  35 2c 52 32 3a 53 55 42  |SUB R5,R5,R2:SUB|
00015a10  20 52 36 2c 52 36 2c 52  33 0d 78 6e 0d 4d 4f 56  | R6,R6,R3.xn.MOV|
00015a20  20 52 33 2c 52 30 0d 78  78 15 4d 4f 56 20 52 32  | R3,R0.xx.MOV R2|
00015a30  2c 52 31 32 2c 4c 53 52  20 23 32 0d 78 82 20 80  |,R12,LSR #2.x. .|
00015a40  20 52 37 2c 52 31 32 2c  23 33 3a 4d 4f 56 20 52  | R7,R12,#3:MOV R|
00015a50  37 2c 52 37 2c 4c 53 4c  20 23 31 0d 78 8c 0e 4d  |7,R7,LSL #1.x..M|
00015a60  4f 56 20 52 31 34 2c 23  33 0d 78 96 45 4c 44 52  |OV R14,#3.x.ELDR|
00015a70  42 20 52 30 2c 5b 52 32  5d 3a 42 49 43 20 52 30  |B R0,[R2]:BIC R0|
00015a80  2c 52 30 2c 52 31 34 2c  4c 53 4c 20 52 37 3a 84  |,R0,R14,LSL R7:.|
00015a90  52 20 52 30 2c 52 30 2c  52 33 2c 4c 53 4c 20 52  |R R0,R0,R3,LSL R|
00015aa0  37 3a 53 54 52 42 20 52  30 2c 5b 52 32 5d 0d 78  |7:STRB R0,[R2].x|
00015ab0  a0 12 41 44 44 20 52 31  32 2c 52 31 32 2c 52 31  |..ADD R12,R12,R1|
00015ac0  0d 78 aa 05 5d 0d 78 b4  05 7f 0d 78 be 0a 5b 4f  |.x..].x....x..[O|
00015ad0  50 54 20 5a 0d 78 c8 25  43 4d 50 20 52 34 2c 23  |PT Z.x.%CMP R4,#|
00015ae0  46 3a 4d 4f 56 43 53 20  52 34 2c 23 30 3a 4d 4f  |F:MOVCS R4,#0:MO|
00015af0  56 47 45 20 52 34 2c 23  46 0d 78 d2 3a 52 53 42  |VGE R4,#F.x.:RSB|
00015b00  20 52 33 2c 52 34 2c 52  34 2c 4c 53 4c 20 23 32  | R3,R4,R4,LSL #2|
00015b10  3a 41 44 44 20 52 33 2c  52 33 2c 23 46 3e 3e 31  |:ADD R3,R3,#F>>1|
00015b20  3a 4d 4f 56 20 52 33 2c  52 33 2c 4c 53 52 23 62  |:MOV R3,R3,LSR#b|
00015b30  69 74 73 0d 78 dc 19 4c  44 52 20 52 32 2c 5b 52  |its.x..LDR R2,[R|
00015b40  37 2c 52 33 2c 4c 53 4c  20 23 32 5d 0d 78 e6 10  |7,R3,LSL #2].x..|
00015b50  53 55 42 20 52 34 2c 52  34 2c 52 32 0d 78 f0 15  |SUB R4,R4,R2.x..|
00015b60  4d 4f 56 20 52 32 2c 52  31 32 2c 4c 53 52 20 23  |MOV R2,R12,LSR #|
00015b70  32 0d 78 fa 20 80 20 52  35 2c 52 31 32 2c 23 33  |2.x. . R5,R12,#3|
00015b80  3a 4d 4f 56 20 52 35 2c  52 35 2c 4c 53 4c 20 23  |:MOV R5,R5,LSL #|
00015b90  31 0d 79 04 0d 4d 4f 56  20 52 36 2c 23 33 0d 79  |1.y..MOV R6,#3.y|
00015ba0  0e 44 4c 44 52 42 20 52  30 2c 5b 52 32 5d 3a 42  |.DLDRB R0,[R2]:B|
00015bb0  49 43 20 52 30 2c 52 30  2c 52 36 2c 4c 53 4c 20  |IC R0,R0,R6,LSL |
00015bc0  52 35 3a 84 52 20 52 30  2c 52 30 2c 52 33 2c 4c  |R5:.R R0,R0,R3,L|
00015bd0  53 4c 20 52 35 3a 53 54  52 42 20 52 30 2c 5b 52  |SL R5:STRB R0,[R|
00015be0  32 5d 0d 79 18 12 41 44  44 20 52 31 32 2c 52 31  |2].y..ADD R12,R1|
00015bf0  32 2c 52 31 0d 79 22 05  5d 0d 79 2c 05 cb 0d 79  |2,R1.y".].y,...y|
00015c00  36 15 e7 6d 24 3d 22 43  22 20 84 6d 24 3d 22 52  |6..m$="C" .m$="R|
00015c10  22 20 8c 0d 79 40 0e e7  64 69 74 68 65 72 25 20  |" ..y@..dither% |
00015c20  8c 0d 79 4a 0a 5b 4f 50  54 20 5a 0d 79 54 11 41  |..yJ.[OPT Z.yT.A|
00015c30  44 44 20 52 30 2c 52 31  31 2c 23 34 0d 79 5e 17  |DD R0,R11,#4.y^.|
00015c40  41 44 44 20 52 32 2c 52  34 2c 52 34 2c 4c 53 4c  |ADD R2,R4,R4,LSL|
00015c50  20 23 31 0d 79 68 28 4c  44 52 20 52 33 2c 5b 52  | #1.yh(LDR R3,[R|
00015c60  31 31 2c 2d 52 38 5d 3a  41 44 44 20 52 33 2c 52  |11,-R8]:ADD R3,R|
00015c70  33 2c 52 32 2c 41 53 52  20 23 34 0d 79 72 14 53  |3,R2,ASR #4.yr.S|
00015c80  54 52 20 52 33 2c 5b 52  31 31 2c 2d 52 38 5d 0d  |TR R3,[R11,-R8].|
00015c90  79 7c 17 41 44 44 20 52  32 2c 52 34 2c 52 34 2c  |y|.ADD R2,R4,R4,|
00015ca0  4c 53 4c 20 23 32 0d 79  86 24 4c 44 52 20 52 33  |LSL #2.y.$LDR R3|
00015cb0  2c 5b 52 31 31 5d 3a 41  44 44 20 52 33 2c 52 33  |,[R11]:ADD R3,R3|
00015cc0  2c 52 32 2c 41 53 52 20  23 34 0d 79 90 10 53 54  |,R2,ASR #4.y..ST|
00015cd0  52 20 52 33 2c 5b 52 31  31 5d 0d 79 9a 14 4d 4f  |R R3,[R11].y..MO|
00015ce0  56 20 52 33 2c 52 34 2c  41 53 52 20 23 34 0d 79  |V R3,R4,ASR #4.y|
00015cf0  a4 14 53 54 52 20 52 33  2c 5b 52 31 31 2c 52 38  |..STR R3,[R11,R8|
00015d00  5d 21 0d 79 ae 17 52 53  42 20 52 32 2c 52 34 2c  |]!.y..RSB R2,R4,|
00015d10  52 34 2c 4c 53 4c 20 23  33 0d 79 b8 10 4c 44 52  |R4,LSL #3.y..LDR|
00015d20  20 52 34 2c 5b 52 31 30  5d 0d 79 c2 17 41 44 44  | R4,[R10].y..ADD|
00015d30  20 52 34 2c 52 34 2c 52  32 2c 41 53 52 20 23 34  | R4,R4,R2,ASR #4|
00015d40  0d 79 cc 17 41 44 44 20  52 32 2c 52 35 2c 52 35  |.y..ADD R2,R5,R5|
00015d50  2c 4c 53 4c 20 23 31 0d  79 d6 27 4c 44 52 20 52  |,LSL #1.y.'LDR R|
00015d60  33 2c 5b 52 30 2c 2d 52  38 5d 3a 41 44 44 20 52  |3,[R0,-R8]:ADD R|
00015d70  33 2c 52 33 2c 52 32 2c  41 53 52 20 23 34 0d 79  |3,R3,R2,ASR #4.y|
00015d80  e0 13 53 54 52 20 52 33  2c 5b 52 30 2c 2d 52 38  |..STR R3,[R0,-R8|
00015d90  5d 0d 79 ea 14 4d 4f 56  20 52 33 2c 52 35 2c 41  |].y..MOV R3,R5,A|
00015da0  53 52 20 23 34 0d 79 f4  12 53 54 52 20 52 33 2c  |SR #4.y..STR R3,|
00015db0  5b 52 30 2c 52 38 5d 0d  79 fe 17 41 44 44 20 52  |[R0,R8].y..ADD R|
00015dc0  32 2c 52 35 2c 52 35 2c  4c 53 4c 20 23 32 0d 7a  |2,R5,R5,LSL #2.z|
00015dd0  08 23 4c 44 52 20 52 33  2c 5b 52 30 5d 3a 41 44  |.#LDR R3,[R0]:AD|
00015de0  44 20 52 33 2c 52 33 2c  52 32 2c 41 53 52 20 23  |D R3,R3,R2,ASR #|
00015df0  34 0d 7a 12 12 53 54 52  20 52 33 2c 5b 52 30 5d  |4.z..STR R3,[R0]|
00015e00  2c 23 34 0d 7a 1c 17 52  53 42 20 52 32 2c 52 35  |,#4.z..RSB R2,R5|
00015e10  2c 52 35 2c 4c 53 4c 20  23 33 0d 7a 26 13 4c 44  |,R5,LSL #3.z&.LD|
00015e20  52 20 52 35 2c 5b 52 31  30 2c 23 34 5d 0d 7a 30  |R R5,[R10,#4].z0|
00015e30  17 41 44 44 20 52 35 2c  52 35 2c 52 32 2c 41 53  |.ADD R5,R5,R2,AS|
00015e40  52 20 23 34 0d 7a 3a 17  41 44 44 20 52 32 2c 52  |R #4.z:.ADD R2,R|
00015e50  36 2c 52 36 2c 4c 53 4c  20 23 31 0d 7a 44 27 4c  |6,R6,LSL #1.zD'L|
00015e60  44 52 20 52 33 2c 5b 52  30 2c 2d 52 38 5d 3a 41  |DR R3,[R0,-R8]:A|
00015e70  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
00015e80  23 34 0d 7a 4e 13 53 54  52 20 52 33 2c 5b 52 30  |#4.zN.STR R3,[R0|
00015e90  2c 2d 52 38 5d 0d 7a 58  17 41 44 44 20 52 32 2c  |,-R8].zX.ADD R2,|
00015ea0  52 36 2c 52 36 2c 4c 53  4c 20 23 32 0d 7a 62 23  |R6,R6,LSL #2.zb#|
00015eb0  4c 44 52 20 52 33 2c 5b  52 30 5d 3a 41 44 44 20  |LDR R3,[R0]:ADD |
00015ec0  52 33 2c 52 33 2c 52 32  2c 41 53 52 20 23 34 0d  |R3,R3,R2,ASR #4.|
00015ed0  7a 6c 0f 53 54 52 20 52  33 2c 5b 52 30 5d 0d 7a  |zl.STR R3,[R0].z|
00015ee0  76 14 4d 4f 56 20 52 33  2c 52 36 2c 41 53 52 20  |v.MOV R3,R6,ASR |
00015ef0  23 34 0d 7a 80 12 53 54  52 20 52 33 2c 5b 52 30  |#4.z..STR R3,[R0|
00015f00  2c 52 38 5d 0d 7a 8a 17  52 53 42 20 52 32 2c 52  |,R8].z..RSB R2,R|
00015f10  36 2c 52 36 2c 4c 53 4c  20 23 33 0d 7a 94 13 4c  |6,R6,LSL #3.z..L|
00015f20  44 52 20 52 36 2c 5b 52  31 30 2c 23 38 5d 0d 7a  |DR R6,[R10,#8].z|
00015f30  9e 17 41 44 44 20 52 36  2c 52 36 2c 52 32 2c 41  |..ADD R6,R6,R2,A|
00015f40  53 52 20 23 34 0d 7a a8  05 5d 0d 7a b2 05 cc 0d  |SR #4.z..].z....|
00015f50  7a bc 0a 5b 4f 50 54 20  5a 0d 7a c6 18 4c 44 4d  |z..[OPT Z.z..LDM|
00015f60  49 41 20 52 31 30 2c 7b  52 34 2c 52 35 2c 52 36  |IA R10,{R4,R5,R6|
00015f70  7d 0d 7a d0 05 5d 0d 7a  da 05 cd 0d 7a e4 05 cc  |}.z..].z....z...|
00015f80  0d 7a ee 0e e7 64 69 74  68 65 72 25 20 8c 0d 7a  |.z...dither% ..z|
00015f90  f8 0a 5b 4f 50 54 20 5a  0d 7b 02 17 41 44 44 20  |..[OPT Z.{..ADD |
00015fa0  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 31 0d  |R2,R4,R4,LSL #1.|
00015fb0  7b 0c 28 4c 44 52 20 52  33 2c 5b 52 31 31 2c 2d  |{.(LDR R3,[R11,-|
00015fc0  52 38 5d 3a 41 44 44 20  52 33 2c 52 33 2c 52 32  |R8]:ADD R3,R3,R2|
00015fd0  2c 41 53 52 20 23 34 0d  7b 16 14 53 54 52 20 52  |,ASR #4.{..STR R|
00015fe0  33 2c 5b 52 31 31 2c 2d  52 38 5d 0d 7b 20 17 41  |3,[R11,-R8].{ .A|
00015ff0  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
00016000  23 32 0d 7b 2a 24 4c 44  52 20 52 33 2c 5b 52 31  |#2.{*$LDR R3,[R1|
00016010  31 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |1]:ADD R3,R3,R2,|
00016020  41 53 52 20 23 34 0d 7b  34 10 53 54 52 20 52 33  |ASR #4.{4.STR R3|
00016030  2c 5b 52 31 31 5d 0d 7b  3e 14 4d 4f 56 20 52 33  |,[R11].{>.MOV R3|
00016040  2c 52 34 2c 41 53 52 20  23 34 0d 7b 48 14 53 54  |,R4,ASR #4.{H.ST|
00016050  52 20 52 33 2c 5b 52 31  31 2c 52 38 5d 21 0d 7b  |R R3,[R11,R8]!.{|
00016060  52 17 52 53 42 20 52 32  2c 52 34 2c 52 34 2c 4c  |R.RSB R2,R4,R4,L|
00016070  53 4c 20 23 33 0d 7b 5c  13 4c 44 52 20 52 34 2c  |SL #3.{\.LDR R4,|
00016080  5b 52 31 30 5d 2c 52 38  0d 7b 66 17 41 44 44 20  |[R10],R8.{f.ADD |
00016090  52 34 2c 52 34 2c 52 32  2c 41 53 52 20 23 34 0d  |R4,R4,R2,ASR #4.|
000160a0  7b 70 05 5d 0d 7b 7a 05  cc 0d 7b 84 0a 5b 4f 50  |{p.].{z...{..[OP|
000160b0  54 20 5a 0d 7b 8e 13 4c  44 52 20 52 34 2c 5b 52  |T Z.{..LDR R4,[R|
000160c0  31 30 5d 2c 52 38 0d 7b  98 05 5d 0d 7b a2 05 cd  |10],R8.{..].{...|
000160d0  0d 7b ac 05 cd 0d 7b b6  0a 5b 4f 50 54 20 5a 0d  |.{....{..[OPT Z.|
000160e0  7b c0 1c 53 55 42 53 20  52 39 2c 52 39 2c 23 31  |{..SUBS R9,R9,#1|
000160f0  3a 42 4e 45 20 66 73 6c  6f 6f 70 0d 7b ca 14 4c  |:BNE fsloop.{..L|
00016100  44 4d 46 44 20 53 50 20  21 2c 7b 50 43 7d 5e 0d  |DMFD SP !,{PC}^.|
00016110  7b d4 05 5d 0d 7b de 07  c9 20 31 0d 7b e8 0b c8  |{..].{... 1.{...|
00016120  8e 20 6d 24 20 ca 0d 7b  f2 08 c9 22 43 22 0d 7b  |. m$ ..{..."C".{|
00016130  fc 0a 5b 4f 50 54 20 5a  0d 7c 06 14 2e 64 69 76  |..[OPT Z.|...div|
00016140  74 61 62 6c 65 20 45 51  55 44 20 30 0d 7c 10 1e  |table EQUD 0.|..|
00016150  45 51 55 44 20 28 31 2d  62 6c 61 63 6b 25 2f 32  |EQUD (1-black%/2|
00016160  35 36 2a 32 29 2f 31 36  2a 46 0d 7c 1a 1e 45 51  |56*2)/16*F.|..EQ|
00016170  55 44 20 28 32 2d 62 6c  61 63 6b 25 2f 32 35 36  |UD (2-black%/256|
00016180  2a 34 29 2f 31 36 2a 46  0d 7c 24 1e 45 51 55 44  |*4)/16*F.|$.EQUD|
00016190  20 28 33 2d 62 6c 61 63  6b 25 2f 32 35 36 2a 35  | (3-black%/256*5|
000161a0  29 2f 31 36 2a 46 0d 7c  2e 1e 45 51 55 44 20 28  |)/16*F.|..EQUD (|
000161b0  34 2d 62 6c 61 63 6b 25  2f 32 35 36 2a 36 29 2f  |4-black%/256*6)/|
000161c0  31 36 2a 46 0d 7c 38 1e  45 51 55 44 20 28 35 2d  |16*F.|8.EQUD (5-|
000161d0  62 6c 61 63 6b 25 2f 32  35 36 2a 37 29 2f 31 36  |black%/256*7)/16|
000161e0  2a 46 0d 7c 42 1e 45 51  55 44 20 28 36 2d 62 6c  |*F.|B.EQUD (6-bl|
000161f0  61 63 6b 25 2f 32 35 36  2a 38 29 2f 31 36 2a 46  |ack%/256*8)/16*F|
00016200  0d 7c 4c 1e 45 51 55 44  20 28 37 2d 62 6c 61 63  |.|L.EQUD (7-blac|
00016210  6b 25 2f 32 35 36 2a 38  29 2f 31 36 2a 46 0d 7c  |k%/256*8)/16*F.||
00016220  56 1e 45 51 55 44 20 28  38 2d 62 6c 61 63 6b 25  |V.EQUD (8-black%|
00016230  2f 32 35 36 2a 38 29 2f  31 36 2a 46 0d 7c 60 1e  |/256*8)/16*F.|`.|
00016240  45 51 55 44 20 28 39 2d  62 6c 61 63 6b 25 2f 32  |EQUD (9-black%/2|
00016250  35 36 2a 38 29 2f 31 36  2a 46 0d 7c 6a 1f 45 51  |56*8)/16*F.|j.EQ|
00016260  55 44 20 28 31 30 2d 62  6c 61 63 6b 25 2f 32 35  |UD (10-black%/25|
00016270  36 2a 38 29 2f 31 36 2a  46 0d 7c 74 1f 45 51 55  |6*8)/16*F.|t.EQU|
00016280  44 20 28 31 31 2d 62 6c  61 63 6b 25 2f 32 35 36  |D (11-black%/256|
00016290  2a 37 29 2f 31 36 2a 46  0d 7c 7e 1f 45 51 55 44  |*7)/16*F.|~.EQUD|
000162a0  20 28 31 32 2d 62 6c 61  63 6b 25 2f 32 35 36 2a  | (12-black%/256*|
000162b0  36 29 2f 31 36 2a 46 0d  7c 88 1f 45 51 55 44 20  |6)/16*F.|..EQUD |
000162c0  28 31 33 2d 62 6c 61 63  6b 25 2f 32 35 36 2a 35  |(13-black%/256*5|
000162d0  29 2f 31 36 2a 46 0d 7c  92 1f 45 51 55 44 20 28  |)/16*F.|..EQUD (|
000162e0  31 34 2d 62 6c 61 63 6b  25 2f 32 35 36 2a 34 29  |14-black%/256*4)|
000162f0  2f 31 36 2a 46 0d 7c 9c  1f 45 51 55 44 20 28 31  |/16*F.|..EQUD (1|
00016300  35 2d 62 6c 61 63 6b 25  2f 32 35 36 2a 32 29 2f  |5-black%/256*2)/|
00016310  31 36 2a 46 0d 7c a6 0a  45 51 55 44 20 46 0d 7c  |16*F.|..EQUD F.||
00016320  b0 1f 2e 65 76 65 6e 72  6f 77 5f 67 61 72 64 20  |...evenrow_gard |
00016330  44 43 44 20 65 76 65 6e  5f 67 61 72 64 0d 7c ba  |DCD even_gard.|.|
00016340  1d 2e 6f 64 64 72 6f 77  5f 67 61 72 64 20 44 43  |..oddrow_gard DC|
00016350  44 20 6f 64 64 5f 67 61  72 64 0d 7c c4 11 2e 72  |D odd_gard.|...r|
00016360  6f 77 69 6e 63 20 44 43  44 20 30 0d 7c ce 08 2e  |owinc DCD 0.|...|
00016370  66 73 25 0d 7c d8 14 53  54 4d 46 44 20 53 50 20  |fs%.|..STMFD SP |
00016380  21 2c 7b 52 31 34 7d 0d  7c e2 20 4c 44 52 20 52  |!,{R14}.|. LDR R|
00016390  31 2c 5b 52 39 2c 23 35  2a 38 5d 3a 4c 44 52 20  |1,[R9,#5*8]:LDR |
000163a0  52 31 2c 5b 52 31 5d 0d  7c ec 15 4c 44 52 20 52  |R1,[R1].|..LDR R|
000163b0  31 30 2c 5b 52 39 2c 23  34 2a 38 5d 0d 7c f6 15  |10,[R9,#4*8].|..|
000163c0  4c 44 52 20 52 31 31 2c  5b 52 39 2c 23 33 2a 38  |LDR R11,[R9,#3*8|
000163d0  5d 0d 7d 00 15 4c 44 52  20 52 31 32 2c 5b 52 39  |].}..LDR R12,[R9|
000163e0  2c 23 32 2a 38 5d 0d 7d  0a 11 4c 44 52 20 52 31  |,#2*8].}..LDR R1|
000163f0  32 2c 5b 52 31 32 5d 0d  7d 14 12 4c 44 52 20 52  |2,[R12].}..LDR R|
00016400  38 2c 5b 52 39 2c 23 38  5d 0d 7d 1e 0f 4c 44 52  |8,[R9,#8].}..LDR|
00016410  20 52 38 2c 5b 52 38 5d  0d 7d 28 0f 4c 44 52 20  | R8,[R8].}(.LDR |
00016420  52 39 2c 5b 52 39 5d 0d  7d 32 0f 4c 44 52 20 52  |R9,[R9].}2.LDR R|
00016430  39 2c 5b 52 39 5d 0d 7d  3c 13 4c 44 52 20 52 34  |9,[R9].}<.LDR R4|
00016440  2c 5b 52 31 30 5d 2c 52  38 0d 7d 46 0d 54 45 51  |,[R10],R8.}F.TEQ|
00016450  20 52 38 2c 23 30 0d 7d  50 19 4c 44 52 50 4c 20  | R8,#0.}P.LDRPL |
00016460  52 36 2c 65 76 65 6e 72  6f 77 5f 67 61 72 64 0d  |R6,evenrow_gard.|
00016470  7d 5a 18 4c 44 52 4d 49  20 52 36 2c 6f 64 64 72  |}Z.LDRMI R6,oddr|
00016480  6f 77 5f 67 61 72 64 0d  7d 64 14 4d 4f 56 20 52  |ow_gard.}d.MOV R|
00016490  31 2c 52 31 2c 4c 53 4c  20 23 31 0d 7d 6e 11 4c  |1,R1,LSL #1.}n.L|
000164a0  44 52 20 52 37 2c 72 6f  77 69 6e 63 0d 7d 78 14  |DR R7,rowinc.}x.|
000164b0  41 44 52 20 52 31 34 2c  64 69 76 74 61 62 6c 65  |ADR R14,divtable|
000164c0  0d 7d 82 0b 2e 66 73 6c  6f 6f 70 0d 7d 8c 25 43  |.}...fsloop.}.%C|
000164d0  4d 50 20 52 34 2c 23 46  3a 4d 4f 56 43 53 20 52  |MP R4,#F:MOVCS R|
000164e0  34 2c 23 30 3a 4d 4f 56  47 45 20 52 34 2c 23 46  |4,#0:MOVGE R4,#F|
000164f0  0d 7d 96 13 41 44 44 20  52 35 2c 52 34 2c 23 46  |.}..ADD R5,R4,#F|
00016500  3e 3e 35 0d 7d a0 1a 4d  4f 56 53 20 52 35 2c 52  |>>5.}..MOVS R5,R|
00016510  35 2c 4c 53 52 20 23 62  69 74 73 2d 34 0d 7d aa  |5,LSR #bits-4.}.|
00016520  1c 4c 44 52 4e 45 20 52  30 2c 5b 52 31 34 2c 52  |.LDRNE R0,[R14,R|
00016530  35 2c 4c 53 4c 20 23 32  5d 0d 7d b4 12 53 55 42  |5,LSL #2].}..SUB|
00016540  4e 45 20 52 34 2c 52 34  2c 52 30 0d 7d be 05 5d  |NE R4,R4,R0.}..]|
00016550  0d 7d c8 0e e7 64 69 74  68 65 72 25 20 8c 0d 7d  |.}...dither% ..}|
00016560  d2 0a 5b 4f 50 54 20 5a  0d 7d dc 17 41 44 44 20  |..[OPT Z.}..ADD |
00016570  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 31 0d  |R2,R4,R4,LSL #1.|
00016580  7d e6 28 4c 44 52 20 52  33 2c 5b 52 31 31 2c 2d  |}.(LDR R3,[R11,-|
00016590  52 38 5d 3a 41 44 44 20  52 33 2c 52 33 2c 52 32  |R8]:ADD R3,R3,R2|
000165a0  2c 41 53 52 20 23 34 0d  7d f0 14 53 54 52 20 52  |,ASR #4.}..STR R|
000165b0  33 2c 5b 52 31 31 2c 2d  52 38 5d 0d 7d fa 17 41  |3,[R11,-R8].}..A|
000165c0  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
000165d0  23 32 0d 7e 04 24 4c 44  52 20 52 33 2c 5b 52 31  |#2.~.$LDR R3,[R1|
000165e0  31 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |1]:ADD R3,R3,R2,|
000165f0  41 53 52 20 23 34 0d 7e  0e 10 53 54 52 20 52 33  |ASR #4.~..STR R3|
00016600  2c 5b 52 31 31 5d 0d 7e  18 14 4d 4f 56 20 52 33  |,[R11].~..MOV R3|
00016610  2c 52 34 2c 41 53 52 20  23 34 0d 7e 22 14 53 54  |,R4,ASR #4.~".ST|
00016620  52 20 52 33 2c 5b 52 31  31 2c 52 38 5d 21 0d 7e  |R R3,[R11,R8]!.~|
00016630  2c 17 52 53 42 20 52 32  2c 52 34 2c 52 34 2c 4c  |,.RSB R2,R4,R4,L|
00016640  53 4c 20 23 33 0d 7e 36  13 4c 44 52 20 52 34 2c  |SL #3.~6.LDR R4,|
00016650  5b 52 31 30 5d 2c 52 38  0d 7e 40 18 41 44 44 53  |[R10],R8.~@.ADDS|
00016660  20 52 34 2c 52 34 2c 52  32 2c 41 53 52 20 23 34  | R4,R4,R2,ASR #4|
00016670  0d 7e 4a 05 5d 0d 7e 54  05 cc 0d 7e 5e 0a 5b 4f  |.~J.].~T...~^.[O|
00016680  50 54 20 5a 0d 7e 68 13  4c 44 52 20 52 34 2c 5b  |PT Z.~h.LDR R4,[|
00016690  52 31 30 5d 2c 52 38 0d  7e 72 05 5d 0d 7e 7c 05  |R10],R8.~r.].~|.|
000166a0  cd 0d 7e 86 0a 5b 4f 50  54 20 5a 0d 7e 90 25 43  |..~..[OPT Z.~.%C|
000166b0  4d 50 20 52 34 2c 23 46  3a 4d 4f 56 43 53 20 52  |MP R4,#F:MOVCS R|
000166c0  34 2c 23 30 3a 4d 4f 56  47 45 20 52 34 2c 23 46  |4,#0:MOVGE R4,#F|
000166d0  0d 7e 9a 13 41 44 44 20  52 33 2c 52 34 2c 23 46  |.~..ADD R3,R4,#F|
000166e0  3e 3e 35 0d 7e a4 1a 4d  4f 56 53 20 52 33 2c 52  |>>5.~..MOVS R3,R|
000166f0  33 2c 4c 53 52 20 23 62  69 74 73 2d 34 0d 7e ae  |3,LSR #bits-4.~.|
00016700  1c 4c 44 52 4e 45 20 52  30 2c 5b 52 31 34 2c 52  |.LDRNE R0,[R14,R|
00016710  33 2c 4c 53 4c 20 23 32  5d 0d 7e b8 12 53 55 42  |3,LSL #2].~..SUB|
00016720  4e 45 20 52 34 2c 52 34  2c 52 30 0d 7e c2 2c 84  |NE R4,R4,R0.~.,.|
00016730  52 20 52 35 2c 52 35 2c  52 33 2c 4c 53 4c 20 23  |R R5,R5,R3,LSL #|
00016740  35 3a 4c 44 52 20 52 33  2c 5b 52 36 2c 52 35 2c  |5:LDR R3,[R6,R5,|
00016750  4c 53 4c 20 23 32 5d 0d  7e cc 46 4d 4f 56 20 52  |LSL #2].~.FMOV R|
00016760  32 2c 52 31 32 2c 4c 53  52 20 23 31 3a 53 54 52  |2,R12,LSR #1:STR|
00016770  42 20 52 33 2c 5b 52 32  5d 2c 52 37 3a 4d 4f 56  |B R3,[R2],R7:MOV|
00016780  20 52 33 2c 52 33 2c 4c  53 52 20 23 38 3a 53 54  | R3,R3,LSR #8:ST|
00016790  52 42 20 52 33 2c 5b 52  32 5d 2c 52 37 0d 7e d6  |RB R3,[R2],R7.~.|
000167a0  42 4d 4f 56 20 52 33 2c  52 33 2c 4c 53 52 20 23  |BMOV R3,R3,LSR #|
000167b0  38 3a 53 54 52 42 20 52  33 2c 5b 52 32 5d 2c 52  |8:STRB R3,[R2],R|
000167c0  37 3a 4d 4f 56 20 52 33  2c 52 33 2c 4c 53 52 20  |7:MOV R3,R3,LSR |
000167d0  23 38 3a 53 54 52 42 20  52 33 2c 5b 52 32 5d 0d  |#8:STRB R3,[R2].|
000167e0  7e e0 12 41 44 44 20 52  31 32 2c 52 31 32 2c 52  |~..ADD R12,R12,R|
000167f0  31 0d 7e ea 05 5d 0d 7e  f4 0e e7 64 69 74 68 65  |1.~..].~...dithe|
00016800  72 25 20 8c 0d 7e fe 0a  5b 4f 50 54 20 5a 0d 7f  |r% ..~..[OPT Z..|
00016810  08 17 41 44 44 20 52 32  2c 52 34 2c 52 34 2c 4c  |..ADD R2,R4,R4,L|
00016820  53 4c 20 23 31 0d 7f 12  28 4c 44 52 20 52 33 2c  |SL #1...(LDR R3,|
00016830  5b 52 31 31 2c 2d 52 38  5d 3a 41 44 44 20 52 33  |[R11,-R8]:ADD R3|
00016840  2c 52 33 2c 52 32 2c 41  53 52 20 23 34 0d 7f 1c  |,R3,R2,ASR #4...|
00016850  14 53 54 52 20 52 33 2c  5b 52 31 31 2c 2d 52 38  |.STR R3,[R11,-R8|
00016860  5d 0d 7f 26 17 41 44 44  20 52 32 2c 52 34 2c 52  |]..&.ADD R2,R4,R|
00016870  34 2c 4c 53 4c 20 23 32  0d 7f 30 24 4c 44 52 20  |4,LSL #2..0$LDR |
00016880  52 33 2c 5b 52 31 31 5d  3a 41 44 44 20 52 33 2c  |R3,[R11]:ADD R3,|
00016890  52 33 2c 52 32 2c 41 53  52 20 23 34 0d 7f 3a 10  |R3,R2,ASR #4..:.|
000168a0  53 54 52 20 52 33 2c 5b  52 31 31 5d 0d 7f 44 14  |STR R3,[R11]..D.|
000168b0  4d 4f 56 20 52 33 2c 52  34 2c 41 53 52 20 23 34  |MOV R3,R4,ASR #4|
000168c0  0d 7f 4e 14 53 54 52 20  52 33 2c 5b 52 31 31 2c  |..N.STR R3,[R11,|
000168d0  52 38 5d 21 0d 7f 58 17  52 53 42 20 52 32 2c 52  |R8]!..X.RSB R2,R|
000168e0  34 2c 52 34 2c 4c 53 4c  20 23 33 0d 7f 62 13 4c  |4,R4,LSL #3..b.L|
000168f0  44 52 20 52 34 2c 5b 52  31 30 5d 2c 52 38 0d 7f  |DR R4,[R10],R8..|
00016900  6c 17 41 44 44 20 52 34  2c 52 34 2c 52 32 2c 41  |l.ADD R4,R4,R2,A|
00016910  53 52 20 23 34 0d 7f 76  05 5d 0d 7f 80 05 cc 0d  |SR #4..v.]......|
00016920  7f 8a 0a 5b 4f 50 54 20  5a 0d 7f 94 13 4c 44 52  |...[OPT Z....LDR|
00016930  20 52 34 2c 5b 52 31 30  5d 2c 52 38 0d 7f 9e 05  | R4,[R10],R8....|
00016940  5d 0d 7f a8 05 cd 0d 7f  b2 0a 5b 4f 50 54 20 5a  |].........[OPT Z|
00016950  0d 7f bc 1c 53 55 42 53  20 52 39 2c 52 39 2c 23  |....SUBS R9,R9,#|
00016960  32 3a 42 4e 45 20 66 73  6c 6f 6f 70 0d 7f c6 14  |2:BNE fsloop....|
00016970  4c 44 4d 46 44 20 53 50  20 21 2c 7b 50 43 7d 5e  |LDMFD SP !,{PC}^|
00016980  0d 7f d0 05 5d 0d 7f da  08 c9 22 54 22 0d 7f e4  |....]....."T"...|
00016990  0a 5b 4f 50 54 20 5a 0d  7f ee 14 2e 64 69 76 74  |.[OPT Z.....divt|
000169a0  61 62 6c 65 20 45 51 55  44 20 30 0d 7f f8 1d 45  |able EQUD 0....E|
000169b0  51 55 44 20 28 31 2d 62  6c 61 63 6b 25 2f 32 35  |QUD (1-black%/25|
000169c0  36 2a 32 29 2f 39 2a 46  0d 80 02 1d 45 51 55 44  |6*2)/9*F....EQUD|
000169d0  20 28 32 2d 62 6c 61 63  6b 25 2f 32 35 36 2a 34  | (2-black%/256*4|
000169e0  29 2f 39 2a 46 0d 80 0c  1d 45 51 55 44 20 28 33  |)/9*F....EQUD (3|
000169f0  2d 62 6c 61 63 6b 25 2f  32 35 36 2a 35 29 2f 39  |-black%/256*5)/9|
00016a00  2a 46 0d 80 16 1d 45 51  55 44 20 28 34 2d 62 6c  |*F....EQUD (4-bl|
00016a10  61 63 6b 25 2f 32 35 36  2a 36 29 2f 39 2a 46 0d  |ack%/256*6)/9*F.|
00016a20  80 20 1d 45 51 55 44 20  28 35 2d 62 6c 61 63 6b  |. .EQUD (5-black|
00016a30  25 2f 32 35 36 2a 36 29  2f 39 2a 46 0d 80 2a 1d  |%/256*6)/9*F..*.|
00016a40  45 51 55 44 20 28 36 2d  62 6c 61 63 6b 25 2f 32  |EQUD (6-black%/2|
00016a50  35 36 2a 35 29 2f 39 2a  46 0d 80 34 1d 45 51 55  |56*5)/9*F..4.EQU|
00016a60  44 20 28 37 2d 62 6c 61  63 6b 25 2f 32 35 36 2a  |D (7-black%/256*|
00016a70  34 29 2f 39 2a 46 0d 80  3e 1d 45 51 55 44 20 28  |4)/9*F..>.EQUD (|
00016a80  38 2d 62 6c 61 63 6b 25  2f 32 35 36 2a 32 29 2f  |8-black%/256*2)/|
00016a90  39 2a 46 0d 80 48 0a 45  51 55 44 20 46 0d 80 52  |9*F..H.EQUD F..R|
00016aa0  1f 2e 65 76 65 6e 72 6f  77 5f 67 61 72 64 20 44  |..evenrow_gard D|
00016ab0  43 44 20 65 76 65 6e 5f  67 61 72 64 0d 80 5c 1d  |CD even_gard..\.|
00016ac0  2e 6f 64 64 72 6f 77 5f  67 61 72 64 20 44 43 44  |.oddrow_gard DCD|
00016ad0  20 6f 64 64 5f 67 61 72  64 0d 80 66 11 2e 72 6f  | odd_gard..f..ro|
00016ae0  77 69 6e 63 20 44 43 44  20 30 0d 80 70 08 2e 66  |winc DCD 0..p..f|
00016af0  73 25 0d 80 7a 14 53 54  4d 46 44 20 53 50 20 21  |s%..z.STMFD SP !|
00016b00  2c 7b 52 31 34 7d 0d 80  84 20 4c 44 52 20 52 31  |,{R14}... LDR R1|
00016b10  2c 5b 52 39 2c 23 35 2a  38 5d 3a 4c 44 52 20 52  |,[R9,#5*8]:LDR R|
00016b20  31 2c 5b 52 31 5d 0d 80  8e 15 4c 44 52 20 52 31  |1,[R1]....LDR R1|
00016b30  30 2c 5b 52 39 2c 23 34  2a 38 5d 0d 80 98 15 4c  |0,[R9,#4*8]....L|
00016b40  44 52 20 52 31 31 2c 5b  52 39 2c 23 33 2a 38 5d  |DR R11,[R9,#3*8]|
00016b50  0d 80 a2 15 4c 44 52 20  52 31 32 2c 5b 52 39 2c  |....LDR R12,[R9,|
00016b60  23 32 2a 38 5d 0d 80 ac  11 4c 44 52 20 52 31 32  |#2*8]....LDR R12|
00016b70  2c 5b 52 31 32 5d 0d 80  b6 12 4c 44 52 20 52 38  |,[R12]....LDR R8|
00016b80  2c 5b 52 39 2c 23 38 5d  0d 80 c0 0f 4c 44 52 20  |,[R9,#8]....LDR |
00016b90  52 38 2c 5b 52 38 5d 0d  80 ca 0f 4c 44 52 20 52  |R8,[R8]....LDR R|
00016ba0  39 2c 5b 52 39 5d 0d 80  d4 0f 4c 44 52 20 52 39  |9,[R9]....LDR R9|
00016bb0  2c 5b 52 39 5d 0d 80 de  13 4c 44 52 20 52 34 2c  |,[R9]....LDR R4,|
00016bc0  5b 52 31 30 5d 2c 52 38  0d 80 e8 0d 54 45 51 20  |[R10],R8....TEQ |
00016bd0  52 38 2c 23 30 0d 80 f2  19 4c 44 52 50 4c 20 52  |R8,#0....LDRPL R|
00016be0  36 2c 65 76 65 6e 72 6f  77 5f 67 61 72 64 0d 80  |6,evenrow_gard..|
00016bf0  fc 18 4c 44 52 4d 49 20  52 36 2c 6f 64 64 72 6f  |..LDRMI R6,oddro|
00016c00  77 5f 67 61 72 64 0d 81  06 14 4d 4f 56 20 52 31  |w_gard....MOV R1|
00016c10  2c 52 31 2c 4c 53 4c 20  23 31 0d 81 10 11 4c 44  |,R1,LSL #1....LD|
00016c20  52 20 52 37 2c 72 6f 77  69 6e 63 0d 81 1a 14 41  |R R7,rowinc....A|
00016c30  44 52 20 52 31 34 2c 64  69 76 74 61 62 6c 65 0d  |DR R14,divtable.|
00016c40  81 24 0b 2e 66 73 6c 6f  6f 70 0d 81 2e 25 43 4d  |.$..fsloop...%CM|
00016c50  50 20 52 34 2c 23 46 3a  4d 4f 56 43 53 20 52 34  |P R4,#F:MOVCS R4|
00016c60  2c 23 30 3a 4d 4f 56 47  45 20 52 34 2c 23 46 0d  |,#0:MOVGE R4,#F.|
00016c70  81 38 13 41 44 44 20 52  35 2c 52 34 2c 23 46 3e  |.8.ADD R5,R4,#F>|
00016c80  3e 34 0d 81 42 17 41 44  44 20 52 35 2c 52 35 2c  |>4..B.ADD R5,R5,|
00016c90  52 35 2c 4c 53 4c 20 23  33 0d 81 4c 18 4d 4f 56  |R5,LSL #3..L.MOV|
00016ca0  53 20 52 35 2c 52 35 2c  4c 53 52 20 23 62 69 74  |S R5,R5,LSR #bit|
00016cb0  73 0d 81 56 1c 4c 44 52  4e 45 20 52 30 2c 5b 52  |s..V.LDRNE R0,[R|
00016cc0  31 34 2c 52 35 2c 4c 53  4c 20 23 32 5d 0d 81 60  |14,R5,LSL #2]..`|
00016cd0  12 53 55 42 4e 45 20 52  34 2c 52 34 2c 52 30 0d  |.SUBNE R4,R4,R0.|
00016ce0  81 6a 05 5d 0d 81 74 0e  e7 64 69 74 68 65 72 25  |.j.]..t..dither%|
00016cf0  20 8c 0d 81 7e 0a 5b 4f  50 54 20 5a 0d 81 88 17  | ...~.[OPT Z....|
00016d00  41 44 44 20 52 32 2c 52  34 2c 52 34 2c 4c 53 4c  |ADD R2,R4,R4,LSL|
00016d10  20 23 31 0d 81 92 28 4c  44 52 20 52 33 2c 5b 52  | #1...(LDR R3,[R|
00016d20  31 31 2c 2d 52 38 5d 3a  41 44 44 20 52 33 2c 52  |11,-R8]:ADD R3,R|
00016d30  33 2c 52 32 2c 41 53 52  20 23 34 0d 81 9c 14 53  |3,R2,ASR #4....S|
00016d40  54 52 20 52 33 2c 5b 52  31 31 2c 2d 52 38 5d 0d  |TR R3,[R11,-R8].|
00016d50  81 a6 17 41 44 44 20 52  32 2c 52 34 2c 52 34 2c  |...ADD R2,R4,R4,|
00016d60  4c 53 4c 20 23 32 0d 81  b0 24 4c 44 52 20 52 33  |LSL #2...$LDR R3|
00016d70  2c 5b 52 31 31 5d 3a 41  44 44 20 52 33 2c 52 33  |,[R11]:ADD R3,R3|
00016d80  2c 52 32 2c 41 53 52 20  23 34 0d 81 ba 10 53 54  |,R2,ASR #4....ST|
00016d90  52 20 52 33 2c 5b 52 31  31 5d 0d 81 c4 14 4d 4f  |R R3,[R11]....MO|
00016da0  56 20 52 33 2c 52 34 2c  41 53 52 20 23 34 0d 81  |V R3,R4,ASR #4..|
00016db0  ce 14 53 54 52 20 52 33  2c 5b 52 31 31 2c 52 38  |..STR R3,[R11,R8|
00016dc0  5d 21 0d 81 d8 17 52 53  42 20 52 32 2c 52 34 2c  |]!....RSB R2,R4,|
00016dd0  52 34 2c 4c 53 4c 20 23  33 0d 81 e2 13 4c 44 52  |R4,LSL #3....LDR|
00016de0  20 52 34 2c 5b 52 31 30  5d 2c 52 38 0d 81 ec 18  | R4,[R10],R8....|
00016df0  41 44 44 53 20 52 34 2c  52 34 2c 52 32 2c 41 53  |ADDS R4,R4,R2,AS|
00016e00  52 20 23 34 0d 81 f6 05  5d 0d 82 00 05 cc 0d 82  |R #4....].......|
00016e10  0a 0a 5b 4f 50 54 20 5a  0d 82 14 13 4c 44 52 20  |..[OPT Z....LDR |
00016e20  52 34 2c 5b 52 31 30 5d  2c 52 38 0d 82 1e 05 5d  |R4,[R10],R8....]|
00016e30  0d 82 28 05 cd 0d 82 32  0a 5b 4f 50 54 20 5a 0d  |..(....2.[OPT Z.|
00016e40  82 3c 25 43 4d 50 20 52  34 2c 23 46 3a 4d 4f 56  |.<%CMP R4,#F:MOV|
00016e50  43 53 20 52 34 2c 23 30  3a 4d 4f 56 47 45 20 52  |CS R4,#0:MOVGE R|
00016e60  34 2c 23 46 0d 82 46 13  41 44 44 20 52 33 2c 52  |4,#F..F.ADD R3,R|
00016e70  34 2c 23 46 3e 3e 34 0d  82 50 17 41 44 44 20 52  |4,#F>>4..P.ADD R|
00016e80  33 2c 52 33 2c 52 33 2c  4c 53 4c 20 23 33 0d 82  |3,R3,R3,LSL #3..|
00016e90  5a 18 4d 4f 56 53 20 52  33 2c 52 33 2c 4c 53 52  |Z.MOVS R3,R3,LSR|
00016ea0  20 23 62 69 74 73 0d 82  64 1c 4c 44 52 4e 45 20  | #bits..d.LDRNE |
00016eb0  52 30 2c 5b 52 31 34 2c  52 33 2c 4c 53 4c 20 23  |R0,[R14,R3,LSL #|
00016ec0  32 5d 0d 82 6e 12 53 55  42 4e 45 20 52 34 2c 52  |2]..n.SUBNE R4,R|
00016ed0  34 2c 52 30 0d 82 78 2c  84 52 20 52 35 2c 52 35  |4,R0..x,.R R5,R5|
00016ee0  2c 52 33 2c 4c 53 4c 20  23 34 3a 4c 44 52 20 52  |,R3,LSL #4:LDR R|
00016ef0  35 2c 5b 52 36 2c 52 35  2c 4c 53 4c 20 23 32 5d  |5,[R6,R5,LSL #2]|
00016f00  0d 82 82 15 4d 4f 56 20  52 32 2c 52 31 32 2c 4c  |....MOV R2,R12,L|
00016f10  53 52 20 23 31 0d 82 8c  10 80 20 52 33 2c 52 35  |SR #1..... R3,R5|
00016f20  2c 23 26 33 46 0d 82 96  13 53 54 52 42 20 52 33  |,#&3F....STRB R3|
00016f30  2c 5b 52 32 5d 2c 52 37  0d 82 a0 21 4d 4f 56 20  |,[R2],R7...!MOV |
00016f40  52 33 2c 52 35 2c 4c 53  52 20 23 36 3a 80 20 52  |R3,R5,LSR #6:. R|
00016f50  33 2c 52 33 2c 23 26 33  46 0d 82 aa 13 53 54 52  |3,R3,#&3F....STR|
00016f60  42 20 52 33 2c 5b 52 32  5d 2c 52 37 0d 82 b4 22  |B R3,[R2],R7..."|
00016f70  4d 4f 56 20 52 33 2c 52  35 2c 4c 53 52 20 23 31  |MOV R3,R5,LSR #1|
00016f80  32 3a 53 54 52 42 20 52  33 2c 5b 52 32 5d 0d 82  |2:STRB R3,[R2]..|
00016f90  be 12 41 44 44 20 52 31  32 2c 52 31 32 2c 52 31  |..ADD R12,R12,R1|
00016fa0  0d 82 c8 05 5d 0d 82 d2  0e e7 64 69 74 68 65 72  |....].....dither|
00016fb0  25 20 8c 0d 82 dc 0a 5b  4f 50 54 20 5a 0d 82 e6  |% .....[OPT Z...|
00016fc0  17 41 44 44 20 52 32 2c  52 34 2c 52 34 2c 4c 53  |.ADD R2,R4,R4,LS|
00016fd0  4c 20 23 31 0d 82 f0 28  4c 44 52 20 52 33 2c 5b  |L #1...(LDR R3,[|
00016fe0  52 31 31 2c 2d 52 38 5d  3a 41 44 44 20 52 33 2c  |R11,-R8]:ADD R3,|
00016ff0  52 33 2c 52 32 2c 41 53  52 20 23 34 0d 82 fa 14  |R3,R2,ASR #4....|
00017000  53 54 52 20 52 33 2c 5b  52 31 31 2c 2d 52 38 5d  |STR R3,[R11,-R8]|
00017010  0d 83 04 17 41 44 44 20  52 32 2c 52 34 2c 52 34  |....ADD R2,R4,R4|
00017020  2c 4c 53 4c 20 23 32 0d  83 0e 24 4c 44 52 20 52  |,LSL #2...$LDR R|
00017030  33 2c 5b 52 31 31 5d 3a  41 44 44 20 52 33 2c 52  |3,[R11]:ADD R3,R|
00017040  33 2c 52 32 2c 41 53 52  20 23 34 0d 83 18 10 53  |3,R2,ASR #4....S|
00017050  54 52 20 52 33 2c 5b 52  31 31 5d 0d 83 22 14 4d  |TR R3,[R11]..".M|
00017060  4f 56 20 52 33 2c 52 34  2c 41 53 52 20 23 34 0d  |OV R3,R4,ASR #4.|
00017070  83 2c 14 53 54 52 20 52  33 2c 5b 52 31 31 2c 52  |.,.STR R3,[R11,R|
00017080  38 5d 21 0d 83 36 17 52  53 42 20 52 32 2c 52 34  |8]!..6.RSB R2,R4|
00017090  2c 52 34 2c 4c 53 4c 20  23 33 0d 83 40 13 4c 44  |,R4,LSL #3..@.LD|
000170a0  52 20 52 34 2c 5b 52 31  30 5d 2c 52 38 0d 83 4a  |R R4,[R10],R8..J|
000170b0  17 41 44 44 20 52 34 2c  52 34 2c 52 32 2c 41 53  |.ADD R4,R4,R2,AS|
000170c0  52 20 23 34 0d 83 54 05  5d 0d 83 5e 05 cc 0d 83  |R #4..T.]..^....|
000170d0  68 0a 5b 4f 50 54 20 5a  0d 83 72 13 4c 44 52 20  |h.[OPT Z..r.LDR |
000170e0  52 34 2c 5b 52 31 30 5d  2c 52 38 0d 83 7c 05 5d  |R4,[R10],R8..|.]|
000170f0  0d 83 86 05 cd 0d 83 90  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
00017100  83 9a 1c 53 55 42 53 20  52 39 2c 52 39 2c 23 32  |...SUBS R9,R9,#2|
00017110  3a 42 4e 45 20 66 73 6c  6f 6f 70 0d 83 a4 14 4c  |:BNE fsloop....L|
00017120  44 4d 46 44 20 53 50 20  21 2c 7b 50 43 7d 5e 0d  |DMFD SP !,{PC}^.|
00017130  83 ae 05 5d 0d 83 b8 08  c9 22 44 22 0d 83 c2 0a  |...]....."D"....|
00017140  5b 4f 50 54 20 5a 0d 83  cc 14 2e 64 69 76 74 61  |[OPT Z.....divta|
00017150  62 6c 65 20 45 51 55 44  20 30 0d 83 d6 1d 45 51  |ble EQUD 0....EQ|
00017160  55 44 20 28 31 2d 62 6c  61 63 6b 25 2f 32 35 36  |UD (1-black%/256|
00017170  2a 32 29 2f 34 2a 46 0d  83 e0 1d 45 51 55 44 20  |*2)/4*F....EQUD |
00017180  28 32 2d 62 6c 61 63 6b  25 2f 32 35 36 2a 34 29  |(2-black%/256*4)|
00017190  2f 34 2a 46 0d 83 ea 1d  45 51 55 44 20 28 33 2d  |/4*F....EQUD (3-|
000171a0  62 6c 61 63 6b 25 2f 32  35 36 2a 32 29 2f 34 2a  |black%/256*2)/4*|
000171b0  46 0d 83 f4 0a 45 51 55  44 20 46 0d 83 fe 1f 2e  |F....EQUD F.....|
000171c0  65 76 65 6e 72 6f 77 5f  67 61 72 64 20 44 43 44  |evenrow_gard DCD|
000171d0  20 65 76 65 6e 5f 67 61  72 64 0d 84 08 1d 2e 6f  | even_gard.....o|
000171e0  64 64 72 6f 77 5f 67 61  72 64 20 44 43 44 20 6f  |ddrow_gard DCD o|
000171f0  64 64 5f 67 61 72 64 0d  84 12 11 2e 72 6f 77 69  |dd_gard.....rowi|
00017200  6e 63 20 44 43 44 20 30  0d 84 1c 08 2e 66 73 25  |nc DCD 0.....fs%|
00017210  0d 84 26 14 53 54 4d 46  44 20 53 50 20 21 2c 7b  |..&.STMFD SP !,{|
00017220  52 31 34 7d 0d 84 30 20  4c 44 52 20 52 31 2c 5b  |R14}..0 LDR R1,[|
00017230  52 39 2c 23 35 2a 38 5d  3a 4c 44 52 20 52 31 2c  |R9,#5*8]:LDR R1,|
00017240  5b 52 31 5d 0d 84 3a 15  4c 44 52 20 52 31 30 2c  |[R1]..:.LDR R10,|
00017250  5b 52 39 2c 23 34 2a 38  5d 0d 84 44 15 4c 44 52  |[R9,#4*8]..D.LDR|
00017260  20 52 31 31 2c 5b 52 39  2c 23 33 2a 38 5d 0d 84  | R11,[R9,#3*8]..|
00017270  4e 15 4c 44 52 20 52 31  32 2c 5b 52 39 2c 23 32  |N.LDR R12,[R9,#2|
00017280  2a 38 5d 0d 84 58 11 4c  44 52 20 52 31 32 2c 5b  |*8]..X.LDR R12,[|
00017290  52 31 32 5d 0d 84 62 12  4c 44 52 20 52 38 2c 5b  |R12]..b.LDR R8,[|
000172a0  52 39 2c 23 38 5d 0d 84  6c 0f 4c 44 52 20 52 38  |R9,#8]..l.LDR R8|
000172b0  2c 5b 52 38 5d 0d 84 76  0f 4c 44 52 20 52 39 2c  |,[R8]..v.LDR R9,|
000172c0  5b 52 39 5d 0d 84 80 0f  4c 44 52 20 52 39 2c 5b  |[R9]....LDR R9,[|
000172d0  52 39 5d 0d 84 8a 13 4c  44 52 20 52 34 2c 5b 52  |R9]....LDR R4,[R|
000172e0  31 30 5d 2c 52 38 0d 84  94 0d 54 45 51 20 52 38  |10],R8....TEQ R8|
000172f0  2c 23 30 0d 84 9e 19 4c  44 52 50 4c 20 52 36 2c  |,#0....LDRPL R6,|
00017300  65 76 65 6e 72 6f 77 5f  67 61 72 64 0d 84 a8 18  |evenrow_gard....|
00017310  4c 44 52 4d 49 20 52 36  2c 6f 64 64 72 6f 77 5f  |LDRMI R6,oddrow_|
00017320  67 61 72 64 0d 84 b2 14  4d 4f 56 20 52 31 2c 52  |gard....MOV R1,R|
00017330  31 2c 4c 53 4c 20 23 31  0d 84 bc 11 4c 44 52 20  |1,LSL #1....LDR |
00017340  52 37 2c 72 6f 77 69 6e  63 0d 84 c6 14 41 44 52  |R7,rowinc....ADR|
00017350  20 52 31 34 2c 64 69 76  74 61 62 6c 65 0d 84 d0  | R14,divtable...|
00017360  0b 2e 66 73 6c 6f 6f 70  0d 84 da 25 43 4d 50 20  |..fsloop...%CMP |
00017370  52 34 2c 23 46 3a 4d 4f  56 43 53 20 52 34 2c 23  |R4,#F:MOVCS R4,#|
00017380  30 3a 4d 4f 56 47 45 20  52 34 2c 23 46 0d 84 e4  |0:MOVGE R4,#F...|
00017390  13 41 44 44 20 52 35 2c  52 34 2c 23 46 3e 3e 33  |.ADD R5,R4,#F>>3|
000173a0  0d 84 ee 1a 4d 4f 56 53  20 52 35 2c 52 35 2c 4c  |....MOVS R5,R5,L|
000173b0  53 52 20 23 62 69 74 73  2d 32 0d 84 f8 1c 4c 44  |SR #bits-2....LD|
000173c0  52 4e 45 20 52 30 2c 5b  52 31 34 2c 52 35 2c 4c  |RNE R0,[R14,R5,L|
000173d0  53 4c 20 23 32 5d 0d 85  02 12 53 55 42 4e 45 20  |SL #2]....SUBNE |
000173e0  52 34 2c 52 34 2c 52 30  0d 85 0c 05 5d 0d 85 16  |R4,R4,R0....]...|
000173f0  0e e7 64 69 74 68 65 72  25 20 8c 0d 85 20 0a 5b  |..dither% ... .[|
00017400  4f 50 54 20 5a 0d 85 2a  17 41 44 44 20 52 32 2c  |OPT Z..*.ADD R2,|
00017410  52 34 2c 52 34 2c 4c 53  4c 20 23 31 0d 85 34 28  |R4,R4,LSL #1..4(|
00017420  4c 44 52 20 52 33 2c 5b  52 31 31 2c 2d 52 38 5d  |LDR R3,[R11,-R8]|
00017430  3a 41 44 44 20 52 33 2c  52 33 2c 52 32 2c 41 53  |:ADD R3,R3,R2,AS|
00017440  52 20 23 34 0d 85 3e 14  53 54 52 20 52 33 2c 5b  |R #4..>.STR R3,[|
00017450  52 31 31 2c 2d 52 38 5d  0d 85 48 17 41 44 44 20  |R11,-R8]..H.ADD |
00017460  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 32 0d  |R2,R4,R4,LSL #2.|
00017470  85 52 24 4c 44 52 20 52  33 2c 5b 52 31 31 5d 3a  |.R$LDR R3,[R11]:|
00017480  41 44 44 20 52 33 2c 52  33 2c 52 32 2c 41 53 52  |ADD R3,R3,R2,ASR|
00017490  20 23 34 0d 85 5c 10 53  54 52 20 52 33 2c 5b 52  | #4..\.STR R3,[R|
000174a0  31 31 5d 0d 85 66 14 4d  4f 56 20 52 33 2c 52 34  |11]..f.MOV R3,R4|
000174b0  2c 41 53 52 20 23 34 0d  85 70 14 53 54 52 20 52  |,ASR #4..p.STR R|
000174c0  33 2c 5b 52 31 31 2c 52  38 5d 21 0d 85 7a 17 52  |3,[R11,R8]!..z.R|
000174d0  53 42 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |SB R2,R4,R4,LSL |
000174e0  23 33 0d 85 84 13 4c 44  52 20 52 34 2c 5b 52 31  |#3....LDR R4,[R1|
000174f0  30 5d 2c 52 38 0d 85 8e  18 41 44 44 53 20 52 34  |0],R8....ADDS R4|
00017500  2c 52 34 2c 52 32 2c 41  53 52 20 23 34 0d 85 98  |,R4,R2,ASR #4...|
00017510  05 5d 0d 85 a2 05 cc 0d  85 ac 0a 5b 4f 50 54 20  |.].........[OPT |
00017520  5a 0d 85 b6 13 4c 44 52  20 52 34 2c 5b 52 31 30  |Z....LDR R4,[R10|
00017530  5d 2c 52 38 0d 85 c0 05  5d 0d 85 ca 05 cd 0d 85  |],R8....].......|
00017540  d4 0a 5b 4f 50 54 20 5a  0d 85 de 25 43 4d 50 20  |..[OPT Z...%CMP |
00017550  52 34 2c 23 46 3a 4d 4f  56 43 53 20 52 34 2c 23  |R4,#F:MOVCS R4,#|
00017560  30 3a 4d 4f 56 47 45 20  52 34 2c 23 46 0d 85 e8  |0:MOVGE R4,#F...|
00017570  13 41 44 44 20 52 33 2c  52 34 2c 23 46 3e 3e 33  |.ADD R3,R4,#F>>3|
00017580  0d 85 f2 1a 4d 4f 56 53  20 52 33 2c 52 33 2c 4c  |....MOVS R3,R3,L|
00017590  53 52 20 23 62 69 74 73  2d 32 0d 85 fc 1c 4c 44  |SR #bits-2....LD|
000175a0  52 4e 45 20 52 30 2c 5b  52 31 34 2c 52 33 2c 4c  |RNE R0,[R14,R3,L|
000175b0  53 4c 20 23 32 5d 0d 86  06 12 53 55 42 4e 45 20  |SL #2]....SUBNE |
000175c0  52 34 2c 52 34 2c 52 30  0d 86 10 26 84 52 20 52  |R4,R4,R0...&.R R|
000175d0  35 2c 52 35 2c 52 33 2c  4c 53 4c 20 23 33 3a 4c  |5,R5,R3,LSL #3:L|
000175e0  44 52 42 20 52 35 2c 5b  52 36 2c 52 35 5d 0d 86  |DRB R5,[R6,R5]..|
000175f0  1a 15 4d 4f 56 20 52 32  2c 52 31 32 2c 4c 53 52  |..MOV R2,R12,LSR|
00017600  20 23 32 0d 86 24 0e 54  53 54 20 52 31 32 2c 23  | #2..$.TST R12,#|
00017610  32 0d 86 2e 1c 80 20 52  33 2c 52 35 2c 23 26 46  |2..... R3,R5,#&F|
00017620  3a 4c 44 52 42 20 52 30  2c 5b 52 32 5d 0d 86 38  |:LDRB R0,[R2]..8|
00017630  20 80 45 51 20 52 30 2c  52 30 2c 23 26 46 30 3a  | .EQ R0,R0,#&F0:|
00017640  84 52 45 51 20 52 30 2c  52 30 2c 52 33 0d 86 42  |.REQ R0,R0,R3..B|
00017650  27 80 4e 45 20 52 30 2c  52 30 2c 23 26 30 46 3a  |'.NE R0,R0,#&0F:|
00017660  84 52 4e 45 20 52 30 2c  52 30 2c 52 33 2c 4c 53  |.RNE R0,R0,R3,LS|
00017670  4c 20 23 34 0d 86 4c 13  53 54 52 42 20 52 30 2c  |L #4..L.STRB R0,|
00017680  5b 52 32 5d 2c 52 37 0d  86 56 21 4d 4f 56 20 52  |[R2],R7..V!MOV R|
00017690  33 2c 52 35 2c 4c 53 52  20 23 34 3a 4c 44 52 42  |3,R5,LSR #4:LDRB|
000176a0  20 52 30 2c 5b 52 32 5d  0d 86 60 20 80 45 51 20  | R0,[R2]..` .EQ |
000176b0  52 30 2c 52 30 2c 23 26  46 30 3a 84 52 45 51 20  |R0,R0,#&F0:.REQ |
000176c0  52 30 2c 52 30 2c 52 33  0d 86 6a 27 80 4e 45 20  |R0,R0,R3..j'.NE |
000176d0  52 30 2c 52 30 2c 23 26  30 46 3a 84 52 4e 45 20  |R0,R0,#&0F:.RNE |
000176e0  52 30 2c 52 30 2c 52 33  2c 4c 53 4c 20 23 34 0d  |R0,R0,R3,LSL #4.|
000176f0  86 74 10 53 54 52 42 20  52 30 2c 5b 52 32 5d 0d  |.t.STRB R0,[R2].|
00017700  86 7e 12 41 44 44 20 52  31 32 2c 52 31 32 2c 52  |.~.ADD R12,R12,R|
00017710  31 0d 86 88 05 5d 0d 86  92 0e e7 64 69 74 68 65  |1....].....dithe|
00017720  72 25 20 8c 0d 86 9c 0a  5b 4f 50 54 20 5a 0d 86  |r% .....[OPT Z..|
00017730  a6 17 41 44 44 20 52 32  2c 52 34 2c 52 34 2c 4c  |..ADD R2,R4,R4,L|
00017740  53 4c 20 23 31 0d 86 b0  28 4c 44 52 20 52 33 2c  |SL #1...(LDR R3,|
00017750  5b 52 31 31 2c 2d 52 38  5d 3a 41 44 44 20 52 33  |[R11,-R8]:ADD R3|
00017760  2c 52 33 2c 52 32 2c 41  53 52 20 23 34 0d 86 ba  |,R3,R2,ASR #4...|
00017770  14 53 54 52 20 52 33 2c  5b 52 31 31 2c 2d 52 38  |.STR R3,[R11,-R8|
00017780  5d 0d 86 c4 17 41 44 44  20 52 32 2c 52 34 2c 52  |]....ADD R2,R4,R|
00017790  34 2c 4c 53 4c 20 23 32  0d 86 ce 24 4c 44 52 20  |4,LSL #2...$LDR |
000177a0  52 33 2c 5b 52 31 31 5d  3a 41 44 44 20 52 33 2c  |R3,[R11]:ADD R3,|
000177b0  52 33 2c 52 32 2c 41 53  52 20 23 34 0d 86 d8 10  |R3,R2,ASR #4....|
000177c0  53 54 52 20 52 33 2c 5b  52 31 31 5d 0d 86 e2 14  |STR R3,[R11]....|
000177d0  4d 4f 56 20 52 33 2c 52  34 2c 41 53 52 20 23 34  |MOV R3,R4,ASR #4|
000177e0  0d 86 ec 14 53 54 52 20  52 33 2c 5b 52 31 31 2c  |....STR R3,[R11,|
000177f0  52 38 5d 21 0d 86 f6 17  52 53 42 20 52 32 2c 52  |R8]!....RSB R2,R|
00017800  34 2c 52 34 2c 4c 53 4c  20 23 33 0d 87 00 13 4c  |4,R4,LSL #3....L|
00017810  44 52 20 52 34 2c 5b 52  31 30 5d 2c 52 38 0d 87  |DR R4,[R10],R8..|
00017820  0a 17 41 44 44 20 52 34  2c 52 34 2c 52 32 2c 41  |..ADD R4,R4,R2,A|
00017830  53 52 20 23 34 0d 87 14  05 5d 0d 87 1e 05 cc 0d  |SR #4....]......|
00017840  87 28 0a 5b 4f 50 54 20  5a 0d 87 32 13 4c 44 52  |.(.[OPT Z..2.LDR|
00017850  20 52 34 2c 5b 52 31 30  5d 2c 52 38 0d 87 3c 05  | R4,[R10],R8..<.|
00017860  5d 0d 87 46 05 cd 0d 87  50 0a 5b 4f 50 54 20 5a  |]..F....P.[OPT Z|
00017870  0d 87 5a 1c 53 55 42 53  20 52 39 2c 52 39 2c 23  |..Z.SUBS R9,R9,#|
00017880  32 3a 42 4e 45 20 66 73  6c 6f 6f 70 0d 87 64 14  |2:BNE fsloop..d.|
00017890  4c 44 4d 46 44 20 53 50  20 21 2c 7b 50 43 7d 5e  |LDMFD SP !,{PC}^|
000178a0  0d 87 6e 05 5d 0d 87 78  05 7f 0d 87 82 0a 5b 4f  |..n.]..x......[O|
000178b0  50 54 20 5a 0d 87 8c 08  2e 66 73 25 0d 87 96 14  |PT Z.....fs%....|
000178c0  53 54 4d 46 44 20 53 50  20 21 2c 7b 52 31 34 7d  |STMFD SP !,{R14}|
000178d0  0d 87 a0 20 4c 44 52 20  52 31 2c 5b 52 39 2c 23  |... LDR R1,[R9,#|
000178e0  35 2a 38 5d 3a 4c 44 52  20 52 31 2c 5b 52 31 5d  |5*8]:LDR R1,[R1]|
000178f0  0d 87 aa 15 4c 44 52 20  52 31 30 2c 5b 52 39 2c  |....LDR R10,[R9,|
00017900  23 34 2a 38 5d 0d 87 b4  15 4c 44 52 20 52 31 31  |#4*8]....LDR R11|
00017910  2c 5b 52 39 2c 23 33 2a  38 5d 0d 87 be 15 4c 44  |,[R9,#3*8]....LD|
00017920  52 20 52 31 32 2c 5b 52  39 2c 23 32 2a 38 5d 0d  |R R12,[R9,#2*8].|
00017930  87 c8 11 4c 44 52 20 52  31 32 2c 5b 52 31 32 5d  |...LDR R12,[R12]|
00017940  0d 87 d2 12 4c 44 52 20  52 38 2c 5b 52 39 2c 23  |....LDR R8,[R9,#|
00017950  38 5d 0d 87 dc 0f 4c 44  52 20 52 38 2c 5b 52 38  |8]....LDR R8,[R8|
00017960  5d 0d 87 e6 0f 4c 44 52  20 52 39 2c 5b 52 39 5d  |]....LDR R9,[R9]|
00017970  0d 87 f0 0f 4c 44 52 20  52 39 2c 5b 52 39 5d 0d  |....LDR R9,[R9].|
00017980  87 fa 13 4c 44 52 20 52  34 2c 5b 52 31 30 5d 2c  |...LDR R4,[R10],|
00017990  52 38 0d 88 04 0d 4d 4f  56 20 52 37 2c 23 31 0d  |R8....MOV R7,#1.|
000179a0  88 0e 0b 2e 66 73 6c 6f  6f 70 0d 88 18 25 43 4d  |....fsloop...%CM|
000179b0  50 20 52 34 2c 23 46 3a  4d 4f 56 43 53 20 52 34  |P R4,#F:MOVCS R4|
000179c0  2c 23 30 3a 4d 4f 56 47  45 20 52 34 2c 23 46 0d  |,#0:MOVGE R4,#F.|
000179d0  88 22 05 5d 0d 88 2c 0d  e7 62 6c 61 63 6b 25 20  |.".]..,..black% |
000179e0  8c 0d 88 36 0a 5b 4f 50  54 20 5a 0d 88 40 15 4d  |...6.[OPT Z..@.M|
000179f0  4f 56 20 52 32 2c 52 31  32 2c 4c 53 52 20 23 33  |OV R2,R12,LSR #3|
00017a00  0d 88 4a 19 80 20 52 35  2c 52 31 32 2c 23 37 3a  |..J.. R5,R12,#7:|
00017a10  4d 4f 56 20 52 36 2c 23  31 0d 88 54 1c 4c 44 52  |MOV R6,#1..T.LDR|
00017a20  42 20 52 30 2c 5b 52 32  2c 23 2d 28 78 25 2b 37  |B R0,[R2,#-(x%+7|
00017a30  3e 3e 33 29 5d 0d 88 5e  10 53 55 42 20 52 33 2c  |>>3)]..^.SUB R3,|
00017a40  52 34 2c 23 46 0d 88 68  0d 43 4d 50 20 52 37 2c  |R4,#F..h.CMP R7,|
00017a50  23 30 0d 88 72 21 41 44  44 4e 45 20 52 34 2c 52  |#0..r!ADDNE R4,R|
00017a60  34 2c 23 62 6c 61 63 6b  25 3c 3c 28 62 69 74 73  |4,#black%<<(bits|
00017a70  2d 38 29 0d 88 7c 21 41  44 44 45 51 20 52 33 2c  |-8)..|!ADDEQ R3,|
00017a80  52 33 2c 23 62 6c 61 63  6b 25 3c 3c 28 62 69 74  |R3,#black%<<(bit|
00017a90  73 2d 38 29 0d 88 86 14  54 53 54 20 52 30 2c 52  |s-8)....TST R0,R|
00017aa0  36 2c 4c 53 4c 20 52 35  0d 88 90 21 41 44 44 4e  |6,LSL R5...!ADDN|
00017ab0  45 20 52 34 2c 52 34 2c  23 62 6c 61 63 6b 25 3c  |E R4,R4,#black%<|
00017ac0  3c 28 62 69 74 73 2d 38  29 0d 88 9a 21 41 44 44  |<(bits-8)...!ADD|
00017ad0  45 51 20 52 33 2c 52 33  2c 23 62 6c 61 63 6b 25  |EQ R3,R3,#black%|
00017ae0  3c 3c 28 62 69 74 73 2d  38 29 0d 88 a4 1d 4d 4f  |<<(bits-8)....MO|
00017af0  56 53 20 52 30 2c 52 33  3a 52 53 42 4d 49 20 52  |VS R0,R3:RSBMI R|
00017b00  30 2c 52 33 2c 23 30 0d  88 ae 0d 43 4d 50 20 52  |0,R3,#0....CMP R|
00017b10  34 2c 52 30 0d 88 b8 0f  4d 4f 56 43 43 20 52 33  |4,R0....MOVCC R3|
00017b20  2c 23 30 0d 88 c2 1b 4d  4f 56 43 53 20 52 34 2c  |,#0....MOVCS R4,|
00017b30  52 33 3a 4d 4f 56 43 53  20 52 33 2c 23 31 0d 88  |R3:MOVCS R3,#1..|
00017b40  cc 0d 4d 4f 56 20 52 37  2c 52 33 0d 88 d6 05 5d  |..MOV R7,R3....]|
00017b50  0d 88 e0 05 cc 0d 88 ea  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
00017b60  88 f4 27 41 44 44 20 52  33 2c 52 34 2c 23 46 3e  |..'ADD R3,R4,#F>|
00017b70  3e 31 3a 4d 4f 56 20 52  33 2c 52 33 2c 4c 53 52  |>1:MOV R3,R3,LSR|
00017b80  20 23 62 69 74 73 0d 88  fe 1a 53 55 42 20 52 34  | #bits....SUB R4|
00017b90  2c 52 34 2c 52 33 2c 4c  53 4c 20 23 62 69 74 73  |,R4,R3,LSL #bits|
00017ba0  0d 89 08 15 4d 4f 56 20  52 32 2c 52 31 32 2c 4c  |....MOV R2,R12,L|
00017bb0  53 52 20 23 33 0d 89 12  19 80 20 52 35 2c 52 31  |SR #3..... R5,R1|
00017bc0  32 2c 23 37 3a 4d 4f 56  20 52 36 2c 23 31 0d 89  |2,#7:MOV R6,#1..|
00017bd0  1c 05 5d 0d 89 26 05 cd  0d 89 30 0a 5b 4f 50 54  |..]..&....0.[OPT|
00017be0  20 5a 0d 89 3a 37 4c 44  52 42 20 52 30 2c 5b 52  | Z..:7LDRB R0,[R|
00017bf0  32 5d 3a 42 49 43 20 52  30 2c 52 30 2c 52 36 2c  |2]:BIC R0,R0,R6,|
00017c00  4c 53 4c 20 52 35 3a 84  52 20 52 30 2c 52 30 2c  |LSL R5:.R R0,R0,|
00017c10  52 33 2c 4c 53 4c 20 52  35 0d 89 44 10 53 54 52  |R3,LSL R5..D.STR|
00017c20  42 20 52 30 2c 5b 52 32  5d 0d 89 4e 12 41 44 44  |B R0,[R2]..N.ADD|
00017c30  20 52 31 32 2c 52 31 32  2c 52 31 0d 89 58 05 5d  | R12,R12,R1..X.]|
00017c40  0d 89 62 0e e7 64 69 74  68 65 72 25 20 8c 0d 89  |..b..dither% ...|
00017c50  6c 0a 5b 4f 50 54 20 5a  0d 89 76 17 41 44 44 20  |l.[OPT Z..v.ADD |
00017c60  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 31 0d  |R2,R4,R4,LSL #1.|
00017c70  89 80 28 4c 44 52 20 52  33 2c 5b 52 31 31 2c 2d  |..(LDR R3,[R11,-|
00017c80  52 38 5d 3a 41 44 44 20  52 33 2c 52 33 2c 52 32  |R8]:ADD R3,R3,R2|
00017c90  2c 41 53 52 20 23 34 0d  89 8a 14 53 54 52 20 52  |,ASR #4....STR R|
00017ca0  33 2c 5b 52 31 31 2c 2d  52 38 5d 0d 89 94 17 41  |3,[R11,-R8]....A|
00017cb0  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
00017cc0  23 32 0d 89 9e 24 4c 44  52 20 52 33 2c 5b 52 31  |#2...$LDR R3,[R1|
00017cd0  31 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |1]:ADD R3,R3,R2,|
00017ce0  41 53 52 20 23 34 0d 89  a8 10 53 54 52 20 52 33  |ASR #4....STR R3|
00017cf0  2c 5b 52 31 31 5d 0d 89  b2 14 4d 4f 56 20 52 33  |,[R11]....MOV R3|
00017d00  2c 52 34 2c 41 53 52 20  23 34 0d 89 bc 14 53 54  |,R4,ASR #4....ST|
00017d10  52 20 52 33 2c 5b 52 31  31 2c 52 38 5d 21 0d 89  |R R3,[R11,R8]!..|
00017d20  c6 17 52 53 42 20 52 32  2c 52 34 2c 52 34 2c 4c  |..RSB R2,R4,R4,L|
00017d30  53 4c 20 23 33 0d 89 d0  13 4c 44 52 20 52 34 2c  |SL #3....LDR R4,|
00017d40  5b 52 31 30 5d 2c 52 38  0d 89 da 17 41 44 44 20  |[R10],R8....ADD |
00017d50  52 34 2c 52 34 2c 52 32  2c 41 53 52 20 23 34 0d  |R4,R4,R2,ASR #4.|
00017d60  89 e4 05 5d 0d 89 ee 05  cc 0d 89 f8 0a 5b 4f 50  |...].........[OP|
00017d70  54 20 5a 0d 8a 02 13 4c  44 52 20 52 34 2c 5b 52  |T Z....LDR R4,[R|
00017d80  31 30 5d 2c 52 38 0d 8a  0c 05 5d 0d 8a 16 05 cd  |10],R8....].....|
00017d90  0d 8a 20 0a 5b 4f 50 54  20 5a 0d 8a 2a 1c 53 55  |.. .[OPT Z..*.SU|
00017da0  42 53 20 52 39 2c 52 39  2c 23 31 3a 42 4e 45 20  |BS R9,R9,#1:BNE |
00017db0  66 73 6c 6f 6f 70 0d 8a  34 14 4c 44 4d 46 44 20  |fsloop..4.LDMFD |
00017dc0  53 50 20 21 2c 7b 50 43  7d 5e 0d 8a 3e 05 5d 0d  |SP !,{PC}^..>.].|
00017dd0  8a 48 05 cb 0d 8a 52 05  cb 0d 8a 5c 0a 5b 4f 50  |.H....R....\.[OP|
00017de0  54 20 5a 0d 8a 66 12 2e  73 78 6c 6f 63 20 44 43  |T Z..f..sxloc DC|
00017df0  44 20 73 78 25 0d 8a 70  05 5d 0d 8a 7a 0c c8 8e  |D sx%..p.]..z...|
00017e00  20 63 6f 6c 20 ca 0d 8a  84 07 c9 20 30 0d 8a 8e  | col ...... 0...|
00017e10  0f e7 69 6e 70 75 74 3c  3d 38 20 8c 0d 8a 98 0a  |..input<=8 .....|
00017e20  5b 4f 50 54 20 5a 0d 8a  a2 0c 2e 6d 61 70 70 69  |[OPT Z.....mappi|
00017e30  78 25 0d 8a ac 10 4c 44  52 20 52 30 2c 73 78 6c  |x%....LDR R0,sxl|
00017e40  6f 63 0d 8a b6 1b 4c 44  52 20 52 31 2c 5b 52 39  |oc....LDR R1,[R9|
00017e50  5d 3a 4c 44 52 20 52 31  2c 5b 52 31 5d 0d 8a c0  |]:LDR R1,[R1]...|
00017e60  14 4c 44 52 20 52 32 2c  5b 52 39 2c 23 33 2a 38  |.LDR R2,[R9,#3*8|
00017e70  5d 0d 8a ca 14 4c 44 52  20 52 35 2c 5b 52 39 2c  |]....LDR R5,[R9,|
00017e80  23 34 2a 38 5d 0d 8a d4  0d 4d 4f 56 20 52 38 2c  |#4*8]....MOV R8,|
00017e90  23 30 0d 8a de 0d 2e 6d  61 70 70 69 78 6c 70 0d  |#0.....mappixlp.|
00017ea0  8a e8 18 4c 44 52 42 20  52 36 2c 5b 52 31 5d 2c  |...LDRB R6,[R1],|
00017eb0  23 73 74 65 70 32 34 0d  8a f2 05 5d 0d 8a fc 05  |#step24....]....|
00017ec0  cd 0d 8b 06 0e c8 8e 20  69 6e 70 75 74 20 ca 0d  |....... input ..|
00017ed0  8b 10 07 c9 20 38 0d 8b  1a 0a e7 68 61 6d 20 8c  |.... 8.....ham .|
00017ee0  0d 8b 24 0a 5b 4f 50 54  20 5a 0d 8b 2e 11 41 44  |..$.[OPT Z....AD|
00017ef0  52 20 52 39 2c 6c 74 61  62 6c 65 0d 8b 38 21 4d  |R R9,ltable..8!M|
00017f00  4f 56 53 20 52 37 2c 52  36 2c 4c 53 52 20 23 34  |OVS R7,R6,LSR #4|
00017f10  3a 80 20 52 36 2c 52 36  2c 23 31 35 0d 8b 42 32  |:. R6,R6,#15..B2|
00017f20  4c 44 52 45 51 20 52 31  30 2c 5b 52 32 2c 52 36  |LDREQ R10,[R2,R6|
00017f30  2c 4c 53 4c 20 23 32 5d  3a ec 51 20 52 31 31 2c  |,LSL #2]:.Q R11,|
00017f40  52 31 30 3a ec 51 20 52  31 32 2c 52 31 30 0d 8b  |R10:.Q R12,R10..|
00017f50  4c 26 43 4d 50 20 52 37  2c 23 31 3a 4c 44 52 45  |L&CMP R7,#1:LDRE|
00017f60  51 20 52 31 32 2c 5b 52  39 2c 52 36 2c 4c 53 4c  |Q R12,[R9,R6,LSL|
00017f70  20 23 32 5d 0d 8b 56 26  43 4d 50 20 52 37 2c 23  | #2]..V&CMP R7,#|
00017f80  32 3a 4c 44 52 45 51 20  52 31 30 2c 5b 52 39 2c  |2:LDREQ R10,[R9,|
00017f90  52 36 2c 4c 53 4c 20 23  32 5d 0d 8b 60 26 43 4d  |R6,LSL #2]..`&CM|
00017fa0  50 20 52 37 2c 23 33 3a  4c 44 52 45 51 20 52 31  |P R7,#3:LDREQ R1|
00017fb0  31 2c 5b 52 39 2c 52 36  2c 4c 53 4c 20 23 32 5d  |1,[R9,R6,LSL #2]|
00017fc0  0d 8b 6a 12 41 44 44 20  52 33 2c 52 31 30 2c 52  |..j.ADD R3,R10,R|
00017fd0  31 31 0d 8b 74 11 41 44  44 20 52 33 2c 52 33 2c  |11..t.ADD R3,R3,|
00017fe0  52 31 32 0d 8b 7e 14 4d  4f 56 20 52 33 2c 52 33  |R12..~.MOV R3,R3|
00017ff0  2c 4c 53 52 20 23 32 0d  8b 88 12 53 54 4d 49 41  |,LSR #2....STMIA|
00018000  20 52 35 21 2c 7b 52 33  7d 0d 8b 92 1e 53 55 42  | R5!,{R3}....SUB|
00018010  53 20 52 30 2c 52 30 2c  23 31 3a 42 4e 45 20 6d  |S R0,R0,#1:BNE m|
00018020  61 70 70 69 78 6c 70 0d  8b 9c 0f 4d 4f 56 53 20  |appixlp....MOVS |
00018030  50 43 2c 52 31 34 0d 8b  a6 0b 2e 6c 74 61 62 6c  |PC,R14.....ltabl|
00018040  65 0d 8b b0 05 5d 0d 8b  ba 0c e3 49 25 3d 30 b8  |e....].....I%=0.|
00018050  31 35 0d 8b c4 0a 5b 4f  50 54 20 5a 0d 8b ce 10  |15....[OPT Z....|
00018060  45 51 55 44 20 49 25 2f  31 35 2a 46 0d 8b d8 05  |EQUD I%/15*F....|
00018070  5d 0d 8b e2 05 ed 0d 8b  ec 05 cc 0d 8b f6 12 e7  |]...............|
00018080  68 70 72 65 64 69 63 74  25 3d 32 20 8c 0d 8c 00  |hpredict%=2 ....|
00018090  0a 5b 4f 50 54 20 5a 0d  8c 0a 10 41 44 44 20 52  |.[OPT Z....ADD R|
000180a0  36 2c 52 36 2c 52 38 0d  8c 14 10 80 20 52 36 2c  |6,R6,R8..... R6,|
000180b0  52 36 2c 23 32 35 35 0d  8c 1e 0d 4d 4f 56 20 52  |R6,#255....MOV R|
000180c0  38 2c 52 36 0d 8c 28 05  5d 0d 8c 32 05 cd 0d 8c  |8,R6..(.]..2....|
000180d0  3c 0a 5b 4f 50 54 20 5a  0d 8c 46 28 4c 44 52 20  |<.[OPT Z..F(LDR |
000180e0  52 37 2c 5b 52 32 2c 52  36 2c 4c 53 4c 20 23 32  |R7,[R2,R6,LSL #2|
000180f0  5d 3a 53 54 52 20 52 37  2c 5b 52 35 5d 2c 23 34  |]:STR R7,[R5],#4|
00018100  0d 8c 50 1e 53 55 42 53  20 52 30 2c 52 30 2c 23  |..P.SUBS R0,R0,#|
00018110  31 3a 42 4e 45 20 6d 61  70 70 69 78 6c 70 0d 8c  |1:BNE mappixlp..|
00018120  5a 0f 4d 4f 56 53 20 50  43 2c 52 31 34 0d 8c 64  |Z.MOVS PC,R14..d|
00018130  05 5d 0d 8c 6e 05 cd 0d  8c 78 07 c9 20 34 0d 8c  |.]..n....x.. 4..|
00018140  82 14 e7 62 69 67 65 6e  64 69 61 6e 62 69 74 73  |...bigendianbits|
00018150  20 8c 0d 8c 8c 0a 5b 4f  50 54 20 5a 0d 8c 96 15  | .....[OPT Z....|
00018160  4d 4f 56 20 52 31 30 2c  52 36 2c 4c 53 52 20 23  |MOV R10,R6,LSR #|
00018170  34 0d 8c a0 1a 4c 44 52  20 52 37 2c 5b 52 32 2c  |4....LDR R7,[R2,|
00018180  52 31 30 2c 4c 53 4c 20  23 32 5d 0d 8c aa 10 80  |R10,LSL #2].....|
00018190  20 52 31 30 2c 52 36 2c  23 26 46 0d 8c b4 05 5d  | R10,R6,#&F....]|
000181a0  0d 8c be 05 cc 0d 8c c8  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
000181b0  8c d2 10 80 20 52 31 30  2c 52 36 2c 23 26 46 0d  |.... R10,R6,#&F.|
000181c0  8c dc 1a 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |...LDR R7,[R2,R1|
000181d0  30 2c 4c 53 4c 20 23 32  5d 0d 8c e6 15 4d 4f 56  |0,LSL #2]....MOV|
000181e0  20 52 31 30 2c 52 36 2c  4c 53 52 20 23 34 0d 8c  | R10,R6,LSR #4..|
000181f0  f0 05 5d 0d 8c fa 05 cd  0d 8d 04 0a 5b 4f 50 54  |..].........[OPT|
00018200  20 5a 0d 8d 0e 2c 4c 44  52 20 52 38 2c 5b 52 32  | Z...,LDR R8,[R2|
00018210  2c 52 31 30 2c 4c 53 4c  20 23 32 5d 3a 53 54 4d  |,R10,LSL #2]:STM|
00018220  49 41 20 52 35 21 2c 7b  52 37 2c 52 38 7d 0d 8d  |IA R5!,{R7,R8}..|
00018230  18 1e 53 55 42 53 20 52  30 2c 52 30 2c 23 32 3a  |..SUBS R0,R0,#2:|
00018240  42 48 49 20 6d 61 70 70  69 78 6c 70 0d 8d 22 0f  |BHI mappixlp..".|
00018250  4d 4f 56 53 20 50 43 2c  52 31 34 0d 8d 2c 05 5d  |MOVS PC,R14..,.]|
00018260  0d 8d 36 07 c9 20 32 0d  8d 40 14 e7 62 69 67 65  |..6.. 2..@..bige|
00018270  6e 64 69 61 6e 62 69 74  73 20 8c 0d 8d 4a 0a 5b  |ndianbits ...J.[|
00018280  4f 50 54 20 5a 0d 8d 54  15 4d 4f 56 20 52 31 30  |OPT Z..T.MOV R10|
00018290  2c 52 36 2c 4c 53 52 20  23 36 0d 8d 5e 1a 4c 44  |,R6,LSR #6..^.LD|
000182a0  52 20 52 37 2c 5b 52 32  2c 52 31 30 2c 4c 53 4c  |R R7,[R2,R10,LSL|
000182b0  20 23 32 5d 0d 8d 68 11  80 20 52 31 30 2c 52 36  | #2]..h.. R10,R6|
000182c0  2c 23 26 33 30 0d 8d 72  1a 4c 44 52 20 52 38 2c  |,#&30..r.LDR R8,|
000182d0  5b 52 32 2c 52 31 30 2c  4c 53 52 20 23 32 5d 0d  |[R2,R10,LSR #2].|
000182e0  8d 7c 10 80 20 52 31 30  2c 52 36 2c 23 26 43 0d  |.|.. R10,R6,#&C.|
000182f0  8d 86 13 4c 44 52 20 52  39 2c 5b 52 32 2c 52 31  |...LDR R9,[R2,R1|
00018300  30 5d 0d 8d 90 10 80 20  52 31 30 2c 52 36 2c 23  |0]..... R10,R6,#|
00018310  26 33 0d 8d 9a 05 5d 0d  8d a4 05 cc 0d 8d ae 0a  |&3....].........|
00018320  5b 4f 50 54 20 5a 0d 8d  b8 10 80 20 52 31 30 2c  |[OPT Z..... R10,|
00018330  52 36 2c 23 26 33 0d 8d  c2 1a 4c 44 52 20 52 37  |R6,#&3....LDR R7|
00018340  2c 5b 52 32 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R2,R10,LSL #2]|
00018350  0d 8d cc 10 80 20 52 31  30 2c 52 36 2c 23 26 43  |..... R10,R6,#&C|
00018360  0d 8d d6 13 4c 44 52 20  52 38 2c 5b 52 32 2c 52  |....LDR R8,[R2,R|
00018370  31 30 5d 0d 8d e0 11 80  20 52 31 30 2c 52 36 2c  |10]..... R10,R6,|
00018380  23 26 33 30 0d 8d ea 1a  4c 44 52 20 52 39 2c 5b  |#&30....LDR R9,[|
00018390  52 32 2c 52 31 30 2c 4c  53 52 20 23 32 5d 0d 8d  |R2,R10,LSR #2]..|
000183a0  f4 15 4d 4f 56 20 52 31  30 2c 52 36 2c 4c 53 52  |..MOV R10,R6,LSR|
000183b0  20 23 36 0d 8d fe 05 5d  0d 8e 08 05 cd 0d 8e 12  | #6....]........|
000183c0  0a 5b 4f 50 54 20 5a 0d  8e 1c 34 4c 44 52 20 52  |.[OPT Z...4LDR R|
000183d0  31 30 2c 5b 52 32 2c 52  31 30 2c 4c 53 4c 20 23  |10,[R2,R10,LSL #|
000183e0  32 5d 3a 53 54 4d 49 41  20 52 35 21 2c 7b 52 37  |2]:STMIA R5!,{R7|
000183f0  2c 52 38 2c 52 39 2c 52  31 30 7d 0d 8e 26 1e 53  |,R8,R9,R10}..&.S|
00018400  55 42 53 20 52 30 2c 52  30 2c 23 34 3a 42 48 49  |UBS R0,R0,#4:BHI|
00018410  20 6d 61 70 70 69 78 6c  70 0d 8e 30 0f 4d 4f 56  | mappixlp..0.MOV|
00018420  53 20 50 43 2c 52 31 34  0d 8e 3a 05 5d 0d 8e 44  |S PC,R14..:.]..D|
00018430  07 c9 20 31 0d 8e 4e 14  e7 62 69 67 65 6e 64 69  |.. 1..N..bigendi|
00018440  61 6e 62 69 74 73 20 8c  0d 8e 58 0a 5b 4f 50 54  |anbits ...X.[OPT|
00018450  20 5a 0d 8e 62 11 80 20  52 31 30 2c 52 36 2c 23  | Z..b.. R10,R6,#|
00018460  26 38 30 0d 8e 6c 1a 4c  44 52 20 52 37 2c 5b 52  |&80..l.LDR R7,[R|
00018470  32 2c 52 31 30 2c 4c 53  52 20 23 35 5d 0d 8e 76  |2,R10,LSR #5]..v|
00018480  11 80 20 52 31 30 2c 52  36 2c 23 26 34 30 0d 8e  |.. R10,R6,#&40..|
00018490  80 1a 4c 44 52 20 52 38  2c 5b 52 32 2c 52 31 30  |..LDR R8,[R2,R10|
000184a0  2c 4c 53 52 20 23 34 5d  0d 8e 8a 11 80 20 52 31  |,LSR #4]..... R1|
000184b0  30 2c 52 36 2c 23 26 32  30 0d 8e 94 1a 4c 44 52  |0,R6,#&20....LDR|
000184c0  20 52 39 2c 5b 52 32 2c  52 31 30 2c 4c 53 52 20  | R9,[R2,R10,LSR |
000184d0  23 33 5d 0d 8e 9e 11 80  20 52 31 30 2c 52 36 2c  |#3]..... R10,R6,|
000184e0  23 26 31 30 0d 8e a8 34  4c 44 52 20 52 31 30 2c  |#&10...4LDR R10,|
000184f0  5b 52 32 2c 52 31 30 2c  4c 53 52 20 23 32 5d 3a  |[R2,R10,LSR #2]:|
00018500  53 54 4d 49 41 20 52 35  21 2c 7b 52 37 2c 52 38  |STMIA R5!,{R7,R8|
00018510  2c 52 39 2c 52 31 30 7d  0d 8e b2 10 80 20 52 31  |,R9,R10}..... R1|
00018520  30 2c 52 36 2c 23 26 38  0d 8e bc 1a 4c 44 52 20  |0,R6,#&8....LDR |
00018530  52 37 2c 5b 52 32 2c 52  31 30 2c 4c 53 52 20 23  |R7,[R2,R10,LSR #|
00018540  31 5d 0d 8e c6 10 80 20  52 31 30 2c 52 36 2c 23  |1]..... R10,R6,#|
00018550  26 34 0d 8e d0 13 4c 44  52 20 52 38 2c 5b 52 32  |&4....LDR R8,[R2|
00018560  2c 52 31 30 5d 0d 8e da  10 80 20 52 31 30 2c 52  |,R10]..... R10,R|
00018570  36 2c 23 26 32 0d 8e e4  1a 4c 44 52 20 52 39 2c  |6,#&2....LDR R9,|
00018580  5b 52 32 2c 52 31 30 2c  4c 53 4c 20 23 31 5d 0d  |[R2,R10,LSL #1].|
00018590  8e ee 10 80 20 52 31 30  2c 52 36 2c 23 26 31 0d  |.... R10,R6,#&1.|
000185a0  8e f8 05 5d 0d 8f 02 05  cc 0d 8f 0c 0a 5b 4f 50  |...].........[OP|
000185b0  54 20 5a 0d 8f 16 10 80  20 52 31 30 2c 52 36 2c  |T Z..... R10,R6,|
000185c0  23 26 31 0d 8f 20 1a 4c  44 52 20 52 37 2c 5b 52  |#&1.. .LDR R7,[R|
000185d0  32 2c 52 31 30 2c 4c 53  4c 20 23 32 5d 0d 8f 2a  |2,R10,LSL #2]..*|
000185e0  10 80 20 52 31 30 2c 52  36 2c 23 26 32 0d 8f 34  |.. R10,R6,#&2..4|
000185f0  1a 4c 44 52 20 52 38 2c  5b 52 32 2c 52 31 30 2c  |.LDR R8,[R2,R10,|
00018600  4c 53 4c 20 23 31 5d 0d  8f 3e 10 80 20 52 31 30  |LSL #1]..>.. R10|
00018610  2c 52 36 2c 23 26 34 0d  8f 48 13 4c 44 52 20 52  |,R6,#&4..H.LDR R|
00018620  39 2c 5b 52 32 2c 52 31  30 5d 0d 8f 52 10 80 20  |9,[R2,R10]..R.. |
00018630  52 31 30 2c 52 36 2c 23  26 38 0d 8f 5c 34 4c 44  |R10,R6,#&8..\4LD|
00018640  52 20 52 31 30 2c 5b 52  32 2c 52 31 30 2c 4c 53  |R R10,[R2,R10,LS|
00018650  52 20 23 31 5d 3a 53 54  4d 49 41 20 52 35 21 2c  |R #1]:STMIA R5!,|
00018660  7b 52 37 2c 52 38 2c 52  39 2c 52 31 30 7d 0d 8f  |{R7,R8,R9,R10}..|
00018670  66 11 80 20 52 31 30 2c  52 36 2c 23 26 31 30 0d  |f.. R10,R6,#&10.|
00018680  8f 70 1a 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |.p.LDR R7,[R2,R1|
00018690  30 2c 4c 53 52 20 23 32  5d 0d 8f 7a 11 80 20 52  |0,LSR #2]..z.. R|
000186a0  31 30 2c 52 36 2c 23 26  32 30 0d 8f 84 1a 4c 44  |10,R6,#&20....LD|
000186b0  52 20 52 38 2c 5b 52 32  2c 52 31 30 2c 4c 53 52  |R R8,[R2,R10,LSR|
000186c0  20 23 33 5d 0d 8f 8e 11  80 20 52 31 30 2c 52 36  | #3]..... R10,R6|
000186d0  2c 23 26 34 30 0d 8f 98  1a 4c 44 52 20 52 39 2c  |,#&40....LDR R9,|
000186e0  5b 52 32 2c 52 31 30 2c  4c 53 52 20 23 34 5d 0d  |[R2,R10,LSR #4].|
000186f0  8f a2 15 4d 4f 56 20 52  31 30 2c 52 36 2c 4c 53  |...MOV R10,R6,LS|
00018700  52 20 23 37 0d 8f ac 05  5d 0d 8f b6 05 cd 0d 8f  |R #7....].......|
00018710  c0 0a 5b 4f 50 54 20 5a  0d 8f ca 34 4c 44 52 20  |..[OPT Z...4LDR |
00018720  52 31 30 2c 5b 52 32 2c  52 31 30 2c 4c 53 4c 20  |R10,[R2,R10,LSL |
00018730  23 32 5d 3a 53 54 4d 49  41 20 52 35 21 2c 7b 52  |#2]:STMIA R5!,{R|
00018740  37 2c 52 38 2c 52 39 2c  52 31 30 7d 0d 8f d4 1e  |7,R8,R9,R10}....|
00018750  53 55 42 53 20 52 30 2c  52 30 2c 23 38 3a 42 48  |SUBS R0,R0,#8:BH|
00018760  49 20 6d 61 70 70 69 78  6c 70 0d 8f de 0f 4d 4f  |I mappixlp....MO|
00018770  56 53 20 50 43 2c 52 31  34 0d 8f e8 05 5d 0d 8f  |VS PC,R14....]..|
00018780  f2 08 c9 20 31 36 0d 8f  fc 0a 5b 4f 50 54 20 5a  |... 16....[OPT Z|
00018790  0d 90 06 0c 2e 6d 61 70  70 69 78 25 0d 90 10 10  |.....mappix%....|
000187a0  4c 44 52 20 52 30 2c 73  78 6c 6f 63 0d 90 1a 1b  |LDR R0,sxloc....|
000187b0  4c 44 52 20 52 31 2c 5b  52 39 5d 3a 4c 44 52 20  |LDR R1,[R9]:LDR |
000187c0  52 31 2c 5b 52 31 5d 0d  90 24 1e 4c 44 52 20 52  |R1,[R1]..$.LDR R|
000187d0  32 2c 5b 52 39 2c 23 38  5d 3a 4c 44 52 20 52 32  |2,[R9,#8]:LDR R2|
000187e0  2c 5b 52 32 5d 0d 90 2e  14 4c 44 52 20 52 33 2c  |,[R2]....LDR R3,|
000187f0  5b 52 39 2c 23 34 2a 38  5d 0d 90 38 14 4c 44 52  |[R9,#4*8]..8.LDR|
00018800  20 52 34 2c 5b 52 39 2c  23 33 2a 38 5d 0d 90 42  | R4,[R9,#3*8]..B|
00018810  14 4c 44 52 20 52 35 2c  5b 52 39 2c 23 32 2a 38  |.LDR R5,[R9,#2*8|
00018820  5d 0d 90 4c 14 4c 44 52  20 52 36 2c 5b 52 39 2c  |]..L.LDR R6,[R9,|
00018830  23 35 2a 38 5d 0d 90 56  14 4c 44 52 20 52 37 2c  |#5*8]..V.LDR R7,|
00018840  5b 52 39 2c 23 36 2a 38  5d 0d 90 60 14 4c 44 52  |[R9,#6*8]..`.LDR|
00018850  20 52 38 2c 5b 52 39 2c  23 37 2a 38 5d 0d 90 6a  | R8,[R9,#7*8]..j|
00018860  0d 43 4d 50 20 52 31 2c  52 32 0d 90 74 12 41 44  |.CMP R1,R2..t.AD|
00018870  44 45 51 20 52 32 2c 52  32 2c 23 31 0d 90 7e 0d  |DEQ R2,R2,#1..~.|
00018880  2e 6d 61 70 70 69 78 6c  70 0d 90 88 2e 4c 44 52  |.mappixlp....LDR|
00018890  42 20 52 39 2c 5b 52 31  5d 2c 23 73 74 65 70 32  |B R9,[R1],#step2|
000188a0  34 3a 4c 44 52 42 20 52  31 30 2c 5b 52 32 5d 2c  |4:LDRB R10,[R2],|
000188b0  23 73 74 65 70 32 34 0d  90 92 3e 4c 44 52 20 52  |#step24...>LDR R|
000188c0  39 2c 5b 52 36 2c 52 39  2c 4c 53 4c 20 23 32 5d  |9,[R6,R9,LSL #2]|
000188d0  3a 4c 44 52 20 52 31 30  2c 5b 52 37 2c 52 31 30  |:LDR R10,[R7,R10|
000188e0  2c 4c 53 4c 20 23 32 5d  3a 84 52 20 52 39 2c 52  |,LSL #2]:.R R9,R|
000188f0  39 2c 52 31 30 0d 90 9c  29 80 20 52 31 30 2c 52  |9,R10...). R10,R|
00018900  39 2c 23 32 35 35 3a 4c  44 52 20 52 31 30 2c 5b  |9,#255:LDR R10,[|
00018910  52 33 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 0d 90  |R3,R10,LSL #2]..|
00018920  a6 3c 4d 4f 56 20 52 31  31 2c 52 39 2c 4c 53 52  |.<MOV R11,R9,LSR|
00018930  20 23 38 3a 80 20 52 31  31 2c 52 31 31 2c 23 32  | #8:. R11,R11,#2|
00018940  35 35 3a 4c 44 52 20 52  31 31 2c 5b 52 34 2c 52  |55:LDR R11,[R4,R|
00018950  31 31 2c 4c 53 4c 20 23  32 5d 0d 90 b0 2e 4d 4f  |11,LSL #2]....MO|
00018960  56 20 52 31 32 2c 52 39  2c 4c 53 52 20 23 31 36  |V R12,R9,LSR #16|
00018970  3a 4c 44 52 20 52 31 32  2c 5b 52 35 2c 52 31 32  |:LDR R12,[R5,R12|
00018980  2c 4c 53 4c 20 23 32 5d  0d 90 ba 33 41 44 44 20  |,LSL #2]...3ADD |
00018990  52 31 30 2c 52 31 30 2c  52 31 31 3a 41 44 44 20  |R10,R10,R11:ADD |
000189a0  52 31 30 2c 52 31 30 2c  52 31 32 3a 53 54 4d 49  |R10,R10,R12:STMI|
000189b0  41 20 52 38 21 2c 7b 52  31 30 7d 0d 90 c4 1e 53  |A R8!,{R10}....S|
000189c0  55 42 53 20 52 30 2c 52  30 2c 23 31 3a 42 4e 45  |UBS R0,R0,#1:BNE|
000189d0  20 6d 61 70 70 69 78 6c  70 0d 90 ce 0f 4d 4f 56  | mappixlp....MOV|
000189e0  53 20 50 43 2c 52 31 34  0d 90 d8 05 5d 0d 90 e2  |S PC,R14....]...|
000189f0  08 c9 20 32 34 0d 90 ec  0a 5b 4f 50 54 20 5a 0d  |.. 24....[OPT Z.|
00018a00  90 f6 0c 2e 6d 61 70 70  69 78 25 0d 91 00 10 4c  |....mappix%....L|
00018a10  44 52 20 52 30 2c 73 78  6c 6f 63 0d 91 0a 20 4c  |DR R0,sxloc... L|
00018a20  44 52 20 52 31 2c 5b 52  39 2c 23 32 2a 38 5d 3a  |DR R1,[R9,#2*8]:|
00018a30  4c 44 52 20 52 31 2c 5b  52 31 5d 0d 91 14 1e 4c  |LDR R1,[R1]....L|
00018a40  44 52 20 52 32 2c 5b 52  39 2c 23 38 5d 3a 4c 44  |DR R2,[R9,#8]:LD|
00018a50  52 20 52 32 2c 5b 52 32  5d 0d 91 1e 1b 4c 44 52  |R R2,[R2]....LDR|
00018a60  20 52 33 2c 5b 52 39 5d  3a 4c 44 52 20 52 33 2c  | R3,[R9]:LDR R3,|
00018a70  5b 52 33 5d 0d 91 28 14  4c 44 52 20 52 34 2c 5b  |[R3]..(.LDR R4,[|
00018a80  52 39 2c 23 35 2a 38 5d  0d 91 32 14 4c 44 52 20  |R9,#5*8]..2.LDR |
00018a90  52 35 2c 5b 52 39 2c 23  34 2a 38 5d 0d 91 3c 14  |R5,[R9,#4*8]..<.|
00018aa0  4c 44 52 20 52 36 2c 5b  52 39 2c 23 33 2a 38 5d  |LDR R6,[R9,#3*8]|
00018ab0  0d 91 46 14 4c 44 52 20  52 37 2c 5b 52 39 2c 23  |..F.LDR R7,[R9,#|
00018ac0  36 2a 38 5d 0d 91 50 14  53 54 4d 46 44 20 53 50  |6*8]..P.STMFD SP|
00018ad0  20 21 2c 7b 52 31 34 7d  0d 91 5a 24 4d 4f 56 20  | !,{R14}..Z$MOV |
00018ae0  72 31 31 2c 23 30 3a 4d  4f 56 20 52 31 32 2c 23  |r11,#0:MOV R12,#|
00018af0  30 3a 4d 4f 56 20 52 31  34 2c 23 30 0d 91 64 0d  |0:MOV R14,#0..d.|
00018b00  2e 6d 61 70 70 69 78 6c  70 0d 91 6e 43 4c 44 52  |.mappixlp..nCLDR|
00018b10  42 20 52 38 2c 5b 52 31  5d 2c 23 73 74 65 70 32  |B R8,[R1],#step2|
00018b20  34 3a 4c 44 52 42 20 52  39 2c 5b 52 32 5d 2c 23  |4:LDRB R9,[R2],#|
00018b30  73 74 65 70 32 34 3a 4c  44 52 42 20 52 31 30 2c  |step24:LDRB R10,|
00018b40  5b 52 33 5d 2c 23 73 74  65 70 32 34 0d 91 78 05  |[R3],#step24..x.|
00018b50  5d 0d 91 82 12 e7 68 70  72 65 64 69 63 74 25 3d  |].....hpredict%=|
00018b60  32 20 8c 0d 91 8c 0a 5b  4f 50 54 20 5a 0d 91 96  |2 .....[OPT Z...|
00018b70  11 41 44 44 20 72 38 2c  72 38 2c 72 31 31 0d 91  |.ADD r8,r8,r11..|
00018b80  a0 10 80 20 72 38 2c 72  38 2c 23 32 35 35 0d 91  |... r8,r8,#255..|
00018b90  aa 0e 4d 4f 56 20 72 31  31 2c 72 38 0d 91 b4 11  |..MOV r11,r8....|
00018ba0  41 44 44 20 72 39 2c 72  39 2c 72 31 32 0d 91 be  |ADD r9,r9,r12...|
00018bb0  10 80 20 72 39 2c 72 39  2c 23 32 35 35 0d 91 c8  |.. r9,r9,#255...|
00018bc0  0e 4d 4f 56 20 72 31 32  2c 72 39 0d 91 d2 13 41  |.MOV r12,r9....A|
00018bd0  44 44 20 72 31 30 2c 72  31 30 2c 72 31 34 0d 91  |DD r10,r10,r14..|
00018be0  dc 12 80 20 72 31 30 2c  72 31 30 2c 23 32 35 35  |... r10,r10,#255|
00018bf0  0d 91 e6 0f 4d 4f 56 20  72 31 34 2c 72 31 30 0d  |....MOV r14,r10.|
00018c00  91 f0 05 5d 0d 91 fa 05  cd 0d 92 04 0a 5b 4f 50  |...].........[OP|
00018c10  54 20 5a 0d 92 0e 47 4c  44 52 20 52 38 2c 5b 52  |T Z...GLDR R8,[R|
00018c20  34 2c 52 38 2c 4c 53 4c  20 23 32 5d 3a 4c 44 52  |4,R8,LSL #2]:LDR|
00018c30  20 52 39 2c 5b 52 35 2c  52 39 2c 4c 53 4c 20 23  | R9,[R5,R9,LSL #|
00018c40  32 5d 3a 4c 44 52 20 52  31 30 2c 5b 52 36 2c 52  |2]:LDR R10,[R6,R|
00018c50  31 30 2c 4c 53 4c 20 23  32 5d 0d 92 18 2d 41 44  |10,LSL #2]...-AD|
00018c60  44 20 52 38 2c 52 38 2c  52 39 3a 41 44 44 20 52  |D R8,R8,R9:ADD R|
00018c70  38 2c 52 38 2c 52 31 30  3a 53 54 52 20 52 38 2c  |8,R8,R10:STR R8,|
00018c80  5b 52 37 5d 2c 23 34 0d  92 22 1e 53 55 42 53 20  |[R7],#4..".SUBS |
00018c90  52 30 2c 52 30 2c 23 31  3a 42 4e 45 20 6d 61 70  |R0,R0,#1:BNE map|
00018ca0  70 69 78 6c 70 0d 92 2c  14 4c 44 4d 46 44 20 53  |pixlp..,.LDMFD S|
00018cb0  50 20 21 2c 7b 50 43 7d  5e 0d 92 36 05 5d 0d 92  |P !,{PC}^..6.]..|
00018cc0  40 08 c9 20 34 38 0d 92  4a 0a 5b 4f 50 54 20 5a  |@.. 48..J.[OPT Z|
00018cd0  0d 92 54 0c 2e 6d 61 70  70 69 78 25 0d 92 5e 10  |..T..mappix%..^.|
00018ce0  4c 44 52 20 52 30 2c 73  78 6c 6f 63 0d 92 68 20  |LDR R0,sxloc..h |
00018cf0  4c 44 52 20 52 31 2c 5b  52 39 2c 23 32 2a 38 5d  |LDR R1,[R9,#2*8]|
00018d00  3a 4c 44 52 20 52 31 2c  5b 52 31 5d 0d 92 72 1e  |:LDR R1,[R1]..r.|
00018d10  4c 44 52 20 52 32 2c 5b  52 39 2c 23 38 5d 3a 4c  |LDR R2,[R9,#8]:L|
00018d20  44 52 20 52 32 2c 5b 52  32 5d 0d 92 7c 1b 4c 44  |DR R2,[R2]..|.LD|
00018d30  52 20 52 33 2c 5b 52 39  5d 3a 4c 44 52 20 52 33  |R R3,[R9]:LDR R3|
00018d40  2c 5b 52 33 5d 0d 92 86  14 4c 44 52 20 52 34 2c  |,[R3]....LDR R4,|
00018d50  5b 52 39 2c 23 35 2a 38  5d 0d 92 90 14 4c 44 52  |[R9,#5*8]....LDR|
00018d60  20 52 35 2c 5b 52 39 2c  23 34 2a 38 5d 0d 92 9a  | R5,[R9,#4*8]...|
00018d70  14 4c 44 52 20 52 36 2c  5b 52 39 2c 23 33 2a 38  |.LDR R6,[R9,#3*8|
00018d80  5d 0d 92 a4 14 4c 44 52  20 52 37 2c 5b 52 39 2c  |]....LDR R7,[R9,|
00018d90  23 36 2a 38 5d 0d 92 ae  14 53 54 4d 46 44 20 53  |#6*8]....STMFD S|
00018da0  50 20 21 2c 7b 52 31 34  7d 0d 92 b8 3f 4d 4f 56  |P !,{R14}...?MOV|
00018db0  20 72 31 31 2c 23 63 6f  6c 6f 75 72 69 6e 64 65  | r11,#colourinde|
00018dc0  78 20 80 20 32 35 35 3a  41 44 44 20 72 31 31 2c  |x . 255:ADD r11,|
00018dd0  72 31 31 2c 23 63 6f 6c  6f 75 72 69 6e 64 65 78  |r11,#colourindex|
00018de0  20 80 20 26 66 66 30 30  0d 92 c2 0d 2e 6d 61 70  | . &ff00.....map|
00018df0  70 69 78 6c 70 0d 92 cc  40 4c 44 52 20 52 38 2c  |pixlp...@LDR R8,|
00018e00  5b 52 31 5d 2c 23 73 74  65 70 32 34 3a 4c 44 52  |[R1],#step24:LDR|
00018e10  20 52 39 2c 5b 52 32 5d  2c 23 73 74 65 70 32 34  | R9,[R2],#step24|
00018e20  3a 4c 44 52 20 52 31 30  2c 5b 52 33 5d 2c 23 73  |:LDR R10,[R3],#s|
00018e30  74 65 70 32 34 0d 92 d6  29 80 20 72 38 2c 72 38  |tep24...). r8,r8|
00018e40  2c 72 31 31 3a 80 20 72  39 2c 72 39 2c 72 31 31  |,r11:. r9,r9,r11|
00018e50  3a 80 20 72 31 30 2c 72  31 30 2c 72 31 31 0d 92  |:. r10,r10,r11..|
00018e60  e0 47 4c 44 52 20 52 38  2c 5b 52 34 2c 52 38 2c  |.GLDR R8,[R4,R8,|
00018e70  4c 53 4c 20 23 32 5d 3a  4c 44 52 20 52 39 2c 5b  |LSL #2]:LDR R9,[|
00018e80  52 35 2c 52 39 2c 4c 53  4c 20 23 32 5d 3a 4c 44  |R5,R9,LSL #2]:LD|
00018e90  52 20 52 31 30 2c 5b 52  36 2c 52 31 30 2c 4c 53  |R R10,[R6,R10,LS|
00018ea0  4c 20 23 32 5d 0d 92 ea  2d 41 44 44 20 52 38 2c  |L #2]...-ADD R8,|
00018eb0  52 38 2c 52 39 3a 41 44  44 20 52 38 2c 52 38 2c  |R8,R9:ADD R8,R8,|
00018ec0  52 31 30 3a 53 54 52 20  52 38 2c 5b 52 37 5d 2c  |R10:STR R8,[R7],|
00018ed0  23 34 0d 92 f4 1e 53 55  42 53 20 52 30 2c 52 30  |#4....SUBS R0,R0|
00018ee0  2c 23 31 3a 42 4e 45 20  6d 61 70 70 69 78 6c 70  |,#1:BNE mappixlp|
00018ef0  0d 92 fe 14 4c 44 4d 46  44 20 53 50 20 21 2c 7b  |....LDMFD SP !,{|
00018f00  50 43 7d 5e 0d 93 08 05  5d 0d 93 12 09 c9 20 34  |PC}^....]..... 4|
00018f10  31 31 0d 93 1c 0a 5b 4f  50 54 20 5a 0d 93 26 0c  |11....[OPT Z..&.|
00018f20  2e 6d 61 70 70 69 78 25  0d 93 30 10 4c 44 52 20  |.mappix%..0.LDR |
00018f30  52 30 2c 73 78 6c 6f 63  0d 93 3a 1b 4c 44 52 20  |R0,sxloc..:.LDR |
00018f40  52 31 2c 5b 52 39 5d 3a  4c 44 52 20 52 31 2c 5b  |R1,[R9]:LDR R1,[|
00018f50  52 31 5d 0d 93 44 14 4c  44 52 20 52 34 2c 5b 52  |R1]..D.LDR R4,[R|
00018f60  39 2c 23 31 2a 38 5d 0d  93 4e 14 4c 44 52 20 52  |9,#1*8]..N.LDR R|
00018f70  37 2c 5b 52 39 2c 23 38  2a 38 5d 0d 93 58 0d 2e  |7,[R9,#8*8]..X..|
00018f80  6d 61 70 70 69 78 6c 70  0d 93 62 13 4c 44 52 42  |mappixlp..b.LDRB|
00018f90  20 52 38 2c 5b 52 31 5d  2c 23 32 0d 93 6c 3e 4c  | R8,[R1],#2..l>L|
00018fa0  44 52 20 52 38 2c 5b 52  34 2c 52 38 2c 4c 53 4c  |DR R8,[R4,R8,LSL|
00018fb0  20 23 32 5d 3a 43 4d 50  20 52 38 2c 23 46 3a 4d  | #2]:CMP R8,#F:M|
00018fc0  4f 56 43 53 20 52 38 2c  23 46 3a 53 54 52 20 52  |OVCS R8,#F:STR R|
00018fd0  38 2c 5b 52 37 5d 2c 23  34 0d 93 76 1e 53 55 42  |8,[R7],#4..v.SUB|
00018fe0  53 20 52 30 2c 52 30 2c  23 31 3a 42 4e 45 20 6d  |S R0,R0,#1:BNE m|
00018ff0  61 70 70 69 78 6c 70 0d  93 80 0f 4d 4f 56 53 20  |appixlp....MOVS |
00019000  50 43 2c 52 31 34 0d 93  8a 05 5d 0d 93 94 09 c9  |PC,R14....].....|
00019010  20 34 32 32 0d 93 9e 0a  5b 4f 50 54 20 5a 0d 93  | 422....[OPT Z..|
00019020  a8 0c 2e 6d 61 70 70 69  78 25 0d 93 b2 10 4c 44  |...mappix%....LD|
00019030  52 20 52 30 2c 73 78 6c  6f 63 0d 93 bc 1b 4c 44  |R R0,sxloc....LD|
00019040  52 20 52 31 2c 5b 52 39  5d 3a 4c 44 52 20 52 31  |R R1,[R9]:LDR R1|
00019050  2c 5b 52 31 5d 0d 93 c6  10 41 44 44 20 52 31 2c  |,[R1]....ADD R1,|
00019060  52 31 2c 23 31 0d 93 d0  14 4c 44 52 20 52 34 2c  |R1,#1....LDR R4,|
00019070  5b 52 39 2c 23 31 2a 38  5d 0d 93 da 14 4c 44 52  |[R9,#1*8]....LDR|
00019080  20 52 37 2c 5b 52 39 2c  23 38 2a 38 5d 0d 93 e4  | R7,[R9,#8*8]...|
00019090  0d 2e 6d 61 70 70 69 78  6c 70 0d 93 ee 13 4c 44  |..mappixlp....LD|
000190a0  52 42 20 52 38 2c 5b 52  31 5d 2c 23 32 0d 93 f8  |RB R8,[R1],#2...|
000190b0  3e 4c 44 52 20 52 38 2c  5b 52 34 2c 52 38 2c 4c  |>LDR R8,[R4,R8,L|
000190c0  53 4c 20 23 32 5d 3a 43  4d 50 20 52 38 2c 23 46  |SL #2]:CMP R8,#F|
000190d0  3a 4d 4f 56 43 53 20 52  38 2c 23 46 3a 53 54 52  |:MOVCS R8,#F:STR|
000190e0  20 52 38 2c 5b 52 37 5d  2c 23 34 0d 94 02 1e 53  | R8,[R7],#4....S|
000190f0  55 42 53 20 52 30 2c 52  30 2c 23 31 3a 42 4e 45  |UBS R0,R0,#1:BNE|
00019100  20 6d 61 70 70 69 78 6c  70 0d 94 0c 0f 4d 4f 56  | mappixlp....MOV|
00019110  53 20 50 43 2c 52 31 34  0d 94 16 05 5d 0d 94 20  |S PC,R14....].. |
00019120  09 c9 20 35 35 35 0d 94  2a 0a 5b 4f 50 54 20 5a  |.. 555..*.[OPT Z|
00019130  0d 94 34 0c 2e 6d 61 70  70 69 78 25 0d 94 3e 10  |..4..mappix%..>.|
00019140  4c 44 52 20 52 30 2c 73  78 6c 6f 63 0d 94 48 1b  |LDR R0,sxloc..H.|
00019150  4c 44 52 20 52 31 2c 5b  52 39 5d 3a 4c 44 52 20  |LDR R1,[R9]:LDR |
00019160  52 31 2c 5b 52 31 5d 0d  94 52 10 41 44 44 20 52  |R1,[R1]..R.ADD R|
00019170  31 2c 52 31 2c 23 31 0d  94 5c 14 4c 44 52 20 52  |1,R1,#1..\.LDR R|
00019180  34 2c 5b 52 39 2c 23 31  2a 38 5d 0d 94 66 14 4c  |4,[R9,#1*8]..f.L|
00019190  44 52 20 52 37 2c 5b 52  39 2c 23 38 2a 38 5d 0d  |DR R7,[R9,#8*8].|
000191a0  94 70 0d 2e 6d 61 70 70  69 78 6c 70 0d 94 7a 13  |.p..mappixlp..z.|
000191b0  4c 44 52 42 20 52 38 2c  5b 52 31 5d 2c 23 32 0d  |LDRB R8,[R1],#2.|
000191c0  94 84 12 80 20 52 38 2c  52 38 2c 23 79 6d 61 78  |.... R8,R8,#ymax|
000191d0  25 0d 94 8e 3e 4c 44 52  20 52 38 2c 5b 52 34 2c  |%...>LDR R8,[R4,|
000191e0  52 38 2c 4c 53 4c 20 23  32 5d 3a 43 4d 50 20 52  |R8,LSL #2]:CMP R|
000191f0  38 2c 23 46 3a 4d 4f 56  43 53 20 52 38 2c 23 46  |8,#F:MOVCS R8,#F|
00019200  3a 53 54 52 20 52 38 2c  5b 52 37 5d 2c 23 34 0d  |:STR R8,[R7],#4.|
00019210  94 98 1e 53 55 42 53 20  52 30 2c 52 30 2c 23 31  |...SUBS R0,R0,#1|
00019220  3a 42 4e 45 20 6d 61 70  70 69 78 6c 70 0d 94 a2  |:BNE mappixlp...|
00019230  0f 4d 4f 56 53 20 50 43  2c 52 31 34 0d 94 ac 05  |.MOVS PC,R14....|
00019240  5d 0d 94 b6 05 cb 0d 94  c0 18 e7 78 6d 75 6c 25  |]..........xmul%|
00019250  3d 32 20 80 20 78 64 69  76 25 3d 31 20 8c 0d 94  |=2 . xdiv%=1 ...|
00019260  ca 0a 5b 4f 50 54 20 5a  0d 94 de 0d 2e 78 73 61  |..[OPT Z.....xsa|
00019270  6d 70 6c 65 25 0d 94 e8  1b 4c 44 52 20 52 30 2c  |mple%....LDR R0,|
00019280  5b 52 39 5d 3a 4c 44 52  20 52 30 2c 5b 52 30 5d  |[R9]:LDR R0,[R0]|
00019290  0d 94 f2 12 4c 44 52 20  52 31 2c 5b 52 39 2c 23  |....LDR R1,[R9,#|
000192a0  38 5d 0d 94 fc 14 4c 44  52 20 52 32 2c 5b 52 39  |8]....LDR R2,[R9|
000192b0  2c 23 32 2a 38 5d 0d 95  06 11 53 55 42 53 20 52  |,#2*8]....SUBS R|
000192c0  30 2c 52 30 2c 23 32 0d  95 10 10 42 45 51 20 78  |0,R0,#2....BEQ x|
000192d0  64 6f 6e 65 64 69 76 0d  95 1a 10 42 4d 49 20 78  |donediv....BMI x|
000192e0  64 6f 6e 65 64 69 76 0d  95 24 0e 2e 78 73 61 6d  |donediv..$..xsam|
000192f0  70 6c 65 6c 70 0d 95 2e  14 4c 44 4d 49 41 20 52  |plelp....LDMIA R|
00019300  31 2c 7b 52 35 2c 52 36  7d 0d 95 38 10 41 44 44  |1,{R5,R6}..8.ADD|
00019310  20 52 36 2c 52 36 2c 52  35 0d 95 42 14 4d 4f 56  | R6,R6,R5..B.MOV|
00019320  20 52 36 2c 52 36 2c 4c  53 52 20 23 31 0d 95 4c  | R6,R6,LSR #1..L|
00019330  15 53 54 4d 49 41 20 52  32 21 2c 7b 52 35 2c 52  |.STMIA R2!,{R5,R|
00019340  36 7d 0d 95 56 10 41 44  44 20 52 31 2c 52 31 2c  |6}..V.ADD R1,R1,|
00019350  23 34 0d 95 60 1f 53 55  42 53 20 52 30 2c 52 30  |#4..`.SUBS R0,R0|
00019360  2c 23 32 3a 42 47 54 20  78 73 61 6d 70 6c 65 6c  |,#2:BGT xsamplel|
00019370  70 0d 95 6a 0d 2e 78 64  6f 6e 65 64 69 76 0d 95  |p..j..xdonediv..|
00019380  74 11 4c 44 4d 49 41 20  52 31 2c 7b 52 35 7d 0d  |t.LDMIA R1,{R5}.|
00019390  95 7e 0d 4d 4f 56 20 52  36 2c 52 35 0d 95 88 15  |.~.MOV R6,R5....|
000193a0  53 54 4d 49 41 20 52 32  21 2c 7b 52 35 2c 52 36  |STMIA R2!,{R5,R6|
000193b0  7d 0d 95 92 0f 4d 4f 56  53 20 50 43 2c 52 31 34  |}....MOVS PC,R14|
000193c0  0d 95 9c 05 5d 0d 95 a6  05 cc 0d 95 b0 0a 5b 4f  |....].........[O|
000193d0  50 54 20 5a 0d 95 c4 0d  2e 78 73 61 6d 70 6c 65  |PT Z.....xsample|
000193e0  25 0d 95 ce 1b 4c 44 52  20 52 30 2c 5b 52 39 5d  |%....LDR R0,[R9]|
000193f0  3a 4c 44 52 20 52 30 2c  5b 52 30 5d 0d 95 d8 12  |:LDR R0,[R0]....|
00019400  4c 44 52 20 52 31 2c 5b  52 39 2c 23 38 5d 0d 95  |LDR R1,[R9,#8]..|
00019410  e2 14 4c 44 52 20 52 32  2c 5b 52 39 2c 23 32 2a  |..LDR R2,[R9,#2*|
00019420  38 5d 0d 95 ec 20 4c 44  52 20 52 33 2c 5b 52 39  |8]... LDR R3,[R9|
00019430  2c 23 33 2a 38 5d 3a 4c  44 52 20 52 33 2c 5b 52  |,#3*8]:LDR R3,[R|
00019440  33 5d 0d 95 f6 20 4c 44  52 20 52 34 2c 5b 52 39  |3]... LDR R4,[R9|
00019450  2c 23 34 2a 38 5d 3a 4c  44 52 20 52 34 2c 5b 52  |,#4*8]:LDR R4,[R|
00019460  34 5d 0d 96 00 0e 4d 4f  56 20 52 31 31 2c 52 34  |4]....MOV R11,R4|
00019470  0d 96 0a 0e 2e 78 73 61  6d 70 6c 65 6c 70 0d 96  |.....xsamplelp..|
00019480  14 11 4c 44 4d 49 41 20  52 31 2c 7b 52 35 7d 0d  |..LDMIA R1,{R5}.|
00019490  96 1e 2c 53 55 42 53 20  52 31 31 2c 52 31 31 2c  |..,SUBS R11,R11,|
000194a0  23 31 3a ec 51 20 52 31  31 2c 52 34 3a 41 44 44  |#1:.Q R11,R4:ADD|
000194b0  45 51 20 52 31 2c 52 31  2c 23 34 0d 96 28 12 53  |EQ R1,R1,#4..(.S|
000194c0  55 42 53 20 52 31 32 2c  52 33 2c 23 31 0d 96 32  |UBS R12,R3,#1..2|
000194d0  10 42 45 51 20 78 64 6f  6e 65 64 69 76 0d 96 3c  |.BEQ xdonediv..<|
000194e0  0b 2e 78 64 69 76 6c 70  0d 96 46 0f 43 4d 50 20  |..xdivlp..F.CMP |
000194f0  52 31 32 2c 52 31 31 0d  96 50 0f 42 43 43 20 78  |R12,R11..P.BCC x|
00019500  64 69 76 6c 70 32 0d 96  5a 23 4c 44 4d 49 41 20  |divlp2..Z#LDMIA |
00019510  52 31 21 2c 7b 52 38 7d  3a 4d 4c 41 20 52 35 2c  |R1!,{R8}:MLA R5,|
00019520  52 38 2c 52 31 31 2c 52  35 0d 96 64 1f 53 55 42  |R8,R11,R5..d.SUB|
00019530  53 20 52 31 32 2c 52 31  32 2c 52 31 31 3a 4d 4f  |S R12,R12,R11:MO|
00019540  56 20 52 31 31 2c 52 34  0d 96 6e 0e 42 4e 45 20  |V R11,R4..n.BNE |
00019550  78 64 69 76 6c 70 0d 96  78 0e 42 20 78 64 6f 6e  |xdivlp..x.B xdon|
00019560  65 64 69 76 0d 96 82 0c  2e 78 64 69 76 6c 70 32  |ediv.....xdivlp2|
00019570  0d 96 8c 11 4c 44 4d 49  41 20 52 31 2c 7b 52 38  |....LDMIA R1,{R8|
00019580  7d 0d 96 96 2c 53 55 42  53 20 52 31 31 2c 52 31  |}...,SUBS R11,R1|
00019590  31 2c 23 31 3a ec 51 20  52 31 31 2c 52 34 3a 41  |1,#1:.Q R11,R4:A|
000195a0  44 44 45 51 20 52 31 2c  52 31 2c 23 34 0d 96 a0  |DDEQ R1,R1,#4...|
000195b0  10 41 44 44 20 52 35 2c  52 35 2c 52 38 0d 96 aa  |.ADD R5,R5,R8...|
000195c0  1e 53 55 42 53 20 52 31  32 2c 52 31 32 2c 23 31  |.SUBS R12,R12,#1|
000195d0  3a 42 4e 45 20 78 64 69  76 6c 70 0d 96 b4 0d 2e  |:BNE xdivlp.....|
000195e0  78 64 6f 6e 65 64 69 76  0d 96 be 12 53 54 4d 49  |xdonediv....STMI|
000195f0  41 20 52 32 21 2c 7b 52  35 7d 0d 96 c8 1f 53 55  |A R2!,{R5}....SU|
00019600  42 53 20 52 30 2c 52 30  2c 23 31 3a 42 50 4c 20  |BS R0,R0,#1:BPL |
00019610  78 73 61 6d 70 6c 65 6c  70 0d 96 d2 0f 4d 4f 56  |xsamplelp....MOV|
00019620  53 20 50 43 2c 52 31 34  0d 96 dc 05 5d 0d 96 e6  |S PC,R14....]...|
00019630  05 cd 0d 96 f0 07 c9 20  32 0d 96 fa 0f e7 69 6e  |....... 2.....in|
00019640  70 75 74 3c 3d 38 20 8c  0d 97 04 0a 5b 4f 50 54  |put<=8 .....[OPT|
00019650  20 5a 0d 97 0e 0c 2e 6d  61 70 70 69 78 25 0d 97  | Z.....mappix%..|
00019660  18 10 4c 44 52 20 52 30  2c 73 78 6c 6f 63 0d 97  |..LDR R0,sxloc..|
00019670  22 1b 4c 44 52 20 52 31  2c 5b 52 39 5d 3a 4c 44  |".LDR R1,[R9]:LD|
00019680  52 20 52 31 2c 5b 52 31  5d 0d 97 2c 14 4c 44 52  |R R1,[R1]..,.LDR|
00019690  20 52 32 2c 5b 52 39 2c  23 33 2a 38 5d 0d 97 36  | R2,[R9,#3*8]..6|
000196a0  14 4c 44 52 20 52 33 2c  5b 52 39 2c 23 32 2a 38  |.LDR R3,[R9,#2*8|
000196b0  5d 0d 97 40 12 4c 44 52  20 52 34 2c 5b 52 39 2c  |]..@.LDR R4,[R9,|
000196c0  23 38 5d 0d 97 4a 14 4c  44 52 20 52 35 2c 5b 52  |#8]..J.LDR R5,[R|
000196d0  39 2c 23 34 2a 38 5d 0d  97 54 0e 4d 4f 56 20 52  |9,#4*8]..T.MOV R|
000196e0  31 30 2c 23 30 0d 97 5e  0d 2e 6d 61 70 70 69 78  |10,#0..^..mappix|
000196f0  6c 70 0d 97 68 18 4c 44  52 42 20 52 36 2c 5b 52  |lp..h.LDRB R6,[R|
00019700  31 5d 2c 23 73 74 65 70  32 34 0d 97 72 05 5d 0d  |1],#step24..r.].|
00019710  97 7c 05 cd 0d 97 86 0e  c8 8e 20 69 6e 70 75 74  |.|........ input|
00019720  20 ca 0d 97 90 07 c9 20  38 0d 97 9a 0a e7 68 61  | ...... 8.....ha|
00019730  6d 20 8c 0d 97 a4 0a 5b  4f 50 54 20 5a 0d 97 ae  |m .....[OPT Z...|
00019740  11 41 44 52 20 52 39 2c  6c 74 61 62 6c 65 0d 97  |.ADR R9,ltable..|
00019750  b8 21 4d 4f 56 53 20 52  37 2c 52 36 2c 4c 53 52  |.!MOVS R7,R6,LSR|
00019760  20 23 34 3a 80 20 52 36  2c 52 36 2c 23 31 35 0d  | #4:. R6,R6,#15.|
00019770  97 c2 4e 4c 44 52 45 51  20 52 31 30 2c 5b 52 32  |..NLDREQ R10,[R2|
00019780  2c 52 36 2c 4c 53 4c 20  23 32 5d 3a 4c 44 52 45  |,R6,LSL #2]:LDRE|
00019790  51 20 52 31 31 2c 5b 52  33 2c 52 36 2c 4c 53 4c  |Q R11,[R3,R6,LSL|
000197a0  20 23 32 5d 3a 4c 44 52  45 51 20 52 31 32 2c 5b  | #2]:LDREQ R12,[|
000197b0  52 34 2c 52 36 2c 4c 53  4c 20 23 32 5d 0d 97 cc  |R4,R6,LSL #2]...|
000197c0  26 43 4d 50 20 52 37 2c  23 31 3a 4c 44 52 45 51  |&CMP R7,#1:LDREQ|
000197d0  20 52 31 32 2c 5b 52 39  2c 52 36 2c 4c 53 4c 20  | R12,[R9,R6,LSL |
000197e0  23 32 5d 0d 97 d6 26 43  4d 50 20 52 37 2c 23 32  |#2]...&CMP R7,#2|
000197f0  3a 4c 44 52 45 51 20 52  31 30 2c 5b 52 39 2c 52  |:LDREQ R10,[R9,R|
00019800  36 2c 4c 53 4c 20 23 32  5d 0d 97 e0 26 43 4d 50  |6,LSL #2]...&CMP|
00019810  20 52 37 2c 23 33 3a 4c  44 52 45 51 20 52 31 31  | R7,#3:LDREQ R11|
00019820  2c 5b 52 39 2c 52 36 2c  4c 53 4c 20 23 32 5d 0d  |,[R9,R6,LSL #2].|
00019830  97 ea 1b 53 54 4d 49 41  20 52 35 21 2c 7b 52 31  |...STMIA R5!,{R1|
00019840  30 2c 52 31 31 2c 52 31  32 7d 0d 97 f4 1e 53 55  |0,R11,R12}....SU|
00019850  42 53 20 52 30 2c 52 30  2c 23 31 3a 42 4e 45 20  |BS R0,R0,#1:BNE |
00019860  6d 61 70 70 69 78 6c 70  0d 97 fe 0f 4d 4f 56 53  |mappixlp....MOVS|
00019870  20 50 43 2c 52 31 34 0d  98 08 0b 2e 6c 74 61 62  | PC,R14.....ltab|
00019880  6c 65 0d 98 12 05 5d 0d  98 1c 0c e3 49 25 3d 30  |le....].....I%=0|
00019890  b8 31 35 0d 98 26 0a 5b  4f 50 54 20 5a 0d 98 30  |.15..&.[OPT Z..0|
000198a0  10 45 51 55 44 20 49 25  2f 31 35 2a 46 0d 98 3a  |.EQUD I%/15*F..:|
000198b0  05 5d 0d 98 44 05 ed 0d  98 4e 05 cc 0d 98 58 12  |.]..D....N....X.|
000198c0  e7 68 70 72 65 64 69 63  74 25 3d 32 20 8c 0d 98  |.hpredict%=2 ...|
000198d0  62 0a 5b 4f 50 54 20 5a  0d 98 6c 11 41 44 44 20  |b.[OPT Z..l.ADD |
000198e0  52 36 2c 52 36 2c 52 31  30 0d 98 76 10 80 20 52  |R6,R6,R10..v.. R|
000198f0  36 2c 52 36 2c 23 32 35  35 0d 98 80 0e 4d 4f 56  |6,R6,#255....MOV|
00019900  20 52 31 30 2c 52 36 0d  98 8a 05 5d 0d 98 94 05  | R10,R6....]....|
00019910  cd 0d 98 9e 0a 5b 4f 50  54 20 5a 0d 98 a8 45 4c  |.....[OPT Z...EL|
00019920  44 52 20 52 37 2c 5b 52  32 2c 52 36 2c 4c 53 4c  |DR R7,[R2,R6,LSL|
00019930  20 23 32 5d 3a 4c 44 52  20 52 38 2c 5b 52 33 2c  | #2]:LDR R8,[R3,|
00019940  52 36 2c 4c 53 4c 20 23  32 5d 3a 4c 44 52 20 52  |R6,LSL #2]:LDR R|
00019950  39 2c 5b 52 34 2c 52 36  2c 4c 53 4c 20 23 32 5d  |9,[R4,R6,LSL #2]|
00019960  0d 98 b2 18 53 54 4d 49  41 20 52 35 21 2c 7b 52  |....STMIA R5!,{R|
00019970  37 2c 52 38 2c 52 39 7d  0d 98 bc 1e 53 55 42 53  |7,R8,R9}....SUBS|
00019980  20 52 30 2c 52 30 2c 23  31 3a 42 4e 45 20 6d 61  | R0,R0,#1:BNE ma|
00019990  70 70 69 78 6c 70 0d 98  c6 0f 4d 4f 56 53 20 50  |ppixlp....MOVS P|
000199a0  43 2c 52 31 34 0d 98 d0  05 5d 0d 98 da 05 cd 0d  |C,R14....]......|
000199b0  98 e4 07 c9 20 34 0d 98  ee 14 e7 62 69 67 65 6e  |.... 4.....bigen|
000199c0  64 69 61 6e 62 69 74 73  20 8c 0d 98 f8 0a 5b 4f  |dianbits .....[O|
000199d0  50 54 20 5a 0d 99 02 15  4d 4f 56 20 52 31 30 2c  |PT Z....MOV R10,|
000199e0  52 36 2c 4c 53 52 20 23  34 0d 99 0c 48 4c 44 52  |R6,LSR #4...HLDR|
000199f0  20 52 37 2c 5b 52 32 2c  52 31 30 2c 4c 53 4c 20  | R7,[R2,R10,LSL |
00019a00  23 32 5d 3a 4c 44 52 20  52 38 2c 5b 52 33 2c 52  |#2]:LDR R8,[R3,R|
00019a10  31 30 2c 4c 53 4c 20 23  32 5d 3a 4c 44 52 20 52  |10,LSL #2]:LDR R|
00019a20  39 2c 5b 52 34 2c 52 31  30 2c 4c 53 4c 20 23 32  |9,[R4,R10,LSL #2|
00019a30  5d 0d 99 16 18 53 54 4d  49 41 20 52 35 21 2c 7b  |]....STMIA R5!,{|
00019a40  52 37 2c 52 38 2c 52 39  7d 0d 99 20 10 80 20 52  |R7,R8,R9}.. .. R|
00019a50  31 30 2c 52 36 2c 23 26  46 0d 99 2a 05 5d 0d 99  |10,R6,#&F..*.]..|
00019a60  34 05 cc 0d 99 3e 0a 5b  4f 50 54 20 5a 0d 99 48  |4....>.[OPT Z..H|
00019a70  10 80 20 52 31 30 2c 52  36 2c 23 26 46 0d 99 52  |.. R10,R6,#&F..R|
00019a80  48 4c 44 52 20 52 37 2c  5b 52 32 2c 52 31 30 2c  |HLDR R7,[R2,R10,|
00019a90  4c 53 4c 20 23 32 5d 3a  4c 44 52 20 52 38 2c 5b  |LSL #2]:LDR R8,[|
00019aa0  52 33 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 3a 4c  |R3,R10,LSL #2]:L|
00019ab0  44 52 20 52 39 2c 5b 52  34 2c 52 31 30 2c 4c 53  |DR R9,[R4,R10,LS|
00019ac0  4c 20 23 32 5d 0d 99 5c  18 53 54 4d 49 41 20 52  |L #2]..\.STMIA R|
00019ad0  35 21 2c 7b 52 37 2c 52  38 2c 52 39 7d 0d 99 66  |5!,{R7,R8,R9}..f|
00019ae0  15 4d 4f 56 20 52 31 30  2c 52 36 2c 4c 53 52 20  |.MOV R10,R6,LSR |
00019af0  23 34 0d 99 70 05 5d 0d  99 7a 05 cd 0d 99 84 0a  |#4..p.]..z......|
00019b00  5b 4f 50 54 20 5a 0d 99  8e 48 4c 44 52 20 52 37  |[OPT Z...HLDR R7|
00019b10  2c 5b 52 32 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R2,R10,LSL #2]|
00019b20  3a 4c 44 52 20 52 38 2c  5b 52 33 2c 52 31 30 2c  |:LDR R8,[R3,R10,|
00019b30  4c 53 4c 20 23 32 5d 3a  4c 44 52 20 52 39 2c 5b  |LSL #2]:LDR R9,[|
00019b40  52 34 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 0d 99  |R4,R10,LSL #2]..|
00019b50  98 18 53 54 4d 49 41 20  52 35 21 2c 7b 52 37 2c  |..STMIA R5!,{R7,|
00019b60  52 38 2c 52 39 7d 0d 99  a2 1e 53 55 42 53 20 52  |R8,R9}....SUBS R|
00019b70  30 2c 52 30 2c 23 32 3a  42 48 49 20 6d 61 70 70  |0,R0,#2:BHI mapp|
00019b80  69 78 6c 70 0d 99 ac 0f  4d 4f 56 53 20 50 43 2c  |ixlp....MOVS PC,|
00019b90  52 31 34 0d 99 b6 05 5d  0d 99 c0 07 c9 20 32 0d  |R14....]..... 2.|
00019ba0  99 ca 14 e7 62 69 67 65  6e 64 69 61 6e 62 69 74  |....bigendianbit|
00019bb0  73 20 8c 0d 99 d4 0a 5b  4f 50 54 20 5a 0d 99 de  |s .....[OPT Z...|
00019bc0  15 4d 4f 56 20 52 31 30  2c 52 36 2c 4c 53 52 20  |.MOV R10,R6,LSR |
00019bd0  23 36 0d 99 e8 48 4c 44  52 20 52 37 2c 5b 52 32  |#6...HLDR R7,[R2|
00019be0  2c 52 31 30 2c 4c 53 4c  20 23 32 5d 3a 4c 44 52  |,R10,LSL #2]:LDR|
00019bf0  20 52 38 2c 5b 52 33 2c  52 31 30 2c 4c 53 4c 20  | R8,[R3,R10,LSL |
00019c00  23 32 5d 3a 4c 44 52 20  52 39 2c 5b 52 34 2c 52  |#2]:LDR R9,[R4,R|
00019c10  31 30 2c 4c 53 4c 20 23  32 5d 0d 99 f2 18 53 54  |10,LSL #2]....ST|
00019c20  4d 49 41 20 52 35 21 2c  7b 52 37 2c 52 38 2c 52  |MIA R5!,{R7,R8,R|
00019c30  39 7d 0d 99 fc 11 80 20  52 31 30 2c 52 36 2c 23  |9}..... R10,R6,#|
00019c40  26 33 30 0d 9a 06 48 4c  44 52 20 52 37 2c 5b 52  |&30...HLDR R7,[R|
00019c50  32 2c 52 31 30 2c 4c 53  52 20 23 32 5d 3a 4c 44  |2,R10,LSR #2]:LD|
00019c60  52 20 52 38 2c 5b 52 33  2c 52 31 30 2c 4c 53 52  |R R8,[R3,R10,LSR|
00019c70  20 23 32 5d 3a 4c 44 52  20 52 39 2c 5b 52 34 2c  | #2]:LDR R9,[R4,|
00019c80  52 31 30 2c 4c 53 52 20  23 32 5d 0d 9a 10 18 53  |R10,LSR #2]....S|
00019c90  54 4d 49 41 20 52 35 21  2c 7b 52 37 2c 52 38 2c  |TMIA R5!,{R7,R8,|
00019ca0  52 39 7d 0d 9a 1a 10 80  20 52 31 30 2c 52 36 2c  |R9}..... R10,R6,|
00019cb0  23 26 43 0d 9a 24 33 4c  44 52 20 52 37 2c 5b 52  |#&C..$3LDR R7,[R|
00019cc0  32 2c 52 31 30 5d 3a 4c  44 52 20 52 38 2c 5b 52  |2,R10]:LDR R8,[R|
00019cd0  33 2c 52 31 30 5d 3a 4c  44 52 20 52 39 2c 5b 52  |3,R10]:LDR R9,[R|
00019ce0  34 2c 52 31 30 5d 0d 9a  2e 18 53 54 4d 49 41 20  |4,R10]....STMIA |
00019cf0  52 35 21 2c 7b 52 37 2c  52 38 2c 52 39 7d 0d 9a  |R5!,{R7,R8,R9}..|
00019d00  38 10 80 20 52 31 30 2c  52 36 2c 23 26 33 0d 9a  |8.. R10,R6,#&3..|
00019d10  42 05 5d 0d 9a 4c 05 cc  0d 9a 56 0a 5b 4f 50 54  |B.]..L....V.[OPT|
00019d20  20 5a 0d 9a 60 10 80 20  52 31 30 2c 52 36 2c 23  | Z..`.. R10,R6,#|
00019d30  26 33 0d 9a 6a 48 4c 44  52 20 52 37 2c 5b 52 32  |&3..jHLDR R7,[R2|
00019d40  2c 52 31 30 2c 4c 53 4c  20 23 32 5d 3a 4c 44 52  |,R10,LSL #2]:LDR|
00019d50  20 52 38 2c 5b 52 33 2c  52 31 30 2c 4c 53 4c 20  | R8,[R3,R10,LSL |
00019d60  23 32 5d 3a 4c 44 52 20  52 39 2c 5b 52 34 2c 52  |#2]:LDR R9,[R4,R|
00019d70  31 30 2c 4c 53 4c 20 23  32 5d 0d 9a 74 18 53 54  |10,LSL #2]..t.ST|
00019d80  4d 49 41 20 52 35 21 2c  7b 52 37 2c 52 38 2c 52  |MIA R5!,{R7,R8,R|
00019d90  39 7d 0d 9a 7e 10 80 20  52 31 30 2c 52 36 2c 23  |9}..~.. R10,R6,#|
00019da0  26 43 0d 9a 88 33 4c 44  52 20 52 37 2c 5b 52 32  |&C...3LDR R7,[R2|
00019db0  2c 52 31 30 5d 3a 4c 44  52 20 52 38 2c 5b 52 33  |,R10]:LDR R8,[R3|
00019dc0  2c 52 31 30 5d 3a 4c 44  52 20 52 39 2c 5b 52 34  |,R10]:LDR R9,[R4|
00019dd0  2c 52 31 30 5d 0d 9a 92  18 53 54 4d 49 41 20 52  |,R10]....STMIA R|
00019de0  35 21 2c 7b 52 37 2c 52  38 2c 52 39 7d 0d 9a 9c  |5!,{R7,R8,R9}...|
00019df0  11 80 20 52 31 30 2c 52  36 2c 23 26 33 30 0d 9a  |.. R10,R6,#&30..|
00019e00  a6 48 4c 44 52 20 52 37  2c 5b 52 32 2c 52 31 30  |.HLDR R7,[R2,R10|
00019e10  2c 4c 53 52 20 23 32 5d  3a 4c 44 52 20 52 38 2c  |,LSR #2]:LDR R8,|
00019e20  5b 52 33 2c 52 31 30 2c  4c 53 52 20 23 32 5d 3a  |[R3,R10,LSR #2]:|
00019e30  4c 44 52 20 52 39 2c 5b  52 34 2c 52 31 30 2c 4c  |LDR R9,[R4,R10,L|
00019e40  53 52 20 23 32 5d 0d 9a  b0 18 53 54 4d 49 41 20  |SR #2]....STMIA |
00019e50  52 35 21 2c 7b 52 37 2c  52 38 2c 52 39 7d 0d 9a  |R5!,{R7,R8,R9}..|
00019e60  ba 15 4d 4f 56 20 52 31  30 2c 52 36 2c 4c 53 52  |..MOV R10,R6,LSR|
00019e70  20 23 36 0d 9a c4 05 5d  0d 9a ce 05 cd 0d 9a d8  | #6....]........|
00019e80  0a 5b 4f 50 54 20 5a 0d  9a e2 48 4c 44 52 20 52  |.[OPT Z...HLDR R|
00019e90  37 2c 5b 52 32 2c 52 31  30 2c 4c 53 4c 20 23 32  |7,[R2,R10,LSL #2|
00019ea0  5d 3a 4c 44 52 20 52 38  2c 5b 52 33 2c 52 31 30  |]:LDR R8,[R3,R10|
00019eb0  2c 4c 53 4c 20 23 32 5d  3a 4c 44 52 20 52 39 2c  |,LSL #2]:LDR R9,|
00019ec0  5b 52 34 2c 52 31 30 2c  4c 53 4c 20 23 32 5d 0d  |[R4,R10,LSL #2].|
00019ed0  9a ec 18 53 54 4d 49 41  20 52 35 21 2c 7b 52 37  |...STMIA R5!,{R7|
00019ee0  2c 52 38 2c 52 39 7d 0d  9a f6 1e 53 55 42 53 20  |,R8,R9}....SUBS |
00019ef0  52 30 2c 52 30 2c 23 34  3a 42 48 49 20 6d 61 70  |R0,R0,#4:BHI map|
00019f00  70 69 78 6c 70 0d 9b 00  0f 4d 4f 56 53 20 50 43  |pixlp....MOVS PC|
00019f10  2c 52 31 34 0d 9b 0a 05  5d 0d 9b 14 07 c9 20 31  |,R14....]..... 1|
00019f20  0d 9b 1e 14 e7 62 69 67  65 6e 64 69 61 6e 62 69  |.....bigendianbi|
00019f30  74 73 20 8c 0d 9b 28 0a  5b 4f 50 54 20 5a 0d 9b  |ts ...(.[OPT Z..|
00019f40  32 11 80 20 52 31 30 2c  52 36 2c 23 26 38 30 0d  |2.. R10,R6,#&80.|
00019f50  9b 3c 48 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |.<HLDR R7,[R2,R1|
00019f60  30 2c 4c 53 52 20 23 35  5d 3a 4c 44 52 20 52 38  |0,LSR #5]:LDR R8|
00019f70  2c 5b 52 33 2c 52 31 30  2c 4c 53 52 20 23 35 5d  |,[R3,R10,LSR #5]|
00019f80  3a 4c 44 52 20 52 39 2c  5b 52 34 2c 52 31 30 2c  |:LDR R9,[R4,R10,|
00019f90  4c 53 52 20 23 35 5d 0d  9b 46 18 53 54 4d 49 41  |LSR #5]..F.STMIA|
00019fa0  20 52 35 21 2c 7b 52 37  2c 52 38 2c 52 39 7d 0d  | R5!,{R7,R8,R9}.|
00019fb0  9b 50 11 80 20 52 31 30  2c 52 36 2c 23 26 34 30  |.P.. R10,R6,#&40|
00019fc0  0d 9b 5a 48 4c 44 52 20  52 37 2c 5b 52 32 2c 52  |..ZHLDR R7,[R2,R|
00019fd0  31 30 2c 4c 53 52 20 23  34 5d 3a 4c 44 52 20 52  |10,LSR #4]:LDR R|
00019fe0  38 2c 5b 52 33 2c 52 31  30 2c 4c 53 52 20 23 34  |8,[R3,R10,LSR #4|
00019ff0  5d 3a 4c 44 52 20 52 39  2c 5b 52 34 2c 52 31 30  |]:LDR R9,[R4,R10|
0001a000  2c 4c 53 52 20 23 34 5d  0d 9b 64 18 53 54 4d 49  |,LSR #4]..d.STMI|
0001a010  41 20 52 35 21 2c 7b 52  37 2c 52 38 2c 52 39 7d  |A R5!,{R7,R8,R9}|
0001a020  0d 9b 6e 11 80 20 52 31  30 2c 52 36 2c 23 26 32  |..n.. R10,R6,#&2|
0001a030  30 0d 9b 78 48 4c 44 52  20 52 37 2c 5b 52 32 2c  |0..xHLDR R7,[R2,|
0001a040  52 31 30 2c 4c 53 52 20  23 33 5d 3a 4c 44 52 20  |R10,LSR #3]:LDR |
0001a050  52 38 2c 5b 52 33 2c 52  31 30 2c 4c 53 52 20 23  |R8,[R3,R10,LSR #|
0001a060  33 5d 3a 4c 44 52 20 52  39 2c 5b 52 34 2c 52 31  |3]:LDR R9,[R4,R1|
0001a070  30 2c 4c 53 52 20 23 33  5d 0d 9b 82 18 53 54 4d  |0,LSR #3]....STM|
0001a080  49 41 20 52 35 21 2c 7b  52 37 2c 52 38 2c 52 39  |IA R5!,{R7,R8,R9|
0001a090  7d 0d 9b 8c 11 80 20 52  31 30 2c 52 36 2c 23 26  |}..... R10,R6,#&|
0001a0a0  31 30 0d 9b 96 48 4c 44  52 20 52 37 2c 5b 52 32  |10...HLDR R7,[R2|
0001a0b0  2c 52 31 30 2c 4c 53 52  20 23 32 5d 3a 4c 44 52  |,R10,LSR #2]:LDR|
0001a0c0  20 52 38 2c 5b 52 33 2c  52 31 30 2c 4c 53 52 20  | R8,[R3,R10,LSR |
0001a0d0  23 32 5d 3a 4c 44 52 20  52 39 2c 5b 52 34 2c 52  |#2]:LDR R9,[R4,R|
0001a0e0  31 30 2c 4c 53 52 20 23  32 5d 0d 9b a0 18 53 54  |10,LSR #2]....ST|
0001a0f0  4d 49 41 20 52 35 21 2c  7b 52 37 2c 52 38 2c 52  |MIA R5!,{R7,R8,R|
0001a100  39 7d 0d 9b aa 10 80 20  52 31 30 2c 52 36 2c 23  |9}..... R10,R6,#|
0001a110  26 38 0d 9b b4 48 4c 44  52 20 52 37 2c 5b 52 32  |&8...HLDR R7,[R2|
0001a120  2c 52 31 30 2c 4c 53 52  20 23 31 5d 3a 4c 44 52  |,R10,LSR #1]:LDR|
0001a130  20 52 38 2c 5b 52 33 2c  52 31 30 2c 4c 53 52 20  | R8,[R3,R10,LSR |
0001a140  23 31 5d 3a 4c 44 52 20  52 39 2c 5b 52 34 2c 52  |#1]:LDR R9,[R4,R|
0001a150  31 30 2c 4c 53 52 20 23  31 5d 0d 9b be 18 53 54  |10,LSR #1]....ST|
0001a160  4d 49 41 20 52 35 21 2c  7b 52 37 2c 52 38 2c 52  |MIA R5!,{R7,R8,R|
0001a170  39 7d 0d 9b c8 10 80 20  52 31 30 2c 52 36 2c 23  |9}..... R10,R6,#|
0001a180  26 34 0d 9b d2 33 4c 44  52 20 52 37 2c 5b 52 32  |&4...3LDR R7,[R2|
0001a190  2c 52 31 30 5d 3a 4c 44  52 20 52 38 2c 5b 52 33  |,R10]:LDR R8,[R3|
0001a1a0  2c 52 31 30 5d 3a 4c 44  52 20 52 39 2c 5b 52 34  |,R10]:LDR R9,[R4|
0001a1b0  2c 52 31 30 5d 0d 9b dc  18 53 54 4d 49 41 20 52  |,R10]....STMIA R|
0001a1c0  35 21 2c 7b 52 37 2c 52  38 2c 52 39 7d 0d 9b e6  |5!,{R7,R8,R9}...|
0001a1d0  10 80 20 52 31 30 2c 52  36 2c 23 26 32 0d 9b f0  |.. R10,R6,#&2...|
0001a1e0  48 4c 44 52 20 52 37 2c  5b 52 32 2c 52 31 30 2c  |HLDR R7,[R2,R10,|
0001a1f0  4c 53 4c 20 23 31 5d 3a  4c 44 52 20 52 38 2c 5b  |LSL #1]:LDR R8,[|
0001a200  52 33 2c 52 31 30 2c 4c  53 4c 20 23 31 5d 3a 4c  |R3,R10,LSL #1]:L|
0001a210  44 52 20 52 39 2c 5b 52  34 2c 52 31 30 2c 4c 53  |DR R9,[R4,R10,LS|
0001a220  4c 20 23 31 5d 0d 9b fa  18 53 54 4d 49 41 20 52  |L #1]....STMIA R|
0001a230  35 21 2c 7b 52 37 2c 52  38 2c 52 39 7d 0d 9c 04  |5!,{R7,R8,R9}...|
0001a240  10 80 20 52 31 30 2c 52  36 2c 23 26 31 0d 9c 0e  |.. R10,R6,#&1...|
0001a250  05 5d 0d 9c 18 05 cc 0d  9c 22 0a 5b 4f 50 54 20  |.].......".[OPT |
0001a260  5a 0d 9c 2c 10 80 20 52  31 30 2c 52 36 2c 23 26  |Z..,.. R10,R6,#&|
0001a270  31 0d 9c 36 48 4c 44 52  20 52 37 2c 5b 52 32 2c  |1..6HLDR R7,[R2,|
0001a280  52 31 30 2c 4c 53 4c 20  23 32 5d 3a 4c 44 52 20  |R10,LSL #2]:LDR |
0001a290  52 38 2c 5b 52 33 2c 52  31 30 2c 4c 53 4c 20 23  |R8,[R3,R10,LSL #|
0001a2a0  32 5d 3a 4c 44 52 20 52  39 2c 5b 52 34 2c 52 31  |2]:LDR R9,[R4,R1|
0001a2b0  30 2c 4c 53 4c 20 23 32  5d 0d 9c 40 18 53 54 4d  |0,LSL #2]..@.STM|
0001a2c0  49 41 20 52 35 21 2c 7b  52 37 2c 52 38 2c 52 39  |IA R5!,{R7,R8,R9|
0001a2d0  7d 0d 9c 4a 10 80 20 52  31 30 2c 52 36 2c 23 26  |}..J.. R10,R6,#&|
0001a2e0  32 0d 9c 54 48 4c 44 52  20 52 37 2c 5b 52 32 2c  |2..THLDR R7,[R2,|
0001a2f0  52 31 30 2c 4c 53 4c 20  23 31 5d 3a 4c 44 52 20  |R10,LSL #1]:LDR |
0001a300  52 38 2c 5b 52 33 2c 52  31 30 2c 4c 53 4c 20 23  |R8,[R3,R10,LSL #|
0001a310  31 5d 3a 4c 44 52 20 52  39 2c 5b 52 34 2c 52 31  |1]:LDR R9,[R4,R1|
0001a320  30 2c 4c 53 4c 20 23 31  5d 0d 9c 5e 18 53 54 4d  |0,LSL #1]..^.STM|
0001a330  49 41 20 52 35 21 2c 7b  52 37 2c 52 38 2c 52 39  |IA R5!,{R7,R8,R9|
0001a340  7d 0d 9c 68 10 80 20 52  31 30 2c 52 36 2c 23 26  |}..h.. R10,R6,#&|
0001a350  34 0d 9c 72 33 4c 44 52  20 52 37 2c 5b 52 32 2c  |4..r3LDR R7,[R2,|
0001a360  52 31 30 5d 3a 4c 44 52  20 52 38 2c 5b 52 33 2c  |R10]:LDR R8,[R3,|
0001a370  52 31 30 5d 3a 4c 44 52  20 52 39 2c 5b 52 34 2c  |R10]:LDR R9,[R4,|
0001a380  52 31 30 5d 0d 9c 7c 18  53 54 4d 49 41 20 52 35  |R10]..|.STMIA R5|
0001a390  21 2c 7b 52 37 2c 52 38  2c 52 39 7d 0d 9c 86 10  |!,{R7,R8,R9}....|
0001a3a0  80 20 52 31 30 2c 52 36  2c 23 26 38 0d 9c 90 48  |. R10,R6,#&8...H|
0001a3b0  4c 44 52 20 52 37 2c 5b  52 32 2c 52 31 30 2c 4c  |LDR R7,[R2,R10,L|
0001a3c0  53 52 20 23 31 5d 3a 4c  44 52 20 52 38 2c 5b 52  |SR #1]:LDR R8,[R|
0001a3d0  33 2c 52 31 30 2c 4c 53  52 20 23 31 5d 3a 4c 44  |3,R10,LSR #1]:LD|
0001a3e0  52 20 52 39 2c 5b 52 34  2c 52 31 30 2c 4c 53 52  |R R9,[R4,R10,LSR|
0001a3f0  20 23 31 5d 0d 9c 9a 18  53 54 4d 49 41 20 52 35  | #1]....STMIA R5|
0001a400  21 2c 7b 52 37 2c 52 38  2c 52 39 7d 0d 9c a4 11  |!,{R7,R8,R9}....|
0001a410  80 20 52 31 30 2c 52 36  2c 23 26 31 30 0d 9c ae  |. R10,R6,#&10...|
0001a420  48 4c 44 52 20 52 37 2c  5b 52 32 2c 52 31 30 2c  |HLDR R7,[R2,R10,|
0001a430  4c 53 52 20 23 32 5d 3a  4c 44 52 20 52 38 2c 5b  |LSR #2]:LDR R8,[|
0001a440  52 33 2c 52 31 30 2c 4c  53 52 20 23 32 5d 3a 4c  |R3,R10,LSR #2]:L|
0001a450  44 52 20 52 39 2c 5b 52  34 2c 52 31 30 2c 4c 53  |DR R9,[R4,R10,LS|
0001a460  52 20 23 32 5d 0d 9c b8  18 53 54 4d 49 41 20 52  |R #2]....STMIA R|
0001a470  35 21 2c 7b 52 37 2c 52  38 2c 52 39 7d 0d 9c c2  |5!,{R7,R8,R9}...|
0001a480  11 80 20 52 31 30 2c 52  36 2c 23 26 32 30 0d 9c  |.. R10,R6,#&20..|
0001a490  cc 48 4c 44 52 20 52 37  2c 5b 52 32 2c 52 31 30  |.HLDR R7,[R2,R10|
0001a4a0  2c 4c 53 52 20 23 33 5d  3a 4c 44 52 20 52 38 2c  |,LSR #3]:LDR R8,|
0001a4b0  5b 52 33 2c 52 31 30 2c  4c 53 52 20 23 33 5d 3a  |[R3,R10,LSR #3]:|
0001a4c0  4c 44 52 20 52 39 2c 5b  52 34 2c 52 31 30 2c 4c  |LDR R9,[R4,R10,L|
0001a4d0  53 52 20 23 33 5d 0d 9c  d6 18 53 54 4d 49 41 20  |SR #3]....STMIA |
0001a4e0  52 35 21 2c 7b 52 37 2c  52 38 2c 52 39 7d 0d 9c  |R5!,{R7,R8,R9}..|
0001a4f0  e0 11 80 20 52 31 30 2c  52 36 2c 23 26 34 30 0d  |... R10,R6,#&40.|
0001a500  9c ea 48 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |..HLDR R7,[R2,R1|
0001a510  30 2c 4c 53 52 20 23 34  5d 3a 4c 44 52 20 52 38  |0,LSR #4]:LDR R8|
0001a520  2c 5b 52 33 2c 52 31 30  2c 4c 53 52 20 23 34 5d  |,[R3,R10,LSR #4]|
0001a530  3a 4c 44 52 20 52 39 2c  5b 52 34 2c 52 31 30 2c  |:LDR R9,[R4,R10,|
0001a540  4c 53 52 20 23 34 5d 0d  9c f4 18 53 54 4d 49 41  |LSR #4]....STMIA|
0001a550  20 52 35 21 2c 7b 52 37  2c 52 38 2c 52 39 7d 0d  | R5!,{R7,R8,R9}.|
0001a560  9c fe 15 4d 4f 56 20 52  31 30 2c 52 36 2c 4c 53  |...MOV R10,R6,LS|
0001a570  52 20 23 37 0d 9d 08 05  5d 0d 9d 12 05 cd 0d 9d  |R #7....].......|
0001a580  1c 0a 5b 4f 50 54 20 5a  0d 9d 26 48 4c 44 52 20  |..[OPT Z..&HLDR |
0001a590  52 37 2c 5b 52 32 2c 52  31 30 2c 4c 53 4c 20 23  |R7,[R2,R10,LSL #|
0001a5a0  32 5d 3a 4c 44 52 20 52  38 2c 5b 52 33 2c 52 31  |2]:LDR R8,[R3,R1|
0001a5b0  30 2c 4c 53 4c 20 23 32  5d 3a 4c 44 52 20 52 39  |0,LSL #2]:LDR R9|
0001a5c0  2c 5b 52 34 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R4,R10,LSL #2]|
0001a5d0  0d 9d 30 18 53 54 4d 49  41 20 52 35 21 2c 7b 52  |..0.STMIA R5!,{R|
0001a5e0  37 2c 52 38 2c 52 39 7d  0d 9d 3a 1e 53 55 42 53  |7,R8,R9}..:.SUBS|
0001a5f0  20 52 30 2c 52 30 2c 23  38 3a 42 48 49 20 6d 61  | R0,R0,#8:BHI ma|
0001a600  70 70 69 78 6c 70 0d 9d  44 0f 4d 4f 56 53 20 50  |ppixlp..D.MOVS P|
0001a610  43 2c 52 31 34 0d 9d 4e  05 5d 0d 9d 58 08 c9 20  |C,R14..N.]..X.. |
0001a620  31 36 0d 9d 62 0a 5b 4f  50 54 20 5a 0d 9d 6c 0c  |16..b.[OPT Z..l.|
0001a630  2e 6d 61 70 70 69 78 25  0d 9d 76 10 4c 44 52 20  |.mappix%..v.LDR |
0001a640  52 30 2c 73 78 6c 6f 63  0d 9d 80 1b 4c 44 52 20  |R0,sxloc....LDR |
0001a650  52 31 2c 5b 52 39 5d 3a  4c 44 52 20 52 31 2c 5b  |R1,[R9]:LDR R1,[|
0001a660  52 31 5d 0d 9d 8a 1e 4c  44 52 20 52 32 2c 5b 52  |R1]....LDR R2,[R|
0001a670  39 2c 23 38 5d 3a 4c 44  52 20 52 32 2c 5b 52 32  |9,#8]:LDR R2,[R2|
0001a680  5d 0d 9d 94 14 4c 44 52  20 52 33 2c 5b 52 39 2c  |]....LDR R3,[R9,|
0001a690  23 34 2a 38 5d 0d 9d 9e  14 4c 44 52 20 52 34 2c  |#4*8]....LDR R4,|
0001a6a0  5b 52 39 2c 23 33 2a 38  5d 0d 9d a8 14 4c 44 52  |[R9,#3*8]....LDR|
0001a6b0  20 52 35 2c 5b 52 39 2c  23 32 2a 38 5d 0d 9d b2  | R5,[R9,#2*8]...|
0001a6c0  14 4c 44 52 20 52 36 2c  5b 52 39 2c 23 35 2a 38  |.LDR R6,[R9,#5*8|
0001a6d0  5d 0d 9d bc 14 4c 44 52  20 52 37 2c 5b 52 39 2c  |]....LDR R7,[R9,|
0001a6e0  23 36 2a 38 5d 0d 9d c6  14 4c 44 52 20 52 38 2c  |#6*8]....LDR R8,|
0001a6f0  5b 52 39 2c 23 37 2a 38  5d 0d 9d d0 0d 43 4d 50  |[R9,#7*8]....CMP|
0001a700  20 52 31 2c 52 32 0d 9d  da 12 41 44 44 45 51 20  | R1,R2....ADDEQ |
0001a710  52 32 2c 52 32 2c 23 31  0d 9d e4 0d 2e 6d 61 70  |R2,R2,#1.....map|
0001a720  70 69 78 6c 70 0d 9d ee  2e 4c 44 52 42 20 52 39  |pixlp....LDRB R9|
0001a730  2c 5b 52 31 5d 2c 23 73  74 65 70 32 34 3a 4c 44  |,[R1],#step24:LD|
0001a740  52 42 20 52 31 30 2c 5b  52 32 5d 2c 23 73 74 65  |RB R10,[R2],#ste|
0001a750  70 32 34 0d 9d f8 3e 4c  44 52 20 52 39 2c 5b 52  |p24...>LDR R9,[R|
0001a760  36 2c 52 39 2c 4c 53 4c  20 23 32 5d 3a 4c 44 52  |6,R9,LSL #2]:LDR|
0001a770  20 52 31 30 2c 5b 52 37  2c 52 31 30 2c 4c 53 4c  | R10,[R7,R10,LSL|
0001a780  20 23 32 5d 3a 84 52 20  52 39 2c 52 39 2c 52 31  | #2]:.R R9,R9,R1|
0001a790  30 0d 9e 02 29 80 20 52  31 30 2c 52 39 2c 23 32  |0...). R10,R9,#2|
0001a7a0  35 35 3a 4c 44 52 20 52  31 30 2c 5b 52 33 2c 52  |55:LDR R10,[R3,R|
0001a7b0  31 30 2c 4c 53 4c 20 23  32 5d 0d 9e 0c 3c 4d 4f  |10,LSL #2]...<MO|
0001a7c0  56 20 52 31 31 2c 52 39  2c 4c 53 52 20 23 38 3a  |V R11,R9,LSR #8:|
0001a7d0  80 20 52 31 31 2c 52 31  31 2c 23 32 35 35 3a 4c  |. R11,R11,#255:L|
0001a7e0  44 52 20 52 31 31 2c 5b  52 34 2c 52 31 31 2c 4c  |DR R11,[R4,R11,L|
0001a7f0  53 4c 20 23 32 5d 0d 9e  16 2e 4d 4f 56 20 52 31  |SL #2]....MOV R1|
0001a800  32 2c 52 39 2c 4c 53 52  20 23 31 36 3a 4c 44 52  |2,R9,LSR #16:LDR|
0001a810  20 52 31 32 2c 5b 52 35  2c 52 31 32 2c 4c 53 4c  | R12,[R5,R12,LSL|
0001a820  20 23 32 5d 0d 9e 20 1b  53 54 4d 49 41 20 52 38  | #2].. .STMIA R8|
0001a830  21 2c 7b 52 31 30 2c 52  31 31 2c 52 31 32 7d 0d  |!,{R10,R11,R12}.|
0001a840  9e 2a 1e 53 55 42 53 20  52 30 2c 52 30 2c 23 31  |.*.SUBS R0,R0,#1|
0001a850  3a 42 4e 45 20 6d 61 70  70 69 78 6c 70 0d 9e 34  |:BNE mappixlp..4|
0001a860  0f 4d 4f 56 53 20 50 43  2c 52 31 34 0d 9e 3e 05  |.MOVS PC,R14..>.|
0001a870  5d 0d 9e 48 08 c9 20 32  34 0d 9e 52 0a 5b 4f 50  |]..H.. 24..R.[OP|
0001a880  54 20 5a 0d 9e 5c 0c 2e  6d 61 70 70 69 78 25 0d  |T Z..\..mappix%.|
0001a890  9e 66 10 4c 44 52 20 52  30 2c 73 78 6c 6f 63 0d  |.f.LDR R0,sxloc.|
0001a8a0  9e 70 20 4c 44 52 20 52  31 2c 5b 52 39 2c 23 32  |.p LDR R1,[R9,#2|
0001a8b0  2a 38 5d 3a 4c 44 52 20  52 31 2c 5b 52 31 5d 0d  |*8]:LDR R1,[R1].|
0001a8c0  9e 7a 1e 4c 44 52 20 52  32 2c 5b 52 39 2c 23 38  |.z.LDR R2,[R9,#8|
0001a8d0  5d 3a 4c 44 52 20 52 32  2c 5b 52 32 5d 0d 9e 84  |]:LDR R2,[R2]...|
0001a8e0  1b 4c 44 52 20 52 33 2c  5b 52 39 5d 3a 4c 44 52  |.LDR R3,[R9]:LDR|
0001a8f0  20 52 33 2c 5b 52 33 5d  0d 9e 8e 14 4c 44 52 20  | R3,[R3]....LDR |
0001a900  52 34 2c 5b 52 39 2c 23  35 2a 38 5d 0d 9e 98 14  |R4,[R9,#5*8]....|
0001a910  4c 44 52 20 52 35 2c 5b  52 39 2c 23 34 2a 38 5d  |LDR R5,[R9,#4*8]|
0001a920  0d 9e a2 14 4c 44 52 20  52 36 2c 5b 52 39 2c 23  |....LDR R6,[R9,#|
0001a930  33 2a 38 5d 0d 9e ac 14  4c 44 52 20 52 37 2c 5b  |3*8]....LDR R7,[|
0001a940  52 39 2c 23 36 2a 38 5d  0d 9e b6 14 53 54 4d 46  |R9,#6*8]....STMF|
0001a950  44 20 53 50 20 21 2c 7b  52 31 34 7d 0d 9e c0 24  |D SP !,{R14}...$|
0001a960  4d 4f 56 20 72 31 31 2c  23 30 3a 4d 4f 56 20 52  |MOV r11,#0:MOV R|
0001a970  31 32 2c 23 30 3a 4d 4f  56 20 52 31 34 2c 23 30  |12,#0:MOV R14,#0|
0001a980  0d 9e ca 0d 2e 6d 61 70  70 69 78 6c 70 0d 9e d4  |.....mappixlp...|
0001a990  43 4c 44 52 42 20 52 38  2c 5b 52 31 5d 2c 23 73  |CLDRB R8,[R1],#s|
0001a9a0  74 65 70 32 34 3a 4c 44  52 42 20 52 39 2c 5b 52  |tep24:LDRB R9,[R|
0001a9b0  32 5d 2c 23 73 74 65 70  32 34 3a 4c 44 52 42 20  |2],#step24:LDRB |
0001a9c0  52 31 30 2c 5b 52 33 5d  2c 23 73 74 65 70 32 34  |R10,[R3],#step24|
0001a9d0  0d 9e de 05 5d 0d 9e e8  12 e7 68 70 72 65 64 69  |....].....hpredi|
0001a9e0  63 74 25 3d 32 20 8c 0d  9e f2 0a 5b 4f 50 54 20  |ct%=2 .....[OPT |
0001a9f0  5a 0d 9e fc 11 41 44 44  20 72 38 2c 72 38 2c 72  |Z....ADD r8,r8,r|
0001aa00  31 31 0d 9f 06 10 80 20  72 38 2c 72 38 2c 23 32  |11..... r8,r8,#2|
0001aa10  35 35 0d 9f 10 0e 4d 4f  56 20 72 31 31 2c 72 38  |55....MOV r11,r8|
0001aa20  0d 9f 1a 11 41 44 44 20  72 39 2c 72 39 2c 72 31  |....ADD r9,r9,r1|
0001aa30  32 0d 9f 24 10 80 20 72  39 2c 72 39 2c 23 32 35  |2..$.. r9,r9,#25|
0001aa40  35 0d 9f 2e 0e 4d 4f 56  20 72 31 32 2c 72 39 0d  |5....MOV r12,r9.|
0001aa50  9f 38 13 41 44 44 20 72  31 30 2c 72 31 30 2c 72  |.8.ADD r10,r10,r|
0001aa60  31 34 0d 9f 42 12 80 20  72 31 30 2c 72 31 30 2c  |14..B.. r10,r10,|
0001aa70  23 32 35 35 0d 9f 4c 0f  4d 4f 56 20 72 31 34 2c  |#255..L.MOV r14,|
0001aa80  72 31 30 0d 9f 56 05 5d  0d 9f 60 05 cd 0d 9f 6a  |r10..V.]..`....j|
0001aa90  0a 5b 4f 50 54 20 5a 0d  9f 74 47 4c 44 52 20 52  |.[OPT Z..tGLDR R|
0001aaa0  38 2c 5b 52 34 2c 52 38  2c 4c 53 4c 20 23 32 5d  |8,[R4,R8,LSL #2]|
0001aab0  3a 4c 44 52 20 52 39 2c  5b 52 35 2c 52 39 2c 4c  |:LDR R9,[R5,R9,L|
0001aac0  53 4c 20 23 32 5d 3a 4c  44 52 20 52 31 30 2c 5b  |SL #2]:LDR R10,[|
0001aad0  52 36 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 0d 9f  |R6,R10,LSL #2]..|
0001aae0  7e 19 53 54 4d 49 41 20  52 37 21 2c 7b 52 38 2c  |~.STMIA R7!,{R8,|
0001aaf0  52 39 2c 52 31 30 7d 0d  9f 88 1e 53 55 42 53 20  |R9,R10}....SUBS |
0001ab00  52 30 2c 52 30 2c 23 31  3a 42 4e 45 20 6d 61 70  |R0,R0,#1:BNE map|
0001ab10  70 69 78 6c 70 0d 9f 92  14 4c 44 4d 46 44 20 53  |pixlp....LDMFD S|
0001ab20  50 20 21 2c 7b 50 43 7d  5e 0d 9f 9c 05 5d 0d 9f  |P !,{PC}^....]..|
0001ab30  a6 08 c9 20 34 38 0d 9f  b0 0a 5b 4f 50 54 20 5a  |... 48....[OPT Z|
0001ab40  0d 9f ba 0c 2e 6d 61 70  70 69 78 25 0d 9f c4 10  |.....mappix%....|
0001ab50  4c 44 52 20 52 30 2c 73  78 6c 6f 63 0d 9f ce 20  |LDR R0,sxloc... |
0001ab60  4c 44 52 20 52 31 2c 5b  52 39 2c 23 32 2a 38 5d  |LDR R1,[R9,#2*8]|
0001ab70  3a 4c 44 52 20 52 31 2c  5b 52 31 5d 0d 9f d8 1e  |:LDR R1,[R1]....|
0001ab80  4c 44 52 20 52 32 2c 5b  52 39 2c 23 38 5d 3a 4c  |LDR R2,[R9,#8]:L|
0001ab90  44 52 20 52 32 2c 5b 52  32 5d 0d 9f e2 1b 4c 44  |DR R2,[R2]....LD|
0001aba0  52 20 52 33 2c 5b 52 39  5d 3a 4c 44 52 20 52 33  |R R3,[R9]:LDR R3|
0001abb0  2c 5b 52 33 5d 0d 9f ec  14 4c 44 52 20 52 34 2c  |,[R3]....LDR R4,|
0001abc0  5b 52 39 2c 23 35 2a 38  5d 0d 9f f6 14 4c 44 52  |[R9,#5*8]....LDR|
0001abd0  20 52 35 2c 5b 52 39 2c  23 34 2a 38 5d 0d a0 00  | R5,[R9,#4*8]...|
0001abe0  14 4c 44 52 20 52 36 2c  5b 52 39 2c 23 33 2a 38  |.LDR R6,[R9,#3*8|
0001abf0  5d 0d a0 0a 14 4c 44 52  20 52 37 2c 5b 52 39 2c  |]....LDR R7,[R9,|
0001ac00  23 36 2a 38 5d 0d a0 14  14 53 54 4d 46 44 20 53  |#6*8]....STMFD S|
0001ac10  50 20 21 2c 7b 52 31 34  7d 0d a0 1e 3f 4d 4f 56  |P !,{R14}...?MOV|
0001ac20  20 72 31 31 2c 23 63 6f  6c 6f 75 72 69 6e 64 65  | r11,#colourinde|
0001ac30  78 20 80 20 32 35 35 3a  41 44 44 20 72 31 31 2c  |x . 255:ADD r11,|
0001ac40  72 31 31 2c 23 63 6f 6c  6f 75 72 69 6e 64 65 78  |r11,#colourindex|
0001ac50  20 80 20 26 66 66 30 30  0d a0 28 0d 2e 6d 61 70  | . &ff00..(..map|
0001ac60  70 69 78 6c 70 0d a0 32  40 4c 44 52 20 52 38 2c  |pixlp..2@LDR R8,|
0001ac70  5b 52 31 5d 2c 23 73 74  65 70 32 34 3a 4c 44 52  |[R1],#step24:LDR|
0001ac80  20 52 39 2c 5b 52 32 5d  2c 23 73 74 65 70 32 34  | R9,[R2],#step24|
0001ac90  3a 4c 44 52 20 52 31 30  2c 5b 52 33 5d 2c 23 73  |:LDR R10,[R3],#s|
0001aca0  74 65 70 32 34 0d a0 3c  29 80 20 72 38 2c 72 38  |tep24..<). r8,r8|
0001acb0  2c 72 31 31 3a 80 20 72  39 2c 72 39 2c 72 31 31  |,r11:. r9,r9,r11|
0001acc0  3a 80 20 72 31 30 2c 72  31 30 2c 72 31 31 0d a0  |:. r10,r10,r11..|
0001acd0  46 47 4c 44 52 20 52 38  2c 5b 52 34 2c 52 38 2c  |FGLDR R8,[R4,R8,|
0001ace0  4c 53 4c 20 23 32 5d 3a  4c 44 52 20 52 39 2c 5b  |LSL #2]:LDR R9,[|
0001acf0  52 35 2c 52 39 2c 4c 53  4c 20 23 32 5d 3a 4c 44  |R5,R9,LSL #2]:LD|
0001ad00  52 20 52 31 30 2c 5b 52  36 2c 52 31 30 2c 4c 53  |R R10,[R6,R10,LS|
0001ad10  4c 20 23 32 5d 0d a0 50  19 53 54 4d 49 41 20 52  |L #2]..P.STMIA R|
0001ad20  37 21 2c 7b 52 38 2c 52  39 2c 52 31 30 7d 0d a0  |7!,{R8,R9,R10}..|
0001ad30  5a 1e 53 55 42 53 20 52  30 2c 52 30 2c 23 31 3a  |Z.SUBS R0,R0,#1:|
0001ad40  42 4e 45 20 6d 61 70 70  69 78 6c 70 0d a0 64 14  |BNE mappixlp..d.|
0001ad50  4c 44 4d 46 44 20 53 50  20 21 2c 7b 50 43 7d 5e  |LDMFD SP !,{PC}^|
0001ad60  0d a0 6e 05 5d 0d a0 78  09 c9 20 34 31 31 0d a0  |..n.]..x.. 411..|
0001ad70  8c 0a 5b 4f 50 54 20 5a  0d a0 96 0c 2e 6d 61 70  |..[OPT Z.....map|
0001ad80  70 69 78 25 0d a0 a0 10  4c 44 52 20 52 30 2c 73  |pix%....LDR R0,s|
0001ad90  78 6c 6f 63 0d a0 aa 1b  4c 44 52 20 52 31 2c 5b  |xloc....LDR R1,[|
0001ada0  52 39 5d 3a 4c 44 52 20  52 31 2c 5b 52 31 5d 0d  |R9]:LDR R1,[R1].|
0001adb0  a0 b4 14 4c 44 52 20 52  32 2c 5b 52 39 2c 23 31  |...LDR R2,[R9,#1|
0001adc0  2a 38 5d 0d a0 be 14 4c  44 52 20 52 33 2c 5b 52  |*8]....LDR R3,[R|
0001add0  39 2c 23 32 2a 38 5d 0d  a0 c8 14 4c 44 52 20 52  |9,#2*8]....LDR R|
0001ade0  35 2c 5b 52 39 2c 23 34  2a 38 5d 0d a0 d2 14 4c  |5,[R9,#4*8]....L|
0001adf0  44 52 20 52 36 2c 5b 52  39 2c 23 35 2a 38 5d 0d  |DR R6,[R9,#5*8].|
0001ae00  a0 dc 14 4c 44 52 20 52  37 2c 5b 52 39 2c 23 36  |...LDR R7,[R9,#6|
0001ae10  2a 38 5d 0d a0 e6 14 4c  44 52 20 52 39 2c 5b 52  |*8]....LDR R9,[R|
0001ae20  39 2c 23 38 2a 38 5d 0d  a0 f0 14 53 54 4d 46 44  |9,#8*8]....STMFD|
0001ae30  20 53 50 20 21 2c 7b 52  31 34 7d 0d a0 fa 0d 2e  | SP !,{R14}.....|
0001ae40  6d 61 70 70 69 78 6c 70  0d a1 04 16 4c 44 4d 49  |mappixlp....LDMI|
0001ae50  41 20 52 31 21 2c 7b 52  34 2c 52 31 30 7d 0d a1  |A R1!,{R4,R10}..|
0001ae60  0e 12 80 20 52 38 2c 52  34 2c 23 26 43 30 30 30  |... R8,R4,#&C000|
0001ae70  0d a1 18 14 4d 4f 56 20  52 38 2c 52 38 2c 4c 53  |....MOV R8,R8,LS|
0001ae80  52 20 23 38 0d a1 22 17  80 20 52 31 34 2c 52 34  |R #8..".. R14,R4|
0001ae90  2c 23 26 43 30 30 30 30  30 30 30 0d a1 2c 1c 84  |,#&C0000000..,..|
0001aea0  52 20 52 38 2c 52 38 2c  52 31 34 2c 4c 53 52 20  |R R8,R8,R14,LSR |
0001aeb0  23 31 36 2b 38 2b 32 0d  a1 36 14 80 20 52 31 34  |#16+8+2..6.. R14|
0001aec0  2c 52 31 30 2c 23 26 43  30 30 30 0d a1 40 19 84  |,R10,#&C000..@..|
0001aed0  52 20 52 38 2c 52 38 2c  52 31 34 2c 4c 53 52 20  |R R8,R8,R14,LSR |
0001aee0  23 38 2b 34 0d a1 4a 1c  84 52 20 52 38 2c 52 38  |#8+4..J..R R8,R8|
0001aef0  2c 52 31 30 2c 4c 53 52  20 23 31 36 2b 38 2b 36  |,R10,LSR #16+8+6|
0001af00  0d a1 54 13 80 20 52 31  31 2c 52 34 2c 23 26 33  |..T.. R11,R4,#&3|
0001af10  30 30 30 0d a1 5e 16 4d  4f 56 20 52 31 31 2c 52  |000..^.MOV R11,R|
0001af20  31 31 2c 4c 53 52 20 23  36 0d a1 68 17 80 20 52  |11,LSR #6..h.. R|
0001af30  31 34 2c 52 34 2c 23 26  33 30 30 30 30 30 30 30  |14,R4,#&30000000|
0001af40  0d a1 72 1e 84 52 20 52  31 31 2c 52 31 31 2c 52  |..r..R R11,R11,R|
0001af50  31 34 2c 4c 53 52 20 23  31 36 2b 36 2b 32 0d a1  |14,LSR #16+6+2..|
0001af60  7c 14 80 20 52 31 34 2c  52 31 30 2c 23 26 33 30  ||.. R14,R10,#&30|
0001af70  30 30 0d a1 86 1b 84 52  20 52 31 31 2c 52 31 31  |00.....R R11,R11|
0001af80  2c 52 31 34 2c 4c 53 52  20 23 36 2b 34 0d a1 90  |,R14,LSR #6+4...|
0001af90  18 80 20 52 31 34 2c 52  31 30 2c 23 26 33 30 30  |.. R14,R10,#&300|
0001afa0  30 30 30 30 30 0d a1 9a  1e 84 52 20 52 31 31 2c  |00000.....R R11,|
0001afb0  52 31 31 2c 52 31 34 2c  4c 53 52 20 23 31 36 2b  |R11,R14,LSR #16+|
0001afc0  36 2b 36 0d a1 ae 11 80  20 52 31 32 2c 52 34 2c  |6+6..... R12,R4,|
0001afd0  23 26 46 46 0d a1 b8 1b  4c 44 52 20 52 31 32 2c  |#&FF....LDR R12,|
0001afe0  5b 52 32 2c 52 31 32 2c  4c 53 4c 20 23 32 5d 0d  |[R2,R12,LSL #2].|
0001aff0  a1 c2 2c 4c 44 52 20 52  31 34 2c 5b 52 37 2c 52  |..,LDR R14,[R7,R|
0001b000  31 31 2c 4c 53 4c 20 23  32 5d 3a 41 44 44 53 20  |11,LSL #2]:ADDS |
0001b010  52 31 34 2c 52 31 34 2c  52 31 32 0d a1 cc 38 4d  |R14,R14,R12...8M|
0001b020  4f 56 4d 49 20 52 31 34  2c 23 30 3a 43 4d 50 20  |OVMI R14,#0:CMP |
0001b030  52 31 34 2c 23 46 3a 4d  4f 56 43 53 20 52 31 34  |R14,#F:MOVCS R14|
0001b040  2c 23 46 3a 53 54 52 20  52 31 34 2c 5b 52 39 5d  |,#F:STR R14,[R9]|
0001b050  2c 23 34 0d a1 d6 2a 4c  44 52 20 52 31 34 2c 5b  |,#4...*LDR R14,[|
0001b060  52 36 2c 52 38 2c 4c 53  4c 20 23 32 5d 3a 41 44  |R6,R8,LSL #2]:AD|
0001b070  44 20 52 31 34 2c 52 31  34 2c 52 31 32 0d a1 e0  |D R14,R14,R12...|
0001b080  2c 4c 44 52 20 52 31 32  2c 5b 52 35 2c 52 31 31  |,LDR R12,[R5,R11|
0001b090  2c 4c 53 4c 20 23 32 5d  3a 41 44 44 53 20 52 31  |,LSL #2]:ADDS R1|
0001b0a0  34 2c 52 31 34 2c 52 31  32 0d a1 ea 38 4d 4f 56  |4,R14,R12...8MOV|
0001b0b0  4d 49 20 52 31 34 2c 23  30 3a 43 4d 50 20 52 31  |MI R14,#0:CMP R1|
0001b0c0  34 2c 23 46 3a 4d 4f 56  43 53 20 52 31 34 2c 23  |4,#F:MOVCS R14,#|
0001b0d0  46 3a 53 54 52 20 52 31  34 2c 5b 52 39 5d 2c 23  |F:STR R14,[R9],#|
0001b0e0  34 0d a1 f4 11 80 20 52  31 32 2c 52 34 2c 23 26  |4..... R12,R4,#&|
0001b0f0  46 46 0d a1 fe 1b 4c 44  52 20 52 31 32 2c 5b 52  |FF....LDR R12,[R|
0001b100  32 2c 52 31 32 2c 4c 53  4c 20 23 32 5d 0d a2 08  |2,R12,LSL #2]...|
0001b110  2b 4c 44 52 20 52 31 34  2c 5b 52 33 2c 52 38 2c  |+LDR R14,[R3,R8,|
0001b120  4c 53 4c 20 23 32 5d 3a  41 44 44 53 20 52 31 34  |LSL #2]:ADDS R14|
0001b130  2c 52 31 32 2c 52 31 34  0d a2 12 38 4d 4f 56 4d  |,R12,R14...8MOVM|
0001b140  49 20 52 31 34 2c 23 30  3a 43 4d 50 20 52 31 34  |I R14,#0:CMP R14|
0001b150  2c 23 46 3a 4d 4f 56 43  53 20 52 31 34 2c 23 46  |,#F:MOVCS R14,#F|
0001b160  3a 53 54 52 20 52 31 34  2c 5b 52 39 5d 2c 23 34  |:STR R14,[R9],#4|
0001b170  0d a2 26 15 4d 4f 56 20  52 34 2c 52 34 2c 4c 53  |..&.MOV R4,R4,LS|
0001b180  52 20 23 31 36 0d a2 30  11 80 20 52 31 32 2c 52  |R #16..0.. R12,R|
0001b190  34 2c 23 26 46 46 0d a2  3a 1b 4c 44 52 20 52 31  |4,#&FF..:.LDR R1|
0001b1a0  32 2c 5b 52 32 2c 52 31  32 2c 4c 53 4c 20 23 32  |2,[R2,R12,LSL #2|
0001b1b0  5d 0d a2 44 2c 4c 44 52  20 52 31 34 2c 5b 52 37  |]..D,LDR R14,[R7|
0001b1c0  2c 52 31 31 2c 4c 53 4c  20 23 32 5d 3a 41 44 44  |,R11,LSL #2]:ADD|
0001b1d0  53 20 52 31 34 2c 52 31  34 2c 52 31 32 0d a2 4e  |S R14,R14,R12..N|
0001b1e0  38 4d 4f 56 4d 49 20 52  31 34 2c 23 30 3a 43 4d  |8MOVMI R14,#0:CM|
0001b1f0  50 20 52 31 34 2c 23 46  3a 4d 4f 56 43 53 20 52  |P R14,#F:MOVCS R|
0001b200  31 34 2c 23 46 3a 53 54  52 20 52 31 34 2c 5b 52  |14,#F:STR R14,[R|
0001b210  39 5d 2c 23 34 0d a2 58  2a 4c 44 52 20 52 31 34  |9],#4..X*LDR R14|
0001b220  2c 5b 52 36 2c 52 38 2c  4c 53 4c 20 23 32 5d 3a  |,[R6,R8,LSL #2]:|
0001b230  41 44 44 20 52 31 34 2c  52 31 34 2c 52 31 32 0d  |ADD R14,R14,R12.|
0001b240  a2 62 2c 4c 44 52 20 52  31 32 2c 5b 52 35 2c 52  |.b,LDR R12,[R5,R|
0001b250  31 31 2c 4c 53 4c 20 23  32 5d 3a 41 44 44 53 20  |11,LSL #2]:ADDS |
0001b260  52 31 34 2c 52 31 34 2c  52 31 32 0d a2 6c 38 4d  |R14,R14,R12..l8M|
0001b270  4f 56 4d 49 20 52 31 34  2c 23 30 3a 43 4d 50 20  |OVMI R14,#0:CMP |
0001b280  52 31 34 2c 23 46 3a 4d  4f 56 43 53 20 52 31 34  |R14,#F:MOVCS R14|
0001b290  2c 23 46 3a 53 54 52 20  52 31 34 2c 5b 52 39 5d  |,#F:STR R14,[R9]|
0001b2a0  2c 23 34 0d a2 76 11 80  20 52 31 32 2c 52 34 2c  |,#4..v.. R12,R4,|
0001b2b0  23 26 46 46 0d a2 80 1b  4c 44 52 20 52 31 32 2c  |#&FF....LDR R12,|
0001b2c0  5b 52 32 2c 52 31 32 2c  4c 53 4c 20 23 32 5d 0d  |[R2,R12,LSL #2].|
0001b2d0  a2 8a 2b 4c 44 52 20 52  31 34 2c 5b 52 33 2c 52  |..+LDR R14,[R3,R|
0001b2e0  38 2c 4c 53 4c 20 23 32  5d 3a 41 44 44 53 20 52  |8,LSL #2]:ADDS R|
0001b2f0  31 34 2c 52 31 32 2c 52  31 34 0d a2 94 38 4d 4f  |14,R12,R14...8MO|
0001b300  56 4d 49 20 52 31 34 2c  23 30 3a 43 4d 50 20 52  |VMI R14,#0:CMP R|
0001b310  31 34 2c 23 46 3a 4d 4f  56 43 53 20 52 31 34 2c  |14,#F:MOVCS R14,|
0001b320  23 46 3a 53 54 52 20 52  31 34 2c 5b 52 39 5d 2c  |#F:STR R14,[R9],|
0001b330  23 34 0d a2 a8 12 80 20  52 31 32 2c 52 31 30 2c  |#4..... R12,R10,|
0001b340  23 26 46 46 0d a2 b2 1b  4c 44 52 20 52 31 32 2c  |#&FF....LDR R12,|
0001b350  5b 52 32 2c 52 31 32 2c  4c 53 4c 20 23 32 5d 0d  |[R2,R12,LSL #2].|
0001b360  a2 bc 2c 4c 44 52 20 52  31 34 2c 5b 52 37 2c 52  |..,LDR R14,[R7,R|
0001b370  31 31 2c 4c 53 4c 20 23  32 5d 3a 41 44 44 53 20  |11,LSL #2]:ADDS |
0001b380  52 31 34 2c 52 31 34 2c  52 31 32 0d a2 c6 38 4d  |R14,R14,R12...8M|
0001b390  4f 56 4d 49 20 52 31 34  2c 23 30 3a 43 4d 50 20  |OVMI R14,#0:CMP |
0001b3a0  52 31 34 2c 23 46 3a 4d  4f 56 43 53 20 52 31 34  |R14,#F:MOVCS R14|
0001b3b0  2c 23 46 3a 53 54 52 20  52 31 34 2c 5b 52 39 5d  |,#F:STR R14,[R9]|
0001b3c0  2c 23 34 0d a2 d0 2a 4c  44 52 20 52 31 34 2c 5b  |,#4...*LDR R14,[|
0001b3d0  52 36 2c 52 38 2c 4c 53  4c 20 23 32 5d 3a 41 44  |R6,R8,LSL #2]:AD|
0001b3e0  44 20 52 31 34 2c 52 31  34 2c 52 31 32 0d a2 da  |D R14,R14,R12...|
0001b3f0  2c 4c 44 52 20 52 31 32  2c 5b 52 35 2c 52 31 31  |,LDR R12,[R5,R11|
0001b400  2c 4c 53 4c 20 23 32 5d  3a 41 44 44 53 20 52 31  |,LSL #2]:ADDS R1|
0001b410  34 2c 52 31 34 2c 52 31  32 0d a2 e4 38 4d 4f 56  |4,R14,R12...8MOV|
0001b420  4d 49 20 52 31 34 2c 23  30 3a 43 4d 50 20 52 31  |MI R14,#0:CMP R1|
0001b430  34 2c 23 46 3a 4d 4f 56  43 53 20 52 31 34 2c 23  |4,#F:MOVCS R14,#|
0001b440  46 3a 53 54 52 20 52 31  34 2c 5b 52 39 5d 2c 23  |F:STR R14,[R9],#|
0001b450  34 0d a2 ee 12 80 20 52  31 32 2c 52 31 30 2c 23  |4..... R12,R10,#|
0001b460  26 46 46 0d a2 f8 1b 4c  44 52 20 52 31 32 2c 5b  |&FF....LDR R12,[|
0001b470  52 32 2c 52 31 32 2c 4c  53 4c 20 23 32 5d 0d a3  |R2,R12,LSL #2]..|
0001b480  02 2b 4c 44 52 20 52 31  34 2c 5b 52 33 2c 52 38  |.+LDR R14,[R3,R8|
0001b490  2c 4c 53 4c 20 23 32 5d  3a 41 44 44 53 20 52 31  |,LSL #2]:ADDS R1|
0001b4a0  34 2c 52 31 32 2c 52 31  34 0d a3 0c 38 4d 4f 56  |4,R12,R14...8MOV|
0001b4b0  4d 49 20 52 31 34 2c 23  30 3a 43 4d 50 20 52 31  |MI R14,#0:CMP R1|
0001b4c0  34 2c 23 46 3a 4d 4f 56  43 53 20 52 31 34 2c 23  |4,#F:MOVCS R14,#|
0001b4d0  46 3a 53 54 52 20 52 31  34 2c 5b 52 39 5d 2c 23  |F:STR R14,[R9],#|
0001b4e0  34 0d a3 20 17 4d 4f 56  20 52 31 30 2c 52 31 30  |4.. .MOV R10,R10|
0001b4f0  2c 4c 53 52 20 23 31 36  0d a3 2a 12 80 20 52 31  |,LSR #16..*.. R1|
0001b500  32 2c 52 31 30 2c 23 26  46 46 0d a3 34 1b 4c 44  |2,R10,#&FF..4.LD|
0001b510  52 20 52 31 32 2c 5b 52  32 2c 52 31 32 2c 4c 53  |R R12,[R2,R12,LS|
0001b520  4c 20 23 32 5d 0d a3 3e  2c 4c 44 52 20 52 31 34  |L #2]..>,LDR R14|
0001b530  2c 5b 52 37 2c 52 31 31  2c 4c 53 4c 20 23 32 5d  |,[R7,R11,LSL #2]|
0001b540  3a 41 44 44 53 20 52 31  34 2c 52 31 34 2c 52 31  |:ADDS R14,R14,R1|
0001b550  32 0d a3 48 38 4d 4f 56  4d 49 20 52 31 34 2c 23  |2..H8MOVMI R14,#|
0001b560  30 3a 43 4d 50 20 52 31  34 2c 23 46 3a 4d 4f 56  |0:CMP R14,#F:MOV|
0001b570  43 53 20 52 31 34 2c 23  46 3a 53 54 52 20 52 31  |CS R14,#F:STR R1|
0001b580  34 2c 5b 52 39 5d 2c 23  34 0d a3 52 2a 4c 44 52  |4,[R9],#4..R*LDR|
0001b590  20 52 31 34 2c 5b 52 36  2c 52 38 2c 4c 53 4c 20  | R14,[R6,R8,LSL |
0001b5a0  23 32 5d 3a 41 44 44 20  52 31 34 2c 52 31 34 2c  |#2]:ADD R14,R14,|
0001b5b0  52 31 32 0d a3 5c 2c 4c  44 52 20 52 31 32 2c 5b  |R12..\,LDR R12,[|
0001b5c0  52 35 2c 52 31 31 2c 4c  53 4c 20 23 32 5d 3a 41  |R5,R11,LSL #2]:A|
0001b5d0  44 44 53 20 52 31 34 2c  52 31 34 2c 52 31 32 0d  |DDS R14,R14,R12.|
0001b5e0  a3 66 38 4d 4f 56 4d 49  20 52 31 34 2c 23 30 3a  |.f8MOVMI R14,#0:|
0001b5f0  43 4d 50 20 52 31 34 2c  23 46 3a 4d 4f 56 43 53  |CMP R14,#F:MOVCS|
0001b600  20 52 31 34 2c 23 46 3a  53 54 52 20 52 31 34 2c  | R14,#F:STR R14,|
0001b610  5b 52 39 5d 2c 23 34 0d  a3 70 12 80 20 52 31 32  |[R9],#4..p.. R12|
0001b620  2c 52 31 30 2c 23 26 46  46 0d a3 7a 1b 4c 44 52  |,R10,#&FF..z.LDR|
0001b630  20 52 31 32 2c 5b 52 32  2c 52 31 32 2c 4c 53 4c  | R12,[R2,R12,LSL|
0001b640  20 23 32 5d 0d a3 84 2b  4c 44 52 20 52 31 34 2c  | #2]...+LDR R14,|
0001b650  5b 52 33 2c 52 38 2c 4c  53 4c 20 23 32 5d 3a 41  |[R3,R8,LSL #2]:A|
0001b660  44 44 53 20 52 31 34 2c  52 31 32 2c 52 31 34 0d  |DDS R14,R12,R14.|
0001b670  a3 8e 38 4d 4f 56 4d 49  20 52 31 34 2c 23 30 3a  |..8MOVMI R14,#0:|
0001b680  43 4d 50 20 52 31 34 2c  23 46 3a 4d 4f 56 43 53  |CMP R14,#F:MOVCS|
0001b690  20 52 31 34 2c 23 46 3a  53 54 52 20 52 31 34 2c  | R14,#F:STR R14,|
0001b6a0  5b 52 39 5d 2c 23 34 0d  a3 a2 1e 53 55 42 53 20  |[R9],#4....SUBS |
0001b6b0  52 30 2c 52 30 2c 23 34  3a 42 4e 45 20 6d 61 70  |R0,R0,#4:BNE map|
0001b6c0  70 69 78 6c 70 0d a3 ac  14 4c 44 4d 46 44 20 53  |pixlp....LDMFD S|
0001b6d0  50 20 21 2c 7b 50 43 7d  5e 0d a3 b6 05 5d 0d a3  |P !,{PC}^....]..|
0001b6e0  c0 09 c9 20 34 32 33 0d  a3 ca 0a 5b 4f 50 54 20  |... 423....[OPT |
0001b6f0  5a 0d a3 d4 0c 2e 6d 61  70 70 69 78 25 0d a3 de  |Z.....mappix%...|
0001b700  10 4c 44 52 20 52 30 2c  73 78 6c 6f 63 0d a3 e8  |.LDR R0,sxloc...|
0001b710  1b 4c 44 52 20 52 31 2c  5b 52 39 5d 3a 4c 44 52  |.LDR R1,[R9]:LDR|
0001b720  20 52 31 2c 5b 52 31 5d  0d a3 f2 14 4c 44 52 20  | R1,[R1]....LDR |
0001b730  52 32 2c 5b 52 39 2c 23  31 2a 38 5d 0d a3 fc 14  |R2,[R9,#1*8]....|
0001b740  4c 44 52 20 52 33 2c 5b  52 39 2c 23 32 2a 38 5d  |LDR R3,[R9,#2*8]|
0001b750  0d a4 06 14 4c 44 52 20  52 34 2c 5b 52 39 2c 23  |....LDR R4,[R9,#|
0001b760  33 2a 38 5d 0d a4 10 14  4c 44 52 20 52 35 2c 5b  |3*8]....LDR R5,[|
0001b770  52 39 2c 23 34 2a 38 5d  0d a4 1a 14 4c 44 52 20  |R9,#4*8]....LDR |
0001b780  52 36 2c 5b 52 39 2c 23  35 2a 38 5d 0d a4 24 14  |R6,[R9,#5*8]..$.|
0001b790  4c 44 52 20 52 37 2c 5b  52 39 2c 23 36 2a 38 5d  |LDR R7,[R9,#6*8]|
0001b7a0  0d a4 2e 14 4c 44 52 20  52 38 2c 5b 52 39 2c 23  |....LDR R8,[R9,#|
0001b7b0  37 2a 38 5d 0d a4 38 14  4c 44 52 20 52 39 2c 5b  |7*8]..8.LDR R9,[|
0001b7c0  52 39 2c 23 38 2a 38 5d  0d a4 42 14 53 54 4d 46  |R9,#8*8]..B.STMF|
0001b7d0  44 20 53 50 20 21 2c 7b  52 31 34 7d 0d a4 4c 0d  |D SP !,{R14}..L.|
0001b7e0  2e 6d 61 70 70 69 78 6c  70 0d a4 56 13 4c 44 52  |.mappixlp..V.LDR|
0001b7f0  20 52 31 30 2c 5b 52 31  5d 2c 23 34 0d a4 60 14  | R10,[R1],#4..`.|
0001b800  80 20 52 31 31 2c 52 31  30 2c 23 26 46 46 30 30  |. R11,R10,#&FF00|
0001b810  0d a4 6a 1b 4c 44 52 20  52 31 31 2c 5b 52 32 2c  |..j.LDR R11,[R2,|
0001b820  52 31 31 2c 4c 53 52 20  23 36 5d 0d a4 74 3a 80  |R11,LSR #6]..t:.|
0001b830  20 52 31 32 2c 52 31 30  2c 23 26 46 46 3a 4c 44  | R12,R10,#&FF:LD|
0001b840  52 20 52 31 32 2c 5b 52  37 2c 52 31 32 2c 4c 53  |R R12,[R7,R12,LS|
0001b850  4c 20 23 32 5d 3a 41 44  44 20 52 31 34 2c 52 31  |L #2]:ADD R14,R1|
0001b860  32 2c 52 31 31 0d a4 7e  40 80 20 52 31 32 2c 52  |2,R11..~@. R12,R|
0001b870  31 30 2c 23 26 46 46 30  30 30 30 3a 4c 44 52 20  |10,#&FF0000:LDR |
0001b880  52 31 32 2c 5b 52 38 2c  52 31 32 2c 4c 53 52 20  |R12,[R8,R12,LSR |
0001b890  23 31 34 5d 3a 41 44 44  53 20 52 31 34 2c 52 31  |#14]:ADDS R14,R1|
0001b8a0  34 2c 52 31 32 0d a4 88  38 4d 4f 56 4d 49 20 52  |4,R12...8MOVMI R|
0001b8b0  31 34 2c 23 30 3a 43 4d  50 20 52 31 34 2c 23 46  |14,#0:CMP R14,#F|
0001b8c0  3a 4d 4f 56 43 53 20 52  31 34 2c 23 46 3a 53 54  |:MOVCS R14,#F:ST|
0001b8d0  52 20 52 31 34 2c 5b 52  39 5d 2c 23 34 0d a4 92  |R R14,[R9],#4...|
0001b8e0  3a 80 20 52 31 32 2c 52  31 30 2c 23 26 46 46 3a  |:. R12,R10,#&FF:|
0001b8f0  4c 44 52 20 52 31 32 2c  5b 52 35 2c 52 31 32 2c  |LDR R12,[R5,R12,|
0001b900  4c 53 4c 20 23 32 5d 3a  41 44 44 20 52 31 34 2c  |LSL #2]:ADD R14,|
0001b910  52 31 32 2c 52 31 31 0d  a4 9c 40 80 20 52 31 32  |R12,R11...@. R12|
0001b920  2c 52 31 30 2c 23 26 46  46 30 30 30 30 3a 4c 44  |,R10,#&FF0000:LD|
0001b930  52 20 52 31 32 2c 5b 52  36 2c 52 31 32 2c 4c 53  |R R12,[R6,R12,LS|
0001b940  52 20 23 31 34 5d 3a 41  44 44 53 20 52 31 34 2c  |R #14]:ADDS R14,|
0001b950  52 31 34 2c 52 31 32 0d  a4 a6 38 4d 4f 56 4d 49  |R14,R12...8MOVMI|
0001b960  20 52 31 34 2c 23 30 3a  43 4d 50 20 52 31 34 2c  | R14,#0:CMP R14,|
0001b970  23 46 3a 4d 4f 56 43 53  20 52 31 34 2c 23 46 3a  |#F:MOVCS R14,#F:|
0001b980  53 54 52 20 52 31 34 2c  5b 52 39 5d 2c 23 34 0d  |STR R14,[R9],#4.|
0001b990  a4 b0 3a 80 20 52 31 32  2c 52 31 30 2c 23 26 46  |..:. R12,R10,#&F|
0001b9a0  46 3a 4c 44 52 20 52 31  32 2c 5b 52 33 2c 52 31  |F:LDR R12,[R3,R1|
0001b9b0  32 2c 4c 53 4c 20 23 32  5d 3a 41 44 44 20 52 31  |2,LSL #2]:ADD R1|
0001b9c0  34 2c 52 31 32 2c 52 31  31 0d a4 ba 40 80 20 52  |4,R12,R11...@. R|
0001b9d0  31 32 2c 52 31 30 2c 23  26 46 46 30 30 30 30 3a  |12,R10,#&FF0000:|
0001b9e0  4c 44 52 20 52 31 32 2c  5b 52 34 2c 52 31 32 2c  |LDR R12,[R4,R12,|
0001b9f0  4c 53 52 20 23 31 34 5d  3a 41 44 44 53 20 52 31  |LSR #14]:ADDS R1|
0001ba00  34 2c 52 31 34 2c 52 31  32 0d a4 c4 38 4d 4f 56  |4,R14,R12...8MOV|
0001ba10  4d 49 20 52 31 34 2c 23  30 3a 43 4d 50 20 52 31  |MI R14,#0:CMP R1|
0001ba20  34 2c 23 46 3a 4d 4f 56  43 53 20 52 31 34 2c 23  |4,#F:MOVCS R14,#|
0001ba30  46 3a 53 54 52 20 52 31  34 2c 5b 52 39 5d 2c 23  |F:STR R14,[R9],#|
0001ba40  34 0d a4 ce 18 80 20 52  31 31 2c 52 31 30 2c 23  |4..... R11,R10,#|
0001ba50  26 46 46 30 30 30 30 30  30 0d a4 d8 1c 4c 44 52  |&FF000000....LDR|
0001ba60  20 52 31 31 2c 5b 52 32  2c 52 31 31 2c 4c 53 52  | R11,[R2,R11,LSR|
0001ba70  20 23 32 32 5d 0d a4 e2  3a 80 20 52 31 32 2c 52  | #22]...:. R12,R|
0001ba80  31 30 2c 23 26 46 46 3a  4c 44 52 20 52 31 32 2c  |10,#&FF:LDR R12,|
0001ba90  5b 52 37 2c 52 31 32 2c  4c 53 4c 20 23 32 5d 3a  |[R7,R12,LSL #2]:|
0001baa0  41 44 44 20 52 31 34 2c  52 31 32 2c 52 31 31 0d  |ADD R14,R12,R11.|
0001bab0  a4 ec 40 80 20 52 31 32  2c 52 31 30 2c 23 26 46  |..@. R12,R10,#&F|
0001bac0  46 30 30 30 30 3a 4c 44  52 20 52 31 32 2c 5b 52  |F0000:LDR R12,[R|
0001bad0  38 2c 52 31 32 2c 4c 53  52 20 23 31 34 5d 3a 41  |8,R12,LSR #14]:A|
0001bae0  44 44 53 20 52 31 34 2c  52 31 34 2c 52 31 32 0d  |DDS R14,R14,R12.|
0001baf0  a4 f6 38 4d 4f 56 4d 49  20 52 31 34 2c 23 30 3a  |..8MOVMI R14,#0:|
0001bb00  43 4d 50 20 52 31 34 2c  23 46 3a 4d 4f 56 43 53  |CMP R14,#F:MOVCS|
0001bb10  20 52 31 34 2c 23 46 3a  53 54 52 20 52 31 34 2c  | R14,#F:STR R14,|
0001bb20  5b 52 39 5d 2c 23 34 0d  a5 00 3a 80 20 52 31 32  |[R9],#4...:. R12|
0001bb30  2c 52 31 30 2c 23 26 46  46 3a 4c 44 52 20 52 31  |,R10,#&FF:LDR R1|
0001bb40  32 2c 5b 52 35 2c 52 31  32 2c 4c 53 4c 20 23 32  |2,[R5,R12,LSL #2|
0001bb50  5d 3a 41 44 44 20 52 31  34 2c 52 31 32 2c 52 31  |]:ADD R14,R12,R1|
0001bb60  31 0d a5 0a 40 80 20 52  31 32 2c 52 31 30 2c 23  |1...@. R12,R10,#|
0001bb70  26 46 46 30 30 30 30 3a  4c 44 52 20 52 31 32 2c  |&FF0000:LDR R12,|
0001bb80  5b 52 36 2c 52 31 32 2c  4c 53 52 20 23 31 34 5d  |[R6,R12,LSR #14]|
0001bb90  3a 41 44 44 53 20 52 31  34 2c 52 31 34 2c 52 31  |:ADDS R14,R14,R1|
0001bba0  32 0d a5 14 38 4d 4f 56  4d 49 20 52 31 34 2c 23  |2...8MOVMI R14,#|
0001bbb0  30 3a 43 4d 50 20 52 31  34 2c 23 46 3a 4d 4f 56  |0:CMP R14,#F:MOV|
0001bbc0  43 53 20 52 31 34 2c 23  46 3a 53 54 52 20 52 31  |CS R14,#F:STR R1|
0001bbd0  34 2c 5b 52 39 5d 2c 23  34 0d a5 1e 3a 80 20 52  |4,[R9],#4...:. R|
0001bbe0  31 32 2c 52 31 30 2c 23  26 46 46 3a 4c 44 52 20  |12,R10,#&FF:LDR |
0001bbf0  52 31 32 2c 5b 52 33 2c  52 31 32 2c 4c 53 4c 20  |R12,[R3,R12,LSL |
0001bc00  23 32 5d 3a 41 44 44 20  52 31 34 2c 52 31 32 2c  |#2]:ADD R14,R12,|
0001bc10  52 31 31 0d a5 28 40 80  20 52 31 32 2c 52 31 30  |R11..(@. R12,R10|
0001bc20  2c 23 26 46 46 30 30 30  30 3a 4c 44 52 20 52 31  |,#&FF0000:LDR R1|
0001bc30  32 2c 5b 52 34 2c 52 31  32 2c 4c 53 52 20 23 31  |2,[R4,R12,LSR #1|
0001bc40  34 5d 3a 41 44 44 53 20  52 31 34 2c 52 31 34 2c  |4]:ADDS R14,R14,|
0001bc50  52 31 32 0d a5 32 38 4d  4f 56 4d 49 20 52 31 34  |R12..28MOVMI R14|
0001bc60  2c 23 30 3a 43 4d 50 20  52 31 34 2c 23 46 3a 4d  |,#0:CMP R14,#F:M|
0001bc70  4f 56 43 53 20 52 31 34  2c 23 46 3a 53 54 52 20  |OVCS R14,#F:STR |
0001bc80  52 31 34 2c 5b 52 39 5d  2c 23 34 0d a5 3c 1e 53  |R14,[R9],#4..<.S|
0001bc90  55 42 53 20 52 30 2c 52  30 2c 23 32 3a 42 4e 45  |UBS R0,R0,#2:BNE|
0001bca0  20 6d 61 70 70 69 78 6c  70 0d a5 46 14 4c 44 4d  | mappixlp..F.LDM|
0001bcb0  46 44 20 53 50 20 21 2c  7b 50 43 7d 5e 0d a5 50  |FD SP !,{PC}^..P|
0001bcc0  05 5d 0d a5 5a 09 c9 20  34 32 32 0d a5 64 0a 5b  |.]..Z.. 422..d.[|
0001bcd0  4f 50 54 20 5a 0d a5 6e  0c 2e 6d 61 70 70 69 78  |OPT Z..n..mappix|
0001bce0  25 0d a5 78 10 4c 44 52  20 52 30 2c 73 78 6c 6f  |%..x.LDR R0,sxlo|
0001bcf0  63 0d a5 82 1b 4c 44 52  20 52 31 2c 5b 52 39 5d  |c....LDR R1,[R9]|
0001bd00  3a 4c 44 52 20 52 31 2c  5b 52 31 5d 0d a5 8c 14  |:LDR R1,[R1]....|
0001bd10  4c 44 52 20 52 32 2c 5b  52 39 2c 23 31 2a 38 5d  |LDR R2,[R9,#1*8]|
0001bd20  0d a5 96 14 4c 44 52 20  52 33 2c 5b 52 39 2c 23  |....LDR R3,[R9,#|
0001bd30  32 2a 38 5d 0d a5 a0 14  4c 44 52 20 52 35 2c 5b  |2*8]....LDR R5,[|
0001bd40  52 39 2c 23 34 2a 38 5d  0d a5 aa 14 4c 44 52 20  |R9,#4*8]....LDR |
0001bd50  52 36 2c 5b 52 39 2c 23  35 2a 38 5d 0d a5 b4 14  |R6,[R9,#5*8]....|
0001bd60  4c 44 52 20 52 37 2c 5b  52 39 2c 23 36 2a 38 5d  |LDR R7,[R9,#6*8]|
0001bd70  0d a5 be 14 4c 44 52 20  52 39 2c 5b 52 39 2c 23  |....LDR R9,[R9,#|
0001bd80  38 2a 38 5d 0d a5 c8 14  53 54 4d 46 44 20 53 50  |8*8]....STMFD SP|
0001bd90  20 21 2c 7b 52 31 34 7d  0d a5 d2 0d 2e 6d 61 70  | !,{R14}.....map|
0001bda0  70 69 78 6c 70 0d a5 dc  13 4c 44 52 20 52 31 30  |pixlp....LDR R10|
0001bdb0  2c 5b 52 31 5d 2c 23 34  0d a5 e6 14 80 20 52 31  |,[R1],#4..... R1|
0001bdc0  31 2c 52 31 30 2c 23 26  46 46 30 30 0d a5 f0 1b  |1,R10,#&FF00....|
0001bdd0  4c 44 52 20 52 31 31 2c  5b 52 32 2c 52 31 31 2c  |LDR R11,[R2,R11,|
0001bde0  4c 53 52 20 23 36 5d 0d  a5 fa 40 80 20 52 31 32  |LSR #6]...@. R12|
0001bdf0  2c 52 31 30 2c 23 26 46  46 30 30 30 30 3a 4c 44  |,R10,#&FF0000:LD|
0001be00  52 20 52 31 32 2c 5b 52  37 2c 52 31 32 2c 4c 53  |R R12,[R7,R12,LS|
0001be10  52 20 23 31 34 5d 3a 41  44 44 53 20 52 31 34 2c  |R #14]:ADDS R14,|
0001be20  52 31 32 2c 52 31 31 0d  a6 04 38 4d 4f 56 4d 49  |R12,R11...8MOVMI|
0001be30  20 52 31 34 2c 23 30 3a  43 4d 50 20 52 31 34 2c  | R14,#0:CMP R14,|
0001be40  23 46 3a 4d 4f 56 43 53  20 52 31 34 2c 23 46 3a  |#F:MOVCS R14,#F:|
0001be50  53 54 52 20 52 31 34 2c  5b 52 39 5d 2c 23 34 0d  |STR R14,[R9],#4.|
0001be60  a6 0e 3a 80 20 52 31 32  2c 52 31 30 2c 23 26 46  |..:. R12,R10,#&F|
0001be70  46 3a 4c 44 52 20 52 31  32 2c 5b 52 35 2c 52 31  |F:LDR R12,[R5,R1|
0001be80  32 2c 4c 53 4c 20 23 32  5d 3a 41 44 44 20 52 31  |2,LSL #2]:ADD R1|
0001be90  34 2c 52 31 32 2c 52 31  31 0d a6 18 40 80 20 52  |4,R12,R11...@. R|
0001bea0  31 32 2c 52 31 30 2c 23  26 46 46 30 30 30 30 3a  |12,R10,#&FF0000:|
0001beb0  4c 44 52 20 52 31 32 2c  5b 52 36 2c 52 31 32 2c  |LDR R12,[R6,R12,|
0001bec0  4c 53 52 20 23 31 34 5d  3a 41 44 44 53 20 52 31  |LSR #14]:ADDS R1|
0001bed0  34 2c 52 31 34 2c 52 31  32 0d a6 22 38 4d 4f 56  |4,R14,R12.."8MOV|
0001bee0  4d 49 20 52 31 34 2c 23  30 3a 43 4d 50 20 52 31  |MI R14,#0:CMP R1|
0001bef0  34 2c 23 46 3a 4d 4f 56  43 53 20 52 31 34 2c 23  |4,#F:MOVCS R14,#|
0001bf00  46 3a 53 54 52 20 52 31  34 2c 5b 52 39 5d 2c 23  |F:STR R14,[R9],#|
0001bf10  34 0d a6 2c 3b 80 20 52  31 32 2c 52 31 30 2c 23  |4..,;. R12,R10,#|
0001bf20  26 46 46 3a 4c 44 52 20  52 31 32 2c 5b 52 33 2c  |&FF:LDR R12,[R3,|
0001bf30  52 31 32 2c 4c 53 4c 20  23 32 5d 3a 41 44 44 53  |R12,LSL #2]:ADDS|
0001bf40  20 52 31 34 2c 52 31 32  2c 52 31 31 0d a6 36 38  | R14,R12,R11..68|
0001bf50  4d 4f 56 4d 49 20 52 31  34 2c 23 30 3a 43 4d 50  |MOVMI R14,#0:CMP|
0001bf60  20 52 31 34 2c 23 46 3a  4d 4f 56 43 53 20 52 31  | R14,#F:MOVCS R1|
0001bf70  34 2c 23 46 3a 53 54 52  20 52 31 34 2c 5b 52 39  |4,#F:STR R14,[R9|
0001bf80  5d 2c 23 34 0d a6 40 18  80 20 52 31 31 2c 52 31  |],#4..@.. R11,R1|
0001bf90  30 2c 23 26 46 46 30 30  30 30 30 30 0d a6 4a 1c  |0,#&FF000000..J.|
0001bfa0  4c 44 52 20 52 31 31 2c  5b 52 32 2c 52 31 31 2c  |LDR R11,[R2,R11,|
0001bfb0  4c 53 52 20 23 32 32 5d  0d a6 54 40 80 20 52 31  |LSR #22]..T@. R1|
0001bfc0  32 2c 52 31 30 2c 23 26  46 46 30 30 30 30 3a 4c  |2,R10,#&FF0000:L|
0001bfd0  44 52 20 52 31 32 2c 5b  52 37 2c 52 31 32 2c 4c  |DR R12,[R7,R12,L|
0001bfe0  53 52 20 23 31 34 5d 3a  41 44 44 53 20 52 31 34  |SR #14]:ADDS R14|
0001bff0  2c 52 31 32 2c 52 31 31  0d a6 5e 38 4d 4f 56 4d  |,R12,R11..^8MOVM|
0001c000  49 20 52 31 34 2c 23 30  3a 43 4d 50 20 52 31 34  |I R14,#0:CMP R14|
0001c010  2c 23 46 3a 4d 4f 56 43  53 20 52 31 34 2c 23 46  |,#F:MOVCS R14,#F|
0001c020  3a 53 54 52 20 52 31 34  2c 5b 52 39 5d 2c 23 34  |:STR R14,[R9],#4|
0001c030  0d a6 68 3a 80 20 52 31  32 2c 52 31 30 2c 23 26  |..h:. R12,R10,#&|
0001c040  46 46 3a 4c 44 52 20 52  31 32 2c 5b 52 35 2c 52  |FF:LDR R12,[R5,R|
0001c050  31 32 2c 4c 53 4c 20 23  32 5d 3a 41 44 44 20 52  |12,LSL #2]:ADD R|
0001c060  31 34 2c 52 31 32 2c 52  31 31 0d a6 72 40 80 20  |14,R12,R11..r@. |
0001c070  52 31 32 2c 52 31 30 2c  23 26 46 46 30 30 30 30  |R12,R10,#&FF0000|
0001c080  3a 4c 44 52 20 52 31 32  2c 5b 52 36 2c 52 31 32  |:LDR R12,[R6,R12|
0001c090  2c 4c 53 52 20 23 31 34  5d 3a 41 44 44 53 20 52  |,LSR #14]:ADDS R|
0001c0a0  31 34 2c 52 31 34 2c 52  31 32 0d a6 7c 38 4d 4f  |14,R14,R12..|8MO|
0001c0b0  56 4d 49 20 52 31 34 2c  23 30 3a 43 4d 50 20 52  |VMI R14,#0:CMP R|
0001c0c0  31 34 2c 23 46 3a 4d 4f  56 43 53 20 52 31 34 2c  |14,#F:MOVCS R14,|
0001c0d0  23 46 3a 53 54 52 20 52  31 34 2c 5b 52 39 5d 2c  |#F:STR R14,[R9],|
0001c0e0  23 34 0d a6 86 3b 80 20  52 31 32 2c 52 31 30 2c  |#4...;. R12,R10,|
0001c0f0  23 26 46 46 3a 4c 44 52  20 52 31 32 2c 5b 52 33  |#&FF:LDR R12,[R3|
0001c100  2c 52 31 32 2c 4c 53 4c  20 23 32 5d 3a 41 44 44  |,R12,LSL #2]:ADD|
0001c110  53 20 52 31 34 2c 52 31  32 2c 52 31 31 0d a6 90  |S R14,R12,R11...|
0001c120  38 4d 4f 56 4d 49 20 52  31 34 2c 23 30 3a 43 4d  |8MOVMI R14,#0:CM|
0001c130  50 20 52 31 34 2c 23 46  3a 4d 4f 56 43 53 20 52  |P R14,#F:MOVCS R|
0001c140  31 34 2c 23 46 3a 53 54  52 20 52 31 34 2c 5b 52  |14,#F:STR R14,[R|
0001c150  39 5d 2c 23 34 0d a6 9a  1e 53 55 42 53 20 52 30  |9],#4....SUBS R0|
0001c160  2c 52 30 2c 23 32 3a 42  4e 45 20 6d 61 70 70 69  |,R0,#2:BNE mappi|
0001c170  78 6c 70 0d a6 a4 14 4c  44 4d 46 44 20 53 50 20  |xlp....LDMFD SP |
0001c180  21 2c 7b 50 43 7d 5e 0d  a6 ae 05 5d 0d a6 b8 09  |!,{PC}^....]....|
0001c190  c9 20 35 35 35 0d a6 cc  0a 5b 4f 50 54 20 5a 0d  |. 555....[OPT Z.|
0001c1a0  a6 d6 0c 2e 6d 61 70 70  69 78 25 0d a6 e0 10 4c  |....mappix%....L|
0001c1b0  44 52 20 52 30 2c 73 78  6c 6f 63 0d a6 ea 1b 4c  |DR R0,sxloc....L|
0001c1c0  44 52 20 52 31 2c 5b 52  39 5d 3a 4c 44 52 20 52  |DR R1,[R9]:LDR R|
0001c1d0  31 2c 5b 52 31 5d 0d a6  f4 14 4c 44 52 20 52 32  |1,[R1]....LDR R2|
0001c1e0  2c 5b 52 39 2c 23 31 2a  38 5d 0d a6 fe 14 4c 44  |,[R9,#1*8]....LD|
0001c1f0  52 20 52 33 2c 5b 52 39  2c 23 32 2a 38 5d 0d a7  |R R3,[R9,#2*8]..|
0001c200  08 14 4c 44 52 20 52 35  2c 5b 52 39 2c 23 34 2a  |..LDR R5,[R9,#4*|
0001c210  38 5d 0d a7 12 14 4c 44  52 20 52 36 2c 5b 52 39  |8]....LDR R6,[R9|
0001c220  2c 23 35 2a 38 5d 0d a7  1c 14 4c 44 52 20 52 37  |,#5*8]....LDR R7|
0001c230  2c 5b 52 39 2c 23 36 2a  38 5d 0d a7 26 14 4c 44  |,[R9,#6*8]..&.LD|
0001c240  52 20 52 39 2c 5b 52 39  2c 23 38 2a 38 5d 0d a7  |R R9,[R9,#8*8]..|
0001c250  30 14 53 54 4d 46 44 20  53 50 20 21 2c 7b 52 31  |0.STMFD SP !,{R1|
0001c260  34 7d 0d a7 3a 0d 2e 6d  61 70 70 69 78 6c 70 0d  |4}..:..mappixlp.|
0001c270  a7 44 13 4c 44 52 20 52  31 30 2c 5b 52 31 5d 2c  |.D.LDR R10,[R1],|
0001c280  23 32 0d a7 4e 14 80 20  52 31 31 2c 52 31 30 2c  |#2..N.. R11,R10,|
0001c290  23 79 6d 61 78 25 0d a7  58 1b 4c 44 52 20 52 31  |#ymax%..X.LDR R1|
0001c2a0  31 2c 5b 52 32 2c 52 31  31 2c 4c 53 4c 20 23 32  |1,[R2,R11,LSL #2|
0001c2b0  5d 0d a7 62 2e 80 20 52  38 2c 52 31 30 2c 23 28  |]..b.. R8,R10,#(|
0001c2c0  28 31 3c 3c 76 62 69 74  73 25 29 2d 31 29 3c 3c  |(1<<vbits%)-1)<<|
0001c2d0  28 79 62 69 74 73 25 2b  75 62 69 74 73 25 29 0d  |(ybits%+ubits%).|
0001c2e0  a7 6c 26 80 20 52 31 30  2c 52 31 30 2c 23 28 28  |.l&. R10,R10,#((|
0001c2f0  31 3c 3c 75 62 69 74 73  25 29 2d 31 29 3c 3c 79  |1<<ubits%)-1)<<y|
0001c300  62 69 74 73 25 0d a7 80  39 4c 44 52 20 52 31 32  |bits%...9LDR R12|
0001c310  2c 5b 52 37 2c 52 38 2c  4c 53 52 20 23 79 62 69  |,[R7,R8,LSR #ybi|
0001c320  74 73 25 2b 75 62 69 74  73 25 2d 32 5d 3a 41 44  |ts%+ubits%-2]:AD|
0001c330  44 53 20 52 31 34 2c 52  31 32 2c 52 31 31 0d a7  |DS R14,R12,R11..|
0001c340  8a 38 4d 4f 56 4d 49 20  52 31 34 2c 23 30 3a 43  |.8MOVMI R14,#0:C|
0001c350  4d 50 20 52 31 34 2c 23  46 3a 4d 4f 56 43 53 20  |MP R14,#F:MOVCS |
0001c360  52 31 34 2c 23 46 3a 53  54 52 20 52 31 34 2c 5b  |R14,#F:STR R14,[|
0001c370  52 39 5d 2c 23 34 0d a7  94 38 4c 44 52 20 52 31  |R9],#4...8LDR R1|
0001c380  32 2c 5b 52 35 2c 52 38  2c 4c 53 52 20 23 79 62  |2,[R5,R8,LSR #yb|
0001c390  69 74 73 25 2b 75 62 69  74 73 25 2d 32 5d 3a 41  |its%+ubits%-2]:A|
0001c3a0  44 44 20 52 31 34 2c 52  31 32 2c 52 31 31 0d a7  |DD R14,R12,R11..|
0001c3b0  9e 33 4c 44 52 20 52 31  32 2c 5b 52 36 2c 52 31  |.3LDR R12,[R6,R1|
0001c3c0  30 2c 4c 53 52 20 23 79  62 69 74 73 25 2d 32 5d  |0,LSR #ybits%-2]|
0001c3d0  3a 41 44 44 53 20 52 31  34 2c 52 31 34 2c 52 31  |:ADDS R14,R14,R1|
0001c3e0  32 0d a7 a8 38 4d 4f 56  4d 49 20 52 31 34 2c 23  |2...8MOVMI R14,#|
0001c3f0  30 3a 43 4d 50 20 52 31  34 2c 23 46 3a 4d 4f 56  |0:CMP R14,#F:MOV|
0001c400  43 53 20 52 31 34 2c 23  46 3a 53 54 52 20 52 31  |CS R14,#F:STR R1|
0001c410  34 2c 5b 52 39 5d 2c 23  34 0d a7 b2 33 4c 44 52  |4,[R9],#4...3LDR|
0001c420  20 52 31 32 2c 5b 52 33  2c 52 31 30 2c 4c 53 52  | R12,[R3,R10,LSR|
0001c430  20 23 79 62 69 74 73 25  2d 32 5d 3a 41 44 44 53  | #ybits%-2]:ADDS|
0001c440  20 52 31 34 2c 52 31 32  2c 52 31 31 0d a7 bc 38  | R14,R12,R11...8|
0001c450  4d 4f 56 4d 49 20 52 31  34 2c 23 30 3a 43 4d 50  |MOVMI R14,#0:CMP|
0001c460  20 52 31 34 2c 23 46 3a  4d 4f 56 43 53 20 52 31  | R14,#F:MOVCS R1|
0001c470  34 2c 23 46 3a 53 54 52  20 52 31 34 2c 5b 52 39  |4,#F:STR R14,[R9|
0001c480  5d 2c 23 34 0d a7 c6 1e  53 55 42 53 20 52 30 2c  |],#4....SUBS R0,|
0001c490  52 30 2c 23 31 3a 42 4e  45 20 6d 61 70 70 69 78  |R0,#1:BNE mappix|
0001c4a0  6c 70 0d a7 d0 14 4c 44  4d 46 44 20 53 50 20 21  |lp....LDMFD SP !|
0001c4b0  2c 7b 50 43 7d 5e 0d a7  da 05 5d 0d a7 e4 05 cb  |,{PC}^....].....|
0001c4c0  0d a7 ee 18 e7 78 6d 75  6c 25 3d 32 20 80 20 78  |.....xmul%=2 . x|
0001c4d0  64 69 76 25 3d 31 20 8c  0d a7 f8 0a 5b 4f 50 54  |div%=1 .....[OPT|
0001c4e0  20 5a 0d a8 0c 0d 2e 78  73 61 6d 70 6c 65 25 0d  | Z.....xsample%.|
0001c4f0  a8 16 1b 4c 44 52 20 52  30 2c 5b 52 39 5d 3a 4c  |...LDR R0,[R9]:L|
0001c500  44 52 20 52 30 2c 5b 52  30 5d 0d a8 20 12 4c 44  |DR R0,[R0].. .LD|
0001c510  52 20 52 31 2c 5b 52 39  2c 23 38 5d 0d a8 2a 14  |R R1,[R9,#8]..*.|
0001c520  4c 44 52 20 52 32 2c 5b  52 39 2c 23 32 2a 38 5d  |LDR R2,[R9,#2*8]|
0001c530  0d a8 34 11 53 55 42 53  20 52 30 2c 52 30 2c 23  |..4.SUBS R0,R0,#|
0001c540  32 0d a8 3e 10 42 45 51  20 78 64 6f 6e 65 64 69  |2..>.BEQ xdonedi|
0001c550  76 0d a8 48 10 42 4d 49  20 78 64 6f 6e 65 64 69  |v..H.BMI xdonedi|
0001c560  76 0d a8 52 0e 2e 78 73  61 6d 70 6c 65 6c 70 0d  |v..R..xsamplelp.|
0001c570  a8 5c 21 4c 44 4d 49 41  20 52 31 2c 7b 52 35 2c  |.\!LDMIA R1,{R5,|
0001c580  52 36 2c 52 37 2c 52 38  2c 52 39 2c 52 31 30 7d  |R6,R7,R8,R9,R10}|
0001c590  0d a8 66 10 41 44 44 20  52 38 2c 52 38 2c 52 35  |..f.ADD R8,R8,R5|
0001c5a0  0d a8 70 14 4d 4f 56 20  52 38 2c 52 38 2c 4c 53  |..p.MOV R8,R8,LS|
0001c5b0  52 20 23 31 0d a8 7a 10  41 44 44 20 52 39 2c 52  |R #1..z.ADD R9,R|
0001c5c0  39 2c 52 36 0d a8 84 14  4d 4f 56 20 52 39 2c 52  |9,R6....MOV R9,R|
0001c5d0  39 2c 4c 53 52 20 23 31  0d a8 8e 12 41 44 44 20  |9,LSR #1....ADD |
0001c5e0  52 31 30 2c 52 31 30 2c  52 37 0d a8 98 16 4d 4f  |R10,R10,R7....MO|
0001c5f0  56 20 52 31 30 2c 52 31  30 2c 4c 53 52 20 23 31  |V R10,R10,LSR #1|
0001c600  0d a8 a2 22 53 54 4d 49  41 20 52 32 21 2c 7b 52  |..."STMIA R2!,{R|
0001c610  35 2c 52 36 2c 52 37 2c  52 38 2c 52 39 2c 52 31  |5,R6,R7,R8,R9,R1|
0001c620  30 7d 0d a8 ac 11 41 44  44 20 52 31 2c 52 31 2c  |0}....ADD R1,R1,|
0001c630  23 31 32 0d a8 b6 1f 53  55 42 53 20 52 30 2c 52  |#12....SUBS R0,R|
0001c640  30 2c 23 32 3a 42 47 54  20 78 73 61 6d 70 6c 65  |0,#2:BGT xsample|
0001c650  6c 70 0d a8 c0 0d 2e 78  64 6f 6e 65 64 69 76 0d  |lp.....xdonediv.|
0001c660  a8 ca 17 4c 44 4d 49 41  20 52 31 2c 7b 52 35 2c  |...LDMIA R1,{R5,|
0001c670  52 36 2c 52 37 7d 0d a8  d4 0d 4d 4f 56 20 52 38  |R6,R7}....MOV R8|
0001c680  2c 52 35 0d a8 de 0d 4d  4f 56 20 52 39 2c 52 36  |,R5....MOV R9,R6|
0001c690  0d a8 e8 0e 4d 4f 56 20  52 31 30 2c 52 37 0d a8  |....MOV R10,R7..|
0001c6a0  f2 22 53 54 4d 49 41 20  52 32 21 2c 7b 52 35 2c  |."STMIA R2!,{R5,|
0001c6b0  52 36 2c 52 37 2c 52 38  2c 52 39 2c 52 31 30 7d  |R6,R7,R8,R9,R10}|
0001c6c0  0d a8 fc 0f 4d 4f 56 53  20 50 43 2c 52 31 34 0d  |....MOVS PC,R14.|
0001c6d0  a9 06 05 5d 0d a9 10 05  cc 0d a9 1a 0a 5b 4f 50  |...].........[OP|
0001c6e0  54 20 5a 0d a9 2e 0d 2e  78 73 61 6d 70 6c 65 25  |T Z.....xsample%|
0001c6f0  0d a9 38 1b 4c 44 52 20  52 30 2c 5b 52 39 5d 3a  |..8.LDR R0,[R9]:|
0001c700  4c 44 52 20 52 30 2c 5b  52 30 5d 0d a9 42 12 4c  |LDR R0,[R0]..B.L|
0001c710  44 52 20 52 31 2c 5b 52  39 2c 23 38 5d 0d a9 4c  |DR R1,[R9,#8]..L|
0001c720  14 4c 44 52 20 52 32 2c  5b 52 39 2c 23 32 2a 38  |.LDR R2,[R9,#2*8|
0001c730  5d 0d a9 56 20 4c 44 52  20 52 33 2c 5b 52 39 2c  |]..V LDR R3,[R9,|
0001c740  23 33 2a 38 5d 3a 4c 44  52 20 52 33 2c 5b 52 33  |#3*8]:LDR R3,[R3|
0001c750  5d 0d a9 60 20 4c 44 52  20 52 34 2c 5b 52 39 2c  |]..` LDR R4,[R9,|
0001c760  23 34 2a 38 5d 3a 4c 44  52 20 52 34 2c 5b 52 34  |#4*8]:LDR R4,[R4|
0001c770  5d 0d a9 6a 0e 4d 4f 56  20 52 31 31 2c 52 34 0d  |]..j.MOV R11,R4.|
0001c780  a9 74 0e 2e 78 73 61 6d  70 6c 65 6c 70 0d a9 7e  |.t..xsamplelp..~|
0001c790  17 4c 44 4d 49 41 20 52  31 2c 7b 52 35 2c 52 36  |.LDMIA R1,{R5,R6|
0001c7a0  2c 52 37 7d 0d a9 88 2d  53 55 42 53 20 52 31 31  |,R7}...-SUBS R11|
0001c7b0  2c 52 31 31 2c 23 31 3a  ec 51 20 52 31 31 2c 52  |,R11,#1:.Q R11,R|
0001c7c0  34 3a 41 44 44 45 51 20  52 31 2c 52 31 2c 23 31  |4:ADDEQ R1,R1,#1|
0001c7d0  32 0d a9 92 12 53 55 42  53 20 52 31 32 2c 52 33  |2....SUBS R12,R3|
0001c7e0  2c 23 31 0d a9 9c 10 42  45 51 20 78 64 6f 6e 65  |,#1....BEQ xdone|
0001c7f0  64 69 76 0d a9 a6 0b 2e  78 64 69 76 6c 70 0d a9  |div.....xdivlp..|
0001c800  b0 0f 43 4d 50 20 52 31  32 2c 52 31 31 0d a9 ba  |..CMP R12,R11...|
0001c810  0f 42 43 43 20 78 64 69  76 6c 70 32 0d a9 c4 4d  |.BCC xdivlp2...M|
0001c820  4c 44 4d 49 41 20 52 31  21 2c 7b 52 38 2c 52 39  |LDMIA R1!,{R8,R9|
0001c830  2c 52 31 30 7d 3a 4d 4c  41 20 52 35 2c 52 38 2c  |,R10}:MLA R5,R8,|
0001c840  52 31 31 2c 52 35 3a 4d  4c 41 20 52 36 2c 52 39  |R11,R5:MLA R6,R9|
0001c850  2c 52 31 31 2c 52 36 3a  4d 4c 41 20 52 37 2c 52  |,R11,R6:MLA R7,R|
0001c860  31 30 2c 52 31 31 2c 52  37 0d a9 ce 1f 53 55 42  |10,R11,R7....SUB|
0001c870  53 20 52 31 32 2c 52 31  32 2c 52 31 31 3a 4d 4f  |S R12,R12,R11:MO|
0001c880  56 20 52 31 31 2c 52 34  0d a9 d8 0e 42 4e 45 20  |V R11,R4....BNE |
0001c890  78 64 69 76 6c 70 0d a9  e2 0e 42 20 78 64 6f 6e  |xdivlp....B xdon|
0001c8a0  65 64 69 76 0d a9 ec 0c  2e 78 64 69 76 6c 70 32  |ediv.....xdivlp2|
0001c8b0  0d a9 f6 18 4c 44 4d 49  41 20 52 31 2c 7b 52 38  |....LDMIA R1,{R8|
0001c8c0  2c 52 39 2c 52 31 30 7d  0d aa 00 2d 53 55 42 53  |,R9,R10}...-SUBS|
0001c8d0  20 52 31 31 2c 52 31 31  2c 23 31 3a ec 51 20 52  | R11,R11,#1:.Q R|
0001c8e0  31 31 2c 52 34 3a 41 44  44 45 51 20 52 31 2c 52  |11,R4:ADDEQ R1,R|
0001c8f0  31 2c 23 31 32 0d aa 0a  2b 41 44 44 20 52 35 2c  |1,#12...+ADD R5,|
0001c900  52 35 2c 52 38 3a 41 44  44 20 52 36 2c 52 36 2c  |R5,R8:ADD R6,R6,|
0001c910  52 39 3a 41 44 44 20 52  37 2c 52 37 2c 52 31 30  |R9:ADD R7,R7,R10|
0001c920  0d aa 14 1e 53 55 42 53  20 52 31 32 2c 52 31 32  |....SUBS R12,R12|
0001c930  2c 23 31 3a 42 4e 45 20  78 64 69 76 6c 70 0d aa  |,#1:BNE xdivlp..|
0001c940  1e 0d 2e 78 64 6f 6e 65  64 69 76 0d aa 28 18 53  |...xdonediv..(.S|
0001c950  54 4d 49 41 20 52 32 21  2c 7b 52 35 2c 52 36 2c  |TMIA R2!,{R5,R6,|
0001c960  52 37 7d 0d aa 32 1f 53  55 42 53 20 52 30 2c 52  |R7}..2.SUBS R0,R|
0001c970  30 2c 23 31 3a 42 50 4c  20 78 73 61 6d 70 6c 65  |0,#1:BPL xsample|
0001c980  6c 70 0d aa 3c 0f 4d 4f  56 53 20 50 43 2c 52 31  |lp..<.MOVS PC,R1|
0001c990  34 0d aa 46 05 5d 0d aa  50 05 cd 0d aa 5a 05 cb  |4..F.]..P....Z..|
0001c9a0  0d aa 64 14 e7 63 6f 6d  70 72 65 73 73 69 6f 6e  |..d..compression|
0001c9b0  3d 35 20 8c 0d aa 6e 0a  5b 4f 50 54 20 5a 0d aa  |=5 ...n.[OPT Z..|
0001c9c0  82 14 2e 66 69 72 73 74  63 6f 64 65 20 44 43 44  |...firstcode DCD|
0001c9d0  20 30 0d aa 8c 12 2e 6f  6c 64 63 6f 64 65 20 44  | 0.....oldcode D|
0001c9e0  43 44 20 30 0d aa 96 1d  2e 63 6f 64 65 73 69 7a  |CD 0.....codesiz|
0001c9f0  65 20 44 43 44 20 73 65  74 63 6f 64 65 73 25 2b  |e DCD setcodes%+|
0001ca00  31 0d aa a0 13 2e 73 74  61 63 6b 20 44 43 44 20  |1.....stack DCD |
0001ca10  73 74 6b 25 0d aa aa 10  2e 73 70 20 44 43 44 20  |stk%.....sp DCD |
0001ca20  73 74 6b 25 0d aa b4 1d  2e 6d 61 78 63 6f 64 65  |stk%.....maxcode|
0001ca30  20 44 43 44 20 63 6c 65  61 72 63 6f 64 65 25 2b  | DCD clearcode%+|
0001ca40  32 0d aa be 21 2e 6d 61  78 63 6f 64 65 73 69 7a  |2...!.maxcodesiz|
0001ca50  65 20 44 43 44 20 32 2a  63 6c 65 61 72 63 6f 64  |e DCD 2*clearcod|
0001ca60  65 25 0d aa c8 0f 2e 4c  5a 57 64 65 63 6f 64 65  |e%.....LZWdecode|
0001ca70  25 0d aa d2 40 4c 44 52  20 52 32 2c 66 69 72 73  |%...@LDR R2,firs|
0001ca80  74 63 6f 64 65 3a 4c 44  52 20 52 33 2c 6f 6c 64  |tcode:LDR R3,old|
0001ca90  63 6f 64 65 3a 4c 44 52  20 52 34 2c 73 74 61 63  |code:LDR R4,stac|
0001caa0  6b 3a 4c 44 52 20 52 35  2c 63 6f 64 65 73 69 7a  |k:LDR R5,codesiz|
0001cab0  65 0d aa dc 2f 4c 44 52  20 52 36 2c 73 70 3a 4c  |e.../LDR R6,sp:L|
0001cac0  44 52 20 52 37 2c 6d 61  78 63 6f 64 65 3a 4c 44  |DR R7,maxcode:LD|
0001cad0  52 20 52 38 2c 6d 61 78  63 6f 64 65 73 69 7a 65  |R R8,maxcodesize|
0001cae0  0d aa e6 1e 4c 44 52 20  52 31 30 2c 5b 52 39 5d  |....LDR R10,[R9]|
0001caf0  3a 4c 44 52 20 52 31 30  2c 5b 52 31 30 5d 0d aa  |:LDR R10,[R10]..|
0001cb00  f0 21 4c 44 52 20 52 31  31 2c 5b 52 39 2c 23 38  |.!LDR R11,[R9,#8|
0001cb10  5d 3a 4c 44 52 20 52 31  31 2c 5b 52 31 31 5d 0d  |]:LDR R11,[R11].|
0001cb20  aa fa 14 4c 44 52 20 52  31 32 2c 5b 52 39 2c 23  |...LDR R12,[R9,#|
0001cb30  32 34 5d 0d ab 04 14 53  54 4d 46 44 20 53 50 20  |24]....STMFD SP |
0001cb40  21 2c 7b 52 31 34 7d 0d  ab 0e 0c 2e 6c 7a 77 6c  |!,{R14}.....lzwl|
0001cb50  6f 6f 70 0d ab 18 0d 43  4d 50 20 52 36 2c 52 34  |oop....CMP R6,R4|
0001cb60  0d ab 22 12 42 48 49 20  6c 7a 77 75 6e 73 74 61  |..".BHI lzwunsta|
0001cb70  63 6b 0d ab 2c 0e 2e 6c  7a 77 65 6e 67 69 6e 65  |ck..,..lzwengine|
0001cb80  0d ab 36 0e 42 4c 20 67  65 74 63 6f 64 65 0d ab  |..6.BL getcode..|
0001cb90  40 16 43 4d 50 20 52 30  2c 23 63 6c 65 61 72 63  |@.CMP R0,#clearc|
0001cba0  6f 64 65 25 0d ab 4a 10  42 45 51 20 6c 7a 77 63  |ode%..J.BEQ lzwc|
0001cbb0  6c 65 61 72 0d ab 5e 0d  4d 4f 56 20 52 31 2c 52  |lear..^.MOV R1,R|
0001cbc0  30 0d ab 68 0d 43 4d 50  20 52 30 2c 52 37 0d ab  |0..h.CMP R0,R7..|
0001cbd0  72 15 53 54 52 43 53 42  20 52 32 2c 5b 52 36 5d  |r.STRCSB R2,[R6]|
0001cbe0  2c 23 31 0d ab 7c 0f 4d  4f 56 43 53 20 52 30 2c  |,#1..|.MOVCS R0,|
0001cbf0  52 33 0d ab 86 16 43 4d  50 20 52 30 2c 23 63 6c  |R3....CMP R0,#cl|
0001cc00  65 61 72 63 6f 64 65 25  0d ab 90 13 42 43 43 20  |earcode%....BCC |
0001cc10  6c 7a 77 64 6f 6e 65 70  75 73 68 0d ab 9a 11 2e  |lzwdonepush.....|
0001cc20  6c 7a 77 70 75 73 68 74  61 62 6c 65 0d ab a4 1b  |lzwpushtable....|
0001cc30  4c 44 52 20 52 31 34 2c  5b 52 31 32 2c 52 30 2c  |LDR R14,[R12,R0,|
0001cc40  4c 53 4c 20 23 32 5d 0d  ab ae 14 53 54 52 42 20  |LSL #2]....STRB |
0001cc50  52 31 34 2c 5b 52 36 5d  2c 23 31 0d ab b8 16 4d  |R14,[R6],#1....M|
0001cc60  4f 56 20 52 30 2c 52 31  34 2c 4c 53 52 20 23 31  |OV R0,R14,LSR #1|
0001cc70  36 0d ab c2 16 43 4d 50  20 52 30 2c 23 63 6c 65  |6....CMP R0,#cle|
0001cc80  61 72 63 6f 64 65 25 0d  ab cc 14 42 43 53 20 6c  |arcode%....BCS l|
0001cc90  7a 77 70 75 73 68 74 61  62 6c 65 0d ab d6 10 2e  |zwpushtable.....|
0001cca0  6c 7a 77 64 6f 6e 65 70  75 73 68 0d ab e0 1a 4c  |lzwdonepush....L|
0001ccb0  44 52 20 52 32 2c 5b 52  31 32 2c 52 30 2c 4c 53  |DR R2,[R12,R0,LS|
0001ccc0  4c 20 23 32 5d 0d ab ea  16 42 49 43 20 52 32 2c  |L #2]....BIC R2,|
0001ccd0  52 32 2c 23 26 46 46 30  30 30 30 0d ab f4 18 42  |R2,#&FF0000....B|
0001cce0  49 43 20 52 32 2c 52 32  2c 23 26 46 46 30 30 30  |IC R2,R2,#&FF000|
0001ccf0  30 30 30 0d ab fe 13 53  54 52 42 20 52 32 2c 5b  |000....STRB R2,[|
0001cd00  52 36 5d 2c 23 31 0d ac  08 10 43 4d 50 20 52 37  |R6],#1....CMP R7|
0001cd10  2c 23 34 30 39 36 0d ac  12 11 42 43 53 20 6c 7a  |,#4096....BCS lz|
0001cd20  77 6e 6f 63 6f 64 65 0d  ac 1c 17 84 52 20 52 30  |wnocode.....R R0|
0001cd30  2c 52 32 2c 52 33 2c 4c  53 4c 20 23 31 36 0d ac  |,R2,R3,LSL #16..|
0001cd40  26 1a 53 54 52 20 52 30  2c 5b 52 31 32 2c 52 37  |&.STR R0,[R12,R7|
0001cd50  2c 4c 53 4c 20 23 32 5d  0d ac 30 10 41 44 44 20  |,LSL #2]..0.ADD |
0001cd60  52 37 2c 52 37 2c 23 31  0d ac 3a 0d 43 4d 50 20  |R7,R7,#1..:.CMP |
0001cd70  52 37 2c 52 38 0d ac 44  11 42 43 43 20 6c 7a 77  |R7,R8..D.BCC lzw|
0001cd80  6e 6f 63 6f 64 65 0d ac  4e 10 43 4d 50 20 52 38  |nocode..N.CMP R8|
0001cd90  2c 23 34 30 39 36 0d ac  58 12 41 44 44 43 43 20  |,#4096..X.ADDCC |
0001cda0  52 35 2c 52 35 2c 23 31  0d ac 62 16 4d 4f 56 43  |R5,R5,#1..b.MOVC|
0001cdb0  43 20 52 38 2c 52 38 2c  4c 53 4c 20 23 31 0d ac  |C R8,R8,LSL #1..|
0001cdc0  6c 05 5d 0d ac 76 10 e7  66 6c 61 67 3d 31 35 30  |l.]..v..flag=150|
0001cdd0  30 20 8c 0d ac 80 0a 5b  4f 50 54 20 5a 0d ac 8a  |0 .....[OPT Z...|
0001cde0  11 84 52 43 43 20 52 38  2c 52 38 2c 23 31 0d ac  |..RCC R8,R8,#1..|
0001cdf0  94 05 5d 0d ac 9e 05 cd  0d ac a8 0a 5b 4f 50 54  |..].........[OPT|
0001ce00  20 5a 0d ac b2 0e 2e 6c  7a 77 6e 6f 63 6f 64 65  | Z.....lzwnocode|
0001ce10  0d ac bc 0d 4d 4f 56 20  52 33 2c 52 31 0d ac c6  |....MOV R3,R1...|
0001ce20  0d 43 4d 50 20 52 36 2c  52 34 0d ac d0 11 42 4c  |.CMP R6,R4....BL|
0001ce30  53 20 6c 7a 77 65 6e 67  69 6e 65 0d ac da 0f 2e  |S lzwengine.....|
0001ce40  6c 7a 77 75 6e 73 74 61  63 6b 0d ac e4 15 4c 44  |lzwunstack....LD|
0001ce50  52 42 20 52 30 2c 5b 52  36 2c 23 2d 31 5d 21 0d  |RB R0,[R6,#-1]!.|
0001ce60  ac ee 0f 2e 6c 7a 77 6c  6f 6f 70 65 6e 64 0d ac  |....lzwloopend..|
0001ce70  f8 14 53 54 52 42 20 52  30 2c 5b 52 31 31 5d 2c  |..STRB R0,[R11],|
0001ce80  23 31 0d ad 02 13 53 55  42 53 20 52 31 30 2c 52  |#1....SUBS R10,R|
0001ce90  31 30 2c 23 31 0d ad 0c  0f 42 4e 45 20 6c 7a 77  |10,#1....BNE lzw|
0001cea0  6c 6f 6f 70 0d ad 16 33  53 54 52 20 52 32 2c 66  |loop...3STR R2,f|
0001ceb0  69 72 73 74 63 6f 64 65  3a 53 54 52 20 52 33 2c  |irstcode:STR R3,|
0001cec0  6f 6c 64 63 6f 64 65 3a  53 54 52 20 52 35 2c 63  |oldcode:STR R5,c|
0001ced0  6f 64 65 73 69 7a 65 0d  ad 20 2f 53 54 52 20 52  |odesize.. /STR R|
0001cee0  36 2c 73 70 3a 53 54 52  20 52 37 2c 6d 61 78 63  |6,sp:STR R7,maxc|
0001cef0  6f 64 65 3a 53 54 52 20  52 38 2c 6d 61 78 63 6f  |ode:STR R8,maxco|
0001cf00  64 65 73 69 7a 65 0d ad  2a 14 4c 44 4d 46 44 20  |desize..*.LDMFD |
0001cf10  53 50 20 21 2c 7b 50 43  7d 5e 0d ad 34 0d 2e 6c  |SP !,{PC}^..4..l|
0001cf20  7a 77 63 6c 65 61 72 0d  ad 3e 0d 4d 4f 56 20 52  |zwclear..>.MOV R|
0001cf30  30 2c 23 30 0d ad 48 0e  4d 4f 56 20 52 33 2c 52  |0,#0..H.MOV R3,R|
0001cf40  31 32 0d ad 52 14 2e 6c  7a 77 64 65 66 61 75 6c  |12..R..lzwdefaul|
0001cf50  74 74 61 62 6c 65 0d ad  5c 12 53 54 52 20 52 30  |ttable..\.STR R0|
0001cf60  2c 5b 52 33 5d 2c 23 34  0d ad 66 23 41 44 44 20  |,[R3],#4..f#ADD |
0001cf70  52 30 2c 52 30 2c 23 31  3a 43 4d 50 20 52 30 2c  |R0,R0,#1:CMP R0,|
0001cf80  23 63 6c 65 61 72 63 6f  64 65 25 0d ad 70 17 42  |#clearcode%..p.B|
0001cf90  43 43 20 6c 7a 77 64 65  66 61 75 6c 74 74 61 62  |CC lzwdefaulttab|
0001cfa0  6c 65 0d ad 7a 17 4d 4f  56 20 52 35 2c 23 73 65  |le..z.MOV R5,#se|
0001cfb0  74 63 6f 64 65 73 25 2b  31 0d ad 84 16 4d 4f 56  |tcodes%+1....MOV|
0001cfc0  20 52 37 2c 23 63 6c 65  61 72 63 6f 64 65 25 0d  | R7,#clearcode%.|
0001cfd0  ad 8e 14 4d 4f 56 20 52  38 2c 52 37 2c 4c 53 4c  |...MOV R8,R7,LSL|
0001cfe0  20 23 31 0d ad 98 05 5d  0d ad a2 10 e7 66 6c 61  | #1....].....fla|
0001cff0  67 3d 31 35 30 30 20 8c  0d ad ac 0a 5b 4f 50 54  |g=1500 .....[OPT|
0001d000  20 5a 0d ad b6 10 53 55  42 20 52 38 2c 52 38 2c  | Z....SUB R8,R8,|
0001d010  23 31 0d ad c0 05 5d 0d  ad ca 05 cd 0d ad d4 0a  |#1....].........|
0001d020  5b 4f 50 54 20 5a 0d ad  de 10 41 44 44 20 52 37  |[OPT Z....ADD R7|
0001d030  2c 52 37 2c 23 32 0d ad  e8 0e 42 4c 20 67 65 74  |,R7,#2....BL get|
0001d040  63 6f 64 65 0d ad f2 0d  4d 4f 56 20 52 32 2c 52  |code....MOV R2,R|
0001d050  30 0d ad fc 0d 4d 4f 56  20 52 33 2c 52 30 0d ae  |0....MOV R3,R0..|
0001d060  06 0d 4d 4f 56 20 52 36  2c 52 34 0d ae 10 10 42  |..MOV R6,R4....B|
0001d070  20 6c 7a 77 6c 6f 6f 70  65 6e 64 0d ae 24 11 2e  | lzwloopend..$..|
0001d080  63 75 72 62 69 74 20 44  43 44 20 30 0d ae 2e 12  |curbit DCD 0....|
0001d090  2e 6c 61 73 74 62 69 74  20 44 43 44 20 30 0d ae  |.lastbit DCD 0..|
0001d0a0  38 11 2e 62 75 66 20 44  43 44 20 62 75 66 25 0d  |8..buf DCD buf%.|
0001d0b0  ae 42 0c 2e 67 65 74 63  6f 64 65 0d ae 4c 19 53  |.B..getcode..L.S|
0001d0c0  54 4d 46 44 20 53 50 20  21 2c 7b 52 36 2c 52 37  |TMFD SP !,{R6,R7|
0001d0d0  2c 52 38 7d 0d ae 56 11  41 44 52 20 52 36 2c 63  |,R8}..V.ADR R6,c|
0001d0e0  75 72 62 69 74 0d ae 60  17 4c 44 4d 49 41 20 52  |urbit..`.LDMIA R|
0001d0f0  36 2c 7b 52 36 2c 52 37  2c 52 38 7d 0d ae 6a 10  |6,{R6,R7,R8}..j.|
0001d100  41 44 44 20 52 31 2c 52  35 2c 52 36 0d ae 74 0d  |ADD R1,R5,R6..t.|
0001d110  43 4d 50 20 52 31 2c 52  37 0d ae 7e 14 42 43 53  |CMP R1,R7..~.BCS|
0001d120  20 6e 65 65 64 6d 6f 72  65 64 61 74 61 0d ae 88  | needmoredata...|
0001d130  0f 2e 73 69 6d 70 6c 65  63 6f 64 65 0d ae 92 17  |..simplecode....|
0001d140  41 44 44 20 52 37 2c 52  38 2c 52 36 2c 4c 53 52  |ADD R7,R8,R6,LSR|
0001d150  20 23 33 0d ae 9c 10 42  49 43 20 52 37 2c 52 37  | #3....BIC R7,R7|
0001d160  2c 23 33 0d ae a6 14 4c  44 4d 49 41 20 52 37 2c  |,#3....LDMIA R7,|
0001d170  7b 52 30 2c 52 37 7d 0d  ae b0 05 5d 0d ae ba 10  |{R0,R7}....]....|
0001d180  e7 66 6c 61 67 3d 31 35  30 30 20 8c 0d ae c4 0a  |.flag=1500 .....|
0001d190  5b 4f 50 54 20 5a 0d ae  ce 16 82 20 52 31 2c 52  |[OPT Z..... R1,R|
0001d1a0  30 2c 52 30 2c 52 4f 52  20 23 31 36 0d ae d8 16  |0,R0,ROR #16....|
0001d1b0  42 49 43 20 52 31 2c 52  31 2c 23 26 46 46 30 30  |BIC R1,R1,#&FF00|
0001d1c0  30 30 0d ae e2 14 4d 4f  56 20 52 30 2c 52 30 2c  |00....MOV R0,R0,|
0001d1d0  52 4f 52 20 23 38 0d ae  ec 15 82 20 52 30 2c 52  |ROR #8..... R0,R|
0001d1e0  30 2c 52 31 2c 4c 53 52  20 23 38 0d ae f6 16 82  |0,R1,LSR #8.....|
0001d1f0  20 52 31 2c 52 37 2c 52  37 2c 52 4f 52 20 23 31  | R1,R7,R7,ROR #1|
0001d200  36 0d af 00 16 42 49 43  20 52 31 2c 52 31 2c 23  |6....BIC R1,R1,#|
0001d210  26 46 46 30 30 30 30 0d  af 0a 14 4d 4f 56 20 52  |&FF0000....MOV R|
0001d220  37 2c 52 37 2c 52 4f 52  20 23 38 0d af 14 15 82  |7,R7,ROR #8.....|
0001d230  20 52 37 2c 52 37 2c 52  31 2c 4c 53 52 20 23 38  | R7,R7,R1,LSR #8|
0001d240  0d af 1e 48 80 53 20 52  31 2c 52 36 2c 23 33 31  |...H.S R1,R6,#31|
0001d250  3a 4d 4f 56 4e 45 20 52  30 2c 52 30 2c 4c 53 4c  |:MOVNE R0,R0,LSL|
0001d260  20 52 31 3a 52 53 42 4e  45 20 52 31 2c 52 31 2c  | R1:RSBNE R1,R1,|
0001d270  23 33 32 3a 84 52 4e 45  20 52 30 2c 52 30 2c 52  |#32:.RNE R0,R0,R|
0001d280  37 2c 4c 53 52 20 52 31  0d af 28 11 52 53 42 20  |7,LSR R1..(.RSB |
0001d290  52 31 2c 52 35 2c 23 33  32 0d af 32 14 4d 4f 56  |R1,R5,#32..2.MOV|
0001d2a0  20 52 30 2c 52 30 2c 4c  53 52 20 52 31 0d af 3c  | R0,R0,LSR R1..<|
0001d2b0  05 5d 0d af 46 05 cc 0d  af 50 0a 5b 4f 50 54 20  |.]..F....P.[OPT |
0001d2c0  5a 0d af 5a 48 80 53 20  52 31 2c 52 36 2c 23 33  |Z..ZH.S R1,R6,#3|
0001d2d0  31 3a 4d 4f 56 4e 45 20  52 30 2c 52 30 2c 4c 53  |1:MOVNE R0,R0,LS|
0001d2e0  52 20 52 31 3a 52 53 42  4e 45 20 52 31 2c 52 31  |R R1:RSBNE R1,R1|
0001d2f0  2c 23 33 32 3a 84 52 4e  45 20 52 30 2c 52 30 2c  |,#32:.RNE R0,R0,|
0001d300  52 37 2c 4c 53 4c 20 52  31 0d af 64 21 4d 56 4e  |R7,LSL R1..d!MVN|
0001d310  20 52 31 2c 23 30 3a 42  49 43 20 52 30 2c 52 30  | R1,#0:BIC R0,R0|
0001d320  2c 52 31 2c 4c 53 4c 20  52 35 0d af 6e 05 5d 0d  |,R1,LSL R5..n.].|
0001d330  af 78 05 cd 0d af 82 0a  5b 4f 50 54 20 5a 0d af  |.x......[OPT Z..|
0001d340  8c 10 41 44 44 20 52 36  2c 52 36 2c 52 35 0d af  |..ADD R6,R6,R5..|
0001d350  96 11 53 54 52 20 52 36  2c 63 75 72 62 69 74 0d  |..STR R6,curbit.|
0001d360  af a0 19 4c 44 4d 46 44  20 53 50 20 21 2c 7b 52  |...LDMFD SP !,{R|
0001d370  36 2c 52 37 2c 52 38 7d  0d af aa 0e 4d 4f 56 20  |6,R7,R8}....MOV |
0001d380  50 43 2c 52 31 34 0d af  b4 11 2e 6e 65 65 64 6d  |PC,R14.....needm|
0001d390  6f 72 65 64 61 74 61 0d  af be 1d 53 54 4d 46 44  |oredata....STMFD|
0001d3a0  20 53 50 20 21 2c 7b 52  32 2c 52 33 2c 52 34 2c  | SP !,{R2,R3,R4,|
0001d3b0  52 31 34 7d 0d af c8 14  4d 4f 56 20 52 33 2c 52  |R14}....MOV R3,R|
0001d3c0  37 2c 4c 53 52 20 23 33  0d af d2 10 53 55 42 20  |7,LSR #3....SUB |
0001d3d0  52 30 2c 52 33 2c 23 32  0d af dc 13 4c 44 52 42  |R0,R3,#2....LDRB|
0001d3e0  20 52 30 2c 5b 52 38 2c  52 30 5d 0d af e6 10 53  | R0,[R8,R0]....S|
0001d3f0  54 52 42 20 52 30 2c 5b  52 38 5d 0d af f0 10 53  |TRB R0,[R8]....S|
0001d400  55 42 20 52 30 2c 52 33  2c 23 31 0d af fa 13 4c  |UB R0,R3,#1....L|
0001d410  44 52 42 20 52 30 2c 5b  52 38 2c 52 30 5d 0d b0  |DRB R0,[R8,R0]..|
0001d420  04 13 53 54 52 42 20 52  30 2c 5b 52 38 2c 23 31  |..STRB R0,[R8,#1|
0001d430  5d 0d b0 0e 13 4c 44 52  20 52 31 2c 5b 52 39 2c  |]....LDR R1,[R9,|
0001d440  23 31 36 5d 0d b0 18 0f  4c 44 52 20 52 31 2c 5b  |#16]....LDR R1,[|
0001d450  52 31 5d 0d b0 22 05 5d  0d b0 2c 10 e7 66 6c 61  |R1]..".]..,..fla|
0001d460  67 3d 31 35 30 30 20 8c  0d b0 36 0a 5b 4f 50 54  |g=1500 ...6.[OPT|
0001d470  20 5a 0d b0 40 0f 4d 4f  56 20 52 30 2c 23 32 35  | Z..@.MOV R0,#25|
0001d480  36 0d b0 4a 0f 4d 4f 56  20 52 33 2c 23 32 35 36  |6..J.MOV R3,#256|
0001d490  0d b0 54 05 5d 0d b0 5e  05 cc 0d b0 68 0a 5b 4f  |..T.]..^....h.[O|
0001d4a0  50 54 20 5a 0d b0 72 15  42 4c 20 62 79 74 65 66  |PT Z..r.BL bytef|
0001d4b0  72 6f 6d 63 61 63 68 65  25 0d b0 7c 0e 4d 4f 56  |romcache%..|.MOV|
0001d4c0  53 20 52 33 2c 52 30 0d  b0 86 13 42 45 51 20 73  |S R3,R0....BEQ s|
0001d4d0  69 6d 70 6c 65 63 6f 64  65 31 0d b0 90 05 5d 0d  |implecode1....].|
0001d4e0  b0 9a 05 cd 0d b0 a4 0a  5b 4f 50 54 20 5a 0d b0  |........[OPT Z..|
0001d4f0  ae 10 53 55 42 20 52 36  2c 52 36 2c 52 37 0d b0  |..SUB R6,R6,R7..|
0001d500  b8 11 41 44 44 20 52 36  2c 52 36 2c 23 31 36 0d  |..ADD R6,R6,#16.|
0001d510  b0 c2 10 41 44 44 20 52  30 2c 52 30 2c 23 32 0d  |...ADD R0,R0,#2.|
0001d520  b0 cc 14 4d 4f 56 20 52  37 2c 52 30 2c 4c 53 4c  |...MOV R7,R0,LSL|
0001d530  20 23 33 0d b0 d6 12 53  54 52 20 52 37 2c 6c 61  | #3....STR R7,la|
0001d540  73 74 62 69 74 0d b0 e0  10 41 44 44 20 52 32 2c  |stbit....ADD R2,|
0001d550  52 38 2c 23 32 0d b0 ea  1a 42 4c 20 6d 75 6c 74  |R8,#2....BL mult|
0001d560  69 62 79 74 65 66 72 6f  6d 63 61 63 68 65 25 0d  |ibytefromcache%.|
0001d570  b0 f4 10 2e 73 69 6d 70  6c 65 63 6f 64 65 31 0d  |....simplecode1.|
0001d580  b0 fe 1d 4c 44 4d 46 44  20 53 50 20 21 2c 7b 52  |...LDMFD SP !,{R|
0001d590  32 2c 52 33 2c 52 34 2c  52 31 34 7d 0d b1 08 10  |2,R3,R4,R14}....|
0001d5a0  42 20 73 69 6d 70 6c 65  63 6f 64 65 0d b1 12 05  |B simplecode....|
0001d5b0  5d 0d b1 1c 05 cd 0d b1  26 0d e7 72 61 6e 67 65  |].......&..range|
0001d5c0  25 20 8c 0d b1 30 0a 5b  4f 50 54 20 5a 0d b1 44  |% ...0.[OPT Z..D|
0001d5d0  0c 2e 6d 61 78 6d 69 6e  25 0d b1 4e 1b 4c 44 52  |..maxmin%..N.LDR|
0001d5e0  20 52 30 2c 5b 52 39 5d  3a 4c 44 52 20 52 30 2c  | R0,[R9]:LDR R0,|
0001d5f0  5b 52 30 5d 0d b1 58 12  4c 44 52 20 52 31 2c 5b  |[R0]..X.LDR R1,[|
0001d600  52 39 2c 23 38 5d 0d b1  62 0e 4c 44 52 20 52 32  |R9,#8]..b.LDR R2|
0001d610  2c 6d 69 6e 0d b1 6c 0e  4c 44 52 20 52 33 2c 6d  |,min..l.LDR R3,m|
0001d620  61 78 0d b1 76 0d 2e 6d  61 78 6d 69 6e 6c 70 0d  |ax..v..maxminlp.|
0001d630  b1 80 12 4c 44 52 20 52  34 2c 5b 52 31 5d 2c 23  |...LDR R4,[R1],#|
0001d640  34 0d b1 8a 19 43 4d 50  20 52 34 2c 52 33 3a 4d  |4....CMP R4,R3:M|
0001d650  4f 56 43 53 20 52 33 2c  52 34 0d b1 94 19 43 4d  |OVCS R3,R4....CM|
0001d660  50 20 52 34 2c 52 32 3a  4d 4f 56 43 43 20 52 32  |P R4,R2:MOVCC R2|
0001d670  2c 52 34 0d b1 9e 1e 53  55 42 53 20 52 30 2c 52  |,R4....SUBS R0,R|
0001d680  30 2c 23 31 3a 42 4e 45  20 6d 61 78 6d 69 6e 6c  |0,#1:BNE maxminl|
0001d690  70 0d b1 a8 0e 53 54 52  20 52 32 2c 6d 69 6e 0d  |p....STR R2,min.|
0001d6a0  b1 b2 0e 53 54 52 20 52  33 2c 6d 61 78 0d b1 bc  |...STR R3,max...|
0001d6b0  0f 4d 4f 56 53 20 50 43  2c 52 31 34 0d b1 c6 0e  |.MOVS PC,R14....|
0001d6c0  2e 6d 69 6e 20 44 43 44  20 46 0d b1 d0 0e 2e 6d  |.min DCD F.....m|
0001d6d0  61 78 20 44 43 44 20 30  0d b1 da 05 5d 0d b1 e4  |ax DCD 0....]...|
0001d6e0  05 cd 0d b1 ee 0f e7 73  68 61 72 70 65 6e 25 20  |.......sharpen% |
0001d6f0  8c 0d b1 f8 21 73 68 61  72 70 3d 28 63 6f 6c 2b  |....!sharp=(col+|
0001d700  31 29 2a 34 3a e7 73 68  61 72 70 65 6e 25 3e 30  |1)*4:.sharpen%>0|
0001d710  20 8c 0d b2 02 2a e7 20  73 68 61 72 70 65 6e 25  | ....*. sharpen%|
0001d720  3c 3e 38 20 73 68 61 72  70 6d 75 6c 25 3d 46 2f  |<>8 sharpmul%=F/|
0001d730  28 73 68 61 72 70 65 6e  25 2d 38 29 0d b2 0c 05  |(sharpen%-8)....|
0001d740  cc 0d b2 16 1c 73 68 61  72 70 6d 75 6c 25 3d 46  |.....sharpmul%=F|
0001d750  2f 28 38 2d 73 68 61 72  70 65 6e 25 29 0d b2 20  |/(8-sharpen%).. |
0001d760  05 cd 0d b2 2a 0a 5b 4f  50 54 20 5a 0d b2 3e 0b  |....*.[OPT Z..>.|
0001d770  2e 73 68 61 72 70 25 0d  b2 48 1b 4c 44 52 20 52  |.sharp%..H.LDR R|
0001d780  30 2c 5b 52 39 5d 3a 4c  44 52 20 52 30 2c 5b 52  |0,[R9]:LDR R0,[R|
0001d790  30 5d 0d b2 52 12 4c 44  52 20 52 31 2c 5b 52 39  |0]..R.LDR R1,[R9|
0001d7a0  2c 23 38 5d 0d b2 5c 13  4c 44 52 20 52 32 2c 5b  |,#8]..\.LDR R2,[|
0001d7b0  52 39 2c 23 31 36 5d 0d  b2 66 13 4c 44 52 20 52  |R9,#16]..f.LDR R|
0001d7c0  33 2c 5b 52 39 2c 23 32  34 5d 0d b2 70 13 4c 44  |3,[R9,#24]..p.LD|
0001d7d0  52 20 52 34 2c 5b 52 39  2c 23 33 32 5d 0d b2 7a  |R R4,[R9,#32]..z|
0001d7e0  05 5d 0d b2 84 11 c8 8e  20 73 68 61 72 70 65 6e  |.]...... sharpen|
0001d7f0  25 20 ca 0d b2 8e 08 c9  20 2d 38 0d b2 98 12 c9  |% ...... -8.....|
0001d800  20 38 2c 39 2c 31 32 2c  31 36 2c 32 34 0d b2 a2  | 8,9,12,16,24...|
0001d810  05 7f 0d b2 ac 0a 5b 4f  50 54 20 5a 0d b2 b6 1b  |......[OPT Z....|
0001d820  4d 4f 56 20 52 38 2c 23  73 68 61 72 70 6d 75 6c  |MOV R8,#sharpmul|
0001d830  25 20 80 20 26 46 46 0d  b2 c0 1f 84 52 20 52 38  |% . &FF.....R R8|
0001d840  2c 52 38 2c 23 73 68 61  72 70 6d 75 6c 25 20 80  |,R8,#sharpmul% .|
0001d850  20 26 46 46 30 30 0d b2  ca 23 4d 4f 56 20 52 39  | &FF00...#MOV R9|
0001d860  2c 23 28 73 68 61 72 70  6d 75 6c 25 20 3e 3e 20  |,#(sharpmul% >> |
0001d870  31 36 29 20 80 20 26 46  46 0d b2 d4 27 84 52 20  |16) . &FF...'.R |
0001d880  52 39 2c 52 39 2c 23 28  73 68 61 72 70 6d 75 6c  |R9,R9,#(sharpmul|
0001d890  25 20 3e 3e 20 31 36 29  20 80 20 26 46 46 30 30  |% >> 16) . &FF00|
0001d8a0  0d b2 de 05 5d 0d b2 e8  05 cb 0d b2 f2 0a 5b 4f  |....].........[O|
0001d8b0  50 54 20 5a 0d b2 fc 0c  2e 73 68 61 72 70 6c 70  |PT Z.....sharplp|
0001d8c0  0d b3 06 17 4c 44 52 20  52 35 2c 5b 52 31 2c 23  |....LDR R5,[R1,#|
0001d8d0  2d 73 68 61 72 70 5d 0d  b3 10 23 4c 44 52 20 52  |-sharp]...#LDR R|
0001d8e0  36 2c 5b 52 31 2c 23 73  68 61 72 70 5d 3a 41 44  |6,[R1,#sharp]:AD|
0001d8f0  44 20 52 35 2c 52 35 2c  52 36 0d b3 1a 1f 4c 44  |D R5,R5,R6....LD|
0001d900  52 20 52 36 2c 5b 52 31  5d 2c 23 34 3a 41 44 44  |R R6,[R1],#4:ADD|
0001d910  20 52 35 2c 52 35 2c 52  36 0d b3 24 24 4c 44 52  | R5,R5,R6..$$LDR|
0001d920  20 52 36 2c 5b 52 33 2c  23 2d 73 68 61 72 70 5d  | R6,[R3,#-sharp]|
0001d930  3a 41 44 44 20 52 35 2c  52 35 2c 52 36 0d b3 2e  |:ADD R5,R5,R6...|
0001d940  23 4c 44 52 20 52 36 2c  5b 52 33 2c 23 73 68 61  |#LDR R6,[R3,#sha|
0001d950  72 70 5d 3a 41 44 44 20  52 35 2c 52 35 2c 52 36  |rp]:ADD R5,R5,R6|
0001d960  0d b3 38 1f 4c 44 52 20  52 36 2c 5b 52 33 5d 2c  |..8.LDR R6,[R3],|
0001d970  23 34 3a 41 44 44 20 52  35 2c 52 35 2c 52 36 0d  |#4:ADD R5,R5,R6.|
0001d980  b3 42 24 4c 44 52 20 52  36 2c 5b 52 32 2c 23 2d  |.B$LDR R6,[R2,#-|
0001d990  73 68 61 72 70 5d 3a 41  44 44 20 52 35 2c 52 35  |sharp]:ADD R5,R5|
0001d9a0  2c 52 36 0d b3 4c 23 4c  44 52 20 52 36 2c 5b 52  |,R6..L#LDR R6,[R|
0001d9b0  32 2c 23 73 68 61 72 70  5d 3a 41 44 44 20 52 35  |2,#sharp]:ADD R5|
0001d9c0  2c 52 35 2c 52 36 0d b3  56 12 4c 44 52 20 52 36  |,R5,R6..V.LDR R6|
0001d9d0  2c 5b 52 32 5d 2c 23 34  0d b3 60 14 4d 4f 56 20  |,[R2],#4..`.MOV |
0001d9e0  52 36 2c 52 36 2c 4c 53  52 20 23 31 0d b3 6a 15  |R6,R6,LSR #1..j.|
0001d9f0  4d 4f 56 20 52 37 2c 23  94 73 68 61 72 70 65 6e  |MOV R7,#.sharpen|
0001da00  25 0d b3 74 10 4d 55 4c  20 52 37 2c 52 36 2c 52  |%..t.MUL R7,R6,R|
0001da10  37 0d b3 7e 05 5d 0d b3  88 11 e7 73 68 61 72 70  |7..~.].....sharp|
0001da20  65 6e 25 3e 30 20 8c 0d  b3 92 0a 5b 4f 50 54 20  |en%>0 .....[OPT |
0001da30  5a 0d b3 9c 18 53 55 42  53 20 52 35 2c 52 37 2c  |Z....SUBS R5,R7,|
0001da40  52 35 2c 4c 53 52 20 23  31 0d b3 a6 0f 4d 4f 56  |R5,LSR #1....MOV|
0001da50  43 43 20 52 35 2c 23 30  0d b3 b0 05 5d 0d b3 ba  |CC R5,#0....]...|
0001da60  05 cc 0d b3 c4 0a 5b 4f  50 54 20 5a 0d b3 ce 17  |......[OPT Z....|
0001da70  41 44 44 20 52 35 2c 52  37 2c 52 35 2c 4c 53 52  |ADD R5,R7,R5,LSR|
0001da80  20 23 31 0d b3 d8 05 5d  0d b3 e2 05 cd 0d b3 ec  | #1....]........|
0001da90  11 c8 8e 20 73 68 61 72  70 65 6e 25 20 ca 0d b3  |... sharpen% ...|
0001daa0  f6 09 c9 20 38 2c 39 0d  b4 00 0a 5b 4f 50 54 20  |... 8,9....[OPT |
0001dab0  5a 0d b4 0a 14 4d 4f 56  20 52 36 2c 52 35 2c 4c  |Z....MOV R6,R5,L|
0001dac0  53 4c 20 23 31 0d b4 14  05 5d 0d b4 1e 08 c9 20  |SL #1....]..... |
0001dad0  31 30 0d b4 28 0a 5b 4f  50 54 20 5a 0d b4 32 0d  |10..(.[OPT Z..2.|
0001dae0  4d 4f 56 20 52 36 2c 52  35 0d b4 3c 05 5d 0d b4  |MOV R6,R5..<.]..|
0001daf0  46 08 c9 20 31 32 0d b4  50 0a 5b 4f 50 54 20 5a  |F.. 12..P.[OPT Z|
0001db00  0d b4 5a 14 4d 4f 56 20  52 36 2c 52 35 2c 4c 53  |..Z.MOV R6,R5,LS|
0001db10  52 20 23 31 0d b4 64 05  5d 0d b4 6e 08 c9 20 31  |R #1..d.]..n.. 1|
0001db20  36 0d b4 78 0a 5b 4f 50  54 20 5a 0d b4 82 14 4d  |6..x.[OPT Z....M|
0001db30  4f 56 20 52 36 2c 52 35  2c 4c 53 52 20 23 32 0d  |OV R6,R5,LSR #2.|
0001db40  b4 8c 05 5d 0d b4 96 0b  c9 20 2d 38 2c 32 34 0d  |...]..... -8,24.|
0001db50  b4 a0 0a 5b 4f 50 54 20  5a 0d b4 aa 14 4d 4f 56  |...[OPT Z....MOV|
0001db60  20 52 36 2c 52 35 2c 4c  53 52 20 23 33 0d b4 b4  | R6,R5,LSR #3...|
0001db70  05 5d 0d b4 be 05 7f 0d  b4 c8 0a 5b 4f 50 54 20  |.].........[OPT |
0001db80  5a 0d b4 d2 15 4d 4f 56  20 52 36 2c 52 35 2c 4c  |Z....MOV R6,R5,L|
0001db90  53 52 20 23 31 36 0d b4  dc 16 82 20 52 35 2c 52  |SR #16..... R5,R|
0001dba0  35 2c 52 36 2c 4c 53 4c  20 23 31 36 0d b4 e6 10  |5,R6,LSL #16....|
0001dbb0  4d 55 4c 20 52 37 2c 52  38 2c 52 35 0d b4 f0 10  |MUL R7,R8,R5....|
0001dbc0  4d 55 4c 20 52 35 2c 52  39 2c 52 35 0d b4 fa 11  |MUL R5,R9,R5....|
0001dbd0  4d 55 4c 20 52 31 30 2c  52 36 2c 52 38 0d b5 04  |MUL R10,R6,R8...|
0001dbe0  10 4d 55 4c 20 52 36 2c  52 39 2c 52 36 0d b5 0e  |.MUL R6,R9,R6...|
0001dbf0  13 41 44 44 53 20 52 31  30 2c 52 35 2c 52 31 30  |.ADDS R10,R5,R10|
0001dc00  0d b5 18 17 41 44 44 43  53 20 52 36 2c 52 36 2c  |....ADDCS R6,R6,|
0001dc10  23 26 31 30 30 30 30 0d  b5 22 1a 41 44 44 53 20  |#&10000..".ADDS |
0001dc20  52 37 2c 52 37 2c 52 31  30 2c 4c 53 4c 20 23 31  |R7,R7,R10,LSL #1|
0001dc30  36 0d b5 2c 19 41 44 43  20 52 36 2c 52 36 2c 52  |6..,.ADC R6,R6,R|
0001dc40  31 30 2c 4c 53 52 20 23  31 36 0d b5 36 1a 4d 4f  |10,LSR #16..6.MO|
0001dc50  56 20 52 36 2c 52 36 2c  4c 53 4c 20 23 28 33 32  |V R6,R6,LSL #(32|
0001dc60  2d 32 37 29 0d b5 40 18  84 52 53 20 52 36 2c 52  |-27)..@..RS R6,R|
0001dc70  36 2c 52 37 2c 4c 53 52  20 23 32 37 0d b5 4a 12  |6,R7,LSR #27..J.|
0001dc80  41 44 44 43 53 20 52 36  2c 52 36 2c 23 31 0d b5  |ADDCS R6,R6,#1..|
0001dc90  54 05 5d 0d b5 5e 05 cb  0d b5 68 11 e7 73 68 61  |T.]..^....h..sha|
0001dca0  72 70 65 6e 25 3e 30 20  8c 0d b5 72 0a 5b 4f 50  |rpen%>0 ...r.[OP|
0001dcb0  54 20 5a 0d b5 7c 19 43  4d 50 20 52 36 2c 23 46  |T Z..|.CMP R6,#F|
0001dcc0  3a 4d 4f 56 43 53 20 52  36 2c 23 46 0d b5 86 05  |:MOVCS R6,#F....|
0001dcd0  5d 0d b5 90 05 cd 0d b5  9a 0a 5b 4f 50 54 20 5a  |].........[OPT Z|
0001dce0  0d b5 a4 12 53 54 52 20  52 36 2c 5b 52 34 5d 2c  |....STR R6,[R4],|
0001dcf0  23 34 0d b5 ae 11 53 55  42 53 20 52 30 2c 52 30  |#4....SUBS R0,R0|
0001dd00  2c 23 31 0d b5 b8 0f 42  4e 45 20 73 68 61 72 70  |,#1....BNE sharp|
0001dd10  6c 70 0d b5 c2 0f 4d 4f  56 53 20 50 43 2c 52 31  |lp....MOVS PC,R1|
0001dd20  34 0d b5 cc 05 5d 0d b5  d6 05 cd 0d b5 e0 13 e7  |4....]..........|
0001dd30  68 69 73 74 25 84 65 71  75 61 6c 25 20 8c 0d b5  |hist%.equal% ...|
0001dd40  ea 0a 5b 4f 50 54 20 5a  0d b5 fe 0b 2e 68 69 73  |..[OPT Z.....his|
0001dd50  74 6f 25 0d b6 08 1b 4c  44 52 20 52 30 2c 5b 52  |to%....LDR R0,[R|
0001dd60  39 5d 3a 4c 44 52 20 52  30 2c 5b 52 30 5d 0d b6  |9]:LDR R0,[R0]..|
0001dd70  12 12 4c 44 52 20 52 31  2c 5b 52 39 2c 23 38 5d  |..LDR R1,[R9,#8]|
0001dd80  0d b6 1c 13 4c 44 52 20  52 32 2c 5b 52 39 2c 23  |....LDR R2,[R9,#|
0001dd90  31 36 5d 0d b6 26 0b 2e  68 69 73 74 6c 70 0d b6  |16]..&..histlp..|
0001dda0  30 28 4c 44 52 20 52 33  2c 5b 52 32 5d 2c 23 34  |0(LDR R3,[R2],#4|
0001ddb0  3a 43 4d 50 20 52 33 2c  23 46 3a 4d 4f 56 43 53  |:CMP R3,#F:MOVCS|
0001ddc0  20 52 33 2c 23 46 0d b6  3a 19 4d 4f 56 20 52 33  | R3,#F..:.MOV R3|
0001ddd0  2c 52 33 2c 4c 53 52 20  23 62 69 74 73 2d 38 0d  |,R3,LSR #bits-8.|
0001dde0  b6 44 05 5d 0d b6 4e 0c  e7 63 6f 6c 3d 32 20 8c  |.D.]..N..col=2 .|
0001ddf0  0d b6 58 0a 5b 4f 50 54  20 5a 0d b6 62 17 41 44  |..X.[OPT Z..b.AD|
0001de00  44 20 52 33 2c 52 33 2c  52 33 2c 4c 53 4c 20 23  |D R3,R3,R3,LSL #|
0001de10  31 0d b6 6c 3c 4c 44 52  20 52 34 2c 5b 52 31 2c  |1..l<LDR R4,[R1,|
0001de20  52 33 2c 4c 53 4c 20 23  32 5d 3a 41 44 44 20 52  |R3,LSL #2]:ADD R|
0001de30  34 2c 52 34 2c 23 31 3a  53 54 52 20 52 34 2c 5b  |4,R4,#1:STR R4,[|
0001de40  52 31 2c 52 33 2c 4c 53  4c 20 23 32 5d 0d b6 76  |R1,R3,LSL #2]..v|
0001de50  28 4c 44 52 20 52 33 2c  5b 52 32 5d 2c 23 34 3a  |(LDR R3,[R2],#4:|
0001de60  43 4d 50 20 52 33 2c 23  46 3a 4d 4f 56 43 53 20  |CMP R3,#F:MOVCS |
0001de70  52 33 2c 23 46 0d b6 80  19 4d 4f 56 20 52 33 2c  |R3,#F....MOV R3,|
0001de80  52 33 2c 4c 53 52 20 23  62 69 74 73 2d 38 0d b6  |R3,LSR #bits-8..|
0001de90  8a 24 41 44 44 20 52 33  2c 52 33 2c 52 33 2c 4c  |.$ADD R3,R3,R3,L|
0001dea0  53 4c 20 23 31 3a 41 44  44 20 52 33 2c 52 33 2c  |SL #1:ADD R3,R3,|
0001deb0  23 31 0d b6 94 3c 4c 44  52 20 52 34 2c 5b 52 31  |#1...<LDR R4,[R1|
0001dec0  2c 52 33 2c 4c 53 4c 20  23 32 5d 3a 41 44 44 20  |,R3,LSL #2]:ADD |
0001ded0  52 34 2c 52 34 2c 23 31  3a 53 54 52 20 52 34 2c  |R4,R4,#1:STR R4,|
0001dee0  5b 52 31 2c 52 33 2c 4c  53 4c 20 23 32 5d 0d b6  |[R1,R3,LSL #2]..|
0001def0  9e 28 4c 44 52 20 52 33  2c 5b 52 32 5d 2c 23 34  |.(LDR R3,[R2],#4|
0001df00  3a 43 4d 50 20 52 33 2c  23 46 3a 4d 4f 56 43 53  |:CMP R3,#F:MOVCS|
0001df10  20 52 33 2c 23 46 0d b6  a8 19 4d 4f 56 20 52 33  | R3,#F....MOV R3|
0001df20  2c 52 33 2c 4c 53 52 20  23 62 69 74 73 2d 38 0d  |,R3,LSR #bits-8.|
0001df30  b6 b2 24 41 44 44 20 52  33 2c 52 33 2c 52 33 2c  |..$ADD R3,R3,R3,|
0001df40  4c 53 4c 20 23 31 3a 41  44 44 20 52 33 2c 52 33  |LSL #1:ADD R3,R3|
0001df50  2c 23 32 0d b6 bc 05 5d  0d b6 c6 05 cd 0d b6 d0  |,#2....]........|
0001df60  0a 5b 4f 50 54 20 5a 0d  b6 da 3c 4c 44 52 20 52  |.[OPT Z...<LDR R|
0001df70  34 2c 5b 52 31 2c 52 33  2c 4c 53 4c 20 23 32 5d  |4,[R1,R3,LSL #2]|
0001df80  3a 41 44 44 20 52 34 2c  52 34 2c 23 31 3a 53 54  |:ADD R4,R4,#1:ST|
0001df90  52 20 52 34 2c 5b 52 31  2c 52 33 2c 4c 53 4c 20  |R R4,[R1,R3,LSL |
0001dfa0  23 32 5d 0d b6 e4 11 53  55 42 53 20 52 30 2c 52  |#2]....SUBS R0,R|
0001dfb0  30 2c 23 31 0d b6 ee 0e  42 4e 45 20 68 69 73 74  |0,#1....BNE hist|
0001dfc0  6c 70 0d b6 f8 0f 4d 4f  56 53 20 50 43 2c 52 31  |lp....MOVS PC,R1|
0001dfd0  34 0d b7 02 05 5d 0d b7  0c 05 cd 0d b7 16 0d e7  |4....]..........|
0001dfe0  65 71 75 61 6c 25 20 8c  0d b7 20 0a 5b 4f 50 54  |equal% ... .[OPT|
0001dff0  20 5a 0d b7 34 0f 2e 68  69 73 74 65 71 75 61 6c  | Z..4..histequal|
0001e000  25 0d b7 3e 1b 4c 44 52  20 52 30 2c 5b 52 39 5d  |%..>.LDR R0,[R9]|
0001e010  3a 4c 44 52 20 52 30 2c  5b 52 30 5d 0d b7 48 12  |:LDR R0,[R0]..H.|
0001e020  4c 44 52 20 52 31 2c 5b  52 39 2c 23 38 5d 0d b7  |LDR R1,[R9,#8]..|
0001e030  52 13 4c 44 52 20 52 32  2c 5b 52 39 2c 23 31 36  |R.LDR R2,[R9,#16|
0001e040  5d 0d b7 5c 0c 2e 65 71  75 61 6c 6c 70 0d b7 66  |]..\..equallp..f|
0001e050  25 4c 44 52 20 52 33 2c  5b 52 32 5d 3a 43 4d 50  |%LDR R3,[R2]:CMP|
0001e060  20 52 33 2c 23 46 3a 4d  4f 56 43 53 20 52 33 2c  | R3,#F:MOVCS R3,|
0001e070  23 46 0d b7 70 19 4d 4f  56 20 52 33 2c 52 33 2c  |#F..p.MOV R3,R3,|
0001e080  4c 53 52 20 23 62 69 74  73 2d 38 0d b7 7a 05 5d  |LSR #bits-8..z.]|
0001e090  0d b7 84 0c e7 63 6f 6c  3d 32 20 8c 0d b7 8e 0a  |.....col=2 .....|
0001e0a0  5b 4f 50 54 20 5a 0d b7  98 25 4c 44 52 20 52 33  |[OPT Z...%LDR R3|
0001e0b0  2c 5b 52 32 5d 3a 43 4d  50 20 52 33 2c 23 46 3a  |,[R2]:CMP R3,#F:|
0001e0c0  4d 4f 56 43 53 20 52 33  2c 23 46 0d b7 a2 19 4d  |MOVCS R3,#F....M|
0001e0d0  4f 56 20 52 33 2c 52 33  2c 4c 53 52 20 23 62 69  |OV R3,R3,LSR #bi|
0001e0e0  74 73 2d 38 0d b7 ac 17  41 44 44 20 52 33 2c 52  |ts-8....ADD R3,R|
0001e0f0  33 2c 52 33 2c 4c 53 4c  20 23 31 0d b7 b6 28 4c  |3,R3,LSL #1...(L|
0001e100  44 52 20 52 34 2c 5b 52  31 2c 52 33 2c 4c 53 4c  |DR R4,[R1,R3,LSL|
0001e110  20 23 32 5d 3a 53 54 52  20 52 34 2c 5b 52 32 5d  | #2]:STR R4,[R2]|
0001e120  2c 23 34 0d b7 c0 25 4c  44 52 20 52 33 2c 5b 52  |,#4...%LDR R3,[R|
0001e130  32 5d 3a 43 4d 50 20 52  33 2c 23 46 3a 4d 4f 56  |2]:CMP R3,#F:MOV|
0001e140  43 53 20 52 33 2c 23 46  0d b7 ca 19 4d 4f 56 20  |CS R3,#F....MOV |
0001e150  52 33 2c 52 33 2c 4c 53  52 20 23 62 69 74 73 2d  |R3,R3,LSR #bits-|
0001e160  38 0d b7 d4 24 41 44 44  20 52 33 2c 52 33 2c 52  |8...$ADD R3,R3,R|
0001e170  33 2c 4c 53 4c 20 23 31  3a 41 44 44 20 52 33 2c  |3,LSL #1:ADD R3,|
0001e180  52 33 2c 23 31 0d b7 de  28 4c 44 52 20 52 34 2c  |R3,#1...(LDR R4,|
0001e190  5b 52 31 2c 52 33 2c 4c  53 4c 20 23 32 5d 3a 53  |[R1,R3,LSL #2]:S|
0001e1a0  54 52 20 52 34 2c 5b 52  32 5d 2c 23 34 0d b7 e8  |TR R4,[R2],#4...|
0001e1b0  25 4c 44 52 20 52 33 2c  5b 52 32 5d 3a 43 4d 50  |%LDR R3,[R2]:CMP|
0001e1c0  20 52 33 2c 23 46 3a 4d  4f 56 43 53 20 52 33 2c  | R3,#F:MOVCS R3,|
0001e1d0  23 46 0d b7 f2 19 4d 4f  56 20 52 33 2c 52 33 2c  |#F....MOV R3,R3,|
0001e1e0  4c 53 52 20 23 62 69 74  73 2d 38 0d b7 fc 24 41  |LSR #bits-8...$A|
0001e1f0  44 44 20 52 33 2c 52 33  2c 52 33 2c 4c 53 4c 20  |DD R3,R3,R3,LSL |
0001e200  23 31 3a 41 44 44 20 52  33 2c 52 33 2c 23 32 0d  |#1:ADD R3,R3,#2.|
0001e210  b8 06 05 5d 0d b8 10 05  cd 0d b8 1a 0a 5b 4f 50  |...].........[OP|
0001e220  54 20 5a 0d b8 24 28 4c  44 52 20 52 34 2c 5b 52  |T Z..$(LDR R4,[R|
0001e230  31 2c 52 33 2c 4c 53 4c  20 23 32 5d 3a 53 54 52  |1,R3,LSL #2]:STR|
0001e240  20 52 34 2c 5b 52 32 5d  2c 23 34 0d b8 2e 11 53  | R4,[R2],#4....S|
0001e250  55 42 53 20 52 30 2c 52  30 2c 23 31 0d b8 38 0f  |UBS R0,R0,#1..8.|
0001e260  42 4e 45 20 65 71 75 61  6c 6c 70 0d b8 42 0f 4d  |BNE equallp..B.M|
0001e270  4f 56 53 20 50 43 2c 52  31 34 0d b8 4c 05 5d 0d  |OVS PC,R14..L.].|
0001e280  b8 56 05 cd 0d b8 60 0b  c8 8e 20 72 24 20 ca 0d  |.V....`... r$ ..|
0001e290  b8 6a 27 c9 20 22 46 4e  38 30 30 22 2c 22 46 4e  |.j'. "FN800","FN|
0001e2a0  38 30 31 22 2c 22 46 4e  31 30 30 30 22 2c 22 46  |801","FN1000","F|
0001e2b0  4e 31 30 30 31 22 0d b8  74 0a 5b 4f 50 54 20 5a  |N1001"..t.[OPT Z|
0001e2c0  0d b8 92 0e 2e 72 6c 65  78 70 61 6e 64 25 0d b8  |.....rlexpand%..|
0001e2d0  9c 0f 4c 44 52 20 52 30  2c 5b 52 39 5d 0d b8 a6  |..LDR R0,[R9]...|
0001e2e0  0f 4c 44 52 20 52 31 2c  5b 52 30 5d 0d b8 b0 1e  |.LDR R1,[R0]....|
0001e2f0  4c 44 52 20 52 32 2c 5b  52 39 2c 23 38 5d 3a 4c  |LDR R2,[R9,#8]:L|
0001e300  44 52 20 52 32 2c 5b 52  32 5d 0d b8 ba 13 4c 44  |DR R2,[R2]....LD|
0001e310  52 20 52 33 2c 5b 52 39  2c 23 31 36 5d 0d b8 c4  |R R3,[R9,#16]...|
0001e320  0f 4c 44 52 20 52 34 2c  5b 52 33 5d 0d b8 ce 1b  |.LDR R4,[R3]....|
0001e330  43 4d 50 20 52 34 2c 23  31 3a 4d 4f 56 4c 54 53  |CMP R4,#1:MOVLTS|
0001e340  20 50 43 2c 52 31 34 0d  b8 d8 1f 4c 44 52 20 52  | PC,R14....LDR R|
0001e350  35 2c 5b 52 39 2c 23 32  34 5d 3a 4c 44 52 20 52  |5,[R9,#24]:LDR R|
0001e360  35 2c 5b 52 35 5d 0d b8  e2 08 2e 72 6c 65 0d b8  |5,[R5].....rle..|
0001e370  ec 13 53 54 52 42 20 52  32 2c 5b 52 31 5d 2c 23  |..STRB R2,[R1],#|
0001e380  31 0d b8 f6 10 53 55 42  20 52 34 2c 52 34 2c 23  |1....SUB R4,R4,#|
0001e390  31 0d b9 00 0d 43 4d 50  20 52 31 2c 52 35 0d b9  |1....CMP R1,R5..|
0001e3a0  0a 0f 54 45 51 4e 45 20  52 34 2c 23 30 0d b9 14  |..TEQNE R4,#0...|
0001e3b0  0b 42 4e 45 20 72 6c 65  0d b9 1e 0b 2e 72 6c 65  |.BNE rle.....rle|
0001e3c0  78 69 74 0d b9 28 0f 53  54 52 20 52 31 2c 5b 52  |xit..(.STR R1,[R|
0001e3d0  30 5d 0d b9 32 0f 53 54  52 20 52 34 2c 5b 52 33  |0]..2.STR R4,[R3|
0001e3e0  5d 0d b9 3c 0f 4d 4f 56  53 20 50 43 2c 52 31 34  |]..<.MOVS PC,R14|
0001e3f0  0d b9 46 05 5d 0d b9 50  0d c9 20 22 46 4e 39 30  |..F.]..P.. "FN90|
0001e400  32 22 0d b9 5a 0a 5b 4f  50 54 20 5a 0d b9 64 0c  |2"..Z.[OPT Z..d.|
0001e410  2e 75 6e 70 61 63 6b 25  0d b9 6e 0f 4c 44 52 20  |.unpack%..n.LDR |
0001e420  52 30 2c 5b 52 39 5d 0d  b9 78 0f 4c 44 52 20 52  |R0,[R9]..x.LDR R|
0001e430  30 2c 5b 52 30 5d 0d b9  82 11 4c 44 52 20 52 31  |0,[R0]....LDR R1|
0001e440  2c 70 6c 62 75 66 66 0d  b9 8c 12 41 44 44 20 52  |,plbuff....ADD R|
0001e450  32 2c 52 30 2c 23 37 36  38 0d b9 96 0f 2e 75 6e  |2,R0,#768.....un|
0001e460  70 61 63 6b 6c 6f 6f 70  0d b9 a0 12 4c 44 52 20  |packloop....LDR |
0001e470  52 33 2c 5b 52 30 5d 2c  23 34 0d b9 aa 0d 4d 4f  |R3,[R0],#4....MO|
0001e480  56 20 52 35 2c 23 30 0d  b9 b4 0c 2e 62 69 74 6c  |V R5,#0.....bitl|
0001e490  6f 6f 70 0d b9 be 14 4d  4f 56 20 52 36 2c 52 33  |oop....MOV R6,R3|
0001e4a0  2c 4c 53 52 20 52 35 0d  b9 c8 0f 80 20 52 36 2c  |,LSR R5..... R6,|
0001e4b0  52 36 2c 23 31 35 0d b9  d2 10 41 44 44 20 52 35  |R6,#15....ADD R5|
0001e4c0  2c 52 35 2c 23 34 0d b9  dc 14 4d 4f 56 20 52 37  |,R5,#4....MOV R7|
0001e4d0  2c 52 33 2c 4c 53 52 20  52 35 0d b9 e6 0f 80 20  |,R3,LSR R5..... |
0001e4e0  52 37 2c 52 37 2c 23 31  35 0d b9 f0 10 41 44 44  |R7,R7,#15....ADD|
0001e4f0  20 52 35 2c 52 35 2c 23  34 0d b9 fa 13 53 54 52  | R5,R5,#4....STR|
0001e500  42 20 52 37 2c 5b 52 31  5d 2c 23 31 0d ba 04 13  |B R7,[R1],#1....|
0001e510  53 54 52 42 20 52 36 2c  5b 52 31 5d 2c 23 31 0d  |STRB R6,[R1],#1.|
0001e520  ba 0e 0e 43 4d 50 20 52  35 2c 23 33 32 0d ba 18  |...CMP R5,#32...|
0001e530  0f 42 4e 45 20 62 69 74  6c 6f 6f 70 0d ba 22 0d  |.BNE bitloop..".|
0001e540  43 4d 50 20 52 32 2c 52  30 0d ba 2c 12 42 4e 45  |CMP R2,R0..,.BNE|
0001e550  20 75 6e 70 61 63 6b 6c  6f 6f 70 0d ba 36 0e 4d  | unpackloop..6.M|
0001e560  4f 56 20 50 43 2c 52 31  34 0d ba 40 18 2e 70 6c  |OV PC,R14..@..pl|
0001e570  62 75 66 66 20 45 51 55  44 20 70 6c 62 75 66 66  |buff EQUD plbuff|
0001e580  25 0d ba 4a 05 5d 0d ba  54 29 c9 20 22 46 4e 31  |%..J.]..T). "FN1|
0001e590  36 30 31 22 2c 22 46 4e  31 35 30 31 22 2c 22 46  |601","FN1501","F|
0001e5a0  4e 31 38 35 30 22 2c 22  46 4e 31 38 35 31 22 0d  |N1850","FN1851".|
0001e5b0  ba 5e 0a 5b 4f 50 54 20  5a 0d ba 72 0d 2e 72 65  |.^.[OPT Z..r..re|
0001e5c0  61 64 69 66 66 25 0d ba  7c 0e 4d 4f 56 20 52 31  |adiff%..|.MOV R1|
0001e5d0  2c 23 63 25 0d ba 86 1b  4c 44 52 20 52 38 2c 5b  |,#c%....LDR R8,[|
0001e5e0  52 39 5d 3a 4c 44 52 20  52 38 2c 5b 52 38 5d 0d  |R9]:LDR R8,[R8].|
0001e5f0  ba 90 2b 4c 44 52 20 52  37 2c 5b 52 39 2c 23 38  |..+LDR R7,[R9,#8|
0001e600  5d 3a 4c 44 52 20 52 37  2c 5b 52 37 5d 3a 41 44  |]:LDR R7,[R7]:AD|
0001e610  44 20 52 37 2c 52 37 2c  52 38 0d ba 9a 14 53 54  |D R7,R7,R8....ST|
0001e620  4d 46 44 20 53 50 20 21  2c 7b 52 31 34 7d 0d ba  |MFD SP !,{R14}..|
0001e630  a4 05 5d 0d ba ae 20 e7  72 24 3d 22 46 4e 31 38  |..]... .r$="FN18|
0001e640  35 30 22 20 84 20 72 24  3d 22 46 4e 31 38 35 31  |50" . r$="FN1851|
0001e650  22 20 8c 0d ba b8 0a 5b  4f 50 54 20 5a 0d ba c2  |" .....[OPT Z...|
0001e660  15 42 4c 20 62 79 74 65  66 72 6f 6d 63 61 63 68  |.BL bytefromcach|
0001e670  65 25 0d ba cc 05 5d 0d  ba d6 0e e7 73 79 25 3e  |e%....].....sy%>|
0001e680  32 35 30 20 8c 0d ba e0  0a 5b 4f 50 54 20 5a 0d  |250 .....[OPT Z.|
0001e690  ba ea 15 42 4c 20 62 79  74 65 66 72 6f 6d 63 61  |...BL bytefromca|
0001e6a0  63 68 65 25 0d ba f4 05  5d 0d ba fe 05 cd 0d bb  |che%....].......|
0001e6b0  08 05 cd 0d bb 12 0a 5b  4f 50 54 20 5a 0d bb 1c  |.......[OPT Z...|
0001e6c0  08 2e 72 6c 65 0d bb 26  15 42 4c 20 62 79 74 65  |..rle..&.BL byte|
0001e6d0  66 72 6f 6d 63 61 63 68  65 25 0d bb 30 0f 43 4d  |fromcache%..0.CM|
0001e6e0  50 20 52 30 2c 23 31 32  38 0d bb 3a 0c 42 43 43  |P R0,#128..:.BCC|
0001e6f0  20 72 6c 65 31 0d bb 44  12 52 53 42 20 52 32 2c  | rle1..D.RSB R2,|
0001e700  52 30 2c 23 32 35 36 0d  bb 4e 15 42 4c 20 62 79  |R0,#256..N.BL by|
0001e710  74 65 66 72 6f 6d 63 61  63 68 65 25 0d bb 58 19  |tefromcache%..X.|
0001e720  2e 72 6c 65 30 20 53 54  52 42 20 52 30 2c 5b 52  |.rle0 STRB R0,[R|
0001e730  38 5d 2c 23 31 0d bb 62  11 53 55 42 53 20 52 32  |8],#1..b.SUBS R2|
0001e740  2c 52 32 2c 23 31 0d bb  6c 0c 42 50 4c 20 72 6c  |,R2,#1..l.BPL rl|
0001e750  65 30 0d bb 76 0a 42 20  72 6c 65 32 0d bb 80 09  |e0..v.B rle2....|
0001e760  2e 72 6c 65 31 0d bb 8a  10 41 44 44 20 52 33 2c  |.rle1....ADD R3,|
0001e770  52 30 2c 23 31 0d bb 94  0d 4d 4f 56 20 52 32 2c  |R0,#1....MOV R2,|
0001e780  52 38 0d bb 9e 10 41 44  44 20 52 38 2c 52 38 2c  |R8....ADD R8,R8,|
0001e790  52 33 0d bb a8 1a 42 4c  20 6d 75 6c 74 69 62 79  |R3....BL multiby|
0001e7a0  74 65 66 72 6f 6d 63 61  63 68 65 25 0d bb b2 09  |tefromcache%....|
0001e7b0  2e 72 6c 65 32 0d bb bc  0d 43 4d 50 20 52 38 2c  |.rle2....CMP R8,|
0001e7c0  52 37 0d bb c6 0b 42 43  43 20 72 6c 65 0d bb d0  |R7....BCC rle...|
0001e7d0  14 4c 44 4d 46 44 20 53  50 20 21 2c 7b 52 31 34  |.LDMFD SP !,{R14|
0001e7e0  7d 0d bb da 0f 4d 4f 56  53 20 50 43 2c 52 31 34  |}....MOVS PC,R14|
0001e7f0  0d bb e4 05 5d 0d bb ee  1f c9 20 22 46 4e 31 39  |....]..... "FN19|
0001e800  30 30 22 2c 22 46 4e 31  31 30 30 22 2c 22 46 4e  |00","FN1100","FN|
0001e810  34 30 30 22 0d bb f8 0a  5b 4f 50 54 20 5a 0d bc  |400"....[OPT Z..|
0001e820  0c 0e 2e 72 65 61 64 6c  69 6e 65 25 0d bc 16 1b  |...readline%....|
0001e830  4c 44 52 20 52 32 2c 5b  52 39 5d 3a 4c 44 52 20  |LDR R2,[R9]:LDR |
0001e840  52 32 2c 5b 52 32 5d 0d  bc 20 12 4c 44 52 20 52  |R2,[R2].. .LDR R|
0001e850  33 2c 5b 52 39 2c 23 38  5d 0d bc 2a 0f 4c 44 52  |3,[R9,#8]..*.LDR|
0001e860  20 52 30 2c 5b 52 33 5d  0d bc 34 13 4c 44 52 20  | R0,[R3]..4.LDR |
0001e870  52 34 2c 5b 52 39 2c 23  31 36 5d 0d bc 3e 0f 4c  |R4,[R9,#16]..>.L|
0001e880  44 52 20 52 35 2c 5b 52  34 5d 0d bc 48 2c 4c 44  |DR R5,[R4]..H,LD|
0001e890  52 20 52 36 2c 5b 52 39  2c 23 32 34 5d 3a 4c 44  |R R6,[R9,#24]:LD|
0001e8a0  52 20 52 36 2c 5b 52 36  5d 3a 41 44 44 20 52 36  |R R6,[R6]:ADD R6|
0001e8b0  2c 52 36 2c 52 32 0d bc  52 14 53 54 4d 46 44 20  |,R6,R2..R.STMFD |
0001e8c0  53 50 20 21 2c 7b 52 31  34 7d 0d bc 5c 08 2e 72  |SP !,{R14}..\..r|
0001e8d0  6c 65 0d bc 66 0d 43 4d  50 20 52 35 2c 23 31 0d  |le..f.CMP R5,#1.|
0001e8e0  bc 70 0c 42 47 45 20 72  6c 65 31 0d bc 7a 15 42  |.p.BGE rle1..z.B|
0001e8f0  4c 20 62 79 74 65 66 72  6f 6d 63 61 63 68 65 25  |L bytefromcache%|
0001e900  0d bc 84 0d 4d 4f 56 20  52 35 2c 23 31 0d bc 8e  |....MOV R5,#1...|
0001e910  05 5d 0d bc 98 10 e7 66  6c 61 67 3d 31 39 30 30  |.].....flag=1900|
0001e920  20 8c 0d bc a2 0a 5b 4f  50 54 20 5a 0d bc ac 0f  | .....[OPT Z....|
0001e930  43 4d 50 20 52 30 2c 23  31 39 32 0d bc b6 25 80  |CMP R0,#192...%.|
0001e940  43 53 20 52 35 2c 52 30  2c 23 36 33 3a 42 4c 43  |CS R5,R0,#63:BLC|
0001e950  53 20 62 79 74 65 66 72  6f 6d 63 61 63 68 65 25  |S bytefromcache%|
0001e960  0d bc c0 05 5d 0d bc ca  05 cd 0d bc d4 10 e7 66  |....]..........f|
0001e970  6c 61 67 3d 31 31 30 30  20 8c 0d bc de 0a 5b 4f  |lag=1100 .....[O|
0001e980  50 54 20 5a 0d bc e8 0f  43 4d 50 20 52 30 2c 23  |PT Z....CMP R0,#|
0001e990  31 32 38 0d bc f2 0c 42  4e 45 20 72 6c 65 31 0d  |128....BNE rle1.|
0001e9a0  bc fc 15 42 4c 20 62 79  74 65 66 72 6f 6d 63 61  |...BL bytefromca|
0001e9b0  63 68 65 25 0d bd 06 0d  54 45 51 20 52 30 2c 23  |che%....TEQ R0,#|
0001e9c0  30 0d bd 10 0e ec 51 20  52 30 2c 23 31 32 38 0d  |0.....Q R0,#128.|
0001e9d0  bd 1a 0c 42 45 51 20 72  6c 65 31 0d bd 24 10 41  |...BEQ rle1..$.A|
0001e9e0  44 44 20 52 35 2c 52 30  2c 23 31 0d bd 2e 15 42  |DD R5,R0,#1....B|
0001e9f0  4c 20 62 79 74 65 66 72  6f 6d 63 61 63 68 65 25  |L bytefromcache%|
0001ea00  0d bd 38 05 5d 0d bd 42  05 cd 0d bd 4c 0f e7 66  |..8.]..B....L..f|
0001ea10  6c 61 67 3d 34 30 30 20  8c 0d bd 56 0a 5b 4f 50  |lag=400 ...V.[OP|
0001ea20  54 20 5a 0d bd 60 0d 4d  4f 56 20 52 31 2c 52 30  |T Z..`.MOV R1,R0|
0001ea30  0d bd 6a 15 42 4c 20 62  79 74 65 66 72 6f 6d 63  |..j.BL bytefromc|
0001ea40  61 63 68 65 25 0d bd 74  16 84 52 20 52 31 2c 52  |ache%..t..R R1,R|
0001ea50  31 2c 52 30 2c 4c 53 4c  20 23 38 0d bd 7e 15 42  |1,R0,LSL #8..~.B|
0001ea60  4c 20 62 79 74 65 66 72  6f 6d 63 61 63 68 65 25  |L bytefromcache%|
0001ea70  0d bd 88 17 84 52 20 52  31 2c 52 31 2c 52 30 2c  |.....R R1,R1,R0,|
0001ea80  4c 53 4c 20 23 31 36 0d  bd 92 15 42 4c 20 62 79  |LSL #16....BL by|
0001ea90  74 65 66 72 6f 6d 63 61  63 68 65 25 0d bd 9c 10  |tefromcache%....|
0001eaa0  41 44 44 20 52 35 2c 52  30 2c 23 31 0d bd a6 0d  |ADD R5,R0,#1....|
0001eab0  4d 4f 56 20 52 30 2c 52  31 0d bd b0 05 5d 0d bd  |MOV R0,R1....]..|
0001eac0  ba 05 cd 0d bd c4 0f e7  66 6c 61 67 3d 32 30 30  |........flag=200|
0001ead0  20 8c 0d bd ce 0a 5b 4f  50 54 20 5a 0d bd d8 10  | .....[OPT Z....|
0001eae0  41 44 44 20 52 35 2c 52  30 2c 23 31 0d bd e2 15  |ADD R5,R0,#1....|
0001eaf0  42 4c 20 62 79 74 65 66  72 6f 6d 63 61 63 68 65  |BL bytefromcache|
0001eb00  25 0d bd ec 05 5d 0d bd  f6 05 cd 0d be 00 0a 5b  |%....].........[|
0001eb10  4f 50 54 20 5a 0d be 0a  09 2e 72 6c 65 31 0d be  |OPT Z.....rle1..|
0001eb20  14 13 53 54 52 42 20 52  30 2c 5b 52 32 5d 2c 23  |..STRB R0,[R2],#|
0001eb30  31 0d be 1e 05 5d 0d be  28 0f e7 66 6c 61 67 3d  |1....]..(..flag=|
0001eb40  34 30 30 20 8c 0d be 32  0a 5b 4f 50 54 20 5a 0d  |400 ...2.[OPT Z.|
0001eb50  be 3c 14 4d 4f 56 20 52  31 2c 52 30 2c 4c 53 52  |.<.MOV R1,R0,LSR|
0001eb60  20 23 38 0d be 46 13 53  54 52 42 20 52 31 2c 5b  | #8..F.STRB R1,[|
0001eb70  52 32 5d 2c 23 31 0d be  50 15 4d 4f 56 20 52 31  |R2],#1..P.MOV R1|
0001eb80  2c 52 30 2c 4c 53 52 20  23 31 36 0d be 5a 13 53  |,R0,LSR #16..Z.S|
0001eb90  54 52 42 20 52 31 2c 5b  52 32 5d 2c 23 31 0d be  |TRB R1,[R2],#1..|
0001eba0  64 05 5d 0d be 6e 05 cd  0d be 78 0a 5b 4f 50 54  |d.]..n....x.[OPT|
0001ebb0  20 5a 0d be 82 10 53 55  42 20 52 35 2c 52 35 2c  | Z....SUB R5,R5,|
0001ebc0  23 31 0d be 8c 0d 54 45  51 20 52 32 2c 52 36 0d  |#1....TEQ R2,R6.|
0001ebd0  be 96 0b 42 4e 45 20 72  6c 65 0d be a0 0b 2e 72  |...BNE rle.....r|
0001ebe0  6c 65 78 69 74 0d be aa  1b 53 54 52 20 52 30 2c  |lexit....STR R0,|
0001ebf0  5b 52 33 5d 3a 53 54 52  20 52 35 2c 5b 52 34 5d  |[R3]:STR R5,[R4]|
0001ec00  0d be b4 14 4c 44 4d 46  44 20 53 50 20 21 2c 7b  |....LDMFD SP !,{|
0001ec10  50 43 7d 5e 0d be be 05  5d 0d be c8 0e c9 20 22  |PC}^....]..... "|
0001ec20  46 4e 32 34 30 31 22 0d  be d2 0a 5b 4f 50 54 20  |FN2401"....[OPT |
0001ec30  5a 0d be dc 0c 2e 62 6d  5f 72 6c 65 38 0d be e6  |Z.....bm_rle8...|
0001ec40  0e 4d 4f 56 20 52 31 2c  23 63 25 0d be f0 1b 4c  |.MOV R1,#c%....L|
0001ec50  44 52 20 52 38 2c 5b 52  39 5d 3a 4c 44 52 20 52  |DR R8,[R9]:LDR R|
0001ec60  38 2c 5b 52 38 5d 0d be  fa 2b 4c 44 52 20 52 37  |8,[R8]...+LDR R7|
0001ec70  2c 5b 52 39 2c 23 38 5d  3a 4c 44 52 20 52 37 2c  |,[R9,#8]:LDR R7,|
0001ec80  5b 52 37 5d 3a 41 44 44  20 52 37 2c 52 37 2c 52  |[R7]:ADD R7,R7,R|
0001ec90  38 0d bf 04 14 53 54 4d  46 44 20 53 50 20 21 2c  |8....STMFD SP !,|
0001eca0  7b 52 31 34 7d 0d bf 0e  08 2e 72 6c 65 0d bf 18  |{R14}.....rle...|
0001ecb0  15 42 4c 20 62 79 74 65  66 72 6f 6d 63 61 63 68  |.BL bytefromcach|
0001ecc0  65 25 0d bf 22 0d 54 45  51 20 72 30 2c 23 30 0d  |e%..".TEQ r0,#0.|
0001ecd0  bf 2c 0f 42 45 51 20 72  6c 65 63 6f 70 79 0d bf  |.,.BEQ rlecopy..|
0001ece0  40 0d 4d 4f 56 20 72 34  2c 72 30 0d bf 4a 15 42  |@.MOV r4,r0..J.B|
0001ecf0  4c 20 62 79 74 65 66 72  6f 6d 63 61 63 68 65 25  |L bytefromcache%|
0001ed00  0d bf 54 09 2e 72 6c 65  31 0d bf 5e 13 53 54 52  |..T..rle1..^.STR|
0001ed10  42 20 72 30 2c 5b 72 38  5d 2c 23 31 0d bf 68 11  |B r0,[r8],#1..h.|
0001ed20  53 55 42 53 20 72 34 2c  72 34 2c 23 31 0d bf 72  |SUBS r4,r4,#1..r|
0001ed30  0c 42 47 54 20 72 6c 65  31 0d bf 7c 09 42 20 72  |.BGT rle1..|.B r|
0001ed40  6c 65 0d bf 86 0c 2e 72  6c 65 63 6f 70 79 0d bf  |le.....rlecopy..|
0001ed50  9a 15 42 4c 20 62 79 74  65 66 72 6f 6d 63 61 63  |..BL bytefromcac|
0001ed60  68 65 25 0d bf a4 0d 43  4d 50 20 72 30 2c 23 33  |he%....CMP r0,#3|
0001ed70  0d bf ae 12 42 4c 54 20  72 6c 65 73 70 65 63 69  |....BLT rlespeci|
0001ed80  61 6c 0d bf b8 0d 4d 4f  56 20 72 34 2c 72 30 0d  |al....MOV r4,r0.|
0001ed90  bf c2 09 2e 72 6c 65 32  0d bf d6 15 42 4c 20 62  |....rle2....BL b|
0001eda0  79 74 65 66 72 6f 6d 63  61 63 68 65 25 0d bf e0  |ytefromcache%...|
0001edb0  13 53 54 52 42 20 72 30  2c 5b 72 38 5d 2c 23 31  |.STRB r0,[r8],#1|
0001edc0  0d bf ea 15 42 4c 20 62  79 74 65 66 72 6f 6d 63  |....BL bytefromc|
0001edd0  61 63 68 65 25 0d bf f4  11 53 55 42 53 20 72 34  |ache%....SUBS r4|
0001ede0  2c 72 34 2c 23 31 0d bf  fe 15 53 54 52 47 54 42  |,r4,#1....STRGTB|
0001edf0  20 72 30 2c 5b 72 38 5d  2c 23 31 0d c0 08 13 53  | r0,[r8],#1....S|
0001ee00  55 42 47 54 53 20 72 34  2c 72 34 2c 23 31 0d c0  |UBGTS r4,r4,#1..|
0001ee10  12 0c 42 47 54 20 72 6c  65 32 0d c0 1c 09 42 20  |..BGT rle2....B |
0001ee20  72 6c 65 0d c0 26 0f 2e  72 6c 65 73 70 65 63 69  |rle..&..rlespeci|
0001ee30  61 6c 0d c0 94 14 4c 44  4d 46 44 20 53 50 20 21  |al....LDMFD SP !|
0001ee40  2c 7b 52 31 34 7d 0d c0  9e 0f 4d 4f 56 53 20 50  |,{R14}....MOVS P|
0001ee50  43 2c 52 31 34 0d c0 a8  05 5d 0d c0 b2 0e c9 20  |C,R14....]..... |
0001ee60  22 46 4e 32 34 30 32 22  0d c0 bc 0a 5b 4f 50 54  |"FN2402"....[OPT|
0001ee70  20 5a 0d c0 c6 0c 2e 62  6d 5f 72 6c 65 34 0d c0  | Z.....bm_rle4..|
0001ee80  d0 0e 4d 4f 56 20 52 31  2c 23 63 25 0d c0 da 1b  |..MOV R1,#c%....|
0001ee90  4c 44 52 20 52 38 2c 5b  52 39 5d 3a 4c 44 52 20  |LDR R8,[R9]:LDR |
0001eea0  52 38 2c 5b 52 38 5d 0d  c0 e4 2b 4c 44 52 20 52  |R8,[R8]...+LDR R|
0001eeb0  37 2c 5b 52 39 2c 23 38  5d 3a 4c 44 52 20 52 37  |7,[R9,#8]:LDR R7|
0001eec0  2c 5b 52 37 5d 3a 41 44  44 20 52 37 2c 52 37 2c  |,[R7]:ADD R7,R7,|
0001eed0  52 38 0d c0 ee 14 53 54  4d 46 44 20 53 50 20 21  |R8....STMFD SP !|
0001eee0  2c 7b 52 31 34 7d 0d c0  f8 0d 4d 4f 56 20 72 32  |,{R14}....MOV r2|
0001eef0  2c 23 30 0d c1 02 0d 4d  4f 56 20 72 33 2c 23 30  |,#0....MOV r3,#0|
0001ef00  0d c1 0c 08 2e 72 6c 65  0d c1 16 15 42 4c 20 62  |.....rle....BL b|
0001ef10  79 74 65 66 72 6f 6d 63  61 63 68 65 25 0d c1 20  |ytefromcache%.. |
0001ef20  0d 54 45 51 20 72 30 2c  23 30 0d c1 2a 0f 42 45  |.TEQ r0,#0..*.BE|
0001ef30  51 20 72 6c 65 63 6f 70  79 0d c1 3e 0d 4d 4f 56  |Q rlecopy..>.MOV|
0001ef40  20 72 34 2c 72 30 0d c1  48 15 42 4c 20 62 79 74  | r4,r0..H.BL byt|
0001ef50  65 66 72 6f 6d 63 61 63  68 65 25 0d c1 52 09 2e  |efromcache%..R..|
0001ef60  72 6c 65 31 0d c1 5c 14  42 4c 20 62 6d 72 6c 65  |rle1..\.BL bmrle|
0001ef70  34 5f 69 6e 73 65 72 74  0d c1 66 0d 43 4d 50 20  |4_insert..f.CMP |
0001ef80  72 33 2c 23 38 0d c1 70  16 4d 4f 56 47 45 20 72  |r3,#8..p.MOVGE r|
0001ef90  35 2c 72 32 2c 4c 53 52  23 32 34 0d c1 7a 15 53  |5,r2,LSR#24..z.S|
0001efa0  54 52 47 45 42 20 72 35  2c 5b 72 38 5d 2c 23 31  |TRGEB r5,[r8],#1|
0001efb0  0d c1 84 15 4d 4f 56 47  45 20 72 32 2c 72 32 2c  |....MOVGE r2,r2,|
0001efc0  4c 53 4c 23 38 0d c1 8e  12 53 55 42 47 45 20 72  |LSL#8....SUBGE r|
0001efd0  33 2c 72 33 2c 23 38 0d  c1 98 0d 43 4d 50 20 72  |3,r3,#8....CMP r|
0001efe0  34 2c 23 30 0d c1 a2 0c  42 47 54 20 72 6c 65 31  |4,#0....BGT rle1|
0001eff0  0d c1 ac 09 42 20 72 6c  65 0d c1 b6 0c 2e 72 6c  |....B rle.....rl|
0001f000  65 63 6f 70 79 0d c1 ca  15 42 4c 20 62 79 74 65  |ecopy....BL byte|
0001f010  66 72 6f 6d 63 61 63 68  65 25 0d c1 d4 0d 43 4d  |fromcache%....CM|
0001f020  50 20 72 30 2c 23 33 0d  c1 de 12 42 4c 54 20 72  |P r0,#3....BLT r|
0001f030  6c 65 73 70 65 63 69 61  6c 0d c1 e8 0d 4d 4f 56  |lespecial....MOV|
0001f040  20 72 34 2c 72 30 0d c1  f2 09 2e 72 6c 65 32 0d  | r4,r0.....rle2.|
0001f050  c2 06 15 42 4c 20 62 79  74 65 66 72 6f 6d 63 61  |...BL bytefromca|
0001f060  63 68 65 25 0d c2 10 14  42 4c 20 62 6d 72 6c 65  |che%....BL bmrle|
0001f070  34 5f 69 6e 73 65 72 74  0d c2 1a 15 42 4c 20 62  |4_insert....BL b|
0001f080  79 74 65 66 72 6f 6d 63  61 63 68 65 25 0d c2 24  |ytefromcache%..$|
0001f090  0d 43 4d 50 20 72 34 2c  23 30 0d c2 2e 16 42 4c  |.CMP r4,#0....BL|
0001f0a0  47 54 20 62 6d 72 6c 65  34 5f 69 6e 73 65 72 74  |GT bmrle4_insert|
0001f0b0  0d c2 38 0a 42 20 72 6c  65 34 0d c2 42 09 2e 72  |..8.B rle4..B..r|
0001f0c0  6c 65 33 0d c2 4c 14 4d  4f 56 20 72 35 2c 72 32  |le3..L.MOV r5,r2|
0001f0d0  2c 4c 53 52 23 32 34 0d  c2 56 13 53 54 52 42 20  |,LSR#24..V.STRB |
0001f0e0  72 35 2c 5b 72 38 5d 2c  23 31 0d c2 60 13 4d 4f  |r5,[r8],#1..`.MO|
0001f0f0  56 20 72 32 2c 72 32 2c  4c 53 4c 23 38 0d c2 6a  |V r2,r2,LSL#8..j|
0001f100  10 53 55 42 20 72 33 2c  72 33 2c 23 38 0d c2 74  |.SUB r3,r3,#8..t|
0001f110  09 2e 72 6c 65 34 0d c2  7e 0d 43 4d 50 20 72 33  |..rle4..~.CMP r3|
0001f120  2c 23 38 0d c2 88 0c 42  47 45 20 72 6c 65 33 0d  |,#8....BGE rle3.|
0001f130  c2 92 0d 43 4d 50 20 72  34 2c 23 30 0d c2 9c 0c  |...CMP r4,#0....|
0001f140  42 47 54 20 72 6c 65 32  0d c2 a6 09 42 20 72 6c  |BGT rle2....B rl|
0001f150  65 0d c2 b0 0f 2e 72 6c  65 73 70 65 63 69 61 6c  |e.....rlespecial|
0001f160  0d c3 14 0d 43 4d 50 20  72 33 2c 23 30 0d c3 1e  |....CMP r3,#0...|
0001f170  16 4d 4f 56 47 54 20 72  35 2c 72 32 2c 4c 53 52  |.MOVGT r5,r2,LSR|
0001f180  23 32 34 0d c3 28 15 53  54 52 47 54 42 20 72 35  |#24..(.STRGTB r5|
0001f190  2c 5b 72 38 5d 2c 23 31  0d c3 3c 14 4c 44 4d 46  |,[r8],#1..<.LDMF|
0001f1a0  44 20 53 50 20 21 2c 7b  52 31 34 7d 0d c3 46 0f  |D SP !,{R14}..F.|
0001f1b0  4d 4f 56 53 20 50 43 2c  52 31 34 0d c3 50 12 2e  |MOVS PC,R14..P..|
0001f1c0  62 6d 72 6c 65 34 5f 69  6e 73 65 72 74 0d c3 5a  |bmrle4_insert..Z|
0001f1d0  11 52 53 42 20 72 35 2c  72 33 2c 23 33 32 0d c3  |.RSB r5,r3,#32..|
0001f1e0  64 14 4d 4f 56 20 72 32  2c 72 32 2c 4c 53 52 20  |d.MOV r2,r2,LSR |
0001f1f0  72 35 0d c3 6e 14 4d 4f  56 20 72 32 2c 72 32 2c  |r5..n.MOV r2,r2,|
0001f200  4c 53 4c 20 72 35 0d c3  78 10 53 55 42 20 72 35  |LSL r5..x.SUB r5|
0001f210  2c 72 35 2c 23 38 0d c3  82 16 84 52 20 72 32 2c  |,r5,#8.....R r2,|
0001f220  72 32 2c 72 30 2c 4c 53  4c 20 72 35 0d c3 8c 11  |r2,r0,LSL r5....|
0001f230  53 55 42 53 20 72 34 2c  72 34 2c 23 32 0d c3 96  |SUBS r4,r4,#2...|
0001f240  12 41 44 44 4d 49 20 72  33 2c 72 33 2c 23 34 0d  |.ADDMI r3,r3,#4.|
0001f250  c3 a0 12 41 44 44 50 4c  20 72 33 2c 72 33 2c 23  |...ADDPL r3,r3,#|
0001f260  38 0d c3 aa 0f 4d 4f 56  53 20 50 43 2c 52 31 34  |8....MOVS PC,R14|
0001f270  0d c3 b4 05 5d 0d c3 be  05 cb 0d c3 c8 12 e7 63  |....]..........c|
0001f280  61 63 68 65 62 79 74 65  73 25 20 8c 0d c3 d2 0a  |achebytes% .....|
0001f290  5b 4f 50 54 20 5a 0d c3  dc 13 2e 62 79 74 65 66  |[OPT Z.....bytef|
0001f2a0  72 6f 6d 63 61 63 68 65  25 0d c3 e6 16 53 54 4d  |romcache%....STM|
0001f2b0  46 44 20 53 50 20 21 2c  7b 52 31 2c 52 32 7d 0d  |FD SP !,{R1,R2}.|
0001f2c0  c3 f0 15 4c 44 52 20 52  31 2c 69 6e 63 61 63 68  |...LDR R1,incach|
0001f2d0  65 70 74 72 0d c3 fa 16  4c 44 52 20 52 32 2c 6e  |eptr....LDR R2,n|
0001f2e0  75 6d 6c 65 66 74 74 6f  67 6f 0d c4 04 13 4c 44  |umlefttogo....LD|
0001f2f0  52 42 20 52 30 2c 5b 52  31 5d 2c 23 31 0d c4 0e  |RB R0,[R1],#1...|
0001f300  11 53 55 42 53 20 52 32  2c 52 32 2c 23 31 0d c4  |.SUBS R2,R2,#1..|
0001f310  18 17 53 54 52 4e 45 20  52 31 2c 69 6e 63 61 63  |..STRNE R1,incac|
0001f320  68 65 70 74 72 0d c4 22  18 53 54 52 4e 45 20 52  |heptr..".STRNE R|
0001f330  32 2c 6e 75 6d 6c 65 66  74 74 6f 67 6f 0d c4 2c  |2,numlefttogo..,|
0001f340  16 4c 44 4d 46 44 20 53  50 20 21 2c 7b 52 31 2c  |.LDMFD SP !,{R1,|
0001f350  52 32 7d 0d c4 36 10 4d  4f 56 4e 45 20 50 43 2c  |R2}..6.MOVNE PC,|
0001f360  52 31 34 0d c4 40 1f 53  54 4d 46 44 20 53 50 20  |R14..@.STMFD SP |
0001f370  21 2c 7b 52 30 2c 52 31  2c 52 32 2c 52 33 2c 52  |!,{R0,R1,R2,R3,R|
0001f380  34 7d 0d c4 4a 17 4c 44  52 20 52 32 2c 76 61 6c  |4}..J.LDR R2,val|
0001f390  64 61 74 61 63 61 63 68  65 0d c4 54 15 53 54 52  |datacache..T.STR|
0001f3a0  20 52 32 2c 69 6e 63 61  63 68 65 70 74 72 0d c4  | R2,incacheptr..|
0001f3b0  5e 13 4c 44 52 20 52 33  2c 76 61 6c 63 61 63 68  |^.LDR R3,valcach|
0001f3c0  65 0d c4 68 16 53 54 52  20 52 33 2c 6e 75 6d 6c  |e..h.STR R3,numl|
0001f3d0  65 66 74 74 6f 67 6f 0d  c4 72 0d 4d 4f 56 20 52  |efttogo..r.MOV R|
0001f3e0  30 2c 23 34 0d c4 7c 0e  4d 4f 56 20 52 31 2c 23  |0,#4..|.MOV R1,#|
0001f3f0  63 25 0d c4 86 11 53 57  49 20 22 4f 53 5f 47 42  |c%....SWI "OS_GB|
0001f400  50 42 22 0d c4 90 1f 4c  44 4d 46 44 20 53 50 20  |PB"....LDMFD SP |
0001f410  21 2c 7b 52 30 2c 52 31  2c 52 32 2c 52 33 2c 52  |!,{R0,R1,R2,R3,R|
0001f420  34 7d 0d c4 9a 0e 4d 4f  56 20 50 43 2c 52 31 34  |4}....MOV PC,R14|
0001f430  0d c4 a4 20 2e 76 61 6c  64 61 74 61 63 61 63 68  |... .valdatacach|
0001f440  65 20 44 43 44 20 64 61  74 61 63 61 63 68 65 25  |e DCD datacache%|
0001f450  0d c4 ae 18 2e 76 61 6c  63 61 63 68 65 20 44 43  |.....valcache DC|
0001f460  44 20 63 61 63 68 65 25  0d c4 b8 1e 2e 69 6e 63  |D cache%.....inc|
0001f470  61 63 68 65 70 74 72 20  44 43 44 20 64 61 74 61  |acheptr DCD data|
0001f480  63 61 63 68 65 25 0d c4  c2 1b 2e 6e 75 6d 6c 65  |cache%.....numle|
0001f490  66 74 74 6f 67 6f 20 44  43 44 20 63 61 63 68 65  |fttogo DCD cache|
0001f4a0  25 0d c4 cc 18 2e 6d 75  6c 74 69 62 79 74 65 66  |%.....multibytef|
0001f4b0  72 6f 6d 63 61 63 68 65  25 0d c4 d6 0d 43 4d 50  |romcache%....CMP|
0001f4c0  20 52 33 2c 23 30 0d c4  e0 0d ec 51 20 50 43 2c  | R3,#0.....Q PC,|
0001f4d0  52 31 34 0d c4 ea 17 53  54 4d 46 44 20 53 50 20  |R14....STMFD SP |
0001f4e0  21 2c 7b 52 30 2c 52 31  34 7d 0d c4 f4 18 2e 6d  |!,{R0,R14}.....m|
0001f4f0  75 6c 74 69 62 79 74 65  66 72 6f 6d 63 61 63 68  |ultibytefromcach|
0001f500  65 6c 0d c4 fe 15 42 4c  20 62 79 74 65 66 72 6f  |el....BL bytefro|
0001f510  6d 63 61 63 68 65 25 0d  c5 08 13 53 54 52 42 20  |mcache%....STRB |
0001f520  52 30 2c 5b 52 32 5d 2c  23 31 0d c5 12 11 53 55  |R0,[R2],#1....SU|
0001f530  42 53 20 52 33 2c 52 33  2c 23 31 0d c5 1c 1b 42  |BS R3,R3,#1....B|
0001f540  4e 45 20 6d 75 6c 74 69  62 79 74 65 66 72 6f 6d  |NE multibytefrom|
0001f550  63 61 63 68 65 6c 0d c5  26 17 4c 44 4d 46 44 20  |cachel..&.LDMFD |
0001f560  53 50 20 21 2c 7b 52 30  2c 52 31 34 7d 0d c5 30  |SP !,{R0,R14}..0|
0001f570  0e 4d 4f 56 20 50 43 2c  52 31 34 0d c5 3a 05 5d  |.MOV PC,R14..:.]|
0001f580  0d c5 44 05 cd 0d c5 4e  10 e7 70 6c 61 6e 61 72  |..D....N..planar|
0001f590  25 3c 30 20 8c 0d c5 58  19 43 25 3d 37 3a e7 66  |%<0 ...X.C%=7:.f|
0001f5a0  6c 61 67 3d 32 36 30 30  20 43 25 3d 31 35 0d c5  |lag=2600 C%=15..|
0001f5b0  62 0a 5b 4f 50 54 20 5a  0d c5 6c 0d 2e 70 6c 61  |b.[OPT Z..l..pla|
0001f5c0  6e 63 6e 76 25 0d c5 76  10 4c 44 52 20 52 30 2c  |ncnv%..v.LDR R0,|
0001f5d0  73 78 6c 6f 63 0d c5 80  1b 4c 44 52 20 52 31 2c  |sxloc....LDR R1,|
0001f5e0  5b 52 39 5d 3a 4c 44 52  20 52 31 2c 5b 52 31 5d  |[R9]:LDR R1,[R1]|
0001f5f0  0d c5 8a 1e 4c 44 52 20  52 33 2c 5b 52 39 2c 23  |....LDR R3,[R9,#|
0001f600  38 5d 3a 4c 44 52 20 52  33 2c 5b 52 33 5d 0d c5  |8]:LDR R3,[R3]..|
0001f610  94 1f 4c 44 52 20 52 34  2c 5b 52 39 2c 23 31 36  |..LDR R4,[R9,#16|
0001f620  5d 3a 4c 44 52 20 52 34  2c 5b 52 34 5d 0d c5 9e  |]:LDR R4,[R4]...|
0001f630  05 5d 0d c5 a8 10 e7 66  6c 61 67 3d 33 35 30 30  |.].....flag=3500|
0001f640  20 8c 0d c5 b2 0a 5b 4f  50 54 20 5a 0d c5 bc 0d  | .....[OPT Z....|
0001f650  4d 4f 56 20 52 39 2c 23  30 0d c5 c6 05 5d 0d c5  |MOV R9,#0....]..|
0001f660  d0 05 cc 0d c5 da 0a 5b  4f 50 54 20 5a 0d c5 e4  |.......[OPT Z...|
0001f670  0e 4d 4f 56 20 52 39 2c  23 43 25 0d c5 ee 05 5d  |.MOV R9,#C%....]|
0001f680  0d c5 f8 05 cd 0d c6 02  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
0001f690  c6 0c 0c 2e 70 6c 61 6e  65 6c 70 0d c6 16 0d 4d  |....planelp....M|
0001f6a0  4f 56 20 52 37 2c 23 30  0d c6 20 0d 4d 4f 56 20  |OV R7,#0.. .MOV |
0001f6b0  52 35 2c 52 33 0d c6 2a  05 5d 0d c6 34 11 e3 4e  |R5,R3..*.]..4..N|
0001f6c0  25 3d 31 b8 70 6c 61 6e  65 73 25 0d c6 3e 0a 5b  |%=1.planes%..>.[|
0001f6d0  4f 50 54 20 5a 0d c6 48  12 4c 44 52 20 52 36 2c  |OPT Z..H.LDR R6,|
0001f6e0  5b 52 35 5d 2c 52 34 0d  c6 52 05 5d 0d c6 5c 10  |[R5],R4..R.]..\.|
0001f6f0  e7 66 6c 61 67 3d 32 36  30 30 20 8c 0d c6 66 0a  |.flag=2600 ...f.|
0001f700  5b 4f 50 54 20 5a 0d c6  70 14 4d 4f 56 20 52 36  |[OPT Z..p.MOV R6|
0001f710  2c 52 36 2c 4c 53 4c 20  23 38 0d c6 7a 18 42 49  |,R6,LSL #8..z.BI|
0001f720  43 20 52 36 2c 52 36 2c  23 26 46 46 30 30 30 30  |C R6,R6,#&FF0000|
0001f730  30 30 0d c6 84 17 84 52  20 52 36 2c 52 36 2c 52  |00.....R R6,R6,R|
0001f740  36 2c 4c 53 52 20 23 31  36 0d c6 8e 05 5d 0d c6  |6,LSR #16....]..|
0001f750  98 05 cd 0d c6 a2 10 e7  66 6c 61 67 3d 33 35 30  |........flag=350|
0001f760  30 20 8c 0d c6 ac 0a 5b  4f 50 54 20 5a 0d c6 b6  |0 .....[OPT Z...|
0001f770  14 4d 4f 56 20 52 36 2c  52 36 2c 4c 53 52 20 52  |.MOV R6,R6,LSR R|
0001f780  39 0d c6 c0 0f 80 53 20  52 36 2c 52 36 2c 23 31  |9.....S R6,R6,#1|
0001f790  0d c6 ca 21 84 52 20 52  37 2c 52 37 2c 52 36 2c  |...!.R R7,R7,R6,|
0001f7a0  4c 53 4c 20 23 28 70 6c  61 6e 65 73 25 2d 4e 25  |LSL #(planes%-N%|
0001f7b0  29 0d c6 d4 1b 84 52 4e  45 20 52 37 2c 52 37 2c  |).....RNE R7,R7,|
0001f7c0  23 28 70 6c 61 6e 65 73  25 2d 31 29 0d c6 de 05  |#(planes%-1)....|
0001f7d0  5d 0d c6 e8 05 cc 0d c6  f2 0a 5b 4f 50 54 20 5a  |].........[OPT Z|
0001f7e0  0d c6 fc 14 4d 4f 56 20  52 36 2c 52 36 2c 4c 53  |....MOV R6,R6,LS|
0001f7f0  52 20 52 39 0d c7 06 0e  80 20 52 36 2c 52 36 2c  |R R9..... R6,R6,|
0001f800  23 31 0d c7 10 1b 84 52  20 52 37 2c 52 37 2c 52  |#1.....R R7,R7,R|
0001f810  36 2c 4c 53 4c 20 23 28  4e 25 2d 31 29 0d c7 1a  |6,LSL #(N%-1)...|
0001f820  05 5d 0d c7 24 05 cd 0d  c7 2e 05 ed 0d c7 38 0a  |.]..$.........8.|
0001f830  5b 4f 50 54 20 5a 0d c7  42 13 53 54 52 42 20 52  |[OPT Z..B.STRB R|
0001f840  37 2c 5b 52 31 5d 2c 23  31 0d c7 4c 05 5d 0d c7  |7,[R1],#1..L.]..|
0001f850  56 10 e7 66 6c 61 67 3d  33 35 30 30 20 8c 0d c7  |V..flag=3500 ...|
0001f860  60 0a 5b 4f 50 54 20 5a  0d c7 6a 10 41 44 44 20  |`.[OPT Z..j.ADD |
0001f870  52 39 2c 52 39 2c 23 31  0d c7 74 10 43 4d 50 20  |R9,R9,#1..t.CMP |
0001f880  52 39 2c 23 43 25 2b 31  0d c7 7e 0c ec 51 20 52  |R9,#C%+1..~..Q R|
0001f890  39 2c 23 30 0d c7 88 05  5d 0d c7 92 05 cc 0d c7  |9,#0....].......|
0001f8a0  9c 0a 5b 4f 50 54 20 5a  0d c7 a6 1e 53 55 42 53  |..[OPT Z....SUBS|
0001f8b0  20 52 39 2c 52 39 2c 23  31 3a 4d 4f 56 4d 49 20  | R9,R9,#1:MOVMI |
0001f8c0  52 39 2c 23 43 25 0d c7  b0 05 5d 0d c7 ba 05 cd  |R9,#C%....].....|
0001f8d0  0d c7 c4 0d c8 8e 20 66  6c 61 67 20 ca 0d c7 ce  |...... flag ....|
0001f8e0  0a c9 20 32 36 30 30 0d  c7 d8 0a 5b 4f 50 54 20  |.. 2600....[OPT |
0001f8f0  5a 0d c7 e2 0f 4d 4f 56  4d 49 20 52 33 2c 52 35  |Z....MOVMI R3,R5|
0001f900  0d c7 ec 05 5d 0d c7 f6  0a c9 20 33 35 30 30 0d  |....]..... 3500.|
0001f910  c8 00 0a 5b 4f 50 54 20  5a 0d c8 0a 12 41 44 44  |...[OPT Z....ADD|
0001f920  45 51 20 52 33 2c 52 33  2c 23 31 0d c8 14 05 5d  |EQ R3,R3,#1....]|
0001f930  0d c8 1e 05 7f 0d c8 28  0a 5b 4f 50 54 20 5a 0d  |.......(.[OPT Z.|
0001f940  c8 32 12 41 44 44 4d 49  20 52 33 2c 52 33 2c 23  |.2.ADDMI R3,R3,#|
0001f950  31 0d c8 3c 05 5d 0d c8  46 05 cb 0d c8 50 0a 5b  |1..<.]..F....P.[|
0001f960  4f 50 54 20 5a 0d c8 5a  1d 53 55 42 53 20 52 30  |OPT Z..Z.SUBS R0|
0001f970  2c 52 30 2c 23 31 3a 42  4e 45 20 70 6c 61 6e 65  |,R0,#1:BNE plane|
0001f980  6c 70 0d c8 64 0f 4d 4f  56 53 20 50 43 2c 52 31  |lp..d.MOVS PC,R1|
0001f990  34 0d c8 6e 05 5d 0d c8  78 05 cd 0d c8 82 05 ed  |4..n.]..x.......|
0001f9a0  0d c8 8c 0e 63 70 75 74  69 6d 65 25 3d 91 0d c8  |....cputime%=...|
0001f9b0  96 0d e7 63 61 63 68 65  25 20 8c 0d c8 a0 10 e7  |...cache% ......|
0001f9c0  66 6c 61 67 3d 33 36 30  30 20 8c 0d c8 aa 44 70  |flag=3600 ....Dp|
0001f9d0  63 64 62 6c 6b 25 21 31  32 3d 63 61 63 68 65 72  |cdblk%!12=cacher|
0001f9e0  6f 77 73 25 3a f2 72 65  66 69 6c 6c 70 63 64 3a  |ows%:.refillpcd:|
0001f9f0  e7 63 61 63 68 65 25 3e  3d 66 69 6c 65 73 69 7a  |.cache%>=filesiz|
0001fa00  65 25 20 72 6f 77 73 74  6f 67 6f 25 3d 2d 31 0d  |e% rowstogo%=-1.|
0001fa10  c8 b4 05 cc 0d c8 be 21  e7 73 74 72 69 70 72 6f  |.......!.stripro|
0001fa20  77 73 25 3e 30 80 63 6f  6d 70 72 65 73 73 69 6f  |ws%>0.compressio|
0001fa30  6e 3e 31 20 8c 0d c8 d2  1f c8 99 31 32 2c 34 2c  |n>1 .......12,4,|
0001fa40  63 25 2c 64 61 74 61 63  61 63 68 65 25 2c 63 61  |c%,datacache%,ca|
0001fa50  63 68 65 25 0d c8 dc 3b  e7 63 61 63 68 65 62 79  |che%...;.cacheby|
0001fa60  74 65 73 25 20 21 69 6e  63 61 63 68 65 70 74 72  |tes% !incacheptr|
0001fa70  3d 64 61 74 61 63 61 63  68 65 25 3a 21 6e 75 6d  |=datacache%:!num|
0001fa80  6c 65 66 74 74 6f 67 6f  3d 63 61 63 68 65 25 0d  |lefttogo=cache%.|
0001fa90  c8 e6 05 cc 0d c8 f0 2b  f2 72 65 66 69 6c 6c 3a  |.......+.refill:|
0001faa0  e7 63 61 63 68 65 25 3e  3d 66 69 6c 65 73 69 7a  |.cache%>=filesiz|
0001fab0  65 25 20 72 6f 77 73 74  6f 67 6f 25 3d 2d 31 0d  |e% rowstogo%=-1.|
0001fac0  c8 fa 05 cd 0d c9 04 05  cd 0d c9 0e 05 cd 0d c9  |................|
0001fad0  18 19 73 69 7a 65 73 68  66 74 25 3d 30 3a c8 8e  |..sizeshft%=0:..|
0001fae0  20 6e 63 6f 6c 20 ca 0d  c9 22 14 c9 20 32 5e 32  | ncol ...".. 2^2|
0001faf0  34 2d 31 3a 73 69 7a 65  25 3d 31 0d c9 2c 14 c9  |4-1:size%=1..,..|
0001fb00  20 32 5e 31 35 2d 31 3a  73 69 7a 65 25 3d 31 0d  | 2^15-1:size%=1.|
0001fb10  c9 36 18 c9 20 36 33 2c  32 35 35 2c 32 35 36 3a  |.6.. 63,255,256:|
0001fb20  73 69 7a 65 25 3d 31 0d  c9 40 1c c9 20 31 35 3a  |size%=1..@.. 15:|
0001fb30  73 69 7a 65 25 3d 32 3a  73 69 7a 65 73 68 66 74  |size%=2:sizeshft|
0001fb40  25 3d 31 0d c9 4a 1b c9  20 33 3a 73 69 7a 65 25  |%=1..J.. 3:size%|
0001fb50  3d 34 3a 73 69 7a 65 73  68 66 74 25 3d 32 0d c9  |=4:sizeshft%=2..|
0001fb60  54 37 c9 20 31 3a 73 69  7a 65 25 3d 38 3a 73 69  |T7. 1:size%=8:si|
0001fb70  7a 65 73 68 66 74 25 3d  33 3a e7 6d 24 3d 22 43  |zeshft%=3:.m$="C|
0001fb80  22 20 73 69 7a 65 25 3d  32 3a 73 69 7a 65 73 68  |" size%=2:sizesh|
0001fb90  66 74 25 3d 31 0d c9 5e  1f e7 6d 24 3d 22 44 22  |ft%=1..^..m$="D"|
0001fba0  20 73 69 7a 65 25 3d 34  3a 73 69 7a 65 73 68 66  | size%=4:sizeshf|
0001fbb0  74 25 3d 32 0d c9 68 1f  e7 6d 24 3d 22 54 22 20  |t%=2..h..m$="T" |
0001fbc0  73 69 7a 65 25 3d 32 3a  73 69 7a 65 73 68 66 74  |size%=2:sizeshft|
0001fbd0  25 3d 31 0d c9 72 05 cb  0d c9 86 0d c8 8e 20 66  |%=1..r........ f|
0001fbe0  6c 61 67 20 ca 0d c9 90  2a c9 20 35 30 31 3a e7  |lag ....*. 501:.|
0001fbf0  69 6e 66 6f 25 20 f1 22  52 65 61 64 69 6e 67 20  |info% ."Reading |
0001fc00  69 6e 74 65 72 6c 61 63  65 64 20 47 49 46 22 0d  |interlaced GIF".|
0001fc10  c9 9a 25 73 7a 25 3d 73  78 25 2a 73 79 25 3a 70  |..%sz%=sx%*sy%:p|
0001fc20  6c 62 75 66 66 25 3d a4  64 69 6d 28 73 7a 25 2b  |lbuff%=.dim(sz%+|
0001fc30  31 30 30 29 0d c9 a4 46  e3 59 25 3d 30 b8 73 79  |100)...F.Y%=0.sy|
0001fc40  25 2d 31 88 38 3a 58 25  3d 70 6c 62 75 66 66 25  |%-1.8:X%=plbuff%|
0001fc50  2b 59 25 2a 73 78 25 3a  d6 20 4c 5a 57 64 65 63  |+Y%*sx%:. LZWdec|
0001fc60  6f 64 65 25 2c 74 61 62  6c 65 25 28 30 29 2c 63  |ode%,table%(0),c|
0001fc70  25 2c 58 25 2c 73 78 25  3a ed 0d c9 ae 46 e3 59  |%,X%,sx%:....F.Y|
0001fc80  25 3d 34 b8 73 79 25 2d  31 88 38 3a 58 25 3d 70  |%=4.sy%-1.8:X%=p|
0001fc90  6c 62 75 66 66 25 2b 59  25 2a 73 78 25 3a d6 20  |lbuff%+Y%*sx%:. |
0001fca0  4c 5a 57 64 65 63 6f 64  65 25 2c 74 61 62 6c 65  |LZWdecode%,table|
0001fcb0  25 28 30 29 2c 63 25 2c  58 25 2c 73 78 25 3a ed  |%(0),c%,X%,sx%:.|
0001fcc0  0d c9 b8 46 e3 59 25 3d  32 b8 73 79 25 2d 31 88  |...F.Y%=2.sy%-1.|
0001fcd0  34 3a 58 25 3d 70 6c 62  75 66 66 25 2b 59 25 2a  |4:X%=plbuff%+Y%*|
0001fce0  73 78 25 3a d6 20 4c 5a  57 64 65 63 6f 64 65 25  |sx%:. LZWdecode%|
0001fcf0  2c 74 61 62 6c 65 25 28  30 29 2c 63 25 2c 58 25  |,table%(0),c%,X%|
0001fd00  2c 73 78 25 3a ed 0d c9  c2 46 e3 59 25 3d 31 b8  |,sx%:....F.Y%=1.|
0001fd10  73 79 25 2d 31 88 32 3a  58 25 3d 70 6c 62 75 66  |sy%-1.2:X%=plbuf|
0001fd20  66 25 2b 59 25 2a 73 78  25 3a d6 20 4c 5a 57 64  |f%+Y%*sx%:. LZWd|
0001fd30  65 63 6f 64 65 25 2c 74  61 62 6c 65 25 28 30 29  |ecode%,table%(0)|
0001fd40  2c 63 25 2c 58 25 2c 73  78 25 3a ed 0d c9 cc 3f  |,c%,X%,sx%:....?|
0001fd50  64 61 74 61 63 61 63 68  65 25 3d 70 6c 62 75 66  |datacache%=plbuf|
0001fd60  66 25 3a 62 75 66 66 25  3d 70 6c 62 75 66 66 25  |f%:buff%=plbuff%|
0001fd70  3a 72 6f 77 62 79 74 65  73 25 3d 73 78 25 3a 72  |:rowbytes%=sx%:r|
0001fd80  6f 77 73 74 6f 67 6f 25  3d 2d 31 0d c9 d6 05 cb  |owstogo%=-1.....|
0001fd90  0d c9 e0 1a e7 67 61 6d  6d 61 3c 3e 31 20 80 20  |.....gamma<>1 . |
0001fda0  67 61 6d 6d 61 3c 3e 30  20 8c 0d c9 ea 1f 6b 3d  |gamma<>0 .....k=|
0001fdb0  31 2f 67 61 6d 6d 61 3a  e3 43 25 3d 30 b8 63 6f  |1/gamma:.C%=0.co|
0001fdc0  6c 6f 75 72 69 6e 64 65  78 0d c9 f4 23 e7 72 25  |lourindex...#.r%|
0001fdd0  28 43 25 29 20 72 25 28  43 25 29 3d 28 28 72 25  |(C%) r%(C%)=((r%|
0001fde0  28 43 25 29 2f 46 29 5e  6b 29 2a 46 0d c9 fe 23  |(C%)/F)^k)*F...#|
0001fdf0  e7 67 25 28 43 25 29 20  67 25 28 43 25 29 3d 28  |.g%(C%) g%(C%)=(|
0001fe00  28 67 25 28 43 25 29 2f  46 29 5e 6b 29 2a 46 0d  |(g%(C%)/F)^k)*F.|
0001fe10  ca 08 23 e7 62 25 28 43  25 29 20 62 25 28 43 25  |..#.b%(C%) b%(C%|
0001fe20  29 3d 28 28 62 25 28 43  25 29 2f 46 29 5e 6b 29  |)=((b%(C%)/F)^k)|
0001fe30  2a 46 0d ca 12 05 ed 0d  ca 1c 05 cd 0d ca 26 18  |*F............&.|
0001fe40  72 6d 61 78 3d 46 3a 67  6d 61 78 3d 46 3a 62 6d  |rmax=F:gmax=F:bm|
0001fe50  61 78 3d 46 0d ca 30 0c  e7 63 6f 6c 3d 30 20 8c  |ax=F..0..col=0 .|
0001fe60  0d ca 3a 0e e7 69 6e 70  75 74 3c 39 20 8c 0d ca  |..:..input<9 ...|
0001fe70  44 37 e3 43 25 3d 30 b8  32 35 35 3a 72 25 28 43  |D7.C%=0.255:r%(C|
0001fe80  25 29 3d 72 25 28 43 25  29 2a 72 77 74 2b 67 25  |%)=r%(C%)*rwt+g%|
0001fe90  28 43 25 29 2a 67 77 74  2b 62 25 28 43 25 29 2a  |(C%)*gwt+b%(C%)*|
0001fea0  62 77 74 3a ed 0d ca 4e  05 cc 0d ca 58 10 e7 69  |bwt:...N....X..i|
0001feb0  6e 70 75 74 3c 34 30 30  20 8c 0d ca 62 24 72 6d  |nput<400 ...b$rm|
0001fec0  61 78 3d 46 2a 72 77 74  3a 67 6d 61 78 3d 46 2a  |ax=F*rwt:gmax=F*|
0001fed0  67 77 74 3a 62 6d 61 78  3d 46 2a 62 77 74 0d ca  |gwt:bmax=F*bwt..|
0001fee0  6c 4d e3 43 25 3d 30 b8  63 6f 6c 6f 75 72 69 6e  |lM.C%=0.colourin|
0001fef0  64 65 78 3a 72 25 28 43  25 29 3d 72 25 28 43 25  |dex:r%(C%)=r%(C%|
0001ff00  29 2a 72 77 74 3a 67 25  28 43 25 29 3d 67 25 28  |)*rwt:g%(C%)=g%(|
0001ff10  43 25 29 2a 67 77 74 3a  62 25 28 43 25 29 3d 62  |C%)*gwt:b%(C%)=b|
0001ff20  25 28 43 25 29 2a 62 77  74 3a ed 0d ca 76 05 cd  |%(C%)*bwt:...v..|
0001ff30  0d ca 80 05 cd 0d ca 8a  05 cd 0d ca 94 2c e7 ac  |.............,..|
0001ff40  6f 72 64 65 72 25 20 f2  61 64 6a 75 73 74 70 61  |order% .adjustpa|
0001ff50  6c 65 74 74 65 28 31 2f  79 64 69 76 25 2f 78 64  |lette(1/ydiv%/xd|
0001ff60  69 76 25 2c 30 29 0d ca  a8 0d e7 72 61 6e 67 65  |iv%,0).....range|
0001ff70  25 20 8c 0d ca b2 3e e7  69 6e 66 6f 25 20 f1 22  |% ....>.info% ."|
0001ff80  53 63 61 6e 6e 69 6e 67  20 64 61 74 61 20 74 6f  |Scanning data to|
0001ff90  20 63 6f 6d 70 75 74 65  20 70 61 72 61 6d 65 74  | compute paramet|
0001ffa0  65 72 73 20 66 6f 72 20  27 2d 72 61 6e 67 65 27  |ers for '-range'|
0001ffb0  22 0d ca bc 0d e7 6f 72  64 65 72 25 20 8c 0d ca  |".....order% ...|
0001ffc0  c6 1d 59 25 3d 30 3a f5  20 c8 99 68 6f 75 72 25  |..Y%=0:. ..hour%|
0001ffd0  2c 59 25 2a 31 30 30 81  73 79 25 0d ca d0 38 57  |,Y%*100.sy%...8W|
0001ffe0  25 3d a0 28 72 24 2b 22  28 78 70 25 28 29 29 22  |%=.(r$+"(xp%())"|
0001fff0  29 3a d6 6d 61 78 6d 69  6e 25 2c 78 70 25 28 31  |):.maxmin%,xp%(1|
00020000  2c 30 29 2c 74 6f 74 76  61 6c 73 32 25 3a 59 25  |,0),totvals2%:Y%|
00020010  2b 3d 31 0d ca da 22 fd  59 25 3d 73 79 25 20 84  |+=1...".Y%=sy% .|
00020020  21 6d 69 6e 3c 32 35 35  20 80 21 6d 61 78 2b 32  |!min<255 .!max+2|
00020030  35 35 3e 3d 46 0d ca e4  05 cc 0d ca ee 25 59 25  |55>=F........%Y%|
00020040  3d 30 3a 79 73 61 6d 70  25 3d 31 3a f5 20 c8 99  |=0:ysamp%=1:. ..|
00020050  68 6f 75 72 25 2c 59 25  2a 31 30 30 81 79 25 0d  |hour%,Y%*100.y%.|
00020060  ca f8 3b f2 73 63 61 6c  65 64 70 69 78 65 6c 72  |..;.scaledpixelr|
00020070  6f 77 28 63 6c 25 28 29  29 3a d6 6d 61 78 6d 69  |ow(cl%()):.maxmi|
00020080  6e 25 2c 63 6c 25 28 31  2c 30 29 2c 74 6f 74 76  |n%,cl%(1,0),totv|
00020090  61 6c 73 25 3a 59 25 2b  3d 31 0d cb 02 23 fd 59  |als%:Y%+=1...#.Y|
000200a0  25 3d 79 25 20 84 20 21  6d 69 6e 3c 32 35 35 20  |%=y% . !min<255 |
000200b0  80 20 21 6d 61 78 2b 32  35 35 3e 3d 46 0d cb 0c  |. !max+255>=F...|
000200c0  05 cd 0d cb 16 4f e7 21  6d 61 78 2b 32 35 35 3e  |.....O.!max+255>|
000200d0  3d 46 20 80 21 6d 69 6e  3c 32 35 35 20 72 61 6e  |=F .!min<255 ran|
000200e0  67 65 25 3d a3 3a 72 61  6e 67 65 24 3d 22 4e 6f  |ge%=.:range$="No|
000200f0  20 70 6f 69 6e 74 20 69  6e 20 27 2d 72 61 6e 67  | point in '-rang|
00020100  65 27 20 6f 6e 20 74 68  69 73 20 69 6d 61 67 65  |e' on this image|
00020110  22 0d cb 20 85 e7 72 61  6e 67 65 25 20 f2 61 64  |".. ..range% .ad|
00020120  6a 75 73 74 70 61 6c 65  74 74 65 28 46 2f 28 21  |justpalette(F/(!|
00020130  6d 61 78 2d 21 6d 69 6e  29 2c 21 6d 69 6e 2f 79  |max-!min),!min/y|
00020140  64 69 76 25 2f 78 64 69  76 25 29 3a 72 61 6e 67  |div%/xdiv%):rang|
00020150  65 24 3d 22 49 6e 70 75  74 20 69 6d 61 67 65 20  |e$="Input image |
00020160  6d 61 78 69 6d 75 6d 20  22 2b c3 28 21 6d 61 78  |maximum "+.(!max|
00020170  2f 46 2a 31 30 30 29 2b  22 25 20 6d 69 6e 69 6d  |/F*100)+"% minim|
00020180  75 6d 20 22 2b c3 28 21  6d 69 6e 2f 46 2a 31 30  |um "+.(!min/F*10|
00020190  30 29 2b 22 25 22 0d cb  2a 1a f2 72 65 77 69 6e  |0)+"%"..*..rewin|
000201a0  64 3a e7 69 6e 66 6f 25  20 f1 72 61 6e 67 65 24  |d:.info% .range$|
000201b0  0d cb 34 05 cd 0d cb 3e  14 e7 68 69 73 74 25 20  |..4....>..hist% |
000201c0  84 65 71 75 61 6c 25 20  8c 0d cb 48 46 e7 65 71  |.equal% ...HF.eq|
000201d0  75 61 6c 25 20 e7 69 6e  66 6f 25 20 f1 22 53 63  |ual% .info% ."Sc|
000201e0  61 6e 6e 69 6e 67 20 64  61 74 61 20 74 6f 20 63  |anning data to c|
000201f0  6f 6d 70 75 74 65 20 70  61 72 61 6d 65 74 65 72  |ompute parameter|
00020200  73 20 66 6f 72 20 27 2d  65 71 75 61 6c 27 22 0d  |s for '-equal'".|
00020210  cb 52 0d e7 6f 72 64 65  72 25 20 8c 0d cb 5c 24  |.R..order% ...\$|
00020220  e3 79 72 25 3d 30 b8 73  79 25 2d 31 3a c8 99 68  |.yr%=0.sy%-1:..h|
00020230  6f 75 72 25 2c 79 72 25  2a 31 30 30 81 73 79 25  |our%,yr%*100.sy%|
00020240  0d cb 66 36 57 25 3d a0  28 72 24 2b 22 28 78 70  |..f6W%=.(r$+"(xp|
00020250  25 28 29 29 22 29 3a d6  68 69 73 74 6f 25 2c 78  |%())"):.histo%,x|
00020260  70 25 28 31 2c 30 29 2c  76 61 6c 73 25 28 30 2c  |p%(1,0),vals%(0,|
00020270  30 29 2c 73 78 25 0d cb  70 05 ed 0d cb 7a 05 cc  |0),sx%..p....z..|
00020280  0d cb 84 2b 79 73 61 6d  70 25 3d 31 3a e3 79 72  |...+ysamp%=1:.yr|
00020290  25 3d 30 b8 79 25 2d 31  3a c8 99 68 6f 75 72 25  |%=0.y%-1:..hour%|
000202a0  2c 79 72 25 2a 31 30 30  81 79 25 0d cb 8e 39 f2  |,yr%*100.y%...9.|
000202b0  73 63 61 6c 65 64 70 69  78 65 6c 72 6f 77 28 63  |scaledpixelrow(c|
000202c0  6c 25 28 29 29 3a d6 68  69 73 74 6f 25 2c 63 6c  |l%()):.histo%,cl|
000202d0  25 28 31 2c 30 29 2c 76  61 6c 73 25 28 30 2c 30  |%(1,0),vals%(0,0|
000202e0  29 2c 78 25 0d cb 98 05  ed 0d cb a2 05 cd 0d cb  |),x%............|
000202f0  ac 2e e7 69 6e 66 6f 25  20 f1 22 44 6f 6e 65 2e  |...info% ."Done.|
00020300  20 4e 6f 77 20 70 72 6f  63 65 73 73 69 6e 67 20  | Now processing |
00020310  74 68 65 20 70 69 63 74  75 72 65 22 0d cb b6 05  |the picture"....|
00020320  cd 0d cb c0 10 e7 69 6e  70 75 74 3c 34 30 30 20  |......input<400 |
00020330  8c 0d cb ca 15 e3 43 25  3d 30 b8 63 6f 6c 6f 75  |......C%=0.colou|
00020340  72 69 6e 64 65 78 0d cb  d4 16 e7 72 25 28 43 25  |rindex.....r%(C%|
00020350  29 3c 30 20 72 25 28 43  25 29 3d 30 0d cb de 16  |)<0 r%(C%)=0....|
00020360  e7 67 25 28 43 25 29 3c  30 20 67 25 28 43 25 29  |.g%(C%)<0 g%(C%)|
00020370  3d 30 0d cb e8 16 e7 62  25 28 43 25 29 3c 30 20  |=0.....b%(C%)<0 |
00020380  62 25 28 43 25 29 3d 30  0d cb f2 1c e7 72 25 28  |b%(C%)=0.....r%(|
00020390  43 25 29 3e 72 6d 61 78  20 72 25 28 43 25 29 3d  |C%)>rmax r%(C%)=|
000203a0  72 6d 61 78 0d cb fc 1c  e7 67 25 28 43 25 29 3e  |rmax.....g%(C%)>|
000203b0  67 6d 61 78 20 67 25 28  43 25 29 3d 67 6d 61 78  |gmax g%(C%)=gmax|
000203c0  0d cc 06 1c e7 62 25 28  43 25 29 3e 62 6d 61 78  |.....b%(C%)>bmax|
000203d0  20 62 25 28 43 25 29 3d  62 6d 61 78 0d cc 10 05  | b%(C%)=bmax....|
000203e0  ed 0d cc 1a 05 cd 0d cc  24 0c e7 68 69 73 74 25  |........$..hist%|
000203f0  20 8c 0d cc 2e 19 4d 25  3d 30 3a 5a 4d 25 3d 2d  | .....M%=0:ZM%=-|
00020400  31 3a e3 43 25 3d 30 b8  63 6f 6c 0d cc 38 35 e3  |1:.C%=0.col..85.|
00020410  5a 25 3d 30 b8 32 35 36  3a e7 76 61 6c 73 25 28  |Z%=0.256:.vals%(|
00020420  5a 25 2c 43 25 29 3e 4d  25 20 4d 25 3d 76 61 6c  |Z%,C%)>M% M%=val|
00020430  73 25 28 5a 25 2c 43 25  29 3a 5a 4d 25 3d 5a 25  |s%(Z%,C%):ZM%=Z%|
00020440  0d cc 42 07 ed 3a ed 0d  cc 4c 1d e7 5a 4d 25 3d  |..B..:...L..ZM%=|
00020450  2d 31 20 84 20 6f 6b 69  6e 66 6f 25 3d 30 20 8c  |-1 . okinfo%=0 .|
00020460  3d 31 30 30 0d cc 56 0d  e7 20 63 6f 6c 3e 30 20  |=100..V.. col>0 |
00020470  8c 0d cc 60 0e eb 36 36  3a 68 74 3d 35 30 30 0d  |...`..66:ht=500.|
00020480  cc 6a 15 e7 eb 3c 3e 36  36 20 eb 31 36 3a 68 74  |.j...<>66 .16:ht|
00020490  3d 34 30 30 0d cc 74 0f  86 30 2c 36 2c 32 30 30  |=400..t..0,6,200|
000204a0  30 2c 36 0d cc 7e 05 cc  0d cc 88 1a eb 31 38 3a  |0,6..~.......18:|
000204b0  68 74 3d 34 30 30 3a 86  30 2c 36 2c 31 30 32 34  |ht=400:.0,6,1024|
000204c0  2c 36 0d cc 92 05 cd 0d  cc 9c 23 4d 3d 4d 25 2f  |,6........#M=M%/|
000204d0  28 68 74 2a 32 2d 38 29  3a e3 43 25 3d 30 b8 63  |(ht*2-8):.C%=0.c|
000204e0  6f 6c 3a c8 8e 20 43 25  20 ca 0d cc a6 0a c9 20  |ol:.. C% ...... |
000204f0  30 3a e6 31 0d cc b0 0a  c9 20 31 3a e6 32 0d cc  |0:.1..... 1:.2..|
00020500  ba 0a c9 20 32 3a e6 34  0d cc c4 05 cb 0d cc ce  |... 2:.4........|
00020510  0d e7 20 63 6f 6c 3e 30  20 8c 0d cc d8 43 e3 5a  |.. col>0 ....C.Z|
00020520  25 3d 30 b8 32 35 36 3a  e7 76 61 6c 73 25 28 5a  |%=0.256:.vals%(Z|
00020530  25 2c 43 25 29 20 58 25  3d 5a 25 2a 33 2b 43 25  |%,C%) X%=Z%*3+C%|
00020540  3c 3c 31 3a 86 58 25 2c  38 2c 58 25 2c 76 61 6c  |<<1:.X%,8,X%,val|
00020550  73 25 28 5a 25 2c 43 25  29 2f 4d 2b 38 0d cc e2  |s%(Z%,C%)/M+8...|
00020560  05 ed 0d cc ec 05 cc 0d  cc f6 3f e3 5a 25 3d 30  |..........?.Z%=0|
00020570  b8 32 35 36 3a e7 76 61  6c 73 25 28 5a 25 2c 43  |.256:.vals%(Z%,C|
00020580  25 29 20 58 25 3d 5a 25  3c 3c 32 3a c8 93 20 c8  |%) X%=Z%<<2:.. .|
00020590  90 58 25 2c 38 2c 32 2c  76 61 6c 73 25 28 5a 25  |.X%,8,2,vals%(Z%|
000205a0  2c 43 25 29 2f 4d 0d cd  00 05 ed 0d cd 0a 05 cd  |,C%)/M..........|
000205b0  0d cd 14 05 ed 0d cd 1e  1c f2 63 6c 6f 73 65 3a  |..........close:|
000205c0  c8 99 22 48 6f 75 72 67  6c 61 73 73 5f 4f 66 66  |.."Hourglass_Off|
000205d0  22 0d cd 28 08 3d 31 30  30 0d cd 32 05 cd 0d cd  |"..(.=100..2....|
000205e0  3c 25 e7 6d 3e 3d 30 20  6f 6e 61 6d 65 24 3d 22  |<%.m>=0 oname$="|
000205f0  70 22 2b c3 6d 2b 6d 24  20 8b 6f 6e 61 6d 65 24  |p"+.m+m$ .oname$|
00020600  3d 6d 24 0d cd 46 21 e7  6d 3d 2d 36 20 84 6d 3d  |=m$..F!.m=-6 .m=|
00020610  2d 37 20 84 6d 3d 2d 38  20 6f 6e 61 6d 65 24 3d  |-7 .m=-8 oname$=|
00020620  70 6e 6d 24 0d cd 50 17  e7 72 61 6e 67 65 25 20  |pnm$..P..range% |
00020630  6f 6e 61 6d 65 24 2b 3d  22 72 22 0d cd 5a 17 e7  |oname$+="r"..Z..|
00020640  65 71 75 61 6c 25 20 6f  6e 61 6d 65 24 2b 3d 22  |equal% oname$+="|
00020650  65 22 0d cd 64 23 e7 73  68 61 72 70 65 6e 25 20  |e"..d#.sharpen% |
00020660  6f 6e 61 6d 65 24 2b 3d  22 73 22 2b c3 73 68 61  |oname$+="s"+.sha|
00020670  72 70 65 6e 25 0d cd 6e  1f e7 62 6c 61 63 6b 25  |rpen%..n..black%|
00020680  20 6f 6e 61 6d 65 24 2b  3d 22 62 22 2b c3 62 6c  | oname$+="b"+.bl|
00020690  61 63 6b 25 0d cd 78 38  e7 67 61 6d 6d 61 3c 3e  |ack%..x8.gamma<>|
000206a0  31 20 41 25 3d 40 25 3a  40 25 3d 26 31 30 32 30  |1 A%=@%:@%=&1020|
000206b0  31 30 30 3a 6f 6e 61 6d  65 24 2b 3d 22 67 22 2b  |100:oname$+="g"+|
000206c0  c3 67 61 6d 6d 61 3a 40  25 3d 41 25 0d cd 82 1b  |.gamma:@%=A%....|
000206d0  e7 62 72 69 67 68 74 25  3d 31 36 20 6f 6e 61 6d  |.bright%=16 onam|
000206e0  65 24 2b 3d 22 62 22 0d  cd 8c 29 78 73 70 25 3d  |e$+="b"...)xsp%=|
000206f0  78 25 3a 79 73 70 25 3d  79 25 3a e7 72 6f 74 61  |x%:ysp%=y%:.rota|
00020700  74 65 25 20 c8 94 20 78  73 70 25 2c 79 73 70 25  |te% .. xsp%,ysp%|
00020710  0d cd 96 33 e7 20 72 6f  74 61 74 65 25 20 84 20  |...3. rotate% . |
00020720  68 66 6c 69 70 25 20 84  20 76 66 6c 69 70 25 20  |hflip% . vflip% |
00020730  e7 6d 3d 2d 39 20 84 20  6d 3d 2d 31 30 20 8c 6d  |.m=-9 . m=-10 .m|
00020740  2d 3d 32 0d cd a0 11 e7  6d 3d 2d 39 84 6d 3d 2d  |-=2.....m=-9.m=-|
00020750  31 30 20 8c 0d cd aa 0e  de 20 6a 70 71 25 28 32  |10 ...... jpq%(2|
00020760  30 29 0d cd b4 5b 6a 70  71 25 28 29 3d 36 30 2c  |0)...[jpq%()=60,|
00020770  37 35 2c 39 30 2c 31 30  35 2c 31 32 30 2c 31 33  |75,90,105,120,13|
00020780  35 2c 31 35 30 2c 31 36  30 2c 31 37 30 2c 31 38  |5,150,160,170,18|
00020790  30 2c 31 39 30 2c 32 30  35 2c 32 31 35 2c 32 33  |0,190,205,215,23|
000207a0  35 2c 32 35 35 2c 32 38  30 2c 33 32 30 2c 33 38  |5,255,280,320,38|
000207b0  30 2c 35 30 30 2c 37 35  30 2c 38 35 30 0d cd be  |0,500,750,850...|
000207c0  05 cd 0d cd c8 0a c8 8e  20 6d 20 ca 0d cd d2 2e  |........ m .....|
000207d0  c9 20 2d 31 3a 78 77 6f  72 64 73 25 3d 78 73 70  |. -1:xwords%=xsp|
000207e0  25 3a 73 7a 25 3d 78 77  6f 72 64 73 25 2a 79 73  |%:sz%=xwords%*ys|
000207f0  70 25 3a 59 25 3d 79 73  70 25 0d cd dc 2b f2 67  |p%:Y%=ysp%...+.g|
00020800  65 74 6f 75 74 70 75 74  28 73 7a 25 2c 30 2c 78  |etoutput(sz%,0,x|
00020810  77 6f 72 64 73 25 2c 59  25 29 3a 62 61 73 65 25  |words%,Y%):base%|
00020820  3d 72 61 6d 25 0d cd e6  33 c9 20 2d 33 2c 2d 35  |=ram%...3. -3,-5|
00020830  3a 78 77 6f 72 64 73 25  3d 78 73 70 25 2a 32 3a  |:xwords%=xsp%*2:|
00020840  73 7a 25 3d 78 77 6f 72  64 73 25 2a 79 73 70 25  |sz%=xwords%*ysp%|
00020850  3a 59 25 3d 79 73 70 25  0d cd f0 2b f2 67 65 74  |:Y%=ysp%...+.get|
00020860  6f 75 74 70 75 74 28 73  7a 25 2c 30 2c 78 77 6f  |output(sz%,0,xwo|
00020870  72 64 73 25 2c 59 25 29  3a 62 61 73 65 25 3d 72  |rds%,Y%):base%=r|
00020880  61 6d 25 0d cd fa 30 c9  20 2d 34 3a 78 77 6f 72  |am%...0. -4:xwor|
00020890  64 73 25 3d 78 73 70 25  2a 33 3a 73 7a 25 3d 78  |ds%=xsp%*3:sz%=x|
000208a0  77 6f 72 64 73 25 2a 79  73 70 25 3a 59 25 3d 79  |words%*ysp%:Y%=y|
000208b0  73 70 25 0d ce 04 2b f2  67 65 74 6f 75 74 70 75  |sp%...+.getoutpu|
000208c0  74 28 73 7a 25 2c 30 2c  78 77 6f 72 64 73 25 2c  |t(sz%,0,xwords%,|
000208d0  59 25 29 3a 62 61 73 65  25 3d 72 61 6d 25 0d ce  |Y%):base%=ram%..|
000208e0  0e 35 c9 20 2d 36 3a 78  77 6f 72 64 73 25 3d 78  |.5. -6:xwords%=x|
000208f0  73 70 25 2a 32 2b 33 80  ac 33 3a 73 7a 25 3d 78  |sp%*2+3..3:sz%=x|
00020900  77 6f 72 64 73 25 2a 79  73 70 25 3a 59 25 3d 79  |words%*ysp%:Y%=y|
00020910  73 70 25 0d ce 18 27 41  25 3d 59 25 3a f2 67 65  |sp%...'A%=Y%:.ge|
00020920  74 6f 75 74 70 75 74 28  73 7a 25 2c 36 34 2c 78  |toutput(sz%,64,x|
00020930  77 6f 72 64 73 25 2c 59  25 29 0d ce 22 31 72 61  |words%,Y%).."1ra|
00020940  6d 25 21 34 3d 30 3a 72  61 6d 25 21 38 3d 31 36  |m%!4=0:ram%!8=16|
00020950  3a 72 61 6d 25 21 31 32  3d 31 36 3a c8 99 26 32  |:ram%!12=16:..&2|
00020960  65 2c 26 31 30 39 2c 72  61 6d 25 0d ce 2c 29 c8  |e,&109,ram%..,).|
00020970  99 26 32 65 2c 26 31 30  66 2c 72 61 6d 25 2c 6f  |.&2e,&10f,ram%,o|
00020980  6e 61 6d 65 24 2c 30 2c  78 73 70 25 2a 32 2c 59  |name$,0,xsp%*2,Y|
00020990  25 2c 32 38 0d ce 36 4a  62 61 73 65 25 3d 72 61  |%,28..6Jbase%=ra|
000209a0  6d 25 2b 72 61 6d 25 21  38 3a 62 61 73 65 25 21  |m%+ram%!8:base%!|
000209b0  28 35 2a 34 29 3d 41 25  2d 31 3a 21 62 61 73 65  |(5*4)=A%-1:!base|
000209c0  25 3d 21 62 61 73 65 25  2d 59 25 2a 78 77 6f 72  |%=!base%-Y%*xwor|
000209d0  64 73 25 2b 41 25 2a 78  77 6f 72 64 73 25 0d ce  |ds%+A%*xwords%..|
000209e0  40 29 72 61 6d 25 21 31  32 3d 72 61 6d 25 21 31  |@)ram%!12=ram%!1|
000209f0  32 2d 59 25 2a 78 77 6f  72 64 73 25 2b 41 25 2a  |2-Y%*xwords%+A%*|
00020a00  78 77 6f 72 64 73 25 0d  ce 4a 3e 62 61 73 65 25  |xwords%..J>base%|
00020a10  21 28 31 30 2a 34 29 3d  35 3c 3c 32 37 20 84 20  |!(10*4)=5<<27 . |
00020a20  6e 78 3c 3c 31 20 84 20  6e 79 3c 3c 31 34 20 84  |nx<<1 . ny<<14 .|
00020a30  20 31 3a 62 61 73 65 25  2b 3d 62 61 73 65 25 21  | 1:base%+=base%!|
00020a40  28 38 2a 34 29 0d ce 54  35 c9 20 2d 37 3a 78 77  |(8*4)..T5. -7:xw|
00020a50  6f 72 64 73 25 3d 78 73  70 25 2a 33 2b 33 80 ac  |ords%=xsp%*3+3..|
00020a60  33 3a 73 7a 25 3d 78 77  6f 72 64 73 25 2a 79 73  |3:sz%=xwords%*ys|
00020a70  70 25 3a 59 25 3d 79 73  70 25 0d ce 5e 27 41 25  |p%:Y%=ysp%..^'A%|
00020a80  3d 59 25 3a f2 67 65 74  6f 75 74 70 75 74 28 73  |=Y%:.getoutput(s|
00020a90  7a 25 2c 36 34 2c 78 77  6f 72 64 73 25 2c 59 25  |z%,64,xwords%,Y%|
00020aa0  29 0d ce 68 31 72 61 6d  25 21 34 3d 30 3a 72 61  |)..h1ram%!4=0:ra|
00020ab0  6d 25 21 38 3d 31 36 3a  72 61 6d 25 21 31 32 3d  |m%!8=16:ram%!12=|
00020ac0  31 36 3a c8 99 26 32 65  2c 26 31 30 39 2c 72 61  |16:..&2e,&109,ra|
00020ad0  6d 25 0d ce 72 29 c8 99  26 32 65 2c 26 31 30 66  |m%..r)..&2e,&10f|
00020ae0  2c 72 61 6d 25 2c 6f 6e  61 6d 65 24 2c 30 2c 78  |,ram%,oname$,0,x|
00020af0  73 70 25 2a 33 2c 59 25  2c 32 38 0d ce 7c 4a 62  |sp%*3,Y%,28..|Jb|
00020b00  61 73 65 25 3d 72 61 6d  25 2b 72 61 6d 25 21 38  |ase%=ram%+ram%!8|
00020b10  3a 62 61 73 65 25 21 28  35 2a 34 29 3d 41 25 2d  |:base%!(5*4)=A%-|
00020b20  31 3a 21 62 61 73 65 25  3d 21 62 61 73 65 25 2d  |1:!base%=!base%-|
00020b30  59 25 2a 78 77 6f 72 64  73 25 2b 41 25 2a 78 77  |Y%*xwords%+A%*xw|
00020b40  6f 72 64 73 25 0d ce 86  29 72 61 6d 25 21 31 32  |ords%...)ram%!12|
00020b50  3d 72 61 6d 25 21 31 32  2d 59 25 2a 78 77 6f 72  |=ram%!12-Y%*xwor|
00020b60  64 73 25 2b 41 25 2a 78  77 6f 72 64 73 25 0d ce  |ds%+A%*xwords%..|
00020b70  90 42 62 61 73 65 25 21  28 31 30 2a 34 29 3d 70  |.Bbase%!(10*4)=p|
00020b80  61 6e 69 63 3c 3c 32 37  20 84 20 6e 78 3c 3c 31  |anic<<27 . nx<<1|
00020b90  20 84 20 6e 79 3c 3c 31  34 20 84 20 31 3a 62 61  | . ny<<14 . 1:ba|
00020ba0  73 65 25 2b 3d 62 61 73  65 25 21 28 38 2a 34 29  |se%+=base%!(8*4)|
00020bb0  0d ce 9a 34 6e 6f 20 6d  61 67 69 63 20 6e 75 6d  |...4no magic num|
00020bc0  62 65 72 20 79 65 74 20  66 6f 72 20 6e 65 77 20  |ber yet for new |
00020bd0  66 6f 72 6d 61 74 20 32  34 62 70 70 20 73 70 72  |format 24bpp spr|
00020be0  69 74 65 73 0d ce a4 30  c9 20 2d 38 3a 78 77 6f  |ites...0. -8:xwo|
00020bf0  72 64 73 25 3d 78 73 70  25 2a 34 3a 73 7a 25 3d  |rds%=xsp%*4:sz%=|
00020c00  78 77 6f 72 64 73 25 2a  79 73 70 25 3a 59 25 3d  |xwords%*ysp%:Y%=|
00020c10  79 73 70 25 0d ce ae 27  41 25 3d 59 25 3a f2 67  |ysp%...'A%=Y%:.g|
00020c20  65 74 6f 75 74 70 75 74  28 73 7a 25 2c 36 34 2c  |etoutput(sz%,64,|
00020c30  78 77 6f 72 64 73 25 2c  59 25 29 0d ce b8 31 72  |xwords%,Y%)...1r|
00020c40  61 6d 25 21 34 3d 30 3a  72 61 6d 25 21 38 3d 31  |am%!4=0:ram%!8=1|
00020c50  36 3a 72 61 6d 25 21 31  32 3d 31 36 3a c8 99 26  |6:ram%!12=16:..&|
00020c60  32 65 2c 26 31 30 39 2c  72 61 6d 25 0d ce c2 29  |2e,&109,ram%...)|
00020c70  c8 99 26 32 65 2c 26 31  30 66 2c 72 61 6d 25 2c  |..&2e,&10f,ram%,|
00020c80  6f 6e 61 6d 65 24 2c 30  2c 78 73 70 25 2a 34 2c  |oname$,0,xsp%*4,|
00020c90  59 25 2c 32 38 0d ce cc  4a 62 61 73 65 25 3d 72  |Y%,28...Jbase%=r|
00020ca0  61 6d 25 2b 72 61 6d 25  21 38 3a 62 61 73 65 25  |am%+ram%!8:base%|
00020cb0  21 28 35 2a 34 29 3d 41  25 2d 31 3a 21 62 61 73  |!(5*4)=A%-1:!bas|
00020cc0  65 25 3d 21 62 61 73 65  25 2d 59 25 2a 78 77 6f  |e%=!base%-Y%*xwo|
00020cd0  72 64 73 25 2b 41 25 2a  78 77 6f 72 64 73 25 0d  |rds%+A%*xwords%.|
00020ce0  ce d6 29 72 61 6d 25 21  31 32 3d 72 61 6d 25 21  |..)ram%!12=ram%!|
00020cf0  31 32 2d 59 25 2a 78 77  6f 72 64 73 25 2b 41 25  |12-Y%*xwords%+A%|
00020d00  2a 78 77 6f 72 64 73 25  0d ce e0 3e 62 61 73 65  |*xwords%...>base|
00020d10  25 21 28 31 30 2a 34 29  3d 36 3c 3c 32 37 20 84  |%!(10*4)=6<<27 .|
00020d20  20 6e 78 3c 3c 31 20 84  20 6e 79 3c 3c 31 34 20  | nx<<1 . ny<<14 |
00020d30  84 20 31 3a 62 61 73 65  25 2b 3d 62 61 73 65 25  |. 1:base%+=base%|
00020d40  21 28 38 2a 34 29 0d ce  ea 3e c9 20 2d 39 3a 78  |!(8*4)...>. -9:x|
00020d50  77 6f 72 64 73 25 3d 78  73 70 25 2b 33 80 ac 33  |words%=xsp%+3..3|
00020d60  3a 73 7a 25 3d 28 78 73  70 25 2b 37 80 ac 37 29  |:sz%=(xsp%+7..7)|
00020d70  2a 28 79 73 70 25 2b 37  80 ac 37 29 3a 59 25 3d  |*(ysp%+7..7):Y%=|
00020d80  79 73 70 25 0d ce f4 29  73 7a 25 3d 73 7a 25 2a  |ysp%...)sz%=sz%*|
00020d90  6a 70 71 25 28 6a 70 65  67 71 75 61 6c 69 74 79  |jpq%(jpegquality|
00020da0  25 81 35 29 2f 35 38 38  2b 31 30 32 34 0d ce fe  |%.5)/588+1024...|
00020db0  26 6a 70 65 67 77 72 6b  25 3d a4 64 69 6d 28 28  |&jpegwrk%=.dim((|
00020dc0  78 73 70 25 2b 37 80 ac  37 29 2a 39 2b 32 30 30  |xsp%+7..7)*9+200|
00020dd0  30 30 29 0d cf 08 17 62  61 73 65 25 3d a4 64 69  |00)....base%=.di|
00020de0  6d 28 78 77 6f 72 64 73  25 29 0d cf 12 15 f2 67  |m(xwords%).....g|
00020df0  65 74 6f 75 74 70 75 74  6a 70 28 73 7a 25 29 0d  |etoutputjp(sz%).|
00020e00  cf 1c 4e 21 72 61 6d 25  3d 78 73 70 25 3a 72 61  |..N!ram%=xsp%:ra|
00020e10  6d 25 21 34 3d 79 73 70  25 3a 72 61 6d 25 21 38  |m%!4=ysp%:ram%!8|
00020e20  3d 6a 70 65 67 71 75 61  6c 69 74 79 25 3a 72 61  |=jpegquality%:ra|
00020e30  6d 25 21 31 32 3d 31 3a  72 61 6d 25 21 31 36 3d  |m%!12=1:ram%!16=|
00020e40  39 30 3a 72 61 6d 25 21  32 30 3d 39 30 0d cf 26  |90:ram%!20=90..&|
00020e50  50 c8 99 22 43 6f 6d 70  72 65 73 73 4a 50 45 47  |P.."CompressJPEG|
00020e60  5f 53 74 61 72 74 22 2c  72 61 6d 25 2c 73 7a 25  |_Start",ram%,sz%|
00020e70  2c 72 61 6d 25 2c 6a 70  65 67 77 72 6b 25 2c 28  |,ram%,jpegwrk%,(|
00020e80  78 73 70 25 2b 37 80 ac  37 29 2a 39 2b 32 30 30  |xsp%+7..7)*9+200|
00020e90  30 30 20 b8 20 6a 70 65  67 74 61 67 25 0d cf 30  |00 . jpegtag%..0|
00020ea0  4a c9 20 2d 31 30 3a 78  77 6f 72 64 73 25 3d 78  |J. -10:xwords%=x|
00020eb0  73 70 25 2a 33 2b 33 80  ac 33 3a 73 7a 25 3d 28  |sp%*3+3..3:sz%=(|
00020ec0  78 73 70 25 2b 31 35 80  ac 31 35 29 2a 28 79 73  |xsp%+15..15)*(ys|
00020ed0  70 25 2b 31 35 80 ac 31  35 29 2a 31 32 2f 38 3a  |p%+15..15)*12/8:|
00020ee0  59 25 3d 79 73 70 25 0d  cf 3a 29 73 7a 25 3d 73  |Y%=ysp%..:)sz%=s|
00020ef0  7a 25 2a 6a 70 71 25 28  6a 70 65 67 71 75 61 6c  |z%*jpq%(jpegqual|
00020f00  69 74 79 25 81 35 29 2f  35 38 38 2b 31 30 32 34  |ity%.5)/588+1024|
00020f10  0d cf 44 29 6a 70 65 67  77 72 6b 25 3d a4 64 69  |..D)jpegwrk%=.di|
00020f20  6d 28 28 78 73 70 25 2b  31 35 80 ac 31 35 29 2a  |m((xsp%+15..15)*|
00020f30  33 30 2b 32 30 30 30 30  29 0d cf 4e 17 62 61 73  |30+20000)..N.bas|
00020f40  65 25 3d a4 64 69 6d 28  78 77 6f 72 64 73 25 29  |e%=.dim(xwords%)|
00020f50  0d cf 58 15 f2 67 65 74  6f 75 74 70 75 74 6a 70  |..X..getoutputjp|
00020f60  28 73 7a 25 29 0d cf 62  4e 21 72 61 6d 25 3d 78  |(sz%)..bN!ram%=x|
00020f70  73 70 25 3a 72 61 6d 25  21 34 3d 79 73 70 25 3a  |sp%:ram%!4=ysp%:|
00020f80  72 61 6d 25 21 38 3d 6a  70 65 67 71 75 61 6c 69  |ram%!8=jpegquali|
00020f90  74 79 25 3a 72 61 6d 25  21 31 32 3d 33 3a 72 61  |ty%:ram%!12=3:ra|
00020fa0  6d 25 21 31 36 3d 39 30  3a 72 61 6d 25 21 32 30  |m%!16=90:ram%!20|
00020fb0  3d 39 30 0d cf 6c 53 c8  99 22 43 6f 6d 70 72 65  |=90..lS.."Compre|
00020fc0  73 73 4a 50 45 47 5f 53  74 61 72 74 22 2c 72 61  |ssJPEG_Start",ra|
00020fd0  6d 25 2c 73 7a 25 2c 72  61 6d 25 2c 6a 70 65 67  |m%,sz%,ram%,jpeg|
00020fe0  77 72 6b 25 2c 28 78 73  70 25 2b 31 35 80 ac 31  |wrk%,(xsp%+15..1|
00020ff0  35 29 2a 33 30 2b 32 30  30 30 30 20 b8 20 6a 70  |5)*30+20000 . jp|
00021000  65 67 74 61 67 25 0d cf  76 35 c9 20 2d 31 31 3a  |egtag%..v5. -11:|
00021010  78 77 6f 72 64 73 25 3d  78 73 70 25 3a 73 7a 25  |xwords%=xsp%:sz%|
00021020  3d 78 77 6f 72 64 73 25  2a 79 73 70 25 2b 32 30  |=xwords%*ysp%+20|
00021030  30 30 30 3a 59 25 3d 79  73 70 25 0d cf 80 26 6a  |000:Y%=ysp%...&j|
00021040  70 65 67 77 72 6b 25 3d  a4 64 69 6d 28 28 78 73  |pegwrk%=.dim((xs|
00021050  70 25 2b 37 80 ac 37 29  2a 39 2b 32 30 30 30 30  |p%+7..7)*9+20000|
00021060  29 0d cf 8a 31 f2 67 65  74 6f 75 74 70 75 74 28  |)...1.getoutput(|
00021070  73 7a 25 2c 30 2c 78 77  6f 72 64 73 25 2c 59 25  |sz%,0,xwords%,Y%|
00021080  29 3a 62 61 73 65 25 3d  72 61 6d 25 2b 32 30 30  |):base%=ram%+200|
00021090  30 30 0d cf 94 37 c9 20  2d 31 32 3a 78 77 6f 72  |00...7. -12:xwor|
000210a0  64 73 25 3d 78 73 70 25  2a 33 3a 73 7a 25 3d 78  |ds%=xsp%*3:sz%=x|
000210b0  77 6f 72 64 73 25 2a 79  73 70 25 2b 32 30 30 30  |words%*ysp%+2000|
000210c0  30 3a 59 25 3d 79 73 70  25 0d cf 9e 29 6a 70 65  |0:Y%=ysp%...)jpe|
000210d0  67 77 72 6b 25 3d a4 64  69 6d 28 28 78 73 70 25  |gwrk%=.dim((xsp%|
000210e0  2b 31 35 80 ac 31 35 29  2a 33 30 2b 32 30 30 30  |+15..15)*30+2000|
000210f0  30 29 0d cf a8 31 f2 67  65 74 6f 75 74 70 75 74  |0)...1.getoutput|
00021100  28 73 7a 25 2c 30 2c 78  77 6f 72 64 73 25 2c 59  |(sz%,0,xwords%,Y|
00021110  25 29 3a 62 61 73 65 25  3d 72 61 6d 25 2b 32 30  |%):base%=ram%+20|
00021120  30 30 30 0d cf b2 43 7f  3a 78 77 6f 72 64 73 25  |000...C.:xwords%|
00021130  3d 78 73 70 25 2f 73 69  7a 65 25 2b 33 2e 39 39  |=xsp%/size%+3.99|
00021140  39 39 80 ac 33 3a 73 7a  25 3d 78 77 6f 72 64 73  |99..3:sz%=xwords|
00021150  25 2a 79 73 70 25 3a 58  25 3d 78 73 70 25 3a 59  |%*ysp%:X%=xsp%:Y|
00021160  25 3d 79 73 70 25 0d cf  bc 0d e7 6e 63 6f 6c 3d  |%=ysp%.....ncol=|
00021170  31 20 8c 0d cf c6 0b c8  8e 20 6d 24 20 ca 0d cf  |1 ....... m$ ...|
00021180  d0 4f c9 22 43 22 3a 21  72 6f 77 69 6e 63 3d 78  |.O."C":!rowinc=x|
00021190  77 6f 72 64 73 25 3a 78  77 6f 72 64 73 25 3d 78  |words%:xwords%=x|
000211a0  77 6f 72 64 73 25 2a 34  3a 73 7a 25 3d 78 77 6f  |words%*4:sz%=xwo|
000211b0  72 64 73 25 2a 79 73 70  25 3a 58 25 3d 78 73 70  |rds%*ysp%:X%=xsp|
000211c0  25 2a 34 3a 59 25 3d 79  73 70 25 2a 34 0d cf da  |%*4:Y%=ysp%*4...|
000211d0  4f c9 22 54 22 3a 21 72  6f 77 69 6e 63 3d 78 77  |O."T":!rowinc=xw|
000211e0  6f 72 64 73 25 3a 78 77  6f 72 64 73 25 3d 78 77  |ords%:xwords%=xw|
000211f0  6f 72 64 73 25 2a 33 3a  73 7a 25 3d 78 77 6f 72  |ords%*3:sz%=xwor|
00021200  64 73 25 2a 79 73 70 25  3a 58 25 3d 78 73 70 25  |ds%*ysp%:X%=xsp%|
00021210  2a 34 3a 59 25 3d 79 73  70 25 2a 33 0d cf e4 4f  |*4:Y%=ysp%*3...O|
00021220  c9 22 44 22 3a 21 72 6f  77 69 6e 63 3d 78 77 6f  |."D":!rowinc=xwo|
00021230  72 64 73 25 3a 78 77 6f  72 64 73 25 3d 78 77 6f  |rds%:xwords%=xwo|
00021240  72 64 73 25 2a 32 3a 73  7a 25 3d 78 77 6f 72 64  |rds%*2:sz%=xword|
00021250  73 25 2a 79 73 70 25 3a  58 25 3d 78 73 70 25 2a  |s%*ysp%:X%=xsp%*|
00021260  32 3a 59 25 3d 79 73 70  25 2a 32 0d cf ee 05 cb  |2:Y%=ysp%*2.....|
00021270  0d cf f8 05 cd 0d d0 02  2c 41 25 3d 59 25 3a f2  |........,A%=Y%:.|
00021280  67 65 74 6f 75 74 70 75  74 28 73 7a 25 2c 32 30  |getoutput(sz%,20|
00021290  34 38 2b 36 34 2c 78 77  6f 72 64 73 25 2c 59 25  |48+64,xwords%,Y%|
000212a0  29 0d d0 0c 31 72 61 6d  25 21 34 3d 30 3a 72 61  |)...1ram%!4=0:ra|
000212b0  6d 25 21 38 3d 31 36 3a  72 61 6d 25 21 31 32 3d  |m%!8=16:ram%!12=|
000212c0  31 36 3a c8 99 26 32 65  2c 26 31 30 39 2c 72 61  |16:..&2e,&109,ra|
000212d0  6d 25 0d d0 16 30 c8 99  26 32 65 2c 26 31 30 66  |m%...0..&2e,&10f|
000212e0  2c 72 61 6d 25 2c 6f 6e  61 6d 65 24 2c 28 6e 63  |,ram%,oname$,(nc|
000212f0  6f 6c 3c 36 33 29 80 31  2c 58 25 2c 59 25 2c 73  |ol<63).1,X%,Y%,s|
00021300  70 6d 0d d0 20 4a 62 61  73 65 25 3d 72 61 6d 25  |pm.. Jbase%=ram%|
00021310  2b 72 61 6d 25 21 38 3a  62 61 73 65 25 21 28 35  |+ram%!8:base%!(5|
00021320  2a 34 29 3d 41 25 2d 31  3a 21 62 61 73 65 25 3d  |*4)=A%-1:!base%=|
00021330  21 62 61 73 65 25 2d 59  25 2a 78 77 6f 72 64 73  |!base%-Y%*xwords|
00021340  25 2b 41 25 2a 78 77 6f  72 64 73 25 0d d0 2a 29  |%+A%*xwords%..*)|
00021350  72 61 6d 25 21 31 32 3d  72 61 6d 25 21 31 32 2d  |ram%!12=ram%!12-|
00021360  59 25 2a 78 77 6f 72 64  73 25 2b 41 25 2a 78 77  |Y%*xwords%+A%*xw|
00021370  6f 72 64 73 25 0d d0 34  26 70 61 6c 25 3d 62 61  |ords%..4&pal%=ba|
00021380  73 65 25 2b 31 31 2a 34  3a 62 61 73 65 25 2b 3d  |se%+11*4:base%+=|
00021390  62 61 73 65 25 21 28 38  2a 34 29 0d d0 3e 0d c8  |base%!(8*4)..>..|
000213a0  8e 20 6e 63 6f 6c 20 ca  0d d0 48 09 c9 20 32 35  |. ncol ...H.. 25|
000213b0  36 0d d0 52 52 21 28 70  61 6c 25 2d 38 29 2b 3d  |6..RR!(pal%-8)+=|
000213c0  32 30 34 38 3a 21 28 70  61 6c 25 2d 31 32 29 2b  |2048:!(pal%-12)+|
000213d0  3d 32 30 34 38 3a 62 61  73 65 25 2b 3d 32 30 34  |=2048:base%+=204|
000213e0  38 3a 21 28 72 61 6d 25  2b 31 32 29 2b 3d 32 30  |8:!(ram%+12)+=20|
000213f0  34 38 3a 21 28 70 61 6c  25 2d 34 34 29 2b 3d 32  |48:!(pal%-44)+=2|
00021400  30 34 38 0d d0 5c 29 e3  5a 25 3d 30 b8 32 35 35  |048..\).Z%=0.255|
00021410  3a 42 25 3d 5a 25 84 5a  25 3c 3c 38 84 5a 25 3c  |:B%=Z%.Z%<<8.Z%<|
00021420  3c 31 36 3a 42 25 3d 42  25 3c 3c 38 0d d0 66 25  |<16:B%=B%<<8..f%|
00021430  70 61 6c 25 21 28 5a 25  2a 38 29 3d 42 25 3a 70  |pal%!(Z%*8)=B%:p|
00021440  61 6c 25 21 28 5a 25 2a  38 2b 34 29 3d 42 25 3a  |al%!(Z%*8+4)=B%:|
00021450  ed 0d d0 70 09 c9 20 32  35 35 0d d0 7a 52 21 28  |...p.. 255..zR!(|
00021460  70 61 6c 25 2d 38 29 2b  3d 32 30 34 38 3a 21 28  |pal%-8)+=2048:!(|
00021470  70 61 6c 25 2d 31 32 29  2b 3d 32 30 34 38 3a 62  |pal%-12)+=2048:b|
00021480  61 73 65 25 2b 3d 32 30  34 38 3a 21 28 72 61 6d  |ase%+=2048:!(ram|
00021490  25 2b 31 32 29 2b 3d 32  30 34 38 3a 21 28 70 61  |%+12)+=2048:!(pa|
000214a0  6c 25 2d 34 34 29 2b 3d  32 30 34 38 0d d0 84 24  |l%-44)+=2048...$|
000214b0  e3 5a 25 3d 30 b8 32 35  35 3a 42 25 3d 70 61 6c  |.Z%=0.255:B%=pal|
000214c0  65 74 74 65 25 21 28 5a  25 3c 3c 32 29 3c 3c 38  |ette%!(Z%<<2)<<8|
000214d0  0d d0 8e 25 70 61 6c 25  21 28 5a 25 2a 38 29 3d  |...%pal%!(Z%*8)=|
000214e0  42 25 3a 70 61 6c 25 21  28 5a 25 2a 38 2b 34 29  |B%:pal%!(Z%*8+4)|
000214f0  3d 42 25 3a ed 0d d0 98  08 c9 20 31 35 0d d0 a2  |=B%:...... 15...|
00021500  0b c8 8e 20 6d 24 20 ca  0d d0 ac 09 c9 20 22 52  |... m$ ...... "R|
00021510  22 0d d0 b6 30 e3 5a 25  3d 30 b8 31 35 3a f2 63  |"...0.Z%=0.15:.c|
00021520  6f 6c 28 5a 25 2c 70 61  6c 65 74 74 65 25 21 28  |ol(Z%,palette%!(|
00021530  5a 25 3c 3c 32 29 80 26  46 30 46 30 46 30 29 3a  |Z%<<2).&F0F0F0):|
00021540  ed 0d d0 c0 09 c9 20 22  44 22 0d d0 ca 1e e3 5a  |...... "D".....Z|
00021550  25 3d 30 b8 37 3a 41 25  3d 30 3a e7 5a 25 80 31  |%=0.7:A%=0:.Z%.1|
00021560  20 41 25 2b 3d 26 46 30  0d d0 d4 13 e7 5a 25 80  | A%+=&F0.....Z%.|
00021570  32 20 41 25 2b 3d 26 46  30 30 30 0d d0 de 15 e7  |2 A%+=&F000.....|
00021580  5a 25 80 34 20 41 25 2b  3d 26 46 30 30 30 30 30  |Z%.4 A%+=&F00000|
00021590  0d d0 e8 11 f2 63 6f 6c  28 5a 25 2c 41 25 29 3a  |.....col(Z%,A%):|
000215a0  ed 0d d0 f2 09 c9 20 22  54 22 0d d0 fc 30 e3 5a  |...... "T"...0.Z|
000215b0  25 3d 30 b8 31 35 3a 41  25 3d 5a 25 3c 3c 34 3a  |%=0.15:A%=Z%<<4:|
000215c0  f2 63 6f 6c 28 5a 25 2c  41 25 84 41 25 3c 3c 38  |.col(Z%,A%.A%<<8|
000215d0  84 41 25 3c 3c 31 36 29  3a ed 0d d1 06 05 7f 0d  |.A%<<16):.......|
000215e0  d1 10 3c e3 5a 25 3d 30  b8 31 35 3a 41 25 3d 28  |..<.Z%=0.15:A%=(|
000215f0  5a 25 80 37 29 2f 37 2a  31 35 2b 2e 32 3c 3c 34  |Z%.7)/7*15+.2<<4|
00021600  3a f2 63 6f 6c 28 5a 25  2c 41 25 84 41 25 3c 3c  |:.col(Z%,A%.A%<<|
00021610  38 84 41 25 3c 3c 31 36  29 3a ed 0d d1 1a 05 cb  |8.A%<<16):......|
00021620  0d d1 24 07 c9 20 33 0d  d1 2e 0a c8 8e 6d 24 20  |..$.. 3......m$ |
00021630  ca 0d d1 38 09 c9 20 22  43 22 0d d1 42 3b f2 63  |...8.. "C"..B;.c|
00021640  6f 6c 28 30 2c 30 29 3a  f2 63 6f 6c 28 31 2c 26  |ol(0,0):.col(1,&|
00021650  46 30 46 30 30 30 29 3a  f2 63 6f 6c 28 32 2c 26  |F0F000):.col(2,&|
00021660  46 30 30 30 46 30 29 3a  f2 63 6f 6c 28 33 2c 26  |F000F0):.col(3,&|
00021670  46 30 46 30 29 0d d1 4c  09 c9 20 22 52 22 0d d1  |F0F0)..L.. "R"..|
00021680  56 2f e3 5a 25 3d 30 b8  33 3a f2 63 6f 6c 28 5a  |V/.Z%=0.3:.col(Z|
00021690  25 2c 70 61 6c 65 74 74  65 25 21 28 5a 25 3c 3c  |%,palette%!(Z%<<|
000216a0  32 29 80 26 46 30 46 30  46 30 29 3a ed 0d d1 60  |2).&F0F0F0):...`|
000216b0  05 7f 0d d1 6a 31 e3 5a  25 3d 30 b8 33 3a 41 25  |....j1.Z%=0.3:A%|
000216c0  3d 5a 25 2a 35 3c 3c 34  3a f2 63 6f 6c 28 5a 25  |=Z%*5<<4:.col(Z%|
000216d0  2c 41 25 84 41 25 3c 3c  38 84 41 25 3c 3c 31 36  |,A%.A%<<8.A%<<16|
000216e0  29 3a ed 0d d1 74 05 cb  0d d1 7e 21 c9 20 31 3a  |):...t....~!. 1:|
000216f0  f2 63 6f 6c 28 30 2c 30  29 3a f2 63 6f 6c 28 31  |.col(0,0):.col(1|
00021700  2c 26 46 30 46 30 46 30  29 0d d1 88 05 cb 0d d1  |,&F0F0F0).......|
00021710  92 05 cb 0d d1 a6 0c e7  66 6c 65 78 25 20 8c 0d  |........flex% ..|
00021720  d1 ba 05 cc 0d d1 c4 13  e7 77 6f 72 6b 73 70 61  |.........workspa|
00021730  63 65 25 3c 30 20 8c 0d  d1 ce 2e 50 25 3d e0 3a  |ce%<0 .....P%=.:|
00021740  5b 4f 50 54 20 30 3a 53  54 52 20 72 31 33 2c 50  |[OPT 0:STR r13,P|
00021750  25 2b 31 36 3a 4d 4f 56  53 20 50 63 2c 72 31 34  |%+16:MOVS Pc,r14|
00021760  3a 5d 3a d6 e0 0d d1 d8  19 e0 3d e0 2b 33 32 2a  |:]:.......=.+32*|
00021770  31 30 32 34 2b 93 2d 21  28 e0 2b 31 36 29 0d d1  |1024+.-!(.+16)..|
00021780  e2 05 cc 0d d1 f6 05 cd  0d d2 00 05 cd 0d d2 0a  |................|
00021790  3a e7 62 61 73 65 25 2a  73 69 7a 65 25 3e 32 5e  |:.base%*size%>2^|
000217a0  33 32 20 85 20 34 32 2c  22 62 61 73 65 25 2a 73  |32 . 42,"base%*s|
000217b0  69 7a 65 25 20 70 72 6f  64 75 63 74 20 74 6f 6f  |ize% product too|
000217c0  20 6c 61 72 67 65 22 0d  d2 14 07 ea 20 85 0d d2  | large"..... ...|
000217d0  1e 2f ee 20 85 20 ea 3a  f7 20 85 3a f2 53 61 76  |./. . .:. .:.Sav|
000217e0  65 3a 85 20 9f 2c f6 24  2b 22 20 69 6e 74 65 72  |e:. .,.$+" inter|
000217f0  6e 61 6c 20 28 22 2b c3  9e 2b 22 29 22 0d d2 28  |nal ("+..+")"..(|
00021800  18 c8 99 22 48 6f 75 72  67 6c 61 73 73 5f 4c 45  |..."Hourglass_LE|
00021810  44 73 22 2c 33 0d d2 32  24 79 73 61 6d 70 25 3d  |Ds",3..2$ysamp%=|
00021820  31 3a 6e 6c 25 28 29 3d  30 3a 73 74 65 70 25 3d  |1:nl%()=0:step%=|
00021830  34 2a 28 63 6f 6c 2b 31  29 0d d2 3c 49 61 64 64  |4*(col+1)..<Iadd|
00021840  72 25 3d 62 61 73 65 25  3c 3c 73 69 7a 65 73 68  |r%=base%<<sizesh|
00021850  66 74 25 3a 72 6f 77 73  74 65 70 25 3d 78 77 6f  |ft%:rowstep%=xwo|
00021860  72 64 73 25 2a 73 69 7a  65 25 3a 63 6f 6c 73 74  |rds%*size%:colst|
00021870  65 70 25 3d 31 3a 64 69  73 74 25 3d 78 73 70 25  |ep%=1:dist%=xsp%|
00021880  2d 31 0d d2 46 21 e7 6d  3d 2d 33 84 6d 3d 2d 35  |-1..F!.m=-3.m=-5|
00021890  84 6d 3d 2d 36 20 64 69  73 74 25 3d 64 69 73 74  |.m=-6 dist%=dist|
000218a0  25 2a 32 0d d2 50 28 e7  6d 3d 2d 34 84 6d 3d 2d  |%*2..P(.m=-4.m=-|
000218b0  37 84 6d 3d 2d 31 30 84  6d 3d 2d 31 32 20 64 69  |7.m=-10.m=-12 di|
000218c0  73 74 25 3d 64 69 73 74  25 2a 33 0d d2 5a 17 e7  |st%=dist%*3..Z..|
000218d0  6d 3d 2d 38 20 64 69 73  74 25 3d 64 69 73 74 25  |m=-8 dist%=dist%|
000218e0  2a 34 0d d2 64 0e e7 72  6f 74 61 74 65 25 20 8c  |*4..d..rotate% .|
000218f0  0d d2 6e 36 6f 64 69 73  74 25 3d 64 69 73 74 25  |..n6odist%=dist%|
00021900  3a c8 94 20 63 6f 6c 73  74 65 70 25 2c 72 6f 77  |:.. colstep%,row|
00021910  73 74 65 70 25 3a c8 94  20 68 66 6c 69 70 25 2c  |step%:.. hflip%,|
00021920  76 66 6c 69 70 25 0d d2  78 10 e7 72 6f 74 61 74  |vflip%..x..rotat|
00021930  65 25 3d 31 20 8c 0d d2  82 47 61 64 64 72 25 2b  |e%=1 ....Gaddr%+|
00021940  3d 28 79 73 70 25 2d 31  29 2a 63 6f 6c 73 74 65  |=(ysp%-1)*colste|
00021950  70 25 3a 63 6f 6c 73 74  65 70 25 3d 2d 63 6f 6c  |p%:colstep%=-col|
00021960  73 74 65 70 25 3a 64 69  73 74 25 3d 28 79 73 70  |step%:dist%=(ysp|
00021970  25 2d 31 29 2a 63 6f 6c  73 74 65 70 25 0d d2 8c  |%-1)*colstep%...|
00021980  05 cc 0d d2 96 3b 61 64  64 72 25 2b 3d 64 69 73  |.....;addr%+=dis|
00021990  74 25 3a 72 6f 77 73 74  65 70 25 3d 2d 72 6f 77  |t%:rowstep%=-row|
000219a0  73 74 65 70 25 3a 64 69  73 74 25 3d 28 79 73 70  |step%:dist%=(ysp|
000219b0  25 2d 31 29 2a 63 6f 6c  73 74 65 70 25 0d d2 a0  |%-1)*colstep%...|
000219c0  05 cd 0d d2 aa 3b e7 6d  3d 2d 33 84 6d 3d 2d 35  |.....;.m=-3.m=-5|
000219d0  84 6d 3d 2d 36 20 63 6f  6c 73 74 65 70 25 3d 63  |.m=-6 colstep%=c|
000219e0  6f 6c 73 74 65 70 25 2f  32 3a 72 6f 77 73 74 65  |olstep%/2:rowste|
000219f0  70 25 3d 72 6f 77 73 74  65 70 25 2a 32 0d d2 b4  |p%=rowstep%*2...|
00021a00  42 e7 6d 3d 2d 34 84 6d  3d 2d 37 84 6d 3d 2d 31  |B.m=-4.m=-7.m=-1|
00021a10  30 84 6d 3d 2d 31 32 20  63 6f 6c 73 74 65 70 25  |0.m=-12 colstep%|
00021a20  3d 63 6f 6c 73 74 65 70  25 2f 33 3a 72 6f 77 73  |=colstep%/3:rows|
00021a30  74 65 70 25 3d 72 6f 77  73 74 65 70 25 2a 33 0d  |tep%=rowstep%*3.|
00021a40  d2 be 31 e7 6d 3d 2d 38  20 63 6f 6c 73 74 65 70  |..1.m=-8 colstep|
00021a50  25 3d 63 6f 6c 73 74 65  70 25 2f 34 3a 72 6f 77  |%=colstep%/4:row|
00021a60  73 74 65 70 25 3d 72 6f  77 73 74 65 70 25 2a 34  |step%=rowstep%*4|
00021a70  0d d2 c8 05 cd 0d d2 d2  0d e7 68 66 6c 69 70 25  |..........hflip%|
00021a80  20 8c 0d d2 dc 30 61 64  64 72 25 2b 3d 64 69 73  | ....0addr%+=dis|
00021a90  74 25 3a 64 69 73 74 25  3d 2d 64 69 73 74 25 3a  |t%:dist%=-dist%:|
00021aa0  63 6f 6c 73 74 65 70 25  3d 2d 63 6f 6c 73 74 65  |colstep%=-colste|
00021ab0  70 25 0d d2 e6 05 cd 0d  d2 f0 0d e7 76 66 6c 69  |p%..........vfli|
00021ac0  70 25 20 8c 0d d2 fa 0e  e7 72 6f 74 61 74 65 25  |p% ......rotate%|
00021ad0  20 8c 0d d3 04 2c 61 64  64 72 25 2b 3d 6f 64 69  | ....,addr%+=odi|
00021ae0  73 74 25 2a 72 6f 74 61  74 65 25 3a 72 6f 77 73  |st%*rotate%:rows|
00021af0  74 65 70 25 3d 2d 72 6f  77 73 74 65 70 25 0d d3  |tep%=-rowstep%..|
00021b00  0e 05 cc 0d d3 18 2f 61  64 64 72 25 2b 3d 28 79  |....../addr%+=(y|
00021b10  73 70 25 2d 31 29 2a 72  6f 77 73 74 65 70 25 3a  |sp%-1)*rowstep%:|
00021b20  72 6f 77 73 74 65 70 25  3d 2d 72 6f 77 73 74 65  |rowstep%=-rowste|
00021b30  70 25 0d d3 22 05 cd 0d  d3 2c 05 cd 0d d3 36 53  |p%.."....,....6S|
00021b40  6f 75 74 6c 69 6d 25 3d  28 28 62 61 73 65 25 2b  |outlim%=((base%+|
00021b50  78 77 6f 72 64 73 25 2a  59 25 29 3c 3c 73 69 7a  |xwords%*Y%)<<siz|
00021b60  65 73 68 66 74 25 29 2d  31 3a 6f 64 64 63 6f 6c  |eshft%)-1:oddcol|
00021b70  73 74 65 70 25 3d 2d 63  6f 6c 73 74 65 70 25 3a  |step%=-colstep%:|
00021b80  6f 64 64 73 74 65 70 25  3d 2d 73 74 65 70 25 0d  |oddstep%=-step%.|
00021b90  d3 40 2b e7 6f 72 64 65  72 25 20 f2 61 64 6a 75  |.@+.order% .adju|
00021ba0  73 74 70 61 6c 65 74 74  65 28 31 2f 79 64 69 76  |stpalette(1/ydiv|
00021bb0  25 2f 78 64 69 76 25 2c  30 29 0d d3 4a 11 e7 6d  |%/xdiv%,0)..J..m|
00021bc0  3d 2d 39 84 6d 3d 2d 31  30 20 8c 0d d3 54 3f c8  |=-9.m=-10 ...T?.|
00021bd0  99 20 22 4f 53 5f 53 57  49 4e 75 6d 62 65 72 46  |. "OS_SWINumberF|
00021be0  72 6f 6d 53 74 72 69 6e  67 22 2c 2c 22 43 6f 6d  |romString",,"Com|
00021bf0  70 72 65 73 73 4a 50 45  47 5f 57 72 69 74 65 4c  |pressJPEG_WriteL|
00021c00  69 6e 65 22 20 b8 20 77  6c 25 0d d3 5e 39 e7 73  |ine" . wl%..^9.s|
00021c10  79 25 3d 79 25 20 80 20  73 78 25 3d 78 25 20 80  |y%=y% . sx%=x% .|
00021c20  20 72 61 6e 67 65 25 3d  a3 20 80 20 73 68 61 72  | range%=. . shar|
00021c30  70 65 6e 25 3d a3 20 80  20 65 71 75 61 6c 25 3d  |pen%=. . equal%=|
00021c40  a3 20 8c 0d d3 68 0e e7  64 69 74 68 65 72 25 20  |. ...h..dither% |
00021c50  8c 0d d3 72 24 e3 79 72  25 3d 30 20 b8 20 79 25  |...r$.yr%=0 . y%|
00021c60  2d 31 3a c8 99 68 6f 75  72 25 2c 79 72 25 2a 31  |-1:..hour%,yr%*1|
00021c70  30 30 81 79 25 0d d3 7c  36 57 25 3d a0 28 72 24  |00.y%..|6W%=.(r$|
00021c80  2b 22 28 63 6c 25 28 29  29 22 29 3a 63 6c 25 28  |+"(cl%())"):cl%(|
00021c90  29 3d 63 6c 25 28 29 2b  6e 6c 25 28 29 3a 6e 6c  |)=cl%()+nl%():nl|
00021ca0  25 28 29 3d 30 3a 42 25  3d 78 25 0d d3 86 0c e7  |%()=0:B%=x%.....|
00021cb0  79 72 25 80 31 20 8c 0d  d3 90 32 d6 66 73 25 2c  |yr%.1 ....2.fs%,|
00021cc0  63 6f 6c 73 74 65 70 25  2c 63 6c 25 28 31 2c 30  |colstep%,cl%(1,0|
00021cd0  29 2c 6e 6c 25 28 31 2c  30 29 2c 61 64 64 72 25  |),nl%(1,0),addr%|
00021ce0  2c 73 74 65 70 25 2c 42  25 0d d3 9a 05 cc 0d d3  |,step%,B%.......|
00021cf0  a4 46 41 25 3d 61 64 64  72 25 2b 64 69 73 74 25  |.FA%=addr%+dist%|
00021d00  3a d6 66 73 25 2c 6f 64  64 63 6f 6c 73 74 65 70  |:.fs%,oddcolstep|
00021d10  25 2c 63 6c 25 28 78 25  2c 30 29 2c 6e 6c 25 28  |%,cl%(x%,0),nl%(|
00021d20  78 25 2c 30 29 2c 41 25  2c 6f 64 64 73 74 65 70  |x%,0),A%,oddstep|
00021d30  25 2c 42 25 0d d3 ae 05  cd 0d d3 b8 18 c8 99 77  |%,B%...........w|
00021d40  6c 25 2c 6a 70 65 67 74  61 67 25 2c 61 64 64 72  |l%,jpegtag%,addr|
00021d50  25 0d d3 c2 05 ed 0d d3  cc 05 cc 0d d3 d6 47 49  |%.............GI|
00021d60  25 3d 73 74 65 70 25 3a  e3 79 72 25 3d 30 b8 79  |%=step%:.yr%=0.y|
00021d70  25 2d 31 3a c8 99 68 6f  75 72 25 2c 79 72 25 2a  |%-1:..hour%,yr%*|
00021d80  31 30 30 81 79 25 3a e7  61 64 64 72 25 3e 6f 75  |100.y%:.addr%>ou|
00021d90  74 6c 69 6d 25 20 f2 66  6c 75 73 68 6f 75 74 70  |tlim% .flushoutp|
00021da0  75 74 0d d3 e0 42 57 25  3d a0 28 72 24 2b 22 28  |ut...BW%=.(r$+"(|
00021db0  63 6c 25 28 29 29 22 29  3a 42 25 3d 78 25 3a d6  |cl%())"):B%=x%:.|
00021dc0  66 73 25 2c 63 6f 6c 73  74 65 70 25 2c 63 6c 25  |fs%,colstep%,cl%|
00021dd0  28 31 2c 30 29 2c 49 25  2c 61 64 64 72 25 2c 49  |(1,0),I%,addr%,I|
00021de0  25 2c 42 25 0d d3 ea 18  c8 99 77 6c 25 2c 6a 70  |%,B%......wl%,jp|
00021df0  65 67 74 61 67 25 2c 61  64 64 72 25 0d d3 f4 05  |egtag%,addr%....|
00021e00  ed 0d d3 fe 05 cd 0d d4  08 05 cc 0d d4 12 0d e7  |................|
00021e10  65 71 75 61 6c 25 20 8c  0d d4 1c 39 f2 72 65 77  |equal% ....9.rew|
00021e20  69 6e 64 3a 48 61 76 67  25 3d c6 8e 28 76 61 6c  |ind:Havg%=..(val|
00021e30  73 25 28 29 29 2f 32 35  36 2f 28 63 6f 6c 2b 31  |s%())/256/(col+1|
00021e40  29 3a de 20 6e 65 77 25  28 32 35 36 2c 63 6f 6c  |):. new%(256,col|
00021e50  29 0d d4 26 3e e3 42 25  3d 30 b8 63 6f 6c 3a 52  |)..&>.B%=0.col:R|
00021e60  25 3d 30 3a 48 69 6e 74  25 3d 30 3a e3 5a 25 3d  |%=0:Hint%=0:.Z%=|
00021e70  30 b8 32 35 36 3a 4c 25  3d 52 25 3a 48 69 6e 74  |0.256:L%=R%:Hint|
00021e80  25 2b 3d 76 61 6c 73 25  28 5a 25 2c 42 25 29 0d  |%+=vals%(Z%,B%).|
00021e90  d4 30 26 c8 95 48 69 6e  74 25 3e 48 61 76 67 25  |.0&..Hint%>Havg%|
00021ea0  3a 48 69 6e 74 25 2d 3d  48 61 76 67 25 3a 52 25  |:Hint%-=Havg%:R%|
00021eb0  2b 3d 31 3a ce 0d d4 3a  1f 6e 65 77 25 28 5a 25  |+=1:...:.new%(Z%|
00021ec0  2c 42 25 29 3d 28 4c 25  2b 52 25 29 2f 32 2a 46  |,B%)=(L%+R%)/2*F|
00021ed0  2f 32 35 36 0d d4 44 07  ed 3a ed 0d d4 4e 05 cd  |/256..D..:...N..|
00021ee0  0d d4 58 0f e7 73 68 61  72 70 65 6e 25 20 8c 0d  |..X..sharpen% ..|
00021ef0  d4 62 0d e7 6f 72 64 65  72 25 20 8c 0d d4 6c 3a  |.b..order% ...l:|
00021f00  79 72 65 61 64 25 3d 73  79 25 2d 31 3a 57 25 3d  |yread%=sy%-1:W%=|
00021f10  a0 28 72 24 2b 22 28 72  6d 31 25 28 29 29 22 29  |.(r$+"(rm1%())")|
00021f20  3a e7 65 71 75 61 6c 25  20 f2 66 69 74 32 28 72  |:.equal% .fit2(r|
00021f30  6d 31 25 28 29 29 0d d4  76 41 e3 42 25 3d 30 b8  |m1%())..vA.B%=0.|
00021f40  63 6f 6c 3a 72 6d 31 25  28 30 2c 42 25 29 3d 72  |col:rm1%(0,B%)=r|
00021f50  6d 31 25 28 31 2c 42 25  29 3a 72 6d 31 25 28 73  |m1%(1,B%):rm1%(s|
00021f60  78 25 2b 31 2c 42 25 29  3d 72 6d 31 25 28 73 78  |x%+1,B%)=rm1%(sx|
00021f70  25 2c 42 25 29 3a ed 0d  d4 80 05 cc 0d d4 8a 3c  |%,B%):.........<|
00021f80  79 72 65 61 64 25 3d 79  25 2d 31 3a f2 73 63 61  |yread%=y%-1:.sca|
00021f90  6c 65 64 70 69 78 65 6c  72 6f 77 28 72 6d 31 25  |ledpixelrow(rm1%|
00021fa0  28 29 29 3a e7 65 71 75  61 6c 25 20 f2 66 69 74  |()):.equal% .fit|
00021fb0  28 72 6d 31 25 28 29 29  0d d4 94 3f e3 42 25 3d  |(rm1%())...?.B%=|
00021fc0  30 b8 63 6f 6c 3a 72 6d  31 25 28 30 2c 42 25 29  |0.col:rm1%(0,B%)|
00021fd0  3d 72 6d 31 25 28 31 2c  42 25 29 3a 72 6d 31 25  |=rm1%(1,B%):rm1%|
00021fe0  28 78 25 2b 31 2c 42 25  29 3d 72 6d 31 25 28 78  |(x%+1,B%)=rm1%(x|
00021ff0  25 2c 42 25 29 3a ed 0d  d4 9e 05 cd 0d d4 a8 11  |%,B%):..........|
00022000  72 6d 32 25 28 29 3d 72  6d 31 25 28 29 0d d4 b2  |rm2%()=rm1%()...|
00022010  05 cd 0d d4 bc 0d e7 6f  72 64 65 72 25 20 8c 0d  |.......order% ..|
00022020  d4 c6 11 e3 79 72 25 3d  30 20 b8 20 79 25 2d 31  |....yr%=0 . y%-1|
00022030  0d d4 d0 32 c8 99 68 6f  75 72 25 2c 79 72 25 2a  |...2..hour%,yr%*|
00022040  31 30 30 81 79 25 3a e7  61 64 64 72 25 3e 6f 75  |100.y%:.addr%>ou|
00022050  74 6c 69 6d 25 20 f2 66  6c 75 73 68 6f 75 74 70  |tlim% .flushoutp|
00022060  75 74 0d d4 da 0d e7 73  79 25 3d 79 25 20 8c 0d  |ut.....sy%=y% ..|
00022070  d4 e4 19 f2 73 68 61 72  70 70 69 78 65 6c 72 6f  |....sharppixelro|
00022080  77 28 63 6c 25 28 29 29  0d d4 ee 05 cc 0d d4 f8  |w(cl%())........|
00022090  3a 79 73 61 6d 70 25 2d  3d 31 3a e7 79 73 61 6d  |:ysamp%-=1:.ysam|
000220a0  70 25 3d 30 20 f2 73 68  61 72 70 70 69 78 65 6c  |p%=0 .sharppixel|
000220b0  72 6f 77 28 78 6c 25 28  29 29 3a 79 73 61 6d 70  |row(xl%()):ysamp|
000220c0  25 3d 79 6d 75 6c 25 0d  d5 02 0e e7 79 64 69 76  |%=ymul%.....ydiv|
000220d0  25 3d 31 20 8c 0d d5 0c  0f 63 6c 25 28 29 3d 78  |%=1 .....cl%()=x|
000220e0  6c 25 28 29 0d d5 16 05  cc 0d d5 20 14 e7 79 73  |l%()....... ..ys|
000220f0  61 6d 70 25 3e 3d 79 64  69 76 25 20 8c 0d d5 2a  |amp%>=ydiv% ...*|
00022100  23 79 73 61 6d 70 25 2d  3d 79 64 69 76 25 3a 63  |#ysamp%-=ydiv%:c|
00022110  6c 25 28 29 3d 78 6c 25  28 29 2a 79 64 69 76 25  |l%()=xl%()*ydiv%|
00022120  0d d5 34 05 cc 0d d5 3e  2f 63 6c 25 28 29 3d 78  |..4....>/cl%()=x|
00022130  6c 25 28 29 2a 79 73 61  6d 70 25 3a 59 25 3d 79  |l%()*ysamp%:Y%=y|
00022140  64 69 76 25 2d 79 73 61  6d 70 25 3a 79 73 61 6d  |div%-ysamp%:ysam|
00022150  70 25 3d 30 0d d5 48 05  f5 0d d5 52 30 e7 79 73  |p%=0..H....R0.ys|
00022160  61 6d 70 25 3d 30 20 f2  73 68 61 72 70 70 69 78  |amp%=0 .sharppix|
00022170  65 6c 72 6f 77 28 78 6c  25 28 29 29 3a 79 73 61  |elrow(xl%()):ysa|
00022180  6d 70 25 3d 79 6d 75 6c  25 0d d5 5c 10 e7 79 73  |mp%=ymul%..\..ys|
00022190  61 6d 70 25 3e 59 25 20  8c 0d d5 66 36 79 73 61  |amp%>Y% ...f6ysa|
000221a0  6d 70 25 2d 3d 59 25 3a  78 6c 32 25 28 29 3d 78  |mp%-=Y%:xl2%()=x|
000221b0  6c 25 28 29 2a 59 25 3a  63 6c 25 28 29 3d 63 6c  |l%()*Y%:cl%()=cl|
000221c0  25 28 29 2b 78 6c 32 25  28 29 3a 59 25 3d 30 0d  |%()+xl2%():Y%=0.|
000221d0  d5 70 05 cc 0d d5 7a 3e  59 25 2d 3d 79 73 61 6d  |.p....z>Y%-=ysam|
000221e0  70 25 3a 78 6c 32 25 28  29 3d 78 6c 25 28 29 2a  |p%:xl2%()=xl%()*|
000221f0  79 73 61 6d 70 25 3a 63  6c 25 28 29 3d 63 6c 25  |ysamp%:cl%()=cl%|
00022200  28 29 2b 78 6c 32 25 28  29 3a 79 73 61 6d 70 25  |()+xl2%():ysamp%|
00022210  3d 30 0d d5 84 05 cd 0d  d5 8e 0a fd 20 59 25 3d  |=0.......... Y%=|
00022220  30 0d d5 98 05 cd 0d d5  a2 0d 79 73 61 6d 70 25  |0.........ysamp%|
00022230  2b 3d 31 0d d5 ac 05 cd  0d d5 b6 05 cd 0d d5 c0  |+=1.............|
00022240  32 63 6c 25 28 29 3d 63  6c 25 28 29 2b 6e 6c 25  |2cl%()=cl%()+nl%|
00022250  28 29 3a 6e 6c 25 28 29  3d 30 3a 42 25 3d 78 25  |():nl%()=0:B%=x%|
00022260  3a 41 25 3d 61 64 64 72  25 2b 64 69 73 74 25 0d  |:A%=addr%+dist%.|
00022270  d5 ca 0c e7 79 72 25 80  31 20 8c 0d d5 d4 32 d6  |....yr%.1 ....2.|
00022280  66 73 25 2c 63 6f 6c 73  74 65 70 25 2c 63 6c 25  |fs%,colstep%,cl%|
00022290  28 31 2c 30 29 2c 6e 6c  25 28 31 2c 30 29 2c 61  |(1,0),nl%(1,0),a|
000222a0  64 64 72 25 2c 73 74 65  70 25 2c 42 25 0d d5 de  |ddr%,step%,B%...|
000222b0  05 cc 0d d5 e8 37 d6 66  73 25 2c 6f 64 64 63 6f  |.....7.fs%,oddco|
000222c0  6c 73 74 65 70 25 2c 63  6c 25 28 78 25 2c 30 29  |lstep%,cl%(x%,0)|
000222d0  2c 6e 6c 25 28 78 25 2c  30 29 2c 41 25 2c 6f 64  |,nl%(x%,0),A%,od|
000222e0  64 73 74 65 70 25 2c 42  25 0d d5 f2 05 cd 0d d5  |dstep%,B%.......|
000222f0  fc 18 c8 99 77 6c 25 2c  6a 70 65 67 74 61 67 25  |....wl%,jpegtag%|
00022300  2c 61 64 64 72 25 0d d6  06 05 ed 0d d6 10 05 cc  |,addr%..........|
00022310  0d d6 1a 11 e3 79 72 25  3d 30 20 b8 20 79 25 2d  |.....yr%=0 . y%-|
00022320  31 0d d6 24 32 c8 99 68  6f 75 72 25 2c 79 72 25  |1..$2..hour%,yr%|
00022330  2a 31 30 30 81 79 25 3a  e7 61 64 64 72 25 3e 6f  |*100.y%:.addr%>o|
00022340  75 74 6c 69 6d 25 20 f2  66 6c 75 73 68 6f 75 74  |utlim% .flushout|
00022350  70 75 74 0d d6 2e 0f e7  73 68 61 72 70 65 6e 25  |put.....sharpen%|
00022360  20 8c 0d d6 38 40 e7 79  72 65 61 64 25 20 79 72  | ...8@.yread% yr|
00022370  65 61 64 25 2d 3d 31 3a  f2 73 63 61 6c 65 64 70  |ead%-=1:.scaledp|
00022380  69 78 65 6c 72 6f 77 28  72 6d 25 28 29 29 3a e7  |ixelrow(rm%()):.|
00022390  65 71 75 61 6c 25 20 f2  66 69 74 28 72 6d 25 28  |equal% .fit(rm%(|
000223a0  29 29 0d d6 42 3b e3 42  25 3d 30 b8 63 6f 6c 3a  |))..B;.B%=0.col:|
000223b0  72 6d 25 28 30 2c 42 25  29 3d 72 6d 25 28 31 2c  |rm%(0,B%)=rm%(1,|
000223c0  42 25 29 3a 72 6d 25 28  78 25 2b 31 2c 42 25 29  |B%):rm%(x%+1,B%)|
000223d0  3d 72 6d 25 28 78 25 2c  42 25 29 3a ed 0d d6 4c  |=rm%(x%,B%):...L|
000223e0  3b d6 20 73 68 61 72 70  25 2c 63 6c 25 28 31 2c  |;. sharp%,cl%(1,|
000223f0  30 29 2c 72 6d 25 28 31  2c 30 29 2c 72 6d 31 25  |0),rm%(1,0),rm1%|
00022400  28 31 2c 30 29 2c 72 6d  32 25 28 31 2c 30 29 2c  |(1,0),rm2%(1,0),|
00022410  74 6f 74 76 61 6c 73 25  0d d6 56 21 c8 94 20 72  |totvals%..V!.. r|
00022420  6d 32 25 28 29 2c 72 6d  31 25 28 29 3a 72 6d 31  |m2%(),rm1%():rm1|
00022430  25 28 29 3d 72 6d 25 28  29 0d d6 60 05 cc 0d d6  |%()=rm%()..`....|
00022440  6a 2e f2 73 63 61 6c 65  64 70 69 78 65 6c 72 6f  |j..scaledpixelro|
00022450  77 28 63 6c 25 28 29 29  3a e7 65 71 75 61 6c 25  |w(cl%()):.equal%|
00022460  20 f2 66 69 74 28 63 6c  25 28 29 29 0d d6 74 05  | .fit(cl%())..t.|
00022470  cd 0d d6 7e 32 63 6c 25  28 29 3d 63 6c 25 28 29  |...~2cl%()=cl%()|
00022480  2b 6e 6c 25 28 29 3a 6e  6c 25 28 29 3d 30 3a 42  |+nl%():nl%()=0:B|
00022490  25 3d 78 25 3a 41 25 3d  61 64 64 72 25 2b 64 69  |%=x%:A%=addr%+di|
000224a0  73 74 25 0d d6 88 0c e7  79 72 25 80 31 20 8c 0d  |st%.....yr%.1 ..|
000224b0  d6 92 32 d6 66 73 25 2c  63 6f 6c 73 74 65 70 25  |..2.fs%,colstep%|
000224c0  2c 63 6c 25 28 31 2c 30  29 2c 6e 6c 25 28 31 2c  |,cl%(1,0),nl%(1,|
000224d0  30 29 2c 61 64 64 72 25  2c 73 74 65 70 25 2c 42  |0),addr%,step%,B|
000224e0  25 0d d6 9c 05 cc 0d d6  a6 37 d6 66 73 25 2c 6f  |%........7.fs%,o|
000224f0  64 64 63 6f 6c 73 74 65  70 25 2c 63 6c 25 28 78  |ddcolstep%,cl%(x|
00022500  25 2c 30 29 2c 6e 6c 25  28 78 25 2c 30 29 2c 41  |%,0),nl%(x%,0),A|
00022510  25 2c 6f 64 64 73 74 65  70 25 2c 42 25 0d d6 b0  |%,oddstep%,B%...|
00022520  05 cd 0d d6 ba 18 c8 99  77 6c 25 2c 6a 70 65 67  |........wl%,jpeg|
00022530  74 61 67 25 2c 61 64 64  72 25 0d d6 c4 05 ed 0d  |tag%,addr%......|
00022540  d6 ce 05 cd 0d d6 d8 05  cd 0d d6 e2 30 c8 99 22  |............0.."|
00022550  43 6f 6d 70 72 65 73 73  4a 50 45 47 5f 46 69 6e  |CompressJPEG_Fin|
00022560  69 73 68 22 2c 6a 70 65  67 74 61 67 25 20 b8 20  |ish",jpegtag% . |
00022570  6a 70 65 67 73 69 7a 65  25 0d d6 ec 05 cc 0d d6  |jpegsize%.......|
00022580  f6 39 e7 73 79 25 3d 79  25 20 80 20 73 78 25 3d  |.9.sy%=y% . sx%=|
00022590  78 25 20 80 20 72 61 6e  67 65 25 3d a3 20 80 20  |x% . range%=. . |
000225a0  73 68 61 72 70 65 6e 25  3d a3 20 80 20 65 71 75  |sharpen%=. . equ|
000225b0  61 6c 25 3d a3 20 8c 0d  d7 00 0e e7 64 69 74 68  |al%=. ......dith|
000225c0  65 72 25 20 8c 0d d7 0a  40 e3 79 72 25 3d 30 20  |er% ....@.yr%=0 |
000225d0  b8 20 79 25 2d 31 3a c8  99 68 6f 75 72 25 2c 79  |. y%-1:..hour%,y|
000225e0  72 25 2a 31 30 30 81 79  25 3a e7 61 64 64 72 25  |r%*100.y%:.addr%|
000225f0  3e 6f 75 74 6c 69 6d 25  20 f2 66 6c 75 73 68 6f  |>outlim% .flusho|
00022600  75 74 70 75 74 0d d7 14  4f 57 25 3d a0 28 72 24  |utput...OW%=.(r$|
00022610  2b 22 28 63 6c 25 28 29  29 22 29 3a 63 6c 25 28  |+"(cl%())"):cl%(|
00022620  29 3d 63 6c 25 28 29 2b  6e 6c 25 28 29 3a 6e 6c  |)=cl%()+nl%():nl|
00022630  25 28 29 3d 30 3a 42 25  3d 78 25 3a 41 25 3d 61  |%()=0:B%=x%:A%=a|
00022640  64 64 72 25 3a 61 64 64  72 25 2b 3d 72 6f 77 73  |ddr%:addr%+=rows|
00022650  74 65 70 25 0d d7 1e 0c  e7 79 72 25 80 31 20 8c  |tep%.....yr%.1 .|
00022660  0d d7 28 2f d6 66 73 25  2c 63 6f 6c 73 74 65 70  |..(/.fs%,colstep|
00022670  25 2c 63 6c 25 28 31 2c  30 29 2c 6e 6c 25 28 31  |%,cl%(1,0),nl%(1|
00022680  2c 30 29 2c 41 25 2c 73  74 65 70 25 2c 42 25 0d  |,0),A%,step%,B%.|
00022690  d7 32 05 cc 0d d7 3c 41  41 25 2b 3d 64 69 73 74  |.2....<AA%+=dist|
000226a0  25 3a d6 66 73 25 2c 6f  64 64 63 6f 6c 73 74 65  |%:.fs%,oddcolste|
000226b0  70 25 2c 63 6c 25 28 78  25 2c 30 29 2c 6e 6c 25  |p%,cl%(x%,0),nl%|
000226c0  28 78 25 2c 30 29 2c 41  25 2c 6f 64 64 73 74 65  |(x%,0),A%,oddste|
000226d0  70 25 2c 42 25 0d d7 46  05 cd 0d d7 50 05 ed 0d  |p%,B%..F....P...|
000226e0  d7 5a 05 cc 0d d7 64 47  49 25 3d 73 74 65 70 25  |.Z....dGI%=step%|
000226f0  3a e3 79 72 25 3d 30 b8  79 25 2d 31 3a c8 99 68  |:.yr%=0.y%-1:..h|
00022700  6f 75 72 25 2c 79 72 25  2a 31 30 30 81 79 25 3a  |our%,yr%*100.y%:|
00022710  e7 61 64 64 72 25 3e 6f  75 74 6c 69 6d 25 20 f2  |.addr%>outlim% .|
00022720  66 6c 75 73 68 6f 75 74  70 75 74 0d d7 6e 58 57  |flushoutput..nXW|
00022730  25 3d a0 28 72 24 2b 22  28 63 6c 25 28 29 29 22  |%=.(r$+"(cl%())"|
00022740  29 3a 42 25 3d 78 25 3a  41 25 3d 61 64 64 72 25  |):B%=x%:A%=addr%|
00022750  3a 61 64 64 72 25 2b 3d  72 6f 77 73 74 65 70 25  |:addr%+=rowstep%|
00022760  3a d6 66 73 25 2c 63 6f  6c 73 74 65 70 25 2c 63  |:.fs%,colstep%,c|
00022770  6c 25 28 31 2c 30 29 2c  49 25 2c 41 25 2c 49 25  |l%(1,0),I%,A%,I%|
00022780  2c 42 25 0d d7 78 05 ed  0d d7 82 05 cd 0d d7 8c  |,B%..x..........|
00022790  05 cc 0d d7 96 0d e7 65  71 75 61 6c 25 20 8c 0d  |.......equal% ..|
000227a0  d7 a0 39 f2 72 65 77 69  6e 64 3a 48 61 76 67 25  |..9.rewind:Havg%|
000227b0  3d c6 8e 28 76 61 6c 73  25 28 29 29 2f 32 35 36  |=..(vals%())/256|
000227c0  2f 28 63 6f 6c 2b 31 29  3a de 20 6e 65 77 25 28  |/(col+1):. new%(|
000227d0  32 35 36 2c 63 6f 6c 29  0d d7 aa 3e e3 42 25 3d  |256,col)...>.B%=|
000227e0  30 b8 63 6f 6c 3a 52 25  3d 30 3a 48 69 6e 74 25  |0.col:R%=0:Hint%|
000227f0  3d 30 3a e3 5a 25 3d 30  b8 32 35 36 3a 4c 25 3d  |=0:.Z%=0.256:L%=|
00022800  52 25 3a 48 69 6e 74 25  2b 3d 76 61 6c 73 25 28  |R%:Hint%+=vals%(|
00022810  5a 25 2c 42 25 29 0d d7  b4 26 c8 95 48 69 6e 74  |Z%,B%)...&..Hint|
00022820  25 3e 48 61 76 67 25 3a  48 69 6e 74 25 2d 3d 48  |%>Havg%:Hint%-=H|
00022830  61 76 67 25 3a 52 25 2b  3d 31 3a ce 0d d7 be 1f  |avg%:R%+=1:.....|
00022840  6e 65 77 25 28 5a 25 2c  42 25 29 3d 28 4c 25 2b  |new%(Z%,B%)=(L%+|
00022850  52 25 29 2f 32 2a 46 2f  32 35 36 0d d7 c8 07 ed  |R%)/2*F/256.....|
00022860  3a ed 0d d7 d2 05 cd 0d  d7 dc 0f e7 73 68 61 72  |:...........shar|
00022870  70 65 6e 25 20 8c 0d d7  e6 0d e7 6f 72 64 65 72  |pen% ......order|
00022880  25 20 8c 0d d7 f0 3a 79  72 65 61 64 25 3d 73 79  |% ....:yread%=sy|
00022890  25 2d 31 3a 57 25 3d a0  28 72 24 2b 22 28 72 6d  |%-1:W%=.(r$+"(rm|
000228a0  31 25 28 29 29 22 29 3a  e7 65 71 75 61 6c 25 20  |1%())"):.equal% |
000228b0  f2 66 69 74 32 28 72 6d  31 25 28 29 29 0d d7 fa  |.fit2(rm1%())...|
000228c0  41 e3 42 25 3d 30 b8 63  6f 6c 3a 72 6d 31 25 28  |A.B%=0.col:rm1%(|
000228d0  30 2c 42 25 29 3d 72 6d  31 25 28 31 2c 42 25 29  |0,B%)=rm1%(1,B%)|
000228e0  3a 72 6d 31 25 28 73 78  25 2b 31 2c 42 25 29 3d  |:rm1%(sx%+1,B%)=|
000228f0  72 6d 31 25 28 73 78 25  2c 42 25 29 3a ed 0d d8  |rm1%(sx%,B%):...|
00022900  04 05 cc 0d d8 0e 3c 79  72 65 61 64 25 3d 79 25  |......<yread%=y%|
00022910  2d 31 3a f2 73 63 61 6c  65 64 70 69 78 65 6c 72  |-1:.scaledpixelr|
00022920  6f 77 28 72 6d 31 25 28  29 29 3a e7 65 71 75 61  |ow(rm1%()):.equa|
00022930  6c 25 20 f2 66 69 74 28  72 6d 31 25 28 29 29 0d  |l% .fit(rm1%()).|
00022940  d8 18 3f e3 42 25 3d 30  b8 63 6f 6c 3a 72 6d 31  |..?.B%=0.col:rm1|
00022950  25 28 30 2c 42 25 29 3d  72 6d 31 25 28 31 2c 42  |%(0,B%)=rm1%(1,B|
00022960  25 29 3a 72 6d 31 25 28  78 25 2b 31 2c 42 25 29  |%):rm1%(x%+1,B%)|
00022970  3d 72 6d 31 25 28 78 25  2c 42 25 29 3a ed 0d d8  |=rm1%(x%,B%):...|
00022980  22 05 cd 0d d8 2c 11 72  6d 32 25 28 29 3d 72 6d  |"....,.rm2%()=rm|
00022990  31 25 28 29 0d d8 36 05  cd 0d d8 40 0d e7 6f 72  |1%()..6....@..or|
000229a0  64 65 72 25 20 8c 0d d8  4a 11 e3 79 72 25 3d 30  |der% ...J..yr%=0|
000229b0  20 b8 20 79 25 2d 31 0d  d8 54 32 c8 99 68 6f 75  | . y%-1..T2..hou|
000229c0  72 25 2c 79 72 25 2a 31  30 30 81 79 25 3a e7 61  |r%,yr%*100.y%:.a|
000229d0  64 64 72 25 3e 6f 75 74  6c 69 6d 25 20 f2 66 6c  |ddr%>outlim% .fl|
000229e0  75 73 68 6f 75 74 70 75  74 0d d8 5e 0d e7 73 79  |ushoutput..^..sy|
000229f0  25 3d 79 25 20 8c 0d d8  68 19 f2 73 68 61 72 70  |%=y% ...h..sharp|
00022a00  70 69 78 65 6c 72 6f 77  28 63 6c 25 28 29 29 0d  |pixelrow(cl%()).|
00022a10  d8 72 05 cc 0d d8 7c 3a  79 73 61 6d 70 25 2d 3d  |.r....|:ysamp%-=|
00022a20  31 3a e7 79 73 61 6d 70  25 3d 30 20 f2 73 68 61  |1:.ysamp%=0 .sha|
00022a30  72 70 70 69 78 65 6c 72  6f 77 28 78 6c 25 28 29  |rppixelrow(xl%()|
00022a40  29 3a 79 73 61 6d 70 25  3d 79 6d 75 6c 25 0d d8  |):ysamp%=ymul%..|
00022a50  86 0e e7 79 64 69 76 25  3d 31 20 8c 0d d8 90 0f  |...ydiv%=1 .....|
00022a60  63 6c 25 28 29 3d 78 6c  25 28 29 0d d8 9a 05 cc  |cl%()=xl%().....|
00022a70  0d d8 a4 14 e7 79 73 61  6d 70 25 3e 3d 79 64 69  |.....ysamp%>=ydi|
00022a80  76 25 20 8c 0d d8 ae 23  79 73 61 6d 70 25 2d 3d  |v% ....#ysamp%-=|
00022a90  79 64 69 76 25 3a 63 6c  25 28 29 3d 78 6c 25 28  |ydiv%:cl%()=xl%(|
00022aa0  29 2a 79 64 69 76 25 0d  d8 b8 05 cc 0d d8 c2 2f  |)*ydiv%......../|
00022ab0  63 6c 25 28 29 3d 78 6c  25 28 29 2a 79 73 61 6d  |cl%()=xl%()*ysam|
00022ac0  70 25 3a 59 25 3d 79 64  69 76 25 2d 79 73 61 6d  |p%:Y%=ydiv%-ysam|
00022ad0  70 25 3a 79 73 61 6d 70  25 3d 30 0d d8 cc 05 f5  |p%:ysamp%=0.....|
00022ae0  0d d8 d6 30 e7 79 73 61  6d 70 25 3d 30 20 f2 73  |...0.ysamp%=0 .s|
00022af0  68 61 72 70 70 69 78 65  6c 72 6f 77 28 78 6c 25  |harppixelrow(xl%|
00022b00  28 29 29 3a 79 73 61 6d  70 25 3d 79 6d 75 6c 25  |()):ysamp%=ymul%|
00022b10  0d d8 e0 10 e7 79 73 61  6d 70 25 3e 59 25 20 8c  |.....ysamp%>Y% .|
00022b20  0d d8 ea 36 79 73 61 6d  70 25 2d 3d 59 25 3a 78  |...6ysamp%-=Y%:x|
00022b30  6c 32 25 28 29 3d 78 6c  25 28 29 2a 59 25 3a 63  |l2%()=xl%()*Y%:c|
00022b40  6c 25 28 29 3d 63 6c 25  28 29 2b 78 6c 32 25 28  |l%()=cl%()+xl2%(|
00022b50  29 3a 59 25 3d 30 0d d8  f4 05 cc 0d d8 fe 3e 59  |):Y%=0........>Y|
00022b60  25 2d 3d 79 73 61 6d 70  25 3a 78 6c 32 25 28 29  |%-=ysamp%:xl2%()|
00022b70  3d 78 6c 25 28 29 2a 79  73 61 6d 70 25 3a 63 6c  |=xl%()*ysamp%:cl|
00022b80  25 28 29 3d 63 6c 25 28  29 2b 78 6c 32 25 28 29  |%()=cl%()+xl2%()|
00022b90  3a 79 73 61 6d 70 25 3d  30 0d d9 08 05 cd 0d d9  |:ysamp%=0.......|
00022ba0  12 0a fd 20 59 25 3d 30  0d d9 1c 05 cd 0d d9 26  |... Y%=0.......&|
00022bb0  0d 79 73 61 6d 70 25 2b  3d 31 0d d9 30 05 cd 0d  |.ysamp%+=1..0...|
00022bc0  d9 3a 05 cd 0d d9 44 3c  63 6c 25 28 29 3d 63 6c  |.:....D<cl%()=cl|
00022bd0  25 28 29 2b 6e 6c 25 28  29 3a 6e 6c 25 28 29 3d  |%()+nl%():nl%()=|
00022be0  30 3a 42 25 3d 78 25 3a  41 25 3d 61 64 64 72 25  |0:B%=x%:A%=addr%|
00022bf0  3a 61 64 64 72 25 2b 3d  72 6f 77 73 74 65 70 25  |:addr%+=rowstep%|
00022c00  0d d9 4e 0c e7 79 72 25  80 31 20 8c 0d d9 58 2f  |..N..yr%.1 ...X/|
00022c10  d6 66 73 25 2c 63 6f 6c  73 74 65 70 25 2c 63 6c  |.fs%,colstep%,cl|
00022c20  25 28 31 2c 30 29 2c 6e  6c 25 28 31 2c 30 29 2c  |%(1,0),nl%(1,0),|
00022c30  41 25 2c 73 74 65 70 25  2c 42 25 0d d9 62 05 cc  |A%,step%,B%..b..|
00022c40  0d d9 6c 41 41 25 2b 3d  64 69 73 74 25 3a d6 66  |..lAA%+=dist%:.f|
00022c50  73 25 2c 6f 64 64 63 6f  6c 73 74 65 70 25 2c 63  |s%,oddcolstep%,c|
00022c60  6c 25 28 78 25 2c 30 29  2c 6e 6c 25 28 78 25 2c  |l%(x%,0),nl%(x%,|
00022c70  30 29 2c 41 25 2c 6f 64  64 73 74 65 70 25 2c 42  |0),A%,oddstep%,B|
00022c80  25 0d d9 76 05 cd 0d d9  80 05 ed 0d d9 8a 05 cc  |%..v............|
00022c90  0d d9 94 11 e3 79 72 25  3d 30 20 b8 20 79 25 2d  |.....yr%=0 . y%-|
00022ca0  31 0d d9 9e 32 c8 99 68  6f 75 72 25 2c 79 72 25  |1...2..hour%,yr%|
00022cb0  2a 31 30 30 81 79 25 3a  e7 61 64 64 72 25 3e 6f  |*100.y%:.addr%>o|
00022cc0  75 74 6c 69 6d 25 20 f2  66 6c 75 73 68 6f 75 74  |utlim% .flushout|
00022cd0  70 75 74 0d d9 a8 0f e7  73 68 61 72 70 65 6e 25  |put.....sharpen%|
00022ce0  20 8c 0d d9 b2 40 e7 79  72 65 61 64 25 20 79 72  | ....@.yread% yr|
00022cf0  65 61 64 25 2d 3d 31 3a  f2 73 63 61 6c 65 64 70  |ead%-=1:.scaledp|
00022d00  69 78 65 6c 72 6f 77 28  72 6d 25 28 29 29 3a e7  |ixelrow(rm%()):.|
00022d10  65 71 75 61 6c 25 20 f2  66 69 74 28 72 6d 25 28  |equal% .fit(rm%(|
00022d20  29 29 0d d9 bc 3b e3 42  25 3d 30 b8 63 6f 6c 3a  |))...;.B%=0.col:|
00022d30  72 6d 25 28 30 2c 42 25  29 3d 72 6d 25 28 31 2c  |rm%(0,B%)=rm%(1,|
00022d40  42 25 29 3a 72 6d 25 28  78 25 2b 31 2c 42 25 29  |B%):rm%(x%+1,B%)|
00022d50  3d 72 6d 25 28 78 25 2c  42 25 29 3a ed 0d d9 c6  |=rm%(x%,B%):....|
00022d60  3b d6 20 73 68 61 72 70  25 2c 63 6c 25 28 31 2c  |;. sharp%,cl%(1,|
00022d70  30 29 2c 72 6d 25 28 31  2c 30 29 2c 72 6d 31 25  |0),rm%(1,0),rm1%|
00022d80  28 31 2c 30 29 2c 72 6d  32 25 28 31 2c 30 29 2c  |(1,0),rm2%(1,0),|
00022d90  74 6f 74 76 61 6c 73 25  0d d9 d0 21 c8 94 20 72  |totvals%...!.. r|
00022da0  6d 32 25 28 29 2c 72 6d  31 25 28 29 3a 72 6d 31  |m2%(),rm1%():rm1|
00022db0  25 28 29 3d 72 6d 25 28  29 0d d9 da 05 cc 0d d9  |%()=rm%().......|
00022dc0  e4 2e f2 73 63 61 6c 65  64 70 69 78 65 6c 72 6f  |...scaledpixelro|
00022dd0  77 28 63 6c 25 28 29 29  3a e7 65 71 75 61 6c 25  |w(cl%()):.equal%|
00022de0  20 f2 66 69 74 28 63 6c  25 28 29 29 0d d9 ee 05  | .fit(cl%())....|
00022df0  cd 0d d9 f8 3c 63 6c 25  28 29 3d 63 6c 25 28 29  |....<cl%()=cl%()|
00022e00  2b 6e 6c 25 28 29 3a 6e  6c 25 28 29 3d 30 3a 42  |+nl%():nl%()=0:B|
00022e10  25 3d 78 25 3a 41 25 3d  61 64 64 72 25 3a 61 64  |%=x%:A%=addr%:ad|
00022e20  64 72 25 2b 3d 72 6f 77  73 74 65 70 25 0d da 02  |dr%+=rowstep%...|
00022e30  0c e7 79 72 25 80 31 20  8c 0d da 0c 2f d6 66 73  |..yr%.1 ..../.fs|
00022e40  25 2c 63 6f 6c 73 74 65  70 25 2c 63 6c 25 28 31  |%,colstep%,cl%(1|
00022e50  2c 30 29 2c 6e 6c 25 28  31 2c 30 29 2c 41 25 2c  |,0),nl%(1,0),A%,|
00022e60  73 74 65 70 25 2c 42 25  0d da 16 05 cc 0d da 20  |step%,B%....... |
00022e70  41 41 25 2b 3d 64 69 73  74 25 3a d6 66 73 25 2c  |AA%+=dist%:.fs%,|
00022e80  6f 64 64 63 6f 6c 73 74  65 70 25 2c 63 6c 25 28  |oddcolstep%,cl%(|
00022e90  78 25 2c 30 29 2c 6e 6c  25 28 78 25 2c 30 29 2c  |x%,0),nl%(x%,0),|
00022ea0  41 25 2c 6f 64 64 73 74  65 70 25 2c 42 25 0d da  |A%,oddstep%,B%..|
00022eb0  2a 05 cd 0d da 34 05 ed  0d da 3e 05 cd 0d da 48  |*....4....>....H|
00022ec0  05 cd 0d da 52 12 e7 6d  3d 2d 31 31 84 6d 3d 2d  |....R..m=-11.m=-|
00022ed0  31 32 20 8c 0d da 5c 3f  c8 99 20 22 4f 53 5f 53  |12 ...\?.. "OS_S|
00022ee0  57 49 4e 75 6d 62 65 72  46 72 6f 6d 53 74 72 69  |WINumberFromStri|
00022ef0  6e 67 22 2c 2c 22 43 6f  6d 70 72 65 73 73 4a 50  |ng",,"CompressJP|
00022f00  45 47 5f 57 72 69 74 65  4c 69 6e 65 22 20 b8 20  |EG_WriteLine" . |
00022f10  77 6c 25 0d da 66 0c e7  6d 3d 2d 31 31 20 8c 0d  |wl%..f..m=-11 ..|
00022f20  da 70 4e 21 72 61 6d 25  3d 78 73 70 25 3a 72 61  |.pN!ram%=xsp%:ra|
00022f30  6d 25 21 34 3d 79 73 70  25 3a 72 61 6d 25 21 38  |m%!4=ysp%:ram%!8|
00022f40  3d 6a 70 65 67 71 75 61  6c 69 74 79 25 3a 72 61  |=jpegquality%:ra|
00022f50  6d 25 21 31 32 3d 31 3a  72 61 6d 25 21 31 36 3d  |m%!12=1:ram%!16=|
00022f60  39 30 3a 72 61 6d 25 21  32 30 3d 39 30 0d da 7a  |90:ram%!20=90..z|
00022f70  50 c8 99 22 43 6f 6d 70  72 65 73 73 4a 50 45 47  |P.."CompressJPEG|
00022f80  5f 53 74 61 72 74 22 2c  72 61 6d 25 2c 73 7a 25  |_Start",ram%,sz%|
00022f90  2c 72 61 6d 25 2c 6a 70  65 67 77 72 6b 25 2c 28  |,ram%,jpegwrk%,(|
00022fa0  78 73 70 25 2b 37 80 ac  37 29 2a 39 2b 32 30 30  |xsp%+7..7)*9+200|
00022fb0  30 30 20 b8 20 6a 70 65  67 74 61 67 25 0d da 84  |00 . jpegtag%...|
00022fc0  05 cc 0d da 8e 4e 21 72  61 6d 25 3d 78 73 70 25  |.....N!ram%=xsp%|
00022fd0  3a 72 61 6d 25 21 34 3d  79 73 70 25 3a 72 61 6d  |:ram%!4=ysp%:ram|
00022fe0  25 21 38 3d 6a 70 65 67  71 75 61 6c 69 74 79 25  |%!8=jpegquality%|
00022ff0  3a 72 61 6d 25 21 31 32  3d 33 3a 72 61 6d 25 21  |:ram%!12=3:ram%!|
00023000  31 36 3d 39 30 3a 72 61  6d 25 21 32 30 3d 39 30  |16=90:ram%!20=90|
00023010  0d da 98 53 c8 99 22 43  6f 6d 70 72 65 73 73 4a  |...S.."CompressJ|
00023020  50 45 47 5f 53 74 61 72  74 22 2c 72 61 6d 25 2c  |PEG_Start",ram%,|
00023030  73 7a 25 2c 72 61 6d 25  2c 6a 70 65 67 77 72 6b  |sz%,ram%,jpegwrk|
00023040  25 2c 28 78 73 70 25 2b  31 35 80 ac 31 35 29 2a  |%,(xsp%+15..15)*|
00023050  33 30 2b 32 30 30 30 30  20 b8 20 6a 70 65 67 74  |30+20000 . jpegt|
00023060  61 67 25 0d da a2 05 cd  0d da ac 14 61 64 64 72  |ag%.........addr|
00023070  25 3d 72 61 6d 25 2b 32  30 30 30 30 0d da b6 11  |%=ram%+20000....|
00023080  e3 79 72 25 3d 30 b8 79  73 70 25 2d 31 0d da c0  |.yr%=0.ysp%-1...|
00023090  3c c8 99 68 6f 75 72 25  2c 79 72 25 2a 31 30 30  |<..hour%,yr%*100|
000230a0  81 79 73 70 25 3a c8 99  77 6c 25 2c 6a 70 65 67  |.ysp%:..wl%,jpeg|
000230b0  74 61 67 25 2c 61 64 64  72 25 3a 61 64 64 72 25  |tag%,addr%:addr%|
000230c0  2b 3d 78 77 6f 72 64 73  25 0d da ca 05 ed 0d da  |+=xwords%.......|
000230d0  d4 30 c8 99 22 43 6f 6d  70 72 65 73 73 4a 50 45  |.0.."CompressJPE|
000230e0  47 5f 46 69 6e 69 73 68  22 2c 6a 70 65 67 74 61  |G_Finish",jpegta|
000230f0  67 25 20 b8 20 6a 70 65  67 73 69 7a 65 25 0d da  |g% . jpegsize%..|
00023100  de 05 cd 0d da e8 05 cd  0d da f2 17 63 70 75 74  |............cput|
00023110  69 6d 65 25 3d 91 2d 63  70 75 74 69 6d 65 25 0d  |ime%=.-cputime%.|
00023120  da fc 09 f2 53 61 76 65  0d db 06 06 3d 30 0d db  |....Save....=0..|
00023130  10 12 dd 20 f2 73 72 63  68 64 65 76 6c 69 73 74  |... .srchdevlist|
00023140  0d db 1a 0a 5b 4f 50 54  20 5a 0d db 38 25 43 4d  |....[OPT Z..8%CM|
00023150  50 20 52 34 2c 23 46 3a  4d 4f 56 43 53 20 52 34  |P R4,#F:MOVCS R4|
00023160  2c 23 30 3a 4d 4f 56 47  45 20 52 34 2c 23 46 0d  |,#0:MOVGE R4,#F.|
00023170  db 42 3e 4d 4f 56 20 52  30 2c 52 34 2c 4c 53 52  |.B>MOV R0,R4,LSR|
00023180  20 23 28 62 69 74 73 2d  6b 25 29 3a 43 4d 50 20  | #(bits-k%):CMP |
00023190  52 30 2c 23 31 3c 3c 6b  25 3a 4d 4f 56 43 53 20  |R0,#1<<k%:MOVCS |
000231a0  52 30 2c 23 28 31 3c 3c  6b 25 29 2d 31 0d db 4c  |R0,#(1<<k%)-1..L|
000231b0  25 43 4d 50 20 52 35 2c  23 46 3a 4d 4f 56 43 53  |%CMP R5,#F:MOVCS|
000231c0  20 52 35 2c 23 30 3a 4d  4f 56 47 45 20 52 35 2c  | R5,#0:MOVGE R5,|
000231d0  23 46 0d db 56 52 4d 4f  56 20 52 33 2c 52 35 2c  |#F..VRMOV R3,R5,|
000231e0  4c 53 52 20 23 28 62 69  74 73 2d 6b 25 29 3a 43  |LSR #(bits-k%):C|
000231f0  4d 50 20 52 33 2c 23 31  3c 3c 6b 25 3a 4d 4f 56  |MP R3,#1<<k%:MOV|
00023200  43 53 20 52 33 2c 23 28  31 3c 3c 6b 25 29 2d 31  |CS R3,#(1<<k%)-1|
00023210  3a 84 52 20 52 30 2c 52  30 2c 52 33 2c 4c 53 4c  |:.R R0,R0,R3,LSL|
00023220  20 23 6b 25 0d db 60 25  43 4d 50 20 52 36 2c 23  | #k%..`%CMP R6,#|
00023230  46 3a 4d 4f 56 43 53 20  52 36 2c 23 30 3a 4d 4f  |F:MOVCS R6,#0:MO|
00023240  56 47 45 20 52 36 2c 23  46 0d db 6a 54 4d 4f 56  |VGE R6,#F..jTMOV|
00023250  20 52 33 2c 52 36 2c 4c  53 52 20 23 28 62 69 74  | R3,R6,LSR #(bit|
00023260  73 2d 6b 25 29 3a 43 4d  50 20 52 33 2c 23 31 3c  |s-k%):CMP R3,#1<|
00023270  3c 6b 25 3a 4d 4f 56 43  53 20 52 33 2c 23 28 31  |<k%:MOVCS R3,#(1|
00023280  3c 3c 6b 25 29 2d 31 3a  84 52 20 52 30 2c 52 30  |<<k%)-1:.R R0,R0|
00023290  2c 52 33 2c 4c 53 4c 20  23 6b 25 2a 32 0d db 88  |,R3,LSL #k%*2...|
000232a0  1e 53 54 4d 46 44 20 53  50 20 21 2c 7b 52 38 2c  |.STMFD SP !,{R8,|
000232b0  52 39 2c 52 31 30 2c 52  31 31 7d 0d db 92 11 4c  |R9,R10,R11}....L|
000232c0  44 52 20 72 33 2c 69 63  74 6c 6f 63 0d db 9c 19  |DR r3,ictloc....|
000232d0  4c 44 52 20 72 32 2c 5b  72 33 2c 72 30 2c 4c 53  |LDR r2,[r3,r0,LS|
000232e0  4c 20 23 32 5d 0d db b0  16 4d 4f 56 20 72 31 34  |L #2]....MOV r14|
000232f0  2c 72 32 2c 6c 73 72 20  23 32 34 0d db ba 0e 43  |,r2,lsr #24....C|
00023300  4d 50 20 72 31 34 2c 23  34 0d db c4 19 41 44 44  |MP r14,#4....ADD|
00023310  43 43 20 72 32 2c 72 33  2c 72 30 2c 6c 73 6c 20  |CC r2,r3,r0,lsl |
00023320  23 32 0d db ce 1a 42 49  43 43 53 20 72 32 2c 72  |#2....BICCS r2,r|
00023330  32 2c 23 26 66 66 30 30  30 30 30 30 0d db d8 13  |2,#&ff000000....|
00023340  4c 44 52 42 20 72 30 2c  5b 72 32 5d 2c 23 31 0d  |LDRB r0,[r2],#1.|
00023350  db e2 13 53 55 42 53 20  72 31 34 2c 72 31 34 2c  |...SUBS r14,r14,|
00023360  23 31 0d db ec 0d 42 45  51 20 67 6f 74 69 74 0d  |#1....BEQ gotit.|
00023370  dc 00 17 41 44 44 20 72  33 2c 72 30 2c 72 30 2c  |...ADD r3,r0,r0,|
00023380  6c 73 6c 20 23 31 0d dc  0a 17 41 44 44 20 72 33  |lsl #1....ADD r3|
00023390  2c 72 37 2c 72 33 2c 6c  73 6c 20 23 32 0d dc 14  |,r7,r3,lsl #2...|
000233a0  18 4c 44 4d 49 41 20 72  33 2c 7b 72 38 2c 72 39  |.LDMIA r3,{r8,r9|
000233b0  2c 72 31 30 7d 0d dc 1e  11 53 55 42 53 20 72 38  |,r10}....SUBS r8|
000233c0  2c 72 38 2c 72 34 0d dc  28 12 52 53 42 4d 49 20  |,r8,r4..(.RSBMI |
000233d0  72 38 2c 72 38 2c 23 30  0d dc 32 19 4d 4f 56 20  |r8,r8,#0..2.MOV |
000233e0  72 38 2c 72 38 2c 6c 73  72 20 23 62 69 74 73 2f  |r8,r8,lsr #bits/|
000233f0  32 0d dc 3c 11 53 55 42  53 20 72 39 2c 72 39 2c  |2..<.SUBS r9,r9,|
00023400  72 35 0d dc 46 12 52 53  42 4d 49 20 72 39 2c 72  |r5..F.RSBMI r9,r|
00023410  39 2c 23 30 0d dc 50 19  4d 4f 56 20 72 39 2c 72  |9,#0..P.MOV r9,r|
00023420  39 2c 6c 73 72 20 23 62  69 74 73 2f 32 0d dc 5a  |9,lsr #bits/2..Z|
00023430  13 53 55 42 53 20 72 31  30 2c 72 31 30 2c 72 36  |.SUBS r10,r10,r6|
00023440  0d dc 64 14 52 53 42 4d  49 20 72 31 30 2c 72 31  |..d.RSBMI r10,r1|
00023450  30 2c 23 30 0d dc 6e 1b  4d 4f 56 20 72 31 30 2c  |0,#0..n.MOV r10,|
00023460  72 31 30 2c 6c 73 72 20  23 62 69 74 73 2f 32 0d  |r10,lsr #bits/2.|
00023470  dc 78 10 4d 55 4c 20 72  33 2c 72 38 2c 72 38 0d  |.x.MUL r3,r8,r8.|
00023480  dc 82 11 4d 55 4c 20 72  31 31 2c 72 39 2c 72 39  |...MUL r11,r9,r9|
00023490  0d dc 8c 1a 41 44 44 20  72 31 31 2c 72 31 31 2c  |....ADD r11,r11,|
000234a0  72 31 31 2c 4c 53 4c 20  23 32 0d dc 96 17 41 44  |r11,LSL #2....AD|
000234b0  44 20 72 33 2c 72 33 2c  72 33 2c 4c 53 4c 20 23  |D r3,r3,r3,LSL #|
000234c0  31 0d dc a0 18 41 44 44  20 72 33 2c 72 33 2c 72  |1....ADD r3,r3,r|
000234d0  31 31 2c 4c 53 4c 20 23  31 0d dc aa 16 4d 4c 41  |11,LSL #1....MLA|
000234e0  20 72 31 31 2c 72 31 30  2c 72 31 30 2c 72 33 0d  | r11,r10,r10,r3.|
000234f0  dc be 0d 2e 73 72 63 68  6c 69 73 74 0d dc c8 13  |....srchlist....|
00023500  4c 44 52 42 20 72 33 2c  5b 72 32 5d 2c 23 31 0d  |LDRB r3,[r2],#1.|
00023510  dc d2 17 41 44 44 20 52  38 2c 52 33 2c 52 33 2c  |...ADD R8,R3,R3,|
00023520  4c 53 4c 20 23 31 0d dc  dc 17 41 44 44 20 52 38  |LSL #1....ADD R8|
00023530  2c 52 37 2c 52 38 2c 4c  53 4c 20 23 32 0d dc e6  |,R7,R8,LSL #2...|
00023540  18 4c 44 4d 49 41 20 52  38 2c 7b 52 38 2c 52 39  |.LDMIA R8,{R8,R9|
00023550  2c 52 31 30 7d 0d dc f0  11 53 55 42 53 20 52 39  |,R10}....SUBS R9|
00023560  2c 52 35 2c 52 39 0d dc  fa 12 52 53 42 4d 49 20  |,R5,R9....RSBMI |
00023570  52 39 2c 52 39 2c 23 30  0d dd 04 19 4d 4f 56 20  |R9,R9,#0....MOV |
00023580  52 33 2c 52 39 2c 4c 53  52 20 23 62 69 74 73 2f  |R3,R9,LSR #bits/|
00023590  32 0d dd 0e 10 4d 55 4c  20 52 39 2c 52 33 2c 52  |2....MUL R9,R3,R|
000235a0  33 0d dd 18 17 41 44 44  20 72 39 2c 72 39 2c 72  |3....ADD r9,r9,r|
000235b0  39 2c 4c 53 4c 20 23 32  0d dd 22 15 43 4d 50 20  |9,LSL #2..".CMP |
000235c0  52 31 31 2c 52 39 2c 4c  53 4c 20 23 31 0d dd 2c  |R11,R9,LSL #1..,|
000235d0  11 42 43 43 20 73 72 63  68 71 75 69 63 6b 0d dd  |.BCC srchquick..|
000235e0  36 11 53 55 42 53 20 52  38 2c 52 34 2c 52 38 0d  |6.SUBS R8,R4,R8.|
000235f0  dd 40 12 52 53 42 4d 49  20 52 38 2c 52 38 2c 23  |.@.RSBMI R8,R8,#|
00023600  30 0d dd 4a 19 4d 4f 56  20 52 33 2c 52 38 2c 4c  |0..J.MOV R3,R8,L|
00023610  53 52 20 23 62 69 74 73  2f 32 0d dd 54 10 4d 55  |SR #bits/2..T.MU|
00023620  4c 20 52 38 2c 72 33 2c  72 33 0d dd 5e 17 41 44  |L R8,r3,r3..^.AD|
00023630  44 20 72 38 2c 72 38 2c  72 38 2c 4c 53 4c 20 23  |D r8,r8,r8,LSL #|
00023640  31 0d dd 68 17 41 44 44  20 72 38 2c 72 38 2c 72  |1..h.ADD r8,r8,r|
00023650  39 2c 4c 53 4c 20 23 31  0d dd 72 13 53 55 42 53  |9,LSL #1..r.SUBS|
00023660  20 52 31 30 2c 52 36 2c  52 31 30 0d dd 7c 14 52  | R10,R6,R10..|.R|
00023670  53 42 4d 49 20 52 31 30  2c 52 31 30 2c 23 30 0d  |SBMI R10,R10,#0.|
00023680  dd 86 1a 4d 4f 56 20 52  33 2c 52 31 30 2c 4c 53  |...MOV R3,R10,LS|
00023690  52 20 23 62 69 74 73 2f  32 0d dd 90 14 4d 4c 41  |R #bits/2....MLA|
000236a0  20 52 31 30 2c 52 33 2c  52 33 2c 52 38 0d dd 9a  | R10,R3,R3,R8...|
000236b0  0f 43 4d 50 20 52 31 30  2c 52 31 31 0d dd a4 11  |.CMP R10,R11....|
000236c0  4d 4f 56 43 43 20 52 31  31 2c 52 31 30 0d dd ae  |MOVCC R11,R10...|
000236d0  16 4c 44 52 43 43 42 20  52 30 2c 5b 72 32 2c 23  |.LDRCCB R0,[r2,#|
000236e0  2d 31 5d 0d dd b8 0e 2e  73 72 63 68 71 75 69 63  |-1].....srchquic|
000236f0  6b 0d dd c2 13 53 55 42  53 20 52 31 34 2c 52 31  |k....SUBS R14,R1|
00023700  34 2c 23 31 0d dd cc 10  42 4e 45 20 73 72 63 68  |4,#1....BNE srch|
00023710  6c 69 73 74 0d dd d6 0a  2e 67 6f 74 69 74 0d dd  |list.....gotit..|
00023720  e0 2b 41 44 44 20 52 33  2c 52 30 2c 52 30 2c 4c  |.+ADD R3,R0,R0,L|
00023730  53 4c 20 23 31 3a 41 44  44 20 52 33 2c 52 37 2c  |SL #1:ADD R3,R7,|
00023740  52 33 2c 4c 53 4c 20 23  32 0d dd ea 18 4c 44 4d  |R3,LSL #2....LDM|
00023750  49 41 20 52 33 2c 7b 52  38 2c 52 39 2c 52 31 30  |IA R3,{R8,R9,R10|
00023760  7d 0d dd f4 2b 53 55 42  20 52 34 2c 52 34 2c 52  |}...+SUB R4,R4,R|
00023770  38 3a 53 55 42 20 52 35  2c 52 35 2c 52 39 3a 53  |8:SUB R5,R5,R9:S|
00023780  55 42 20 52 36 2c 52 36  2c 52 31 30 0d dd fe 1e  |UB R6,R6,R10....|
00023790  4c 44 4d 46 44 20 72 31  33 21 2c 7b 52 38 2c 52  |LDMFD r13!,{R8,R|
000237a0  39 2c 52 31 30 2c 52 31  31 7d 0d de 08 05 5d 0d  |9,R10,R11}....].|
000237b0  de 12 05 e1 0d de 1c 1f  dd 20 f2 67 65 74 6f 75  |......... .getou|
000237c0  74 70 75 74 28 41 25 2c  45 25 2c 42 25 2c f8 20  |tput(A%,E%,B%,. |
000237d0  43 25 29 0d de 26 25 e7  41 25 3e 6d 61 78 25 20  |C%)..&%.A%>max% |
000237e0  80 20 72 6f 74 61 74 65  25 3d a3 20 80 20 76 66  |. rotate%=. . vf|
000237f0  6c 69 70 25 3d a3 20 8c  0d de 30 31 43 25 3d 6d  |lip%=. ...01C%=m|
00023800  61 78 25 81 42 25 2b 31  3a 41 25 3d 78 77 6f 72  |ax%.B%+1:A%=xwor|
00023810  64 73 25 2a 43 25 2b 45  25 3a 66 69 72 73 74 25  |ds%*C%+E%:first%|
00023820  3d b9 3a 6f 25 3d ae 66  24 0d de 3a 05 cc 0d de  |=.:o%=.f$..:....|
00023830  44 0a 41 25 2b 3d 45 25  0d de 4e 05 cd 0d de 58  |D.A%+=E%..N....X|
00023840  14 e7 73 70 72 69 74 65  61 72 65 61 25 3c 30 20  |..spritearea%<0 |
00023850  8c 0d de 62 2f 72 61 6d  25 3d a4 63 72 65 61 74  |...b/ram%=.creat|
00023860  65 61 72 65 61 28 41 25  29 3a e7 72 61 6d 25 3d  |earea(A%):.ram%=|
00023870  2d 31 20 72 61 6d 25 3d  a4 64 69 6d 28 41 25 29  |-1 ram%=.dim(A%)|
00023880  0d de 6c 05 cc 0d de 76  14 72 61 6d 25 3d 73 70  |..l....v.ram%=sp|
00023890  72 69 74 65 61 72 65 61  25 0d de 80 05 cd 0d de  |ritearea%.......|
000238a0  8a 0c 21 72 61 6d 25 3d  41 25 0d de 94 05 e1 0d  |..!ram%=A%......|
000238b0  de a8 18 dd 20 f2 67 65  74 6f 75 74 70 75 74 6a  |.... .getoutputj|
000238c0  70 28 f8 20 41 25 29 0d  de bc 14 e7 73 70 72 69  |p(. A%).....spri|
000238d0  74 65 61 72 65 61 25 3c  30 20 8c 0d de c6 33 72  |tearea%<0 ....3r|
000238e0  61 6d 25 3d a4 63 72 65  61 74 65 61 72 65 61 6a  |am%=.createareaj|
000238f0  70 28 41 25 29 3a e7 72  61 6d 25 3d 2d 31 20 72  |p(A%):.ram%=-1 r|
00023900  61 6d 25 3d a4 64 69 6d  6a 70 28 41 25 29 0d de  |am%=.dimjp(A%)..|
00023910  d0 05 cc 0d de da 14 72  61 6d 25 3d 73 70 72 69  |.......ram%=spri|
00023920  74 65 61 72 65 61 25 0d  de e4 05 cd 0d de ee 0c  |tearea%.........|
00023930  21 72 61 6d 25 3d 41 25  0d df 02 05 e1 0d df 16  |!ram%=A%........|
00023940  18 dd 20 a4 63 72 65 61  74 65 61 72 65 61 28 73  |.. .createarea(s|
00023950  69 7a 65 25 29 0d df 20  07 ea 20 85 0d df 2a 11  |ize%).. .. ...*.|
00023960  61 72 65 61 6e 75 6d 62  65 72 25 3d 30 0d df 34  |areanumber%=0..4|
00023970  0d ee 20 85 20 ea 3a 3d  2d 31 0d df 3e 5f c8 99  |.. . .:=-1..>_..|
00023980  20 26 32 30 30 36 36 2c  30 2c 2d 31 2c 73 69 7a  | &20066,0,-1,siz|
00023990  65 25 2c 2d 31 2c 25 31  30 30 30 30 30 30 30 2c  |e%,-1,%10000000,|
000239a0  73 69 7a 65 25 2c 30 2c  30 2c 22 43 68 61 6e 67  |size%,0,0,"Chang|
000239b0  65 46 53 49 20 73 70 72  69 74 65 22 20 b8 20 2c  |eFSI sprite" . ,|
000239c0  61 72 65 61 6e 75 6d 62  65 72 25 2c 2c 61 72 65  |areanumber%,,are|
000239d0  61 62 61 73 65 25 3b 56  25 0d df 48 1c e7 56 25  |abase%;V%..H..V%|
000239e0  80 31 20 8c 61 72 65 61  6e 75 6d 62 65 72 25 3d  |.1 .areanumber%=|
000239f0  30 3a 3d 2d 31 0d df 84  34 c8 99 20 22 4f 53 5f  |0:=-1...4.. "OS_|
00023a00  52 65 61 64 44 79 6e 61  6d 69 63 41 72 65 61 22  |ReadDynamicArea"|
00023a10  2c 61 72 65 61 6e 75 6d  62 65 72 25 20 b8 20 2c  |,areanumber% . ,|
00023a20  61 72 65 61 73 69 7a 65  25 0d df 8e 3d e7 20 61  |areasize%...=. a|
00023a30  72 65 61 73 69 7a 65 25  3c 73 69 7a 65 25 20 f2  |reasize%<size% .|
00023a40  72 65 6d 6f 76 65 61 72  65 61 3a 85 20 34 32 2c  |removearea:. 42,|
00023a50  22 43 6f 75 6c 64 6e 27  74 20 63 72 65 61 74 65  |"Couldn't create|
00023a60  20 61 72 65 61 22 0d df  98 0e 3d 61 72 65 61 62  | area"....=areab|
00023a70  61 73 65 25 0d df ac 1c  dd 20 a4 63 72 65 61 74  |ase%..... .creat|
00023a80  65 61 72 65 61 6a 70 28  f8 20 73 69 7a 65 25 29  |eareajp(. size%)|
00023a90  0d df b6 07 ea 20 85 0d  df c0 11 61 72 65 61 6e  |..... .....arean|
00023aa0  75 6d 62 65 72 25 3d 30  0d df ca 0d ee 20 85 20  |umber%=0..... . |
00023ab0  ea 3a 3d 2d 31 0d df d4  5d c8 99 20 26 32 30 30  |.:=-1...].. &200|
00023ac0  36 36 2c 30 2c 2d 31 2c  73 69 7a 65 25 2c 2d 31  |66,0,-1,size%,-1|
00023ad0  2c 25 31 30 30 30 30 30  30 30 2c 73 69 7a 65 25  |,%10000000,size%|
00023ae0  2c 30 2c 30 2c 22 43 68  61 6e 67 65 46 53 49 20  |,0,0,"ChangeFSI |
00023af0  4a 50 45 47 22 20 b8 20  2c 61 72 65 61 6e 75 6d  |JPEG" . ,areanum|
00023b00  62 65 72 25 2c 2c 61 72  65 61 62 61 73 65 25 3b  |ber%,,areabase%;|
00023b10  56 25 0d df de 1c e7 56  25 80 31 20 8c 61 72 65  |V%.....V%.1 .are|
00023b20  61 6e 75 6d 62 65 72 25  3d 30 3a 3d 2d 31 0d df  |anumber%=0:=-1..|
00023b30  e8 44 c8 99 20 22 4f 53  5f 52 65 61 64 44 79 6e  |.D.. "OS_ReadDyn|
00023b40  61 6d 69 63 41 72 65 61  22 2c 61 72 65 61 6e 75  |amicArea",areanu|
00023b50  6d 62 65 72 25 20 b8 20  2c 61 72 65 61 73 69 7a  |mber% . ,areasiz|
00023b60  65 25 3a 73 69 7a 65 25  3d 61 72 65 61 73 69 7a  |e%:size%=areasiz|
00023b70  65 25 0d df f2 0e 3d 61  72 65 61 62 61 73 65 25  |e%....=areabase%|
00023b80  0d e0 06 11 dd 20 f2 72  65 6d 6f 76 65 61 72 65  |..... .removeare|
00023b90  61 0d e0 10 40 e7 61 72  65 61 6e 75 6d 62 65 72  |a...@.areanumber|
00023ba0  25 20 c8 99 20 22 4f 53  5f 44 79 6e 61 6d 69 63  |% .. "OS_Dynamic|
00023bb0  41 72 65 61 22 2c 31 2c  61 72 65 61 6e 75 6d 62  |Area",1,areanumb|
00023bc0  65 72 25 3a 61 72 65 61  6e 75 6d 62 65 72 25 3d  |er%:areanumber%=|
00023bd0  30 0d e0 1a 05 e1 0d e0  2e 16 dd 20 a4 63 61 63  |0.......... .cac|
00023be0  68 65 64 69 6d 28 73 69  7a 65 25 29 0d e0 38 07  |hedim(size%)..8.|
00023bf0  ea 20 85 0d e0 42 16 63  61 63 68 65 61 72 65 61  |. ...B.cachearea|
00023c00  6e 75 6d 62 65 72 25 3d  30 0d e0 4c 0d ee 20 85  |number%=0..L.. .|
00023c10  20 ea 3a 3d 2d 31 0d e0  56 68 c8 99 20 26 32 30  | .:=-1..Vh.. &20|
00023c20  30 36 36 2c 30 2c 2d 31  2c 73 69 7a 65 25 2c 2d  |066,0,-1,size%,-|
00023c30  31 2c 25 31 30 30 30 30  30 30 30 2c 73 69 7a 65  |1,%10000000,size|
00023c40  25 2c 30 2c 30 2c 22 43  68 61 6e 67 65 46 53 49  |%,0,0,"ChangeFSI|
00023c50  20 63 61 63 68 65 22 20  b8 20 2c 63 61 63 68 65  | cache" . ,cache|
00023c60  61 72 65 61 6e 75 6d 62  65 72 25 2c 2c 63 61 63  |areanumber%,,cac|
00023c70  68 65 61 72 65 61 62 61  73 65 25 3b 56 25 0d e0  |heareabase%;V%..|
00023c80  60 21 e7 56 25 80 31 20  8c 63 61 63 68 65 61 72  |`!.V%.1 .cachear|
00023c90  65 61 6e 75 6d 62 65 72  25 3d 30 3a 3d 2d 31 0d  |eanumber%=0:=-1.|
00023ca0  e0 6a 3e c8 99 20 22 4f  53 5f 52 65 61 64 44 79  |.j>.. "OS_ReadDy|
00023cb0  6e 61 6d 69 63 41 72 65  61 22 2c 63 61 63 68 65  |namicArea",cache|
00023cc0  61 72 65 61 6e 75 6d 62  65 72 25 20 b8 20 2c 63  |areanumber% . ,c|
00023cd0  61 63 68 65 61 72 65 61  73 69 7a 65 25 0d e0 74  |acheareasize%..t|
00023ce0  47 e7 20 63 61 63 68 65  61 72 65 61 73 69 7a 65  |G. cacheareasize|
00023cf0  25 3c 73 69 7a 65 25 20  f2 72 65 6d 6f 76 65 63  |%<size% .removec|
00023d00  61 63 68 65 61 72 65 61  3a 85 20 34 32 2c 22 43  |achearea:. 42,"C|
00023d10  6f 75 6c 64 6e 27 74 20  63 72 65 61 74 65 20 61  |ouldn't create a|
00023d20  72 65 61 22 0d e0 7e 13  3d 63 61 63 68 65 61 72  |rea"..~.=cachear|
00023d30  65 61 62 61 73 65 25 0d  e0 92 16 dd 20 f2 72 65  |eabase%..... .re|
00023d40  6d 6f 76 65 63 61 63 68  65 61 72 65 61 0d e0 9c  |movecachearea...|
00023d50  4f e7 63 61 63 68 65 61  72 65 61 6e 75 6d 62 65  |O.cacheareanumbe|
00023d60  72 25 20 c8 99 20 22 4f  53 5f 44 79 6e 61 6d 69  |r% .. "OS_Dynami|
00023d70  63 41 72 65 61 22 2c 31  2c 63 61 63 68 65 61 72  |cArea",1,cachear|
00023d80  65 61 6e 75 6d 62 65 72  25 3a 63 61 63 68 65 61  |eanumber%:cachea|
00023d90  72 65 61 6e 75 6d 62 65  72 25 3d 30 0d e0 a6 05  |reanumber%=0....|
00023da0  e1 0d e0 ba 12 dd 20 f2  66 6c 75 73 68 6f 75 74  |...... .flushout|
00023db0  70 75 74 0d e0 c4 1d e7  73 70 72 69 74 65 61 72  |put.....spritear|
00023dc0  65 61 25 3c 30 20 80 6f  6b 73 61 76 65 25 20 8c  |ea%<0 .oksave% .|
00023dd0  0d e0 ce 27 41 25 3d 62  61 73 65 25 3a e7 66 69  |...'A%=base%:.fi|
00023de0  72 73 74 25 20 41 25 3d  72 61 6d 25 2b 34 3a 66  |rst% A%=ram%+4:f|
00023df0  69 72 73 74 25 3d a3 0d  e0 d8 1f c8 99 31 32 2c  |irst%=.......12,|
00023e00  32 2c 6f 25 2c 41 25 2c  61 64 64 72 25 81 73 69  |2,o%,A%,addr%.si|
00023e10  7a 65 25 2d 41 25 0d e0  e2 05 cd 0d e0 ec 15 61  |ze%-A%.........a|
00023e20  64 64 72 25 3d 62 61 73  65 25 2a 73 69 7a 65 25  |ddr%=base%*size%|
00023e30  0d e0 f6 05 e1 0d e1 00  0c dd 20 f2 63 6c 6f 73  |.......... .clos|
00023e40  65 0d e1 0a 2c e7 63 25  20 e7 66 6c 61 67 3d 33  |e...,.c% .flag=3|
00023e50  36 30 30 20 c8 99 22 50  68 6f 74 6f 43 44 5f 43  |600 .."PhotoCD_C|
00023e60  6c 6f 73 65 22 2c 70 63  64 68 25 2c 31 0d e1 14  |lose",pcdh%,1...|
00023e70  3b e7 63 25 20 d9 23 63  25 3a 63 25 3d 30 3a e7  |;.c% .#c%:c%=0:.|
00023e80  73 63 72 61 70 66 25 20  73 63 72 61 70 66 25 3d  |scrapf% scrapf%=|
00023e90  a3 3a ff 22 52 65 6d 6f  76 65 20 3c 57 69 6d 70  |.:."Remove <Wimp|
00023ea0  24 53 63 72 61 70 3e 22  0d e1 1e 14 e7 63 63 25  |$Scrap>".....cc%|
00023eb0  20 d9 23 63 63 25 3a 63  63 25 3d 30 0d e1 28 17  | .#cc%:cc%=0..(.|
00023ec0  e7 63 63 63 25 20 d9 23  63 63 63 25 3a 63 63 63  |.ccc% .#ccc%:ccc|
00023ed0  25 3d 30 0d e1 32 14 f2  72 65 6d 6f 76 65 63 61  |%=0..2..removeca|
00023ee0  63 68 65 61 72 65 61 0d  e1 3c 05 e1 0d e1 46 0b  |chearea..<....F.|
00023ef0  dd 20 f2 53 61 76 65 0d  e1 50 0a f2 63 6c 6f 73  |. .Save..P..clos|
00023f00  65 0d e1 5a 0a c8 8e 20  6d 20 ca 0d e1 64 22 c9  |e..Z... m ...d".|
00023f10  20 2d 31 3a e7 73 70 72  69 74 65 61 72 65 61 25  | -1:.spritearea%|
00023f20  3c 30 20 80 6f 6b 73 61  76 65 25 20 8c 0d e1 6e  |<0 .oksave% ...n|
00023f30  3b e7 6f 25 20 f2 66 6c  75 73 68 6f 75 74 70 75  |;.o% .flushoutpu|
00023f40  74 20 8b c8 99 22 4f 53  5f 46 69 6c 65 22 2c 31  |t ..."OS_File",1|
00023f50  30 2c 66 24 2c 26 30 30  34 2c 2c 72 61 6d 25 2c  |0,f$,&004,,ram%,|
00023f60  72 61 6d 25 2b 73 7a 25  0d e1 78 05 cd 0d e1 82  |ram%+sz%..x.....|
00023f70  19 c9 20 2d 32 3a 6f 25  3d ae 66 24 3a d5 23 6f  |.. -2:o%=.f$:.#o|
00023f80  25 2c 70 6e 6d 24 0d e1  8c 0d c8 8e 20 70 6e 6d  |%,pnm$...... pnm|
00023f90  24 20 ca 0d e1 96 0a c9  20 22 50 31 22 0d e1 a0  |$ ...... "P1"...|
00023fa0  2c d5 23 6f 25 2c 22 23  20 22 2b 66 24 2b 22 2e  |,.#o%,"# "+f$+".|
00023fb0  70 62 6d 20 28 6f 70 74  69 6f 6e 73 20 22 2b 6f  |pbm (options "+o|
00023fc0  6e 61 6d 65 24 2b 22 29  22 0d e1 aa 18 d5 23 6f  |name$+")".....#o|
00023fd0  25 2c c3 78 73 70 25 2b  22 20 22 2b c3 79 73 70  |%,.xsp%+" "+.ysp|
00023fe0  25 0d e1 b4 24 e3 59 25  3d 30 b8 79 73 70 25 2d  |%...$.Y%=0.ysp%-|
00023ff0  31 3a 42 25 3d 62 61 73  65 25 2b 59 25 2a 78 77  |1:B%=base%+Y%*xw|
00024000  6f 72 64 73 25 0d e1 be  3d e3 58 25 3d 30 b8 78  |ords%...=.X%=0.x|
00024010  73 70 25 2d 31 3a e7 42  25 3f 28 58 25 3e 3e 33  |sp%-1:.B%?(X%>>3|
00024020  29 80 28 31 3c 3c 28 58  25 80 37 29 29 20 d5 23  |).(1<<(X%.7)) .#|
00024030  6f 25 2c 22 31 22 3b 20  8b d5 23 6f 25 2c 22 30  |o%,"1"; ..#o%,"0|
00024040  22 3b 0d e1 c8 05 ed 0d  e1 d2 0b d5 23 6f 25 2c  |";..........#o%,|
00024050  22 22 0d e1 dc 05 ed 0d  e1 e6 0a c9 20 22 50 34  |"".......... "P4|
00024060  22 0d e1 f0 3b d5 23 6f  25 2c 22 23 20 22 2b 66  |"...;.#o%,"# "+f|
00024070  24 2b 22 2e 70 62 6d 20  28 6f 70 74 69 6f 6e 73  |$+".pbm (options|
00024080  20 22 2b 6f 6e 61 6d 65  24 2b 22 29 20 62 69 6e  | "+oname$+") bin|
00024090  61 72 79 20 65 6e 63 6f  64 65 64 22 0d e1 fa 18  |ary encoded"....|
000240a0  d5 23 6f 25 2c c3 78 73  70 25 2b 22 20 22 2b c3  |.#o%,.xsp%+" "+.|
000240b0  79 73 70 25 0d e2 04 66  e3 58 25 3d 30 b8 32 35  |ysp%...f.X%=0.25|
000240c0  35 3a 63 6f 64 65 25 3f  58 25 3d 58 25 3c 3c 37  |5:code%?X%=X%<<7|
000240d0  20 84 20 58 25 3c 3c 35  80 26 34 30 20 84 20 58  | . X%<<5.&40 . X|
000240e0  25 3c 3c 33 80 26 32 30  20 84 20 58 25 3c 3c 31  |%<<3.&20 . X%<<1|
000240f0  80 26 31 30 20 84 20 58  25 3e 3e 31 80 38 20 84  |.&10 . X%>>1.8 .|
00024100  20 58 25 3e 3e 33 80 34  20 84 58 25 3e 3e 35 80  | X%>>3.4 .X%>>5.|
00024110  32 20 84 58 25 3e 3e 37  3a ed 0d e2 0e 24 e3 59  |2 .X%>>7:....$.Y|
00024120  25 3d 30 b8 79 73 70 25  2d 31 3a 42 25 3d 62 61  |%=0.ysp%-1:B%=ba|
00024130  73 65 25 2b 59 25 2a 78  77 6f 72 64 73 25 0d e2  |se%+Y%*xwords%..|
00024140  18 2c e3 58 25 3d 30 b8  78 73 70 25 2d 31 88 38  |.,.X%=0.xsp%-1.8|
00024150  3a d5 23 6f 25 2c 63 6f  64 65 25 3f 28 42 25 3f  |:.#o%,code%?(B%?|
00024160  28 58 25 3e 3e 33 29 29  3a ed 0d e2 22 05 ed 0d  |(X%>>3)):..."...|
00024170  e2 2c 0a c9 20 22 50 32  22 0d e2 36 2c d5 23 6f  |.,.. "P2"..6,.#o|
00024180  25 2c 22 23 20 22 2b 66  24 2b 22 2e 70 67 6d 20  |%,"# "+f$+".pgm |
00024190  28 6f 70 74 69 6f 6e 73  20 22 2b 6f 6e 61 6d 65  |(options "+oname|
000241a0  24 2b 22 29 22 0d e2 40  18 d5 23 6f 25 2c c3 78  |$+")"..@..#o%,.x|
000241b0  73 70 25 2b 22 20 22 2b  c3 79 73 70 25 0d e2 4a  |sp%+" "+.ysp%..J|
000241c0  0d d5 23 6f 25 2c 22 31  35 22 0d e2 54 24 e3 59  |..#o%,"15"..T$.Y|
000241d0  25 3d 30 b8 79 73 70 25  2d 31 3a 42 25 3d 62 61  |%=0.ysp%-1:B%=ba|
000241e0  73 65 25 2b 59 25 2a 78  77 6f 72 64 73 25 0d e2  |se%+Y%*xwords%..|
000241f0  5e 37 e3 58 25 3d 30 b8  78 73 70 25 2d 31 3a 43  |^7.X%=0.xsp%-1:C|
00024200  25 3d 42 25 3f 28 58 25  3e 3e 31 29 3a e7 58 25  |%=B%?(X%>>1):.X%|
00024210  80 31 20 43 25 3d 43 25  3e 3e 34 20 8b 43 25 3d  |.1 C%=C%>>4 .C%=|
00024220  43 25 80 31 35 0d e2 68  11 d5 23 6f 25 2c 22 20  |C%.15..h..#o%," |
00024230  22 2b c3 43 25 3b 0d e2  72 05 ed 0d e2 7c 0b d5  |"+.C%;..r....|..|
00024240  23 6f 25 2c 22 22 0d e2  86 05 ed 0d e2 90 0a c9  |#o%,""..........|
00024250  20 22 50 35 22 0d e2 9a  3b d5 23 6f 25 2c 22 23  | "P5"...;.#o%,"#|
00024260  20 22 2b 66 24 2b 22 2e  70 67 6d 20 28 6f 70 74  | "+f$+".pgm (opt|
00024270  69 6f 6e 73 20 22 2b 6f  6e 61 6d 65 24 2b 22 29  |ions "+oname$+")|
00024280  20 62 69 6e 61 72 79 20  65 6e 63 6f 64 65 64 22  | binary encoded"|
00024290  0d e2 a4 18 d5 23 6f 25  2c c3 78 73 70 25 2b 22  |.....#o%,.xsp%+"|
000242a0  20 22 2b c3 79 73 70 25  0d e2 ae 0d d5 23 6f 25  | "+.ysp%.....#o%|
000242b0  2c 22 31 35 22 0d e2 b8  24 e3 59 25 3d 30 b8 79  |,"15"...$.Y%=0.y|
000242c0  73 70 25 2d 31 3a 42 25  3d 62 61 73 65 25 2b 59  |sp%-1:B%=base%+Y|
000242d0  25 2a 78 77 6f 72 64 73  25 0d e2 c2 37 e3 58 25  |%*xwords%...7.X%|
000242e0  3d 30 b8 78 73 70 25 2d  31 3a 43 25 3d 42 25 3f  |=0.xsp%-1:C%=B%?|
000242f0  28 58 25 3e 3e 31 29 3a  e7 58 25 80 31 20 43 25  |(X%>>1):.X%.1 C%|
00024300  3d 43 25 3e 3e 34 20 8b  43 25 3d 43 25 80 31 35  |=C%>>4 .C%=C%.15|
00024310  0d e2 cc 0b d5 23 6f 25  2c 43 25 0d e2 d6 05 ed  |.....#o%,C%.....|
00024320  0d e2 e0 05 ed 0d e2 ea  05 cb 0d e2 f4 0d d9 23  |...............#|
00024330  6f 25 3a 6f 25 3d 30 0d  e2 fe 2f e7 70 6e 6d 24  |o%:o%=0.../.pnm$|
00024340  3d 22 50 32 22 84 70 6e  6d 24 3d 22 50 31 22 20  |="P2".pnm$="P1" |
00024350  ff 22 53 65 74 74 79 70  65 20 22 2b 66 24 2b 22  |."Settype "+f$+"|
00024360  20 26 46 46 46 22 0d e3  08 19 c9 20 2d 33 3a 6f  | &FFF"..... -3:o|
00024370  25 3d ae 66 24 3a d5 23  6f 25 2c 70 6e 6d 24 0d  |%=.f$:.#o%,pnm$.|
00024380  e3 12 4f d5 23 6f 25 2c  22 23 20 22 2b 66 24 2b  |..O.#o%,"# "+f$+|
00024390  22 2e 70 63 6d 20 28 6f  70 74 69 6f 6e 73 20 22  |".pcm (options "|
000243a0  2b 6f 6e 61 6d 65 24 2b  22 29 20 62 69 6e 61 72  |+oname$+") binar|
000243b0  79 20 65 6e 63 6f 64 65  64 20 31 35 62 70 70 20  |y encoded 15bpp |
000243c0  28 35 62 69 74 73 20 72  2c 67 2c 62 29 22 0d e3  |(5bits r,g,b)"..|
000243d0  1c 18 d5 23 6f 25 2c c3  78 73 70 25 2b 22 20 22  |...#o%,.xsp%+" "|
000243e0  2b c3 79 73 70 25 0d e3  26 0d d5 23 6f 25 2c 22  |+.ysp%..&..#o%,"|
000243f0  33 31 22 0d e3 30 1e c8  99 31 32 2c 32 2c 6f 25  |31"..0...12,2,o%|
00024400  2c 72 61 6d 25 2c 78 73  70 25 2a 79 73 70 25 2a  |,ram%,xsp%*ysp%*|
00024410  32 0d e3 3a 0d d9 23 6f  25 3a 6f 25 3d 30 0d e3  |2..:..#o%:o%=0..|
00024420  44 1e c9 20 2d 34 3a 6f  25 3d ae 66 24 3a e7 70  |D.. -4:o%=.f$:.p|
00024430  6e 6d 24 3d 22 49 52 4c  41 4d 22 8c 0d e3 4e 25  |nm$="IRLAM"...N%|
00024440  d5 23 6f 25 2c 22 49 72  6c 61 6d 20 32 34 3a 20  |.#o%,"Irlam 24: |
00024450  22 2b c3 78 73 70 25 2b  22 20 22 2b c3 79 73 70  |"+.xsp%+" "+.ysp|
00024460  25 0d e3 58 23 e3 59 25  3d 30 b8 79 73 70 25 2d  |%..X#.Y%=0.ysp%-|
00024470  31 3a 42 25 3d 72 61 6d  25 2b 59 25 2a 78 77 6f  |1:B%=ram%+Y%*xwo|
00024480  72 64 73 25 0d e3 62 21  e3 58 25 3d 30 b8 78 73  |rds%..b!.X%=0.xs|
00024490  70 25 2a 33 2d 31 88 33  3a d5 23 6f 25 2c 42 25  |p%*3-1.3:.#o%,B%|
000244a0  3f 58 25 3a ed 0d e3 6c  27 42 25 2b 3d 31 3a e3  |?X%:...l'B%+=1:.|
000244b0  58 25 3d 30 b8 78 73 70  25 2a 33 2d 31 88 33 3a  |X%=0.xsp%*3-1.3:|
000244c0  d5 23 6f 25 2c 42 25 3f  58 25 3a ed 0d e3 76 27  |.#o%,B%?X%:...v'|
000244d0  42 25 2b 3d 31 3a e3 58  25 3d 30 b8 78 73 70 25  |B%+=1:.X%=0.xsp%|
000244e0  2a 33 2d 31 88 33 3a d5  23 6f 25 2c 42 25 3f 58  |*3-1.3:.#o%,B%?X|
000244f0  25 3a ed 0d e3 80 05 ed  0d e3 8a 05 cc 0d e3 94  |%:..............|
00024500  0d d5 23 6f 25 2c 70 6e  6d 24 0d e3 9e 10 e7 70  |..#o%,pnm$.....p|
00024510  6e 6d 24 3d 22 50 36 22  20 8c 0d e3 a8 47 d5 23  |nm$="P6" ....G.#|
00024520  6f 25 2c 22 23 20 22 2b  66 24 2b 22 2e 70 70 6d  |o%,"# "+f$+".ppm|
00024530  20 28 6f 70 74 69 6f 6e  73 20 22 2b 6f 6e 61 6d  | (options "+onam|
00024540  65 24 2b 22 29 20 62 69  6e 61 72 79 20 65 6e 63  |e$+") binary enc|
00024550  6f 64 65 64 20 32 34 62  70 70 20 72 2c 67 2c 62  |oded 24bpp r,g,b|
00024560  22 0d e3 b2 05 cc 0d e3  bc 45 d5 23 6f 25 2c 22  |"........E.#o%,"|
00024570  23 20 22 2b 66 24 2b 22  2e 70 70 6d 20 28 6f 70  |# "+f$+".ppm (op|
00024580  74 69 6f 6e 73 20 22 2b  6f 6e 61 6d 65 24 2b 22  |tions "+oname$+"|
00024590  29 20 22 2b c3 28 70 36  62 69 74 73 2a 33 29 2b  |) "+.(p6bits*3)+|
000245a0  22 62 70 70 20 72 2c 67  2c 62 22 0d e3 c6 05 cd  |"bpp r,g,b".....|
000245b0  0d e3 d0 18 d5 23 6f 25  2c c3 78 73 70 25 2b 22  |.....#o%,.xsp%+"|
000245c0  20 22 2b c3 79 73 70 25  0d e3 da 16 d5 23 6f 25  | "+.ysp%.....#o%|
000245d0  2c c3 28 32 5e 70 36 62  69 74 73 2d 31 29 0d e3  |,.(2^p6bits-1)..|
000245e0  e4 10 e7 70 6e 6d 24 3d  22 50 36 22 20 8c 0d e3  |...pnm$="P6" ...|
000245f0  ee 1e c8 99 31 32 2c 32  2c 6f 25 2c 72 61 6d 25  |....12,2,o%,ram%|
00024600  2c 78 73 70 25 2a 79 73  70 25 2a 33 0d e3 f8 05  |,xsp%*ysp%*3....|
00024610  cc 0d e4 02 23 e3 59 25  3d 30 b8 79 73 70 25 2d  |....#.Y%=0.ysp%-|
00024620  31 3a 42 25 3d 72 61 6d  25 2b 59 25 2a 78 77 6f  |1:B%=ram%+Y%*xwo|
00024630  72 64 73 25 0d e4 0c 58  e3 58 25 3d 30 b8 78 73  |rds%...X.X%=0.xs|
00024640  70 25 2d 31 3a 43 25 3d  42 25 21 28 58 25 2a 33  |p%-1:C%=B%!(X%*3|
00024650  29 3a d5 23 6f 25 2c 22  20 22 2b c3 28 43 25 80  |):.#o%," "+.(C%.|
00024660  32 35 35 29 2b 22 20 22  2b c3 28 28 43 25 3e 3e  |255)+" "+.((C%>>|
00024670  38 29 80 26 46 46 29 2b  22 20 22 2b c3 28 28 43  |8).&FF)+" "+.((C|
00024680  25 3e 3e 31 36 29 80 32  35 35 29 3b 0d e4 16 05  |%>>16).255);....|
00024690  ed 0d e4 20 0b d5 23 6f  25 2c 22 22 0d e4 2a 05  |... ..#o%,""..*.|
000246a0  ed 0d e4 34 05 cd 0d e4  3e 05 cd 0d e4 48 0d d9  |...4....>....H..|
000246b0  23 6f 25 3a 6f 25 3d 30  0d e4 52 25 e7 70 6e 6d  |#o%:o%=0..R%.pnm|
000246c0  24 3d 22 50 33 22 20 ff  22 53 65 74 74 79 70 65  |$="P3" ."Settype|
000246d0  20 22 2b 66 24 2b 22 20  26 46 46 46 22 0d e4 5c  | "+f$+" &FFF"..\|
000246e0  19 c9 20 2d 35 3a 6f 25  3d ae 66 24 3a d5 23 6f  |.. -5:o%=.f$:.#o|
000246f0  25 2c 70 6e 6d 24 0d e4  66 4f d5 23 6f 25 2c 22  |%,pnm$..fO.#o%,"|
00024700  23 20 22 2b 66 24 2b 22  2e 70 63 6d 20 28 6f 70  |# "+f$+".pcm (op|
00024710  74 69 6f 6e 73 20 22 2b  6f 6e 61 6d 65 24 2b 22  |tions "+oname$+"|
00024720  29 20 62 69 6e 61 72 79  20 65 6e 63 6f 64 65 64  |) binary encoded|
00024730  20 31 35 62 70 70 20 28  35 62 69 74 73 20 79 2c  | 15bpp (5bits y,|
00024740  75 2c 76 29 22 0d e4 70  18 d5 23 6f 25 2c c3 78  |u,v)"..p..#o%,.x|
00024750  73 70 25 2b 22 20 22 2b  c3 79 73 70 25 0d e4 7a  |sp%+" "+.ysp%..z|
00024760  13 d5 23 6f 25 2c 22 33  31 20 32 37 20 32 31 22  |..#o%,"31 27 21"|
00024770  0d e4 84 1e c8 99 31 32  2c 32 2c 6f 25 2c 72 61  |......12,2,o%,ra|
00024780  6d 25 2c 78 73 70 25 2a  79 73 70 25 2a 32 0d e4  |m%,xsp%*ysp%*2..|
00024790  8e 0d d9 23 6f 25 3a 6f  25 3d 30 0d e4 98 14 c9  |...#o%:o%=0.....|
000247a0  20 2d 39 2c 2d 31 30 2c  2d 31 31 2c 2d 31 32 0d  | -9,-10,-11,-12.|
000247b0  e4 a2 3f e7 73 70 72 69  74 65 61 72 65 61 25 3c  |..?.spritearea%<|
000247c0  30 20 80 6f 6b 73 61 76  65 25 20 c8 99 38 2c 31  |0 .oksave% ..8,1|
000247d0  30 2c 66 24 2c 26 63 38  35 2c 2c 72 61 6d 25 2c  |0,f$,&c85,,ram%,|
000247e0  72 61 6d 25 2b 6a 70 65  67 73 69 7a 65 25 0d e4  |ram%+jpegsize%..|
000247f0  ac 05 7f 0d e4 b6 14 e7  6e 63 6f 6c 3d 31 80 6d  |........ncol=1.m|
00024800  24 3d 22 54 22 20 8c 0d  e4 c0 1d e3 58 25 3d 28  |$="T" ......X%=(|
00024810  78 73 70 25 2a 34 2d 31  29 81 38 2a 38 2b 36 b8  |xsp%*4-1).8*8+6.|
00024820  36 88 2d 38 0d e4 ca 1d  c8 99 26 32 65 2c 26 31  |6.-8......&2e,&1|
00024830  32 65 2c 72 61 6d 25 2c  6f 6e 61 6d 65 24 2c 58  |2e,ram%,oname$,X|
00024840  25 0d e4 d4 1d c8 99 26  32 65 2c 26 31 32 65 2c  |%......&2e,&12e,|
00024850  72 61 6d 25 2c 6f 6e 61  6d 65 24 2c 58 25 0d e4  |ram%,oname$,X%..|
00024860  de 05 ed 0d e4 e8 05 cd  0d e4 f2 1d e7 73 70 72  |.............spr|
00024870  69 74 65 61 72 65 61 25  3c 30 20 80 6f 6b 73 61  |itearea%<0 .oksa|
00024880  76 65 25 20 8c 0d e4 fc  28 e7 6f 25 20 f2 66 6c  |ve% ....(.o% .fl|
00024890  75 73 68 6f 75 74 70 75  74 20 8b c8 99 26 32 65  |ushoutput ...&2e|
000248a0  2c 26 31 30 63 2c 72 61  6d 25 2c 66 24 0d e5 06  |,&10c,ram%,f$...|
000248b0  05 cd 0d e5 10 05 cb 0d  e5 1a 34 e7 6f 25 20 d9  |..........4.o% .|
000248c0  23 6f 25 3a 6f 25 3d 30  3a ff 22 73 65 74 74 79  |#o%:o%=0:."setty|
000248d0  70 65 20 22 2b 66 24 2b  22 20 26 66 66 39 22 3a  |pe "+f$+" &ff9":|
000248e0  f2 72 65 6d 6f 76 65 61  72 65 61 0d e5 24 15 c8  |.removearea..$..|
000248f0  99 22 48 6f 75 72 67 6c  61 73 73 5f 4f 66 66 22  |."Hourglass_Off"|
00024900  0d e5 2e 05 e1 0d e5 38  0c dd f2 64 65 66 70 61  |.......8...defpa|
00024910  6c 0d e5 42 0d e3 43 25  3d 30 b8 32 35 35 0d e5  |l..B..C%=0.255..|
00024920  4c 23 72 25 28 43 25 29  3d 28 43 25 80 37 20 84  |L#r%(C%)=(C%.7 .|
00024930  20 28 43 25 80 31 36 29  3e 3e 31 29 2f 31 35 2a  | (C%.16)>>1)/15*|
00024940  46 0d e5 56 24 67 25 28  43 25 29 3d 28 43 25 80  |F..V$g%(C%)=(C%.|
00024950  33 20 84 20 28 43 25 80  26 36 30 29 3e 3e 33 29  |3 . (C%.&60)>>3)|
00024960  2f 31 35 2a 46 0d e5 60  30 62 25 28 43 25 29 3d  |/15*F..`0b%(C%)=|
00024970  28 43 25 80 33 20 84 20  28 43 25 80 38 29 3e 3e  |(C%.3 . (C%.8)>>|
00024980  31 20 84 20 28 43 25 80  31 32 38 29 3e 3e 34 29  |1 . (C%.128)>>4)|
00024990  2f 31 35 2a 46 0d e5 6a  05 ed 0d e5 74 05 e1 0d  |/15*F..j....t...|
000249a0  e5 7e 0d dd f2 64 65 66  70 61 6c 32 0d e5 88 1b  |.~...defpal2....|
000249b0  72 25 28 30 29 3d 46 3a  67 25 28 30 29 3d 46 3a  |r%(0)=F:g%(0)=F:|
000249c0  62 25 28 30 29 3d 46 0d  e5 92 05 e1 0d e5 9c 0d  |b%(0)=F.........|
000249d0  dd f2 64 65 66 70 61 6c  34 0d e5 a6 2f 72 25 28  |..defpal4.../r%(|
000249e0  29 3d 31 35 2c 31 30 2c  35 2c 30 3a e3 43 25 3d  |)=15,10,5,0:.C%=|
000249f0  30 b8 33 3a 72 25 28 43  25 29 3d 72 25 28 43 25  |0.3:r%(C%)=r%(C%|
00024a00  29 2f 31 35 2a 46 3a ed  0d e5 b0 17 67 25 28 29  |)/15*F:.....g%()|
00024a10  3d 72 25 28 29 3a 62 25  28 29 3d 72 25 28 29 0d  |=r%():b%()=r%().|
00024a20  e5 ba 05 e1 0d e5 c4 0e  dd f2 64 65 66 70 61 6c  |..........defpal|
00024a30  31 36 0d e5 ce 31 72 25  28 29 3d 31 35 2c 31 33  |16...1r%()=15,13|
00024a40  2c 31 31 2c 39 2c 37 2c  35 2c 33 2c 30 2c 30 2c  |,11,9,7,5,3,0,0,|
00024a50  31 34 2c 20 30 2c 31 33  2c 31 34 2c 35 2c 31 35  |14, 0,13,14,5,15|
00024a60  2c 20 30 0d e5 d8 31 67  25 28 29 3d 31 35 2c 31  |, 0...1g%()=15,1|
00024a70  33 2c 31 31 2c 39 2c 37  2c 35 2c 33 2c 30 2c 34  |3,11,9,7,5,3,0,4|
00024a80  2c 31 34 2c 31 32 2c 20  30 2c 31 34 2c 38 2c 31  |,14,12, 0,14,8,1|
00024a90  31 2c 31 30 0d e5 e2 31  62 25 28 29 3d 31 35 2c  |1,10...1b%()=15,|
00024aa0  31 33 2c 31 31 2c 39 2c  37 2c 35 2c 33 2c 30 2c  |13,11,9,7,5,3,0,|
00024ab0  39 2c 20 30 2c 20 30 2c  20 30 2c 31 31 2c 30 2c  |9, 0, 0, 0,11,0,|
00024ac0  20 30 2c 31 35 0d e5 ec  47 e3 43 25 3d 30 b8 31  | 0,15...G.C%=0.1|
00024ad0  35 3a 72 25 28 43 25 29  3d 72 25 28 43 25 29 2f  |5:r%(C%)=r%(C%)/|
00024ae0  31 35 2a 46 3a 67 25 28  43 25 29 3d 67 25 28 43  |15*F:g%(C%)=g%(C|
00024af0  25 29 2f 31 35 2a 46 3a  62 25 28 43 25 29 3d 62  |%)/15*F:b%(C%)=b|
00024b00  25 28 43 25 29 2f 31 35  2a 46 3a ed 0d e5 f6 05  |%(C%)/15*F:.....|
00024b10  e1 0d e6 00 0c dd f2 69  70 61 6c 36 33 0d e6 0a  |.......ipal63...|
00024b20  2c cf 23 63 25 3d 26 33  38 3a de 20 72 70 61 6c  |,.#c%=&38:. rpal|
00024b30  25 28 31 35 29 2c 67 70  61 6c 25 28 31 35 29 2c  |%(15),gpal%(15),|
00024b40  62 70 61 6c 25 28 31 35  29 0d e6 14 14 e3 43 25  |bpal%(15).....C%|
00024b50  3d 30 b8 31 35 3a 44 25  3d 9a 23 63 25 0d e6 1e  |=0.15:D%=.#c%...|
00024b60  19 72 70 61 6c 25 28 43  25 29 3d 9a 23 63 25 3e  |.rpal%(C%)=.#c%>|
00024b70  3e 34 20 80 20 37 0d e6  28 19 67 70 61 6c 25 28  |>4 . 7..(.gpal%(|
00024b80  43 25 29 3d 9a 23 63 25  3e 3e 34 20 80 20 33 0d  |C%)=.#c%>>4 . 3.|
00024b90  e6 32 19 62 70 61 6c 25  28 43 25 29 3d 9a 23 63  |.2.bpal%(C%)=.#c|
00024ba0  25 3e 3e 34 20 80 20 37  0d e6 3c 0b 44 25 3d a4  |%>>4 . 7..<.D%=.|
00024bb0  57 3a ed 0d e6 46 0d e3  43 25 3d 30 b8 32 35 35  |W:...F..C%=0.255|
00024bc0  0d e6 50 29 72 25 28 43  25 29 3d 28 72 70 61 6c  |..P)r%(C%)=(rpal|
00024bd0  25 28 43 25 80 31 35 29  84 28 43 25 80 31 36 29  |%(C%.15).(C%.16)|
00024be0  3e 3e 31 29 2f 31 35 2a  46 0d e6 5a 2a 67 25 28  |>>1)/15*F..Z*g%(|
00024bf0  43 25 29 3d 28 67 70 61  6c 25 28 43 25 80 31 35  |C%)=(gpal%(C%.15|
00024c00  29 84 28 43 25 80 26 36  30 29 3e 3e 33 29 2f 31  |).(C%.&60)>>3)/1|
00024c10  35 2a 46 0d e6 64 2a 62  25 28 43 25 29 3d 28 62  |5*F..d*b%(C%)=(b|
00024c20  70 61 6c 25 28 43 25 80  31 35 29 84 28 43 25 80  |pal%(C%.15).(C%.|
00024c30  31 32 38 29 3e 3e 34 29  2f 31 35 2a 46 0d e6 6e  |128)>>4)/15*F..n|
00024c40  05 ed 0d e6 78 05 e1 0d  e6 82 0e dd f2 69 70 61  |....x........ipa|
00024c50  6c 28 44 25 29 0d e6 8c  0c cf 23 63 25 3d 26 33  |l(D%).....#c%=&3|
00024c60  38 0d e6 96 16 e3 43 25  3d 30 b8 44 25 2d 31 3a  |8.....C%=0.D%-1:|
00024c70  44 25 3d 9a 23 63 25 0d  e6 a0 19 72 25 28 43 25  |D%=.#c%....r%(C%|
00024c80  29 3d 28 9a 23 63 25 3e  3e 34 29 2f 31 35 2a 46  |)=(.#c%>>4)/15*F|
00024c90  0d e6 aa 19 67 25 28 43  25 29 3d 28 9a 23 63 25  |....g%(C%)=(.#c%|
00024ca0  3e 3e 34 29 2f 31 35 2a  46 0d e6 b4 19 62 25 28  |>>4)/15*F....b%(|
00024cb0  43 25 29 3d 28 9a 23 63  25 3e 3e 34 29 2f 31 35  |C%)=(.#c%>>4)/15|
00024cc0  2a 46 0d e6 be 0b 44 25  3d a4 57 3a ed 0d e6 c8  |*F....D%=.W:....|
00024cd0  05 e1 0d e6 d2 13 dd 20  f2 6e 65 77 72 6f 70 61  |....... .newropa|
00024ce0  6c 28 44 25 29 0d e6 dc  0c cf 23 63 25 3d 26 33  |l(D%).....#c%=&3|
00024cf0  38 0d e6 e6 14 e3 43 25  3d 30 b8 44 25 2d 31 3a  |8.....C%=0.D%-1:|
00024d00  44 25 3d a4 57 0d e6 f0  19 72 25 28 43 25 29 3d  |D%=.W....r%(C%)=|
00024d10  28 44 25 80 32 35 35 29  2f 32 35 35 2a 46 0d e6  |(D%.255)/255*F..|
00024d20  fa 1c 67 25 28 43 25 29  3d 28 44 25 3e 3e 38 80  |..g%(C%)=(D%>>8.|
00024d30  32 35 35 29 2f 32 35 35  2a 46 0d e7 04 1d 62 25  |255)/255*F....b%|
00024d40  28 43 25 29 3d 28 44 25  3e 3e 31 36 80 32 35 35  |(C%)=(D%>>16.255|
00024d50  29 2f 32 35 35 2a 46 0d  e7 0e 0b 44 25 3d a4 57  |)/255*F....D%=.W|
00024d60  3a ed 0d e7 18 05 e1 0d  e7 22 0c dd 20 f2 6e 6f  |:........".. .no|
00024d70  70 61 6c 0d e7 2c 33 e3  43 25 3d 30 b8 32 35 35  |pal..,3.C%=0.255|
00024d80  3a 72 25 28 43 25 29 3d  43 25 2f 32 35 35 2a 46  |:r%(C%)=C%/255*F|
00024d90  3a ed 3a 67 25 28 29 3d  72 25 28 29 3a 62 25 28  |:.:g%()=r%():b%(|
00024da0  29 3d 72 25 28 29 0d e7  36 05 e1 0d e7 40 11 dd  |)=r%()..6....@..|
00024db0  20 f2 63 6f 6c 28 41 25  2c 42 25 29 0d e7 4a 36  | .col(A%,B%)..J6|
00024dc0  42 25 3d 42 25 3c 3c 38  84 42 25 3c 3c 34 84 26  |B%=B%<<8.B%<<4.&|
00024dd0  31 30 3a 70 61 6c 25 21  28 41 25 2a 38 29 3d 42  |10:pal%!(A%*8)=B|
00024de0  25 3a 70 61 6c 25 21 28  41 25 2a 38 2b 34 29 3d  |%:pal%!(A%*8+4)=|
00024df0  42 25 0d e7 54 05 e1 0d  e7 5e 0f dd 20 a4 62 69  |B%..T....^.. .bi|
00024e00  74 73 28 41 25 29 0d e7  68 35 e7 41 25 3d 31 20  |ts(A%)..h5.A%=1 |
00024e10  8c 3d 22 31 20 62 69 74  20 70 65 72 20 70 69 78  |.="1 bit per pix|
00024e20  65 6c 22 20 8b 3d c3 41  25 2b 22 20 62 69 74 73  |el" .=.A%+" bits|
00024e30  20 70 65 72 20 70 69 78  65 6c 22 0d e7 72 0b dd  | per pixel"..r..|
00024e40  20 a4 66 69 74 73 0d e7  7c 0a ea 5a 25 2c 73 24  | .fits..|..Z%,s$|
00024e50  0d e7 86 18 e3 5a 25 3d  31 b8 38 30 3a 73 24 2b  |.....Z%=1.80:s$+|
00024e60  3d bd 9a 23 63 25 3a ed  0d e7 90 07 3d 73 24 0d  |=..#c%:.....=s$.|
00024e70  e7 9a 0d dd 20 a4 75 63  28 61 24 29 0d e7 a4 0d  |.... .uc(a$)....|
00024e80  ea 5a 25 2c 7a 24 2c 62  24 0d e7 ae 0d e3 5a 25  |.Z%,z$,b$.....Z%|
00024e90  3d 31 b8 a9 61 24 0d e7  b8 10 7a 24 3d c1 61 24  |=1..a$....z$=.a$|
00024ea0  2c 5a 25 2c 31 29 0d e7  c2 21 e7 7a 24 3e 3d 22  |,Z%,1)...!.z$>="|
00024eb0  61 22 e7 7a 24 3c 3d 22  7a 22 20 7a 24 3d bd 28  |a".z$<="z" z$=.(|
00024ec0  97 7a 24 2d 33 32 29 0d  e7 cc 0c 62 24 2b 3d 7a  |.z$-32)....b$+=z|
00024ed0  24 3a ed 0d e7 d6 07 3d  62 24 0d e7 e0 0e dd 20  |$:.....=b$..... |
00024ee0  a4 64 69 6d 28 41 25 29  0d e7 ea 08 ea 20 42 25  |.dim(A%)..... B%|
00024ef0  0d e7 f4 0c e7 66 6c 65  78 25 20 8c 0d e7 fe 31  |.....flex% ....1|
00024f00  42 25 3d 6e 65 78 74 6c  6f 63 61 74 69 6f 6e 25  |B%=nextlocation%|
00024f10  3a 41 25 3d 41 25 2b 33  80 ac 33 3a 6e 65 78 74  |:A%=A%+3..3:next|
00024f20  6c 6f 63 61 74 69 6f 6e  25 2b 3d 41 25 0d e8 08  |location%+=A%...|
00024f30  2a c8 99 22 57 69 6d 70  5f 53 6c 6f 74 53 69 7a  |*.."Wimp_SlotSiz|
00024f40  65 22 2c 2d 31 2c 2d 31  20 b8 20 63 75 72 72 65  |e",-1,-1 . curre|
00024f50  6e 74 73 6c 6f 74 25 0d  e8 12 27 e7 63 75 72 72  |ntslot%...'.curr|
00024f60  65 6e 74 73 6c 6f 74 25  2b 26 38 30 30 30 3c 6e  |entslot%+&8000<n|
00024f70  65 78 74 6c 6f 63 61 74  69 6f 6e 25 20 8c 0d e8  |extlocation% ...|
00024f80  1c 3c c8 99 20 22 57 69  6d 70 5f 53 6c 6f 74 53  |.<.. "Wimp_SlotS|
00024f90  69 7a 65 22 2c 6e 65 78  74 6c 6f 63 61 74 69 6f  |ize",nextlocatio|
00024fa0  6e 25 2d 26 38 30 30 30  2c 2d 31 20 b8 20 63 75  |n%-&8000,-1 . cu|
00024fb0  72 72 65 6e 74 73 6c 6f  74 25 0d e8 26 55 e7 63  |rrentslot%..&U.c|
00024fc0  75 72 72 65 6e 74 73 6c  6f 74 25 2b 26 38 30 30  |urrentslot%+&800|
00024fd0  30 3c 6e 65 78 74 6c 6f  63 61 74 69 6f 6e 25 20  |0<nextlocation% |
00024fe0  85 20 34 32 2c 22 43 61  6e 27 74 20 67 65 74 20  |. 42,"Can't get |
00024ff0  65 6e 6f 75 67 68 20 6d  65 6d 6f 72 79 20 74 6f  |enough memory to|
00025000  20 70 72 6f 63 65 73 73  20 69 6d 61 67 65 22 0d  | process image".|
00025010  e8 30 05 cd 0d e8 3a 05  cc 0d e8 44 13 e7 77 6f  |.0....:....D..wo|
00025020  72 6b 73 70 61 63 65 25  3c 30 20 8c 0d e8 4e 0b  |rkspace%<0 ...N.|
00025030  de 20 42 25 20 41 25 0d  e8 58 05 cc 0d e8 62 57  |. B% A%..X....bW|
00025040  42 25 3d 77 6f 72 6b 73  70 61 63 65 25 3a 77 6f  |B%=workspace%:wo|
00025050  72 6b 73 70 61 63 65 25  2b 3d 41 25 2b 33 80 ac  |rkspace%+=A%+3..|
00025060  33 3a e7 77 6f 72 6b 73  70 61 63 65 25 3e 77 6f  |3:.workspace%>wo|
00025070  72 6b 6c 69 6d 69 74 25  20 85 34 32 2c 22 4e 6f  |rklimit% .42,"No|
00025080  74 20 65 6e 6f 75 67 68  20 77 6f 72 6b 73 70 61  |t enough workspa|
00025090  63 65 22 0d e8 6c 05 cd  0d e8 76 05 cd 0d e8 80  |ce"..l....v.....|
000250a0  07 3d 42 25 0d e8 8a 12  dd 20 a4 64 69 6d 6a 70  |.=B%..... .dimjp|
000250b0  28 f8 20 41 25 29 0d e8  94 08 ea 20 42 25 0d e8  |(. A%)..... B%..|
000250c0  9e 0c e7 66 6c 65 78 25  20 8c 0d e8 a8 31 42 25  |...flex% ....1B%|
000250d0  3d 6e 65 78 74 6c 6f 63  61 74 69 6f 6e 25 3a 41  |=nextlocation%:A|
000250e0  25 3d 41 25 2b 33 80 ac  33 3a 6e 65 78 74 6c 6f  |%=A%+3..3:nextlo|
000250f0  63 61 74 69 6f 6e 25 2b  3d 41 25 0d e8 b2 2a c8  |cation%+=A%...*.|
00025100  99 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  |."Wimp_SlotSize"|
00025110  2c 2d 31 2c 2d 31 20 b8  20 63 75 72 72 65 6e 74  |,-1,-1 . current|
00025120  73 6c 6f 74 25 0d e8 bc  27 e7 63 75 72 72 65 6e  |slot%...'.curren|
00025130  74 73 6c 6f 74 25 2b 26  38 30 30 30 3c 6e 65 78  |tslot%+&8000<nex|
00025140  74 6c 6f 63 61 74 69 6f  6e 25 20 8c 0d e8 c6 3c  |tlocation% ....<|
00025150  c8 99 20 22 57 69 6d 70  5f 53 6c 6f 74 53 69 7a  |.. "Wimp_SlotSiz|
00025160  65 22 2c 6e 65 78 74 6c  6f 63 61 74 69 6f 6e 25  |e",nextlocation%|
00025170  2d 26 38 30 30 30 2c 2d  31 20 b8 20 63 75 72 72  |-&8000,-1 . curr|
00025180  65 6e 74 73 6c 6f 74 25  0d e8 d0 3e e7 63 75 72  |entslot%...>.cur|
00025190  72 65 6e 74 73 6c 6f 74  25 2b 26 38 30 30 30 3c  |rentslot%+&8000<|
000251a0  6e 65 78 74 6c 6f 63 61  74 69 6f 6e 25 20 41 25  |nextlocation% A%|
000251b0  3d 63 75 72 72 65 6e 74  73 6c 6f 74 25 2b 26 38  |=currentslot%+&8|
000251c0  30 30 30 2d 42 25 0d e8  da 05 cd 0d e8 e4 05 cc  |000-B%..........|
000251d0  0d e8 ee 13 e7 77 6f 72  6b 73 70 61 63 65 25 3c  |.....workspace%<|
000251e0  30 20 8c 0d e8 f8 0b de  20 42 25 20 41 25 0d e9  |0 ...... B% A%..|
000251f0  02 05 cc 0d e9 0c 57 42  25 3d 77 6f 72 6b 73 70  |......WB%=worksp|
00025200  61 63 65 25 3a 77 6f 72  6b 73 70 61 63 65 25 2b  |ace%:workspace%+|
00025210  3d 41 25 2b 33 80 ac 33  3a e7 77 6f 72 6b 73 70  |=A%+3..3:.worksp|
00025220  61 63 65 25 3e 77 6f 72  6b 6c 69 6d 69 74 25 20  |ace%>worklimit% |
00025230  85 34 32 2c 22 4e 6f 74  20 65 6e 6f 75 67 68 20  |.42,"Not enough |
00025240  77 6f 72 6b 73 70 61 63  65 22 0d e9 16 05 cd 0d  |workspace"......|
00025250  e9 20 05 cd 0d e9 2a 07  3d 42 25 0d e9 3e 10 dd  |. ....*.=B%..>..|
00025260  20 a4 57 3d a4 57 31 28  63 25 29 0d e9 48 32 dd  | .W=.W1(c%)..H2.|
00025270  20 a4 57 31 28 63 25 29  3d 9a 23 63 25 20 84 20  | .W1(c%)=.#c% . |
00025280  9a 23 63 25 3c 3c 38 20  84 20 9a 23 63 25 3c 3c  |.#c%<<8 . .#c%<<|
00025290  31 36 20 84 20 9a 23 63  25 3c 3c 32 34 0d e9 5c  |16 . .#c%<<24..\|
000252a0  18 dd 20 a4 48 57 3d 9a  23 63 25 20 84 20 9a 23  |.. .HW=.#c% . .#|
000252b0  63 25 3c 3c 38 0d e9 70  1a dd 20 a4 62 65 48 57  |c%<<8..p.. .beHW|
000252c0  3d 9a 23 63 25 3c 3c 38  20 84 20 9a 23 63 25 0d  |=.#c%<<8 . .#c%.|
000252d0  e9 84 2f dd 20 a4 62 65  57 3d 9a 23 63 25 3c 3c  |../. .beW=.#c%<<|
000252e0  32 34 20 84 20 9a 23 63  25 3c 3c 31 36 20 84 20  |24 . .#c%<<16 . |
000252f0  9a 23 63 25 3c 3c 38 20  84 20 9a 23 63 25 0d e9  |.#c%<<8 . .#c%..|
00025300  98 0f dd 20 a4 74 69 66  66 28 54 25 29 0d e9 a2  |... .tiff(T%)...|
00025310  0b c8 8e 20 54 25 20 ca  0d e9 ac 0f c9 20 31 2c  |... T% ...... 1,|
00025320  37 3a 3d 9a 23 63 25 0d  e9 b6 2a c9 20 32 3a ea  |7:=.#c%...*. 2:.|
00025330  73 24 2c 74 24 3a f5 73  24 2b 3d 74 24 3a 74 24  |s$,t$:.s$+=t$:t$|
00025340  3d bd 9a 23 63 25 3a fd  74 24 3d bd 30 3a 3d 73  |=..#c%:.t$=.0:=s|
00025350  24 0d e9 c0 34 c9 20 33  3a e7 62 69 67 65 6e 64  |$...4. 3:.bigend|
00025360  69 61 6e 20 8c 3d 9a 23  63 25 3c 3c 38 20 84 20  |ian .=.#c%<<8 . |
00025370  9a 23 63 25 20 8b 3d 9a  23 63 25 20 84 20 9a 23  |.#c% .=.#c% . .#|
00025380  63 25 3c 3c 38 0d e9 ca  25 c9 20 34 2c 39 3a e7  |c%<<8...%. 4,9:.|
00025390  62 69 67 65 6e 64 69 61  6e 20 8c 3d a4 62 65 57  |bigendian .=.beW|
000253a0  20 8b 3d a4 57 31 28 63  25 29 0d e9 d4 17 c9 20  | .=.W1(c%)..... |
000253b0  36 3a 3d 28 9a 23 63 25  3c 3c 32 34 29 3e 3e 32  |6:=(.#c%<<24)>>2|
000253c0  34 0d e9 de 1b c9 20 38  3a 3d 28 a4 74 69 66 66  |4..... 8:=(.tiff|
000253d0  28 33 29 3c 3c 31 36 29  3e 3e 31 36 0d e9 e8 05  |(3)<<16)>>16....|
000253e0  cb 0d e9 f2 1e 85 20 34  32 2c 22 53 69 6c 6c 79  |...... 42,"Silly|
000253f0  20 54 49 46 46 20 74 61  67 3a 22 2b c3 54 25 0d  | TIFF tag:"+.T%.|
00025400  e9 fc 10 dd 20 f2 6e 65  78 74 73 74 72 69 70 0d  |.... .nextstrip.|
00025410  ea 06 18 72 6f 77 73 74  6f 67 6f 25 3d 73 74 72  |...rowstogo%=str|
00025420  69 70 72 6f 77 73 25 0d  ea 10 22 73 74 72 69 70  |iprows%..."strip|
00025430  70 74 72 2b 3d 31 3a cf  23 63 25 3d 73 74 25 28  |ptr+=1:.#c%=st%(|
00025440  73 74 72 69 70 70 74 72  29 0d ea 1a 14 e7 63 6f  |stripptr).....co|
00025450  6d 70 72 65 73 73 69 6f  6e 3d 35 20 8c 0d ea 24  |mpression=5 ...$|
00025460  46 21 66 69 72 73 74 63  6f 64 65 3d 30 3a 21 6f  |F!firstcode=0:!o|
00025470  6c 64 63 6f 64 65 3d 30  3a 21 63 6f 64 65 73 69  |ldcode=0:!codesi|
00025480  7a 65 3d 73 65 74 63 6f  64 65 73 25 2b 31 3a 21  |ze=setcodes%+1:!|
00025490  73 74 61 63 6b 3d 73 74  6b 25 3a 21 73 70 3d 73  |stack=stk%:!sp=s|
000254a0  74 6b 25 0d ea 2e 48 21  6d 61 78 63 6f 64 65 3d  |tk%...H!maxcode=|
000254b0  63 6c 65 61 72 63 6f 64  65 25 2b 32 3a 21 6d 61  |clearcode%+2:!ma|
000254c0  78 63 6f 64 65 73 69 7a  65 3d 32 2a 63 6c 65 61  |xcodesize=2*clea|
000254d0  72 63 6f 64 65 25 3a 21  63 75 72 62 69 74 3d 30  |rcode%:!curbit=0|
000254e0  3a 21 6c 61 73 74 62 69  74 3d 30 0d ea 38 05 cd  |:!lastbit=0..8..|
000254f0  0d ea 42 28 e7 63 6f 6d  70 72 65 73 73 69 6f 6e  |..B(.compression|
00025500  3d 35 20 84 20 63 6f 6d  70 72 65 73 73 69 6f 6e  |=5 . compression|
00025510  3d 33 32 37 37 33 20 8c  0d ea 4c 2e 21 69 6e 63  |=32773 ...L.!inc|
00025520  61 63 68 65 70 74 72 3d  64 61 74 61 63 61 63 68  |acheptr=datacach|
00025530  65 25 3a 21 6e 75 6d 6c  65 66 74 74 6f 67 6f 3d  |e%:!numlefttogo=|
00025540  63 61 63 68 65 25 0d ea  56 1f c8 99 31 32 2c 34  |cache%..V...12,4|
00025550  2c 63 25 2c 64 61 74 61  63 61 63 68 65 25 2c 63  |,c%,datacache%,c|
00025560  61 63 68 65 25 0d ea 60  05 cd 0d ea 6a 05 e1 0d  |ache%..`....j...|
00025570  ea 74 28 dd 20 f2 77 61  74 66 6f 72 64 28 77 74  |.t(. .watford(wt|
00025580  73 78 25 2c f8 20 72 65  70 25 2c f8 20 77 74 25  |sx%,. rep%,. wt%|
00025590  2c 58 25 2c 63 25 29 0d  ea 7e 20 d6 72 6c 65 78  |,X%,c%)..~ .rlex|
000255a0  70 61 6e 64 25 2c 77 74  73 78 25 2c 72 65 70 25  |pand%,wtsx%,rep%|
000255b0  2c 77 74 25 2c 58 25 0d  ea 88 18 f5 20 43 25 3d  |,wt%,X%..... C%=|
000255c0  9a 23 63 25 3a c8 8e 20  43 25 3e 3e 36 20 ca 0d  |.#c%:.. C%>>6 ..|
000255d0  ea 92 1b c9 20 30 3a 3f  58 25 3d 43 25 3a 58 25  |.... 0:?X%=C%:X%|
000255e0  2b 3d 31 3a 77 74 25 3d  43 25 0d ea 9c 36 c9 20  |+=1:wt%=C%...6. |
000255f0  31 3a 77 74 25 2d 3d 31  3a 72 65 70 25 3d 43 25  |1:wt%-=1:rep%=C%|
00025600  80 36 33 3a d6 72 6c 65  78 70 61 6e 64 25 2c 77  |.63:.rlexpand%,w|
00025610  74 73 78 25 2c 72 65 70  25 2c 77 74 25 2c 58 25  |tsx%,rep%,wt%,X%|
00025620  0d ea a6 2f c9 20 32 3a  72 65 70 25 3d 43 25 80  |.../. 2:rep%=C%.|
00025630  36 33 3a d6 72 6c 65 78  70 61 6e 64 25 2c 77 74  |63:.rlexpand%,wt|
00025640  73 78 25 2c 72 65 70 25  2c 77 74 25 2c 58 25 0d  |sx%,rep%,wt%,X%.|
00025650  ea b0 36 c9 20 33 3a 77  74 25 2b 3d 31 3a 72 65  |..6. 3:wt%+=1:re|
00025660  70 25 3d 43 25 80 36 33  3a d6 72 6c 65 78 70 61  |p%=C%.63:.rlexpa|
00025670  6e 64 25 2c 77 74 73 78  25 2c 72 65 70 25 2c 77  |nd%,wtsx%,rep%,w|
00025680  74 25 2c 58 25 0d ea ba  05 cb 0d ea c4 0d fd 58  |t%,X%..........X|
00025690  25 3d 77 74 73 78 25 0d  ea ce 05 e1 0d ea d8 2a  |%=wtsx%........*|
000256a0  dd 20 f2 77 61 74 66 6f  72 64 63 61 63 68 65 28  |. .watfordcache(|
000256b0  77 74 73 78 25 2c f8 20  72 65 70 25 2c f8 20 77  |wtsx%,. rep%,. w|
000256c0  74 25 2c 58 25 29 0d ea  e2 20 d6 72 6c 65 78 70  |t%,X%)... .rlexp|
000256d0  61 6e 64 25 2c 77 74 73  78 25 2c 72 65 70 25 2c  |and%,wtsx%,rep%,|
000256e0  77 74 25 2c 58 25 0d ea  ec 23 f5 20 43 25 3d ba  |wt%,X%...#. C%=.|
000256f0  62 79 74 65 66 72 6f 6d  63 61 63 68 65 25 3a c8  |bytefromcache%:.|
00025700  8e 20 43 25 3e 3e 36 20  ca 0d ea f6 1b c9 20 30  |. C%>>6 ...... 0|
00025710  3a 3f 58 25 3d 43 25 3a  58 25 2b 3d 31 3a 77 74  |:?X%=C%:X%+=1:wt|
00025720  25 3d 43 25 0d eb 00 36  c9 20 31 3a 77 74 25 2d  |%=C%...6. 1:wt%-|
00025730  3d 31 3a 72 65 70 25 3d  43 25 80 36 33 3a d6 72  |=1:rep%=C%.63:.r|
00025740  6c 65 78 70 61 6e 64 25  2c 77 74 73 78 25 2c 72  |lexpand%,wtsx%,r|
00025750  65 70 25 2c 77 74 25 2c  58 25 0d eb 0a 2f c9 20  |ep%,wt%,X%.../. |
00025760  32 3a 72 65 70 25 3d 43  25 80 36 33 3a d6 72 6c  |2:rep%=C%.63:.rl|
00025770  65 78 70 61 6e 64 25 2c  77 74 73 78 25 2c 72 65  |expand%,wtsx%,re|
00025780  70 25 2c 77 74 25 2c 58  25 0d eb 14 36 c9 20 33  |p%,wt%,X%...6. 3|
00025790  3a 77 74 25 2b 3d 31 3a  72 65 70 25 3d 43 25 80  |:wt%+=1:rep%=C%.|
000257a0  36 33 3a d6 72 6c 65 78  70 61 6e 64 25 2c 77 74  |63:.rlexpand%,wt|
000257b0  73 78 25 2c 72 65 70 25  2c 77 74 25 2c 58 25 0d  |sx%,rep%,wt%,X%.|
000257c0  eb 1e 05 cb 0d eb 28 0d  fd 58 25 3d 77 74 73 78  |......(..X%=wtsx|
000257d0  25 0d eb 32 05 e1 0d eb  3c 18 dd 20 f2 72 65 64  |%..2....<.. .red|
000257e0  75 63 65 28 f8 20 41 25  2c f8 20 42 25 29 0d eb  |uce(. A%,. B%)..|
000257f0  46 17 ea 20 43 25 2c 44  25 3a 43 25 3d 41 25 3a  |F.. C%,D%:C%=A%:|
00025800  44 25 3d 42 25 0d eb 50  15 f5 20 e7 43 25 3c 44  |D%=B%..P.. .C%<D|
00025810  25 20 c8 94 20 43 25 2c  44 25 0d eb 5a 0c 43 25  |% .. C%,D%..Z.C%|
00025820  3d 43 25 83 44 25 0d eb  64 09 fd 43 25 3d 30 0d  |=C%.D%..d..C%=0.|
00025830  eb 6e 15 41 25 3d 41 25  81 44 25 3a 42 25 3d 42  |.n.A%=A%.D%:B%=B|
00025840  25 81 44 25 0d eb 78 05  e1 0d eb 82 19 dd 20 f2  |%.D%..x....... .|
00025850  72 65 61 64 70 69 78 65  6c 72 6f 77 28 7a 25 28  |readpixelrow(z%(|
00025860  29 29 0d eb 8c 0c e7 72  6f 77 73 25 20 8c 0d eb  |)).....rows% ...|
00025870  96 16 72 6f 77 73 25 2d  3d 31 3a e7 73 78 25 3d  |..rows%-=1:.sx%=|
00025880  78 25 20 8c 0d eb a0 15  57 25 3d a0 28 72 24 2b  |x% .....W%=.(r$+|
00025890  22 28 7a 25 28 29 29 22  29 0d eb aa 05 cc 0d eb  |"(z%())").......|
000258a0  b4 40 57 25 3d a0 28 72  24 2b 22 28 78 70 25 28  |.@W%=.(r$+"(xp%(|
000258b0  29 29 22 29 3a d6 78 73  61 6d 70 6c 65 25 2c 78  |))"):.xsample%,x|
000258c0  6d 75 6c 25 2c 78 64 69  76 25 2c 7a 25 28 31 2c  |mul%,xdiv%,z%(1,|
000258d0  30 29 2c 78 70 25 28 31  2c 30 29 2c 78 25 0d eb  |0),xp%(1,0),x%..|
000258e0  be 05 cd 0d eb c8 05 cc  0d eb d2 0a 7a 25 28 29  |............z%()|
000258f0  3d 30 0d eb dc 05 cd 0d  eb e6 05 e1 0d eb f0 1a  |=0..............|
00025900  dd 20 f2 73 68 61 72 70  70 69 78 65 6c 72 6f 77  |. .sharppixelrow|
00025910  28 7a 25 28 29 29 0d eb  fa 0c e7 72 6f 77 73 25  |(z%()).....rows%|
00025920  20 8c 0d ec 04 16 72 6f  77 73 25 2d 3d 31 3a e7  | .....rows%-=1:.|
00025930  73 78 25 3d 78 25 20 8c  0d ec 0e 41 e7 73 68 61  |sx%=x% ....A.sha|
00025940  72 70 65 6e 25 20 f2 73  68 61 72 70 28 7a 25 28  |rpen% .sharp(z%(|
00025950  29 29 20 8b 57 25 3d a0  28 72 24 2b 22 28 7a 25  |)) .W%=.(r$+"(z%|
00025960  28 29 29 22 29 3a e7 65  71 75 61 6c 25 20 f2 66  |())"):.equal% .f|
00025970  69 74 32 28 7a 25 28 29  29 0d ec 18 05 cc 0d ec  |it2(z%()).......|
00025980  22 44 e7 73 68 61 72 70  65 6e 25 20 f2 73 68 61  |"D.sharpen% .sha|
00025990  72 70 28 78 70 25 28 29  29 20 8b 57 25 3d a0 28  |rp(xp%()) .W%=.(|
000259a0  72 24 2b 22 28 78 70 25  28 29 29 22 29 3a e7 65  |r$+"(xp%())"):.e|
000259b0  71 75 61 6c 25 20 f2 66  69 74 32 28 78 70 25 28  |qual% .fit2(xp%(|
000259c0  29 29 0d ec 2c 2d d6 78  73 61 6d 70 6c 65 25 2c  |))..,-.xsample%,|
000259d0  78 6d 75 6c 25 2c 78 64  69 76 25 2c 7a 25 28 31  |xmul%,xdiv%,z%(1|
000259e0  2c 30 29 2c 78 70 25 28  31 2c 30 29 2c 78 25 0d  |,0),xp%(1,0),x%.|
000259f0  ec 36 05 cd 0d ec 40 05  cc 0d ec 4a 0a 7a 25 28  |.6....@....J.z%(|
00025a00  29 3d 30 0d ec 54 05 cd  0d ec 5e 05 e1 0d ec 68  |)=0..T....^....h|
00025a10  12 dd 20 f2 73 68 61 72  70 28 7a 25 28 29 29 0d  |.. .sharp(z%()).|
00025a20  ec 72 3d 79 72 65 61 64  25 2d 3d 31 3a e7 79 72  |.r=yread%-=1:.yr|
00025a30  65 61 64 25 20 57 25 3d  a0 28 72 24 2b 22 28 72  |ead% W%=.(r$+"(r|
00025a40  6d 25 28 29 29 22 29 3a  e7 65 71 75 61 6c 25 20  |m%())"):.equal% |
00025a50  f2 66 69 74 32 28 72 6d  25 28 29 29 0d ec 7c 3d  |.fit2(rm%())..|=|
00025a60  e3 42 25 3d 30 b8 63 6f  6c 3a 72 6d 25 28 30 2c  |.B%=0.col:rm%(0,|
00025a70  42 25 29 3d 72 6d 25 28  31 2c 42 25 29 3a 72 6d  |B%)=rm%(1,B%):rm|
00025a80  25 28 73 78 25 2b 31 2c  42 25 29 3d 72 6d 25 28  |%(sx%+1,B%)=rm%(|
00025a90  73 78 25 2c 42 25 29 3a  ed 0d ec 86 3b d6 20 73  |sx%,B%):....;. s|
00025aa0  68 61 72 70 25 2c 7a 25  28 31 2c 30 29 2c 72 6d  |harp%,z%(1,0),rm|
00025ab0  25 28 31 2c 30 29 2c 72  6d 31 25 28 31 2c 30 29  |%(1,0),rm1%(1,0)|
00025ac0  2c 72 6d 32 25 28 31 2c  30 29 2c 74 6f 74 76 61  |,rm2%(1,0),totva|
00025ad0  6c 73 32 25 0d ec 90 21  c8 94 20 72 6d 32 25 28  |ls2%...!.. rm2%(|
00025ae0  29 2c 72 6d 31 25 28 29  3a 72 6d 31 25 28 29 3d  |),rm1%():rm1%()=|
00025af0  72 6d 25 28 29 0d ec 9a  05 e1 0d ec a4 1b dd 20  |rm%().......... |
00025b00  f2 73 63 61 6c 65 64 70  69 78 65 6c 72 6f 77 28  |.scaledpixelrow(|
00025b10  7a 25 28 29 29 0d ec ae  0d e7 73 79 25 3d 79 25  |z%()).....sy%=y%|
00025b20  20 8c 0d ec b8 17 f2 72  65 61 64 70 69 78 65 6c  | ......readpixel|
00025b30  72 6f 77 28 7a 25 28 29  29 0d ec c2 05 cc 0d ec  |row(z%()).......|
00025b40  cc 39 79 73 61 6d 70 25  2d 3d 31 3a e7 79 73 61  |.9ysamp%-=1:.ysa|
00025b50  6d 70 25 3d 30 20 f2 72  65 61 64 70 69 78 65 6c  |mp%=0 .readpixel|
00025b60  72 6f 77 28 78 6c 25 28  29 29 3a 79 73 61 6d 70  |row(xl%()):ysamp|
00025b70  25 3d 79 6d 75 6c 25 0d  ec d6 0e e7 79 64 69 76  |%=ymul%.....ydiv|
00025b80  25 3d 31 20 8c 0d ec e0  0e 7a 25 28 29 3d 78 6c  |%=1 .....z%()=xl|
00025b90  25 28 29 0d ec ea 05 cc  0d ec f4 14 e7 79 73 61  |%()..........ysa|
00025ba0  6d 70 25 3e 3d 79 64 69  76 25 20 8c 0d ec fe 22  |mp%>=ydiv% ...."|
00025bb0  79 73 61 6d 70 25 2d 3d  79 64 69 76 25 3a 7a 25  |ysamp%-=ydiv%:z%|
00025bc0  28 29 3d 78 6c 25 28 29  2a 79 64 69 76 25 0d ed  |()=xl%()*ydiv%..|
00025bd0  08 05 cc 0d ed 12 32 ea  59 25 3a 7a 25 28 29 3d  |......2.Y%:z%()=|
00025be0  78 6c 25 28 29 2a 79 73  61 6d 70 25 3a 59 25 3d  |xl%()*ysamp%:Y%=|
00025bf0  79 64 69 76 25 2d 79 73  61 6d 70 25 3a 79 73 61  |ydiv%-ysamp%:ysa|
00025c00  6d 70 25 3d 30 0d ed 1c  05 f5 0d ed 26 2f e7 79  |mp%=0.......&/.y|
00025c10  73 61 6d 70 25 3d 30 20  f2 72 65 61 64 70 69 78  |samp%=0 .readpix|
00025c20  65 6c 72 6f 77 28 78 6c  25 28 29 29 3a 79 73 61  |elrow(xl%()):ysa|
00025c30  6d 70 25 3d 79 6d 75 6c  25 0d ed 30 10 e7 79 73  |mp%=ymul%..0..ys|
00025c40  61 6d 70 25 3e 59 25 20  8c 0d ed 3a 34 79 73 61  |amp%>Y% ...:4ysa|
00025c50  6d 70 25 2d 3d 59 25 3a  78 6c 32 25 28 29 3d 78  |mp%-=Y%:xl2%()=x|
00025c60  6c 25 28 29 2a 59 25 3a  7a 25 28 29 3d 7a 25 28  |l%()*Y%:z%()=z%(|
00025c70  29 2b 78 6c 32 25 28 29  3a 59 25 3d 30 0d ed 44  |)+xl2%():Y%=0..D|
00025c80  05 cc 0d ed 4e 3c 59 25  2d 3d 79 73 61 6d 70 25  |....N<Y%-=ysamp%|
00025c90  3a 78 6c 32 25 28 29 3d  78 6c 25 28 29 2a 79 73  |:xl2%()=xl%()*ys|
00025ca0  61 6d 70 25 3a 7a 25 28  29 3d 7a 25 28 29 2b 78  |amp%:z%()=z%()+x|
00025cb0  6c 32 25 28 29 3a 79 73  61 6d 70 25 3d 30 0d ed  |l2%():ysamp%=0..|
00025cc0  58 05 cd 0d ed 62 0a fd  20 59 25 3d 30 0d ed 6c  |X....b.. Y%=0..l|
00025cd0  05 cd 0d ed 76 0d 79 73  61 6d 70 25 2b 3d 31 0d  |....v.ysamp%+=1.|
00025ce0  ed 80 05 cd 0d ed 8a 05  cd 0d ed 94 05 e1 0d ed  |................|
00025cf0  9e 10 dd 20 f2 66 69 74  28 7a 25 28 29 29 0d ed  |... .fit(z%())..|
00025d00  a8 24 d6 68 69 73 74 65  71 75 61 6c 25 2c 7a 25  |.$.histequal%,z%|
00025d10  28 31 2c 30 29 2c 6e 65  77 25 28 30 2c 30 29 2c  |(1,0),new%(0,0),|
00025d20  78 25 0d ed b2 05 e1 0d  ed bc 11 dd 20 f2 66 69  |x%.......... .fi|
00025d30  74 32 28 7a 25 28 29 29  0d ed c6 25 d6 68 69 73  |t2(z%())...%.his|
00025d40  74 65 71 75 61 6c 25 2c  7a 25 28 31 2c 30 29 2c  |tequal%,z%(1,0),|
00025d50  6e 65 77 25 28 30 2c 30  29 2c 73 78 25 0d ed d0  |new%(0,0),sx%...|
00025d60  05 e1 0d ed da 1d dd 20  f2 61 64 6a 75 73 74 70  |....... .adjustp|
00025d70  61 6c 65 74 74 65 28 6d  75 6c 2c 73 75 62 29 0d  |alette(mul,sub).|
00025d80  ed e4 14 e7 6d 75 6c 3d  31 20 80 20 73 75 62 3d  |....mul=1 . sub=|
00025d90  30 20 e1 0d ed ee 15 e3  43 25 3d 30 b8 63 6f 6c  |0 ......C%=0.col|
00025da0  6f 75 72 69 6e 64 65 78  0d ed f8 51 72 25 28 43  |ourindex...Qr%(C|
00025db0  25 29 3d 28 72 25 28 43  25 29 2d 73 75 62 29 2a  |%)=(r%(C%)-sub)*|
00025dc0  6d 75 6c 2b 31 3a 67 25  28 43 25 29 3d 28 67 25  |mul+1:g%(C%)=(g%|
00025dd0  28 43 25 29 2d 73 75 62  29 2a 6d 75 6c 2b 31 3a  |(C%)-sub)*mul+1:|
00025de0  62 25 28 43 25 29 3d 28  62 25 28 43 25 29 2d 73  |b%(C%)=(b%(C%)-s|
00025df0  75 62 29 2a 6d 75 6c 2b  31 0d ee 02 05 ed 0d ee  |ub)*mul+1.......|
00025e00  0c 0a e7 68 61 6d 20 8c  0d ee 16 32 e3 43 25 3d  |...ham ....2.C%=|
00025e10  30 b8 31 35 2a 34 88 34  3a 6c 74 61 62 6c 65 21  |0.15*4.4:ltable!|
00025e20  43 25 3d 28 6c 74 61 62  6c 65 21 43 25 2d 73 75  |C%=(ltable!C%-su|
00025e30  62 29 2a 6d 75 6c 2b 31  3a ed 0d ee 20 05 cd 0d  |b)*mul+1:... ...|
00025e40  ee 2a 10 e7 69 6e 70 75  74 3e 34 30 30 20 8c 0d  |.*..input>400 ..|
00025e50  ee 34 15 e3 43 25 3d 30  b8 63 6f 6c 6f 75 72 69  |.4..C%=0.colouri|
00025e60  6e 64 65 78 0d ee 3e 43  72 70 61 6c 25 28 43 25  |ndex..>Crpal%(C%|
00025e70  29 3d 28 72 70 61 6c 25  28 43 25 29 2d 73 75 62  |)=(rpal%(C%)-sub|
00025e80  29 2a 6d 75 6c 2b 31 3a  67 70 61 6c 25 28 43 25  |)*mul+1:gpal%(C%|
00025e90  29 3d 28 67 70 61 6c 25  28 43 25 29 2d 73 75 62  |)=(gpal%(C%)-sub|
00025ea0  29 2a 6d 75 6c 2b 31 0d  ee 48 45 62 70 61 6c 25  |)*mul+1..HEbpal%|
00025eb0  28 43 25 29 3d 28 62 70  61 6c 25 28 43 25 29 2d  |(C%)=(bpal%(C%)-|
00025ec0  73 75 62 29 2a 6d 75 6c  2b 31 3a 74 61 62 6c 65  |sub)*mul+1:table|
00025ed0  25 28 43 25 29 3d 28 74  61 62 6c 65 25 28 43 25  |%(C%)=(table%(C%|
00025ee0  29 2d 73 75 62 29 2a 6d  75 6c 2b 31 0d ee 52 05  |)-sub)*mul+1..R.|
00025ef0  ed 0d ee 5c 05 cd 0d ee  66 05 e1 0d ee 70 14 dd  |...\....f....p..|
00025f00  20 f2 63 61 63 68 65 73  69 7a 65 28 41 25 29 0d  | .cachesize(A%).|
00025f10  ee 7a 29 c8 99 26 32 30  30 32 33 2c 22 43 68 61  |.z)..&20023,"Cha|
00025f20  6e 67 65 46 53 49 24 43  61 63 68 65 22 2c 41 25  |ngeFSI$Cache",A%|
00025f30  2c 2d 31 20 b8 2c 2c 5a  0d ee 84 0b e7 5a 3c 3e  |,-1 .,,Z.....Z<>|
00025f40  30 20 8c 0d ee 8e 39 c8  99 33 35 2c 22 43 68 61  |0 ....9..35,"Cha|
00025f50  6e 67 65 46 53 49 24 43  61 63 68 65 22 2c 41 25  |ngeFSI$Cache",A%|
00025f60  2c 32 30 20 b8 2c 2c 5a  3a 41 25 3f 5a 3d 31 33  |,20 .,,Z:A%?Z=13|
00025f70  3a 63 61 63 68 65 25 3d  bb 24 41 25 0d ee 98 2b  |:cache%=.$A%...+|
00025f80  e7 a7 24 41 25 2c 22 4b  22 29 84 a7 24 41 25 2c  |..$A%,"K")..$A%,|
00025f90  22 6b 22 29 20 63 61 63  68 65 25 3d 63 61 63 68  |"k") cache%=cach|
00025fa0  65 25 2a 31 30 32 34 0d  ee a2 05 cc 0d ee ac 13  |e%*1024.........|
00025fb0  63 61 63 68 65 25 3d 31  32 38 2a 31 30 32 34 0d  |cache%=128*1024.|
00025fc0  ee b6 05 cd 0d ee c0 05  e1 0d ee ca 0d dd 20 f2  |.............. .|
00025fd0  72 65 66 69 6c 6c 0d ee  d4 1c e7 73 74 72 69 70  |refill.....strip|
00025fe0  72 6f 77 73 25 3e 30 20  f2 6e 65 78 74 73 74 72  |rows%>0 .nextstr|
00025ff0  69 70 0d ee de 45 c8 99  31 32 2c 34 2c 63 25 2c  |ip...E..12,4,c%,|
00026000  64 61 74 61 63 61 63 68  65 25 2c 63 61 63 68 65  |datacache%,cache|
00026010  25 3a 72 6f 77 73 74 6f  67 6f 25 3d 63 61 63 68  |%:rowstogo%=cach|
00026020  65 72 6f 77 73 25 3a 62  75 66 66 25 3d 64 61 74  |erows%:buff%=dat|
00026030  61 63 61 63 68 65 25 0d  ee e8 4c e7 69 6e 70 75  |acache%...L.inpu|
00026040  74 3d 32 34 84 69 6e 70  75 74 3d 34 38 20 e7 72  |t=24.input=48 .r|
00026050  62 6f 25 3e 3d 30 20 72  62 25 3d 62 75 66 66 25  |bo%>=0 rb%=buff%|
00026060  2b 72 62 6f 25 3a 67 62  25 3d 62 75 66 66 25 2b  |+rbo%:gb%=buff%+|
00026070  67 62 6f 25 3a 62 62 25  3d 62 75 66 66 25 2b 62  |gbo%:bb%=buff%+b|
00026080  62 6f 25 0d ee f2 05 e1  0d ee fc 10 dd 20 f2 72  |bo%.......... .r|
00026090  65 66 69 6c 6c 70 63 64  0d ef 06 15 e7 70 63 64  |efillpcd.....pcd|
000260a0  62 6c 6b 25 21 34 3e 3d  73 79 25 20 e1 0d ef 10  |blk%!4>=sy% ....|
000260b0  23 e7 70 63 64 62 6c 6b  25 21 31 32 3e 3d 73 79  |#.pcdblk%!12>=sy|
000260c0  25 20 70 63 64 62 6c 6b  25 21 31 32 3d 73 79 25  |% pcdblk%!12=sy%|
000260d0  0d ef 24 56 c8 99 22 50  68 6f 74 6f 43 44 5f 47  |..$V.."PhotoCD_G|
000260e0  65 74 42 6c 6f 63 6b 22  2c 70 63 64 68 25 2c 2c  |etBlock",pcdh%,,|
000260f0  70 63 64 62 6c 6b 25 2c  64 61 74 61 63 61 63 68  |pcdblk%,datacach|
00026100  65 25 2c 70 63 64 69 6e  64 65 78 25 2c 2c 2c 70  |e%,pcdindex%,,,p|
00026110  63 64 63 61 63 68 65 25  2c 70 63 64 63 61 63 68  |cdcache%,pcdcach|
00026120  65 73 69 7a 65 25 0d ef  2e 56 72 6f 77 73 74 6f  |esize%...Vrowsto|
00026130  67 6f 25 3d 63 61 63 68  65 72 6f 77 73 25 3a 62  |go%=cacherows%:b|
00026140  75 66 66 25 3d 64 61 74  61 63 61 63 68 65 25 3a  |uff%=datacache%:|
00026150  70 63 64 62 6c 6b 25 21  34 2b 3d 63 61 63 68 65  |pcdblk%!4+=cache|
00026160  72 6f 77 73 25 3a 70 63  64 62 6c 6b 25 21 31 32  |rows%:pcdblk%!12|
00026170  2b 3d 63 61 63 68 65 72  6f 77 73 25 0d ef 38 30  |+=cacherows%..80|
00026180  72 62 25 3d 62 75 66 66  25 2b 72 62 6f 25 3a 67  |rb%=buff%+rbo%:g|
00026190  62 25 3d 62 75 66 66 25  2b 67 62 6f 25 3a 62 62  |b%=buff%+gbo%:bb|
000261a0  25 3d 62 75 66 66 25 2b  62 62 6f 25 0d ef 42 05  |%=buff%+bbo%..B.|
000261b0  e1 0d ef 56 0e dd 20 a4  38 28 7a 25 28 29 29 0d  |...V.. .8(z%()).|
000261c0  ef 60 3d d6 6d 61 70 70  69 78 25 2c 7a 25 28 31  |.`=.mappix%,z%(1|
000261d0  2c 30 29 2c 72 25 28 30  29 2c 67 25 28 30 29 2c  |,0),r%(0),g%(0),|
000261e0  62 25 28 30 29 2c 62 75  66 66 25 3a 62 75 66 66  |b%(0),buff%:buff|
000261f0  25 2b 3d 72 6f 77 62 79  74 65 73 25 0d ef 6a 25  |%+=rowbytes%..j%|
00026200  72 6f 77 73 74 6f 67 6f  25 2d 3d 31 3a e7 72 6f  |rowstogo%-=1:.ro|
00026210  77 73 74 6f 67 6f 25 3d  30 20 f2 72 65 66 69 6c  |wstogo%=0 .refil|
00026220  6c 0d ef 74 06 3d b9 0d  ef 88 0f dd 20 a4 31 36  |l..t.=...... .16|
00026230  28 7a 25 28 29 29 0d ef  92 44 d6 6d 61 70 70 69  |(z%())...D.mappi|
00026240  78 25 2c 7a 25 28 31 2c  30 29 2c 72 70 61 6c 25  |x%,z%(1,0),rpal%|
00026250  28 30 29 2c 67 70 61 6c  25 28 30 29 2c 72 25 28  |(0),gpal%(0),r%(|
00026260  30 29 2c 67 25 28 30 29  2c 62 25 28 30 29 2c 62  |0),g%(0),b%(0),b|
00026270  75 66 66 25 2c 62 75 66  66 25 0d ef 9c 36 62 75  |uff%,buff%...6bu|
00026280  66 66 25 2b 3d 72 6f 77  62 79 74 65 73 25 3a 72  |ff%+=rowbytes%:r|
00026290  6f 77 73 74 6f 67 6f 25  2d 3d 31 3a e7 72 6f 77  |owstogo%-=1:.row|
000262a0  73 74 6f 67 6f 25 3d 30  20 f2 72 65 66 69 6c 6c  |stogo%=0 .refill|
000262b0  0d ef a6 06 3d b9 0d ef  ba 0f dd 20 a4 32 34 28  |....=...... .24(|
000262c0  7a 25 28 29 29 0d ef c4  32 d6 6d 61 70 70 69 78  |z%())...2.mappix|
000262d0  25 2c 7a 25 28 31 2c 30  29 2c 72 25 28 30 29 2c  |%,z%(1,0),r%(0),|
000262e0  67 25 28 30 29 2c 62 25  28 30 29 2c 72 62 25 2c  |g%(0),b%(0),rb%,|
000262f0  67 62 25 2c 62 62 25 0d  ef ce 30 72 62 25 2b 3d  |gb%,bb%...0rb%+=|
00026300  72 6f 77 62 79 74 65 73  25 3a 67 62 25 2b 3d 72  |rowbytes%:gb%+=r|
00026310  6f 77 62 79 74 65 73 25  3a 62 62 25 2b 3d 72 6f  |owbytes%:bb%+=ro|
00026320  77 62 79 74 65 73 25 0d  ef d8 25 72 6f 77 73 74  |wbytes%...%rowst|
00026330  6f 67 6f 25 2d 3d 31 3a  e7 72 6f 77 73 74 6f 67  |ogo%-=1:.rowstog|
00026340  6f 25 3d 30 20 f2 72 65  66 69 6c 6c 0d ef e2 06  |o%=0 .refill....|
00026350  3d b9 0d ef f6 10 dd 20  a4 33 30 30 28 7a 25 28  |=...... .300(z%(|
00026360  29 29 0d f0 00 5b c8 99  31 32 2c 34 2c 63 63 25  |))...[..12,4,cc%|
00026370  2c 70 62 75 66 66 25 2c  73 78 25 3a d6 6d 61 70  |,pbuff%,sx%:.map|
00026380  70 69 78 25 2c 7a 25 28  31 2c 30 29 2c 72 70 61  |pix%,z%(1,0),rpa|
00026390  6c 25 28 30 29 2c 67 70  61 6c 25 28 30 29 2c 72  |l%(0),gpal%(0),r|
000263a0  25 28 30 29 2c 67 25 28  30 29 2c 62 25 28 30 29  |%(0),g%(0),b%(0)|
000263b0  2c 70 62 75 66 66 25 2c  62 75 66 66 25 0d f0 0a  |,pbuff%,buff%...|
000263c0  36 62 75 66 66 25 2b 3d  72 6f 77 62 79 74 65 73  |6buff%+=rowbytes|
000263d0  25 3a 72 6f 77 73 74 6f  67 6f 25 2d 3d 31 3a e7  |%:rowstogo%-=1:.|
000263e0  72 6f 77 73 74 6f 67 6f  25 3d 30 20 f2 72 65 66  |rowstogo%=0 .ref|
000263f0  69 6c 6c 0d f0 14 06 3d  b9 0d f0 28 10 dd 20 a4  |ill....=...(.. .|
00026400  34 30 30 28 7a 25 28 29  29 0d f0 32 29 d6 72 65  |400(z%())..2).re|
00026410  61 64 6c 69 6e 65 25 2c  70 6c 62 79 74 65 73 25  |adline%,plbytes%|
00026420  2c 72 65 70 25 2c 70 69  78 25 2c 70 6c 62 75 66  |,rep%,pix%,plbuf|
00026430  66 25 0d f0 3c 32 d6 6d  61 70 70 69 78 25 2c 7a  |f%..<2.mappix%,z|
00026440  25 28 31 2c 30 29 2c 72  25 28 30 29 2c 67 25 28  |%(1,0),r%(0),g%(|
00026450  30 29 2c 62 25 28 30 29  2c 72 62 25 2c 67 62 25  |0),b%(0),rb%,gb%|
00026460  2c 62 62 25 0d f0 46 06  3d b9 0d f0 5a 10 dd 20  |,bb%..F.=...Z.. |
00026470  a4 35 30 30 28 7a 25 28  29 29 0d f0 64 29 d6 20  |.500(z%())..d). |
00026480  4c 5a 57 64 65 63 6f 64  65 25 2c 74 61 62 6c 65  |LZWdecode%,table|
00026490  25 28 30 29 2c 63 25 2c  70 6c 62 75 66 66 25 2c  |%(0),c%,plbuff%,|
000264a0  73 78 25 0d f0 6e 2e d6  6d 61 70 70 69 78 25 2c  |sx%..n..mappix%,|
000264b0  7a 25 28 31 2c 30 29 2c  72 25 28 30 29 2c 67 25  |z%(1,0),r%(0),g%|
000264c0  28 30 29 2c 62 25 28 30  29 2c 70 6c 62 75 66 66  |(0),b%(0),plbuff|
000264d0  25 0d f0 78 06 3d b9 0d  f0 8c 10 dd 20 a4 38 30  |%..x.=...... .80|
000264e0  30 28 7a 25 28 29 29 0d  f0 96 29 f2 77 61 74 66  |0(z%())...).watf|
000264f0  6f 72 64 63 61 63 68 65  28 77 74 73 78 25 2c 72  |ordcache(wtsx%,r|
00026500  65 70 25 2c 77 74 25 2c  70 6c 62 75 66 66 25 29  |ep%,wt%,plbuff%)|
00026510  0d f0 a0 2e d6 6d 61 70  70 69 78 25 2c 7a 25 28  |.....mappix%,z%(|
00026520  31 2c 30 29 2c 72 25 28  30 29 2c 67 25 28 30 29  |1,0),r%(0),g%(0)|
00026530  2c 62 25 28 30 29 2c 70  6c 62 75 66 66 25 0d f0  |,b%(0),plbuff%..|
00026540  aa 06 3d b9 0d f0 be 10  dd 20 a4 38 30 31 28 7a  |..=...... .801(z|
00026550  25 28 29 29 0d f0 c8 28  f2 77 61 74 66 6f 72 64  |%())...(.watford|
00026560  28 77 74 73 78 31 25 2c  72 65 70 31 25 2c 77 74  |(wtsx1%,rep1%,wt|
00026570  31 25 2c 62 75 66 66 25  2c 63 25 29 0d f0 d2 2a  |1%,buff%,c%)...*|
00026580  f2 77 61 74 66 6f 72 64  28 77 74 73 78 32 25 2c  |.watford(wtsx2%,|
00026590  72 65 70 32 25 2c 77 74  32 25 2c 77 74 73 78 31  |rep2%,wt2%,wtsx1|
000265a0  25 2c 63 63 25 29 0d f0  dc 2b f2 77 61 74 66 6f  |%,cc%)...+.watfo|
000265b0  72 64 28 77 74 73 78 33  25 2c 72 65 70 33 25 2c  |rd(wtsx3%,rep3%,|
000265c0  77 74 33 25 2c 77 74 73  78 32 25 2c 63 63 63 25  |wt3%,wtsx2%,ccc%|
000265d0  29 0d f0 e6 32 d6 6d 61  70 70 69 78 25 2c 7a 25  |)...2.mappix%,z%|
000265e0  28 31 2c 30 29 2c 72 25  28 30 29 2c 67 25 28 30  |(1,0),r%(0),g%(0|
000265f0  29 2c 62 25 28 30 29 2c  72 62 25 2c 67 62 25 2c  |),b%(0),rb%,gb%,|
00026600  62 62 25 0d f0 f0 06 3d  b9 0d f1 04 10 dd 20 a4  |bb%....=...... .|
00026610  39 30 31 28 7a 25 28 29  29 0d f1 0e 3c c8 99 31  |901(z%())...<..1|
00026620  32 2c 34 2c 63 25 2c 72  62 25 2c 73 78 25 3a c8  |2,4,c%,rb%,sx%:.|
00026630  99 31 32 2c 34 2c 63 63  25 2c 67 62 25 2c 73 78  |.12,4,cc%,gb%,sx|
00026640  25 3a c8 99 31 32 2c 34  2c 63 63 63 25 2c 62 62  |%:..12,4,ccc%,bb|
00026650  25 2c 73 78 25 0d f1 18  32 d6 6d 61 70 70 69 78  |%,sx%...2.mappix|
00026660  25 2c 7a 25 28 31 2c 30  29 2c 72 25 28 30 29 2c  |%,z%(1,0),r%(0),|
00026670  67 25 28 30 29 2c 62 25  28 30 29 2c 72 62 25 2c  |g%(0),b%(0),rb%,|
00026680  67 62 25 2c 62 62 25 0d  f1 22 06 3d b9 0d f1 36  |gb%,bb%..".=...6|
00026690  10 dd 20 a4 39 30 32 28  7a 25 28 29 29 0d f1 40  |.. .902(z%())..@|
000266a0  41 d6 75 6e 70 61 63 6b  25 2c 62 75 66 66 25 3a  |A.unpack%,buff%:|
000266b0  d6 6d 61 70 70 69 78 25  2c 7a 25 28 31 2c 30 29  |.mappix%,z%(1,0)|
000266c0  2c 72 25 28 30 29 2c 67  25 28 30 29 2c 62 25 28  |,r%(0),g%(0),b%(|
000266d0  30 29 2c 72 62 25 2c 67  62 25 2c 62 62 25 0d f1  |0),rb%,gb%,bb%..|
000266e0  4a 36 62 75 66 66 25 2b  3d 72 6f 77 62 79 74 65  |J6buff%+=rowbyte|
000266f0  73 25 3a 72 6f 77 73 74  6f 67 6f 25 2d 3d 31 3a  |s%:rowstogo%-=1:|
00026700  e7 72 6f 77 73 74 6f 67  6f 25 3d 30 20 f2 72 65  |.rowstogo%=0 .re|
00026710  66 69 6c 6c 0d f1 54 06  3d b9 0d f1 68 11 dd 20  |fill..T.=...h.. |
00026720  a4 31 30 30 30 28 7a 25  28 29 29 0d f1 72 3f 58  |.1000(z%())..r?X|
00026730  25 3d 62 75 66 66 25 3a  e7 72 65 70 25 3e 30 20  |%=buff%:.rep%>0 |
00026740  43 25 3d 3f 70 61 25 3a  d6 72 6c 65 78 70 61 6e  |C%=?pa%:.rlexpan|
00026750  64 25 2c 70 61 73 78 25  2c 72 65 70 25 2c 43 25  |d%,pasx%,rep%,C%|
00026760  2c 58 25 3a 70 61 25 2b  3d 31 0d f1 7c 38 e7 72  |,X%:pa%+=1..|8.r|
00026770  65 70 32 25 3e 30 20 43  25 3d 3f 70 61 25 3a d6  |ep2%>0 C%=?pa%:.|
00026780  72 6c 65 78 70 61 6e 64  25 2c 70 61 73 78 25 2c  |rlexpand%,pasx%,|
00026790  72 65 70 32 25 2c 43 25  2c 58 25 3a 70 61 25 2b  |rep2%,C%,X%:pa%+|
000267a0  3d 31 0d f1 86 15 f5 20  43 25 3d 9a 23 63 25 3a  |=1..... C%=.#c%:|
000267b0  e7 43 25 3d 30 20 8c 0d  f1 90 40 72 65 70 25 3d  |.C%=0 ....@rep%=|
000267c0  9a 23 63 25 3a 43 25 3d  3f 70 61 25 3a d6 72 6c  |.#c%:C%=?pa%:.rl|
000267d0  65 78 70 61 6e 64 25 2c  70 61 73 78 25 2c 72 65  |expand%,pasx%,re|
000267e0  70 25 2c 43 25 2c 58 25  3a e7 72 65 70 25 3d 30  |p%,C%,X%:.rep%=0|
000267f0  20 70 61 25 2b 3d 31 0d  f1 9a 05 cc 0d f1 a4 53  | pa%+=1........S|
00026800  72 65 70 32 25 3d 43 25  80 31 35 3a 72 65 70 25  |rep2%=C%.15:rep%|
00026810  3d 43 25 3e 3e 34 3a e7  72 65 70 25 20 43 25 3d  |=C%>>4:.rep% C%=|
00026820  3f 70 61 25 3a d6 72 6c  65 78 70 61 6e 64 25 2c  |?pa%:.rlexpand%,|
00026830  70 61 73 78 25 2c 72 65  70 25 2c 43 25 2c 58 25  |pasx%,rep%,C%,X%|
00026840  3a e7 72 65 70 25 3d 30  20 70 61 25 2b 3d 31 0d  |:.rep%=0 pa%+=1.|
00026850  f1 ae 49 e7 58 25 3c 70  61 73 78 25 20 e7 72 65  |..I.X%<pasx% .re|
00026860  70 32 25 20 43 25 3d 3f  70 61 25 3a d6 72 6c 65  |p2% C%=?pa%:.rle|
00026870  78 70 61 6e 64 25 2c 70  61 73 78 25 2c 72 65 70  |xpand%,pasx%,rep|
00026880  32 25 2c 43 25 2c 58 25  3a e7 72 65 70 32 25 3d  |2%,C%,X%:.rep2%=|
00026890  30 20 70 61 25 2b 3d 31  0d f1 b8 05 cd 0d f1 c2  |0 pa%+=1........|
000268a0  0d fd 58 25 3d 70 61 73  78 25 0d f1 cc 2c d6 6d  |..X%=pasx%...,.m|
000268b0  61 70 70 69 78 25 2c 7a  25 28 31 2c 30 29 2c 72  |appix%,z%(1,0),r|
000268c0  25 28 30 29 2c 67 25 28  30 29 2c 62 25 28 30 29  |%(0),g%(0),b%(0)|
000268d0  2c 62 75 66 66 25 0d f1  d6 06 3d b9 0d f1 ea 11  |,buff%....=.....|
000268e0  dd 20 a4 31 30 30 31 28  7a 25 28 29 29 0d f1 f4  |. .1001(z%())...|
000268f0  3f 58 25 3d 62 75 66 66  25 3a e7 72 65 70 25 3e  |?X%=buff%:.rep%>|
00026900  30 20 43 25 3d 3f 70 61  25 3a d6 72 6c 65 78 70  |0 C%=?pa%:.rlexp|
00026910  61 6e 64 25 2c 70 61 73  78 25 2c 72 65 70 25 2c  |and%,pasx%,rep%,|
00026920  43 25 2c 58 25 3a 70 61  25 2b 3d 31 0d f1 fe 42  |C%,X%:pa%+=1...B|
00026930  f5 20 72 65 70 25 3d 9a  23 63 25 3a 43 25 3d 3f  |. rep%=.#c%:C%=?|
00026940  70 61 25 3a d6 72 6c 65  78 70 61 6e 64 25 2c 70  |pa%:.rlexpand%,p|
00026950  61 73 78 25 2c 72 65 70  25 2c 43 25 2c 58 25 3a  |asx%,rep%,C%,X%:|
00026960  e7 72 65 70 25 3d 30 20  70 61 25 2b 3d 31 0d f2  |.rep%=0 pa%+=1..|
00026970  08 36 fd 58 25 3d 70 61  73 78 25 3a d6 6d 61 70  |.6.X%=pasx%:.map|
00026980  70 69 78 25 2c 7a 25 28  31 2c 30 29 2c 72 25 28  |pix%,z%(1,0),r%(|
00026990  30 29 2c 67 25 28 30 29  2c 62 25 28 30 29 2c 62  |0),g%(0),b%(0),b|
000269a0  75 66 66 25 0d f2 12 06  3d b9 0d f2 26 11 dd 20  |uff%....=...&.. |
000269b0  a4 31 31 30 30 28 7a 25  28 29 29 0d f2 30 29 d6  |.1100(z%())..0).|
000269c0  72 65 61 64 6c 69 6e 65  25 2c 70 6c 62 79 74 65  |readline%,plbyte|
000269d0  73 25 2c 72 65 70 25 2c  70 69 78 25 2c 70 6c 62  |s%,rep%,pix%,plb|
000269e0  75 66 66 25 0d f2 3a 2e  d6 6d 61 70 70 69 78 25  |uff%..:..mappix%|
000269f0  2c 7a 25 28 31 2c 30 29  2c 72 25 28 30 29 2c 67  |,z%(1,0),r%(0),g|
00026a00  25 28 30 29 2c 62 25 28  30 29 2c 70 6c 62 75 66  |%(0),b%(0),plbuf|
00026a10  66 25 0d f2 44 06 3d b9  0d f2 58 11 dd 20 a4 31  |f%..D.=...X.. .1|
00026a20  34 30 30 28 7a 25 28 29  29 0d f2 62 0c e7 76 72  |400(z%())..b..vr|
00026a30  65 70 25 20 8c 0d f2 6c  0c 76 72 65 70 25 2d 3d  |ep% ...l.vrep%-=|
00026a40  31 0d f2 76 05 cc 0d f2  80 38 47 25 3d 62 75 66  |1..v.....8G%=buf|
00026a50  66 25 3a e3 58 25 3d 31  b8 70 6c 61 6e 65 73 25  |f%:.X%=1.planes%|
00026a60  3a 47 25 2b 3d 72 6f 77  62 79 74 65 73 25 3a 46  |:G%+=rowbytes%:F|
00026a70  25 3d 47 25 2d 72 6f 77  62 79 74 65 73 25 0d f2  |%=G%-rowbytes%..|
00026a80  8a 15 f5 20 43 25 3d 9a  23 63 25 3a e7 43 25 3d  |... C%=.#c%:.C%=|
00026a90  30 20 8c 0d f2 94 13 43  25 3d 9a 23 63 25 3a e7  |0 .....C%=.#c%:.|
00026aa0  43 25 3d 30 20 8c 0d f2  9e 18 43 25 3d 9a 23 63  |C%=0 .....C%=.#c|
00026ab0  25 3a 76 72 65 70 25 3d  9a 23 63 25 2d 31 0d f2  |%:vrep%=.#c%-1..|
00026ac0  a8 05 cc 0d f2 b2 2a 44  25 3d 46 25 3a c8 99 31  |......*D%=F%:..1|
00026ad0  32 2c 34 2c 63 25 2c 46  25 2c 70 61 74 6c 65 6e  |2,4,c%,F%,patlen|
00026ae0  25 3a 46 25 2b 3d 70 61  74 6c 65 6e 25 0d f2 bc  |%:F%+=patlen%...|
00026af0  3e e7 43 25 3e 31 20 e3  4e 25 3d 32 b8 43 25 3a  |>.C%>1 .N%=2.C%:|
00026b00  e3 45 25 3d 30 b8 70 61  74 6c 65 6e 25 2d 31 3a  |.E%=0.patlen%-1:|
00026b10  46 25 3f 45 25 3d 44 25  3f 45 25 3a ed 3a 46 25  |F%?E%=D%?E%:.:F%|
00026b20  2b 3d 70 61 74 6c 65 6e  25 3a ed 0d f2 c6 05 cd  |+=patlen%:......|
00026b30  0d f2 d0 05 cc 0d f2 da  0d e7 43 25 3d 31 32 38  |..........C%=128|
00026b40  20 8c 0d f2 e4 22 43 25  3d 9a 23 63 25 3a c8 99  | ...."C%=.#c%:..|
00026b50  31 32 2c 34 2c 63 25 2c  46 25 2c 43 25 3a 46 25  |12,4,c%,F%,C%:F%|
00026b60  2b 3d 43 25 0d f2 ee 05  cc 0d f2 f8 3d 3f 46 25  |+=C%........=?F%|
00026b70  3d 28 43 25 80 26 38 30  29 3c 3e 30 3a e3 45 25  |=(C%.&80)<>0:.E%|
00026b80  3d 46 25 2b 31 b8 46 25  2b 28 43 25 80 26 37 46  |=F%+1.F%+(C%.&7F|
00026b90  29 3a 3f 45 25 3d 3f 46  25 3a ed 3a 46 25 2b 3d  |):?E%=?F%:.:F%+=|
00026ba0  43 25 80 26 37 46 0d f3  02 05 cd 0d f3 0c 0f cd  |C%.&7F..........|
00026bb0  3a fd 46 25 3e 3d 47 25  3a ed 0d f3 16 24 d6 70  |:.F%>=G%:....$.p|
00026bc0  6c 61 6e 63 6e 76 25 2c  72 6f 77 62 79 74 65 73  |lancnv%,rowbytes|
00026bd0  25 2c 62 75 66 66 25 2c  70 62 75 66 66 25 0d f3  |%,buff%,pbuff%..|
00026be0  20 05 cd 0d f3 2a 2d d6  6d 61 70 70 69 78 25 2c  | ....*-.mappix%,|
00026bf0  7a 25 28 31 2c 30 29 2c  72 25 28 30 29 2c 67 25  |z%(1,0),r%(0),g%|
00026c00  28 30 29 2c 62 25 28 30  29 2c 70 62 75 66 66 25  |(0),b%(0),pbuff%|
00026c10  0d f3 34 06 3d b9 0d f3  48 11 dd 20 a4 31 35 30  |..4.=...H.. .150|
00026c20  31 28 7a 25 28 29 29 0d  f3 52 44 d6 72 65 61 64  |1(z%())..RD.read|
00026c30  69 66 66 25 2c 72 6f 77  62 79 74 65 73 25 2c 70  |iff%,rowbytes%,p|
00026c40  6c 62 75 66 66 25 3a 72  6f 77 73 74 6f 67 6f 25  |lbuff%:rowstogo%|
00026c50  2d 3d 31 3a e7 72 6f 77  73 74 6f 67 6f 25 3d 30  |-=1:.rowstogo%=0|
00026c60  20 f2 6e 65 78 74 73 74  72 69 70 0d f3 5c 2e d6  | .nextstrip..\..|
00026c70  6d 61 70 70 69 78 25 2c  7a 25 28 31 2c 30 29 2c  |mappix%,z%(1,0),|
00026c80  72 25 28 30 29 2c 67 25  28 30 29 2c 62 25 28 30  |r%(0),g%(0),b%(0|
00026c90  29 2c 70 6c 62 75 66 66  25 0d f3 66 06 3d b9 0d  |),plbuff%..f.=..|
00026ca0  f3 7a 11 dd 20 a4 31 35  30 35 28 7a 25 28 29 29  |.z.. .1505(z%())|
00026cb0  0d f3 84 2f d6 20 4c 5a  57 64 65 63 6f 64 65 25  |.../. LZWdecode%|
00026cc0  2c 74 61 62 6c 65 25 28  30 29 2c 63 25 2c 70 6c  |,table%(0),c%,pl|
00026cd0  62 75 66 66 25 2c 72 6f  77 62 79 74 65 73 25 0d  |buff%,rowbytes%.|
00026ce0  f3 8e 28 72 6f 77 73 74  6f 67 6f 25 2d 3d 31 3a  |..(rowstogo%-=1:|
00026cf0  e7 72 6f 77 73 74 6f 67  6f 25 3d 30 20 f2 6e 65  |.rowstogo%=0 .ne|
00026d00  78 74 73 74 72 69 70 0d  f3 98 2e d6 6d 61 70 70  |xtstrip.....mapp|
00026d10  69 78 25 2c 7a 25 28 31  2c 30 29 2c 72 25 28 30  |ix%,z%(1,0),r%(0|
00026d20  29 2c 67 25 28 30 29 2c  62 25 28 30 29 2c 70 6c  |),g%(0),b%(0),pl|
00026d30  62 75 66 66 25 0d f3 a2  06 3d b9 0d f3 b6 11 dd  |buff%....=......|
00026d40  20 a4 31 35 31 35 28 7a  25 28 29 29 0d f3 c0 2f  | .1515(z%()).../|
00026d50  d6 20 4c 5a 57 64 65 63  6f 64 65 25 2c 74 61 62  |. LZWdecode%,tab|
00026d60  6c 65 25 28 30 29 2c 63  25 2c 70 6c 62 75 66 66  |le%(0),c%,plbuff|
00026d70  25 2c 72 6f 77 62 79 74  65 73 25 0d f3 ca 28 72  |%,rowbytes%...(r|
00026d80  6f 77 73 74 6f 67 6f 25  2d 3d 31 3a e7 72 6f 77  |owstogo%-=1:.row|
00026d90  73 74 6f 67 6f 25 3d 30  20 f2 6e 65 78 74 73 74  |stogo%=0 .nextst|
00026da0  72 69 70 0d f3 d4 32 d6  6d 61 70 70 69 78 25 2c  |rip...2.mappix%,|
00026db0  7a 25 28 31 2c 30 29 2c  72 25 28 30 29 2c 67 25  |z%(1,0),r%(0),g%|
00026dc0  28 30 29 2c 62 25 28 30  29 2c 72 62 25 2c 67 62  |(0),b%(0),rb%,gb|
00026dd0  25 2c 62 62 25 0d f3 de  06 3d b9 0d f3 f2 11 dd  |%,bb%....=......|
00026de0  20 a4 31 36 30 30 28 7a  25 28 29 29 0d f3 fc 39  | .1600(z%())...9|
00026df0  d6 70 6c 61 6e 63 6e 76  25 2c 72 65 61 6c 72 6f  |.plancnv%,realro|
00026e00  77 62 79 74 65 73 25 2c  62 75 66 66 25 2c 70 62  |wbytes%,buff%,pb|
00026e10  75 66 66 25 3a 62 75 66  66 25 2b 3d 72 6f 77 62  |uff%:buff%+=rowb|
00026e20  79 74 65 73 25 0d f4 06  2d d6 6d 61 70 70 69 78  |ytes%...-.mappix|
00026e30  25 2c 7a 25 28 31 2c 30  29 2c 72 25 28 30 29 2c  |%,z%(1,0),r%(0),|
00026e40  67 25 28 30 29 2c 62 25  28 30 29 2c 70 62 75 66  |g%(0),b%(0),pbuf|
00026e50  66 25 0d f4 10 25 72 6f  77 73 74 6f 67 6f 25 2d  |f%...%rowstogo%-|
00026e60  3d 31 3a e7 72 6f 77 73  74 6f 67 6f 25 3d 30 20  |=1:.rowstogo%=0 |
00026e70  f2 72 65 66 69 6c 6c 0d  f4 1a 06 3d b9 0d f4 2e  |.refill....=....|
00026e80  11 dd 20 a4 31 36 30 31  28 7a 25 28 29 29 0d f4  |.. .1601(z%())..|
00026e90  38 44 e3 58 25 3d 30 b8  70 6c 61 6e 65 73 25 2d  |8D.X%=0.planes%-|
00026ea0  31 3a 46 25 3d 70 6c 62  75 66 66 25 2b 58 25 2a  |1:F%=plbuff%+X%*|
00026eb0  72 6f 77 62 79 74 65 73  25 3a d6 72 65 61 64 69  |rowbytes%:.readi|
00026ec0  66 66 25 2c 72 6f 77 62  79 74 65 73 25 2c 46 25  |ff%,rowbytes%,F%|
00026ed0  3a ed 0d f4 42 28 e7 6d  61 73 6b 69 6e 67 25 20  |:...B(.masking% |
00026ee0  d6 72 65 61 64 69 66 66  25 2c 72 6f 77 62 79 74  |.readiff%,rowbyt|
00026ef0  65 73 25 2c 70 62 75 66  66 25 0d f4 4c 26 d6 70  |es%,pbuff%..L&.p|
00026f00  6c 61 6e 63 6e 76 25 2c  72 6f 77 62 79 74 65 73  |lancnv%,rowbytes|
00026f10  25 2c 70 6c 62 75 66 66  25 2c 70 62 75 66 66 25  |%,plbuff%,pbuff%|
00026f20  0d f4 56 2d d6 6d 61 70  70 69 78 25 2c 7a 25 28  |..V-.mappix%,z%(|
00026f30  31 2c 30 29 2c 72 25 28  30 29 2c 67 25 28 30 29  |1,0),r%(0),g%(0)|
00026f40  2c 62 25 28 30 29 2c 70  62 75 66 66 25 0d f4 60  |,b%(0),pbuff%..`|
00026f50  06 3d b9 0d f4 74 11 dd  20 a4 31 38 35 30 28 7a  |.=...t.. .1850(z|
00026f60  25 28 29 29 0d f4 7e 1f  d6 72 65 61 64 69 66 66  |%())..~..readiff|
00026f70  25 2c 72 6f 77 62 79 74  65 73 25 2c 70 6c 62 75  |%,rowbytes%,plbu|
00026f80  66 66 25 0d f4 88 2e d6  6d 61 70 70 69 78 25 2c  |ff%.....mappix%,|
00026f90  7a 25 28 31 2c 30 29 2c  72 25 28 30 29 2c 67 25  |z%(1,0),r%(0),g%|
00026fa0  28 30 29 2c 62 25 28 30  29 2c 70 6c 62 75 66 66  |(0),b%(0),plbuff|
00026fb0  25 0d f4 92 06 3d b9 0d  f4 a6 11 dd 20 a4 31 38  |%....=...... .18|
00026fc0  35 31 28 7a 25 28 29 29  0d f4 b0 1f d6 72 65 61  |51(z%()).....rea|
00026fd0  64 69 66 66 25 2c 72 6f  77 62 79 74 65 73 25 2c  |diff%,rowbytes%,|
00026fe0  70 6c 62 75 66 66 25 0d  f4 ba 32 d6 6d 61 70 70  |plbuff%...2.mapp|
00026ff0  69 78 25 2c 7a 25 28 31  2c 30 29 2c 72 25 28 30  |ix%,z%(1,0),r%(0|
00027000  29 2c 67 25 28 30 29 2c  62 25 28 30 29 2c 72 62  |),g%(0),b%(0),rb|
00027010  25 2c 67 62 25 2c 62 62  25 0d f4 c4 06 3d b9 0d  |%,gb%,bb%....=..|
00027020  f4 d8 11 dd 20 a4 31 39  30 30 28 7a 25 28 29 29  |.... .1900(z%())|
00027030  0d f4 e2 29 d6 72 65 61  64 6c 69 6e 65 25 2c 70  |...).readline%,p|
00027040  6c 62 79 74 65 73 25 2c  72 65 70 25 2c 70 69 78  |lbytes%,rep%,pix|
00027050  25 2c 70 6c 62 75 66 66  25 0d f4 ec 26 d6 70 6c  |%,plbuff%...&.pl|
00027060  61 6e 63 6e 76 25 2c 72  6f 77 62 79 74 65 73 25  |ancnv%,rowbytes%|
00027070  2c 70 6c 62 75 66 66 25  2c 70 62 75 66 66 25 0d  |,plbuff%,pbuff%.|
00027080  f4 f6 2d d6 6d 61 70 70  69 78 25 2c 7a 25 28 31  |..-.mappix%,z%(1|
00027090  2c 30 29 2c 72 25 28 30  29 2c 67 25 28 30 29 2c  |,0),r%(0),g%(0),|
000270a0  62 25 28 30 29 2c 70 62  75 66 66 25 0d f5 00 06  |b%(0),pbuff%....|
000270b0  3d b9 0d f5 14 11 dd 20  a4 32 30 30 30 28 7a 25  |=...... .2000(z%|
000270c0  28 29 29 0d f5 1e 0e 58  25 3d 62 75 66 66 25 3a  |())....X%=buff%:|
000270d0  f5 0d f5 28 15 43 25 3d  9a 23 63 25 3a e7 43 25  |...(.C%=.#c%:.C%|
000270e0  3c 31 32 38 20 8c 0d f5  32 20 43 25 2b 3d 31 3a  |<128 ...2 C%+=1:|
000270f0  c8 99 31 32 2c 34 2c 63  25 2c 58 25 2c 43 25 3a  |..12,4,c%,X%,C%:|
00027100  58 25 2b 3d 43 25 0d f5  3c 05 cc 0d f5 46 30 46  |X%+=C%..<....F0F|
00027110  25 3d 58 25 3a 3f 46 25  3d 9a 23 63 25 3a e3 43  |%=X%:?F%=.#c%:.C|
00027120  25 3d 43 25 b8 31 32 38  88 2d 31 3a 3f 58 25 3d  |%=C%.128.-1:?X%=|
00027130  3f 46 25 3a 58 25 2b 3d  31 3a ed 0d f5 50 05 cd  |?F%:X%+=1:...P..|
00027140  0d f5 5a 17 fd 58 25 3d  62 75 66 66 25 2b 72 6f  |..Z..X%=buff%+ro|
00027150  77 62 79 74 65 73 25 0d  f5 64 2c d6 6d 61 70 70  |wbytes%..d,.mapp|
00027160  69 78 25 2c 7a 25 28 31  2c 30 29 2c 72 25 28 30  |ix%,z%(1,0),r%(0|
00027170  29 2c 67 25 28 30 29 2c  62 25 28 30 29 2c 62 75  |),g%(0),b%(0),bu|
00027180  66 66 25 0d f5 6e 06 3d  b9 0d f5 82 11 dd 20 a4  |ff%..n.=...... .|
00027190  32 30 30 31 28 7a 25 28  29 29 0d f5 8c 0e 58 25  |2001(z%())....X%|
000271a0  3d 62 75 66 66 25 3a f5  0d f5 96 15 43 25 3d 9a  |=buff%:.....C%=.|
000271b0  23 63 25 3a e7 43 25 3c  31 32 38 20 8c 0d f5 a0  |#c%:.C%<128 ....|
000271c0  26 43 25 3d 28 43 25 2b  31 29 2a 32 3a c8 99 31  |&C%=(C%+1)*2:..1|
000271d0  32 2c 34 2c 63 25 2c 58  25 2c 43 25 3a 58 25 2b  |2,4,c%,X%,C%:X%+|
000271e0  3d 43 25 0d f5 aa 05 cc  0d f5 b4 36 46 25 3d 58  |=C%........6F%=X|
000271f0  25 3a c8 99 31 32 2c 34  2c 63 25 2c 58 25 2c 32  |%:..12,4,c%,X%,2|
00027200  3a e3 43 25 3d 43 25 b8  31 32 38 88 2d 31 3a 21  |:.C%=C%.128.-1:!|
00027210  58 25 3d 21 46 25 3a 58  25 2b 3d 32 3a ed 0d f5  |X%=!F%:X%+=2:...|
00027220  be 05 cd 0d f5 c8 17 fd  58 25 3d 62 75 66 66 25  |........X%=buff%|
00027230  2b 72 6f 77 62 79 74 65  73 25 0d f5 d2 44 d6 6d  |+rowbytes%...D.m|
00027240  61 70 70 69 78 25 2c 7a  25 28 31 2c 30 29 2c 72  |appix%,z%(1,0),r|
00027250  70 61 6c 25 28 30 29 2c  67 70 61 6c 25 28 30 29  |pal%(0),gpal%(0)|
00027260  2c 72 25 28 30 29 2c 67  25 28 30 29 2c 62 25 28  |,r%(0),g%(0),b%(|
00027270  30 29 2c 62 75 66 66 25  2c 62 75 66 66 25 0d f5  |0),buff%,buff%..|
00027280  dc 06 3d b9 0d f5 f0 11  dd 20 a4 32 30 30 32 28  |..=...... .2002(|
00027290  7a 25 28 29 29 0d f5 fa  0e 58 25 3d 62 75 66 66  |z%())....X%=buff|
000272a0  25 3a f5 0d f6 04 15 43  25 3d 9a 23 63 25 3a e7  |%:.....C%=.#c%:.|
000272b0  43 25 3c 31 32 38 20 8c  0d f6 0e 2b 43 25 3d 28  |C%<128 ....+C%=(|
000272c0  43 25 2b 31 29 2a 73 74  65 70 32 34 3a c8 99 31  |C%+1)*step24:..1|
000272d0  32 2c 34 2c 63 25 2c 58  25 2c 43 25 3a 58 25 2b  |2,4,c%,X%,C%:X%+|
000272e0  3d 43 25 0d f6 18 05 cc  0d f6 22 40 46 25 3d 58  |=C%......."@F%=X|
000272f0  25 3a c8 99 31 32 2c 34  2c 63 25 2c 58 25 2c 73  |%:..12,4,c%,X%,s|
00027300  74 65 70 32 34 3a e3 43  25 3d 43 25 b8 31 32 38  |tep24:.C%=C%.128|
00027310  88 2d 31 3a 21 58 25 3d  21 46 25 3a 58 25 2b 3d  |.-1:!X%=!F%:X%+=|
00027320  73 74 65 70 32 34 3a ed  0d f6 2c 05 cd 0d f6 36  |step24:...,....6|
00027330  17 fd 58 25 3d 62 75 66  66 25 2b 72 6f 77 62 79  |..X%=buff%+rowby|
00027340  74 65 73 25 0d f6 40 32  d6 6d 61 70 70 69 78 25  |tes%..@2.mappix%|
00027350  2c 7a 25 28 31 2c 30 29  2c 72 25 28 30 29 2c 67  |,z%(1,0),r%(0),g|
00027360  25 28 30 29 2c 62 25 28  30 29 2c 72 62 25 2c 67  |%(0),b%(0),rb%,g|
00027370  62 25 2c 62 62 25 0d f6  4a 06 3d b9 0d f6 5e 11  |b%,bb%..J.=...^.|
00027380  dd 20 a4 32 32 35 30 28  7a 25 28 29 29 0d f6 68  |. .2250(z%())..h|
00027390  51 d6 6d 61 70 70 69 78  25 2c 7a 25 28 31 2c 30  |Q.mappix%,z%(1,0|
000273a0  29 2c 72 70 61 6c 25 28  30 29 2c 72 25 28 30 29  |),rpal%(0),r%(0)|
000273b0  2c 67 70 61 6c 25 28 30  29 2c 67 25 28 30 29 2c  |,gpal%(0),g%(0),|
000273c0  62 70 61 6c 25 28 30 29  2c 62 25 28 30 29 2c 74  |bpal%(0),b%(0),t|
000273d0  61 62 6c 65 25 28 30 29  2c 62 75 66 66 25 0d f6  |able%(0),buff%..|
000273e0  72 36 62 75 66 66 25 2b  3d 72 6f 77 62 79 74 65  |r6buff%+=rowbyte|
000273f0  73 25 3a 72 6f 77 73 74  6f 67 6f 25 2d 3d 31 3a  |s%:rowstogo%-=1:|
00027400  e7 72 6f 77 73 74 6f 67  6f 25 3d 30 20 f2 72 65  |.rowstogo%=0 .re|
00027410  66 69 6c 6c 0d f6 7c 06  3d b9 0d f6 90 11 dd 20  |fill..|.=...... |
00027420  a4 32 33 30 30 28 7a 25  28 29 29 0d f6 9a 48 e7  |.2300(z%())...H.|
00027430  63 6c 72 66 69 72 73 74  25 20 e3 58 25 3d 30 b8  |clrfirst% .X%=0.|
00027440  73 78 25 2d 31 3a 72 62  25 3f 58 25 3d 3f 62 61  |sx%-1:rb%?X%=?ba|
00027450  63 6b 25 3a 67 62 25 3f  58 25 3d 62 61 63 6b 25  |ck%:gb%?X%=back%|
00027460  3f 31 3a 62 62 25 3f 58  25 3d 62 61 63 6b 25 3f  |?1:bb%?X%=back%?|
00027470  32 3a ed 0d f6 a4 0c e7  76 72 65 70 25 20 8c 0d  |2:......vrep% ..|
00027480  f6 ae 0c 76 72 65 70 25  2d 3d 31 0d f6 b8 05 cc  |...vrep%-=1.....|
00027490  0d f6 c2 07 ea 20 85 0d  f6 cc 44 ee 20 85 20 ea  |..... ....D. . .|
000274a0  20 76 72 65 70 25 3d 2d  31 3a d6 6d 61 70 70 69  | vrep%=-1:.mappi|
000274b0  78 25 2c 7a 25 28 31 2c  30 29 2c 72 25 28 30 29  |x%,z%(1,0),r%(0)|
000274c0  2c 67 25 28 30 29 2c 62  25 28 30 29 2c 72 62 25  |,g%(0),b%(0),rb%|
000274d0  2c 67 62 25 2c 62 62 25  3a 3d b9 0d f6 d6 29 45  |,gb%,bb%:=....)E|
000274e0  25 3d a3 3a f5 20 43 25  3d 9a 23 63 25 3a 44 25  |%=.:. C%=.#c%:D%|
000274f0  3d 9a 23 63 25 3a e7 43  25 80 26 34 30 20 44 25  |=.#c%:.C%.&40 D%|
00027500  3d a4 48 57 0d f6 e0 0f  c8 8e 20 43 25 80 26 33  |=.HW...... C%.&3|
00027510  66 20 ca 0d f6 ea 28 c9  20 31 3a 45 25 3d b9 3a  |f ....(. 1:E%=.:|
00027520  76 72 65 70 25 3d 44 25  2d 31 3a e7 76 72 65 70  |vrep%=D%-1:.vrep|
00027530  25 3c 30 20 76 72 65 70  25 3d a3 0d f6 f4 3c c9  |%<0 vrep%=....<.|
00027540  20 32 3a 63 63 6f 6c 25  3d 62 61 63 6b 25 3f 44  | 2:ccol%=back%?D|
00027550  25 3a 63 62 75 66 25 3d  72 62 25 2b 73 78 25 2a  |%:cbuf%=rb%+sx%*|
00027560  44 25 3a e7 44 25 3d 32  35 35 20 63 62 75 66 25  |D%:.D%=255 cbuf%|
00027570  3d 61 6c 70 68 61 25 0d  f6 fe 2d c9 20 33 3a e3  |=alpha%...-. 3:.|
00027580  58 25 3d 30 b8 44 25 2d  31 3a 63 62 75 66 25 3f  |X%=0.D%-1:cbuf%?|
00027590  58 25 3d 63 63 6f 6c 25  3a ed 3a 63 62 75 66 25  |X%=ccol%:.:cbuf%|
000275a0  2b 3d 44 25 0d f7 08 36  c9 20 35 3a c8 99 31 32  |+=D%...6. 5:..12|
000275b0  2c 34 2c 63 25 2c 63 62  75 66 25 2c 44 25 2b 31  |,4,c%,cbuf%,D%+1|
000275c0  3a 63 62 75 66 25 2b 3d  44 25 2b 31 3a e7 44 25  |:cbuf%+=D%+1:.D%|
000275d0  2b 31 80 31 20 e7 9a 23  63 25 0d f7 12 31 c9 20  |+1.1 ..#c%...1. |
000275e0  36 3a 43 25 3d a4 48 57  3a e3 58 25 3d 30 b8 44  |6:C%=.HW:.X%=0.D|
000275f0  25 3a 63 62 75 66 25 3f  58 25 3d 43 25 3a ed 3a  |%:cbuf%?X%=C%:.:|
00027600  63 62 75 66 25 2b 3d 44  25 2b 31 0d f7 1c 05 cb  |cbuf%+=D%+1.....|
00027610  0d f7 26 07 fd 45 25 0d  f7 30 05 cd 0d f7 3a 32  |..&..E%..0....:2|
00027620  d6 6d 61 70 70 69 78 25  2c 7a 25 28 31 2c 30 29  |.mappix%,z%(1,0)|
00027630  2c 72 25 28 30 29 2c 67  25 28 30 29 2c 62 25 28  |,r%(0),g%(0),b%(|
00027640  30 29 2c 72 62 25 2c 67  62 25 2c 62 62 25 0d f7  |0),rb%,gb%,bb%..|
00027650  44 06 3d b9 0d f7 58 11  dd 20 a4 32 34 30 31 28  |D.=...X.. .2401(|
00027660  7a 25 28 29 29 0d f7 62  1e d6 62 6d 5f 72 6c 65  |z%())..b..bm_rle|
00027670  38 2c 72 6f 77 62 79 74  65 73 25 2c 70 6c 62 75  |8,rowbytes%,plbu|
00027680  66 66 25 0d f7 6c 2e d6  6d 61 70 70 69 78 25 2c  |ff%..l..mappix%,|
00027690  7a 25 28 31 2c 30 29 2c  72 25 28 30 29 2c 67 25  |z%(1,0),r%(0),g%|
000276a0  28 30 29 2c 62 25 28 30  29 2c 70 6c 62 75 66 66  |(0),b%(0),plbuff|
000276b0  25 0d f7 76 06 3d b9 0d  f7 8a 11 dd 20 a4 32 34  |%..v.=...... .24|
000276c0  30 32 28 7a 25 28 29 29  0d f7 94 1e d6 62 6d 5f  |02(z%()).....bm_|
000276d0  72 6c 65 34 2c 72 6f 77  62 79 74 65 73 25 2c 70  |rle4,rowbytes%,p|
000276e0  6c 62 75 66 66 25 0d f7  9e 2e d6 6d 61 70 70 69  |lbuff%.....mappi|
000276f0  78 25 2c 7a 25 28 31 2c  30 29 2c 72 25 28 30 29  |x%,z%(1,0),r%(0)|
00027700  2c 67 25 28 30 29 2c 62  25 28 30 29 2c 70 6c 62  |,g%(0),b%(0),plb|
00027710  75 66 66 25 0d f7 a8 06  3d b9 0d f7 bc 11 dd 20  |uff%....=...... |
00027720  a4 33 30 30 30 28 7a 25  28 29 29 0d f7 c6 51 d6  |.3000(z%())...Q.|
00027730  6d 61 70 70 69 78 25 2c  7a 25 28 31 2c 30 29 2c  |mappix%,z%(1,0),|
00027740  72 70 61 6c 25 28 30 29  2c 72 25 28 30 29 2c 67  |rpal%(0),r%(0),g|
00027750  70 61 6c 25 28 30 29 2c  67 25 28 30 29 2c 62 70  |pal%(0),g%(0),bp|
00027760  61 6c 25 28 30 29 2c 62  25 28 30 29 2c 74 61 62  |al%(0),b%(0),tab|
00027770  6c 65 25 28 30 29 2c 62  75 66 66 25 0d f7 d0 36  |le%(0),buff%...6|
00027780  62 75 66 66 25 2b 3d 72  6f 77 62 79 74 65 73 25  |buff%+=rowbytes%|
00027790  3a 72 6f 77 73 74 6f 67  6f 25 2d 3d 31 3a e7 72  |:rowstogo%-=1:.r|
000277a0  6f 77 73 74 6f 67 6f 25  3d 30 20 f2 72 65 66 69  |owstogo%=0 .refi|
000277b0  6c 6c 0d f7 da 06 3d b9  0d f7 e4 11 dd 20 a4 33  |ll....=...... .3|
000277c0  35 30 30 28 7a 25 28 29  29 0d f7 ee 06 3d b9 0d  |500(z%())....=..|
000277d0  f7 f8 11 dd 20 a4 33 36  30 30 28 7a 25 28 29 29  |.... .3600(z%())|
000277e0  0d f8 02 32 d6 6d 61 70  70 69 78 25 2c 7a 25 28  |...2.mappix%,z%(|
000277f0  31 2c 30 29 2c 72 25 28  30 29 2c 67 25 28 30 29  |1,0),r%(0),g%(0)|
00027800  2c 62 25 28 30 29 2c 72  62 25 2c 67 62 25 2c 62  |,b%(0),rb%,gb%,b|
00027810  62 25 0d f8 0c 30 72 62  25 2b 3d 72 6f 77 62 79  |b%...0rb%+=rowby|
00027820  74 65 73 25 3a 67 62 25  2b 3d 72 6f 77 62 79 74  |tes%:gb%+=rowbyt|
00027830  65 73 25 3a 62 62 25 2b  3d 72 6f 77 62 79 74 65  |es%:bb%+=rowbyte|
00027840  73 25 0d f8 16 28 72 6f  77 73 74 6f 67 6f 25 2d  |s%...(rowstogo%-|
00027850  3d 31 3a e7 72 6f 77 73  74 6f 67 6f 25 3d 30 20  |=1:.rowstogo%=0 |
00027860  f2 72 65 66 69 6c 6c 70  63 64 0d f8 20 06 3d b9  |.refillpcd.. .=.|
00027870  0d f8 2a 11 dd 20 a4 33  37 30 38 28 7a 25 28 29  |..*.. .3708(z%()|
00027880  29 0d f8 34 34 41 25 3d  6a 70 65 67 73 70 61 63  |)..44A%=jpegspac|
00027890  65 25 3a 6a 70 65 67 79  25 2d 3d 31 3a 42 25 3d  |e%:jpegy%-=1:B%=|
000278a0  6a 70 65 67 79 25 3a 72  62 25 3d ba 28 6a 70 65  |jpegy%:rb%=.(jpe|
000278b0  67 25 2b 34 29 0d f8 3e  2a d6 6d 61 70 70 69 78  |g%+4)..>*.mappix|
000278c0  25 2c 7a 25 28 31 2c 30  29 2c 72 25 28 30 29 2c  |%,z%(1,0),r%(0),|
000278d0  67 25 28 30 29 2c 62 25  28 30 29 2c 72 62 25 0d  |g%(0),b%(0),rb%.|
000278e0  f8 48 06 3d b9 0d f8 52  11 dd 20 a4 33 37 32 34  |.H.=...R.. .3724|
000278f0  28 7a 25 28 29 29 0d f8  5c 48 41 25 3d 6a 70 65  |(z%())..\HA%=jpe|
00027900  67 73 70 61 63 65 25 3a  6a 70 65 67 79 25 2d 3d  |gspace%:jpegy%-=|
00027910  31 3a 42 25 3d 6a 70 65  67 79 25 3a 72 62 25 3d  |1:B%=jpegy%:rb%=|
00027920  ba 28 6a 70 65 67 25 2b  34 29 3a 67 62 25 3d 72  |.(jpeg%+4):gb%=r|
00027930  62 25 2b 31 3a 62 62 25  3d 72 62 25 2b 32 0d f8  |b%+1:bb%=rb%+2..|
00027940  66 32 d6 6d 61 70 70 69  78 25 2c 7a 25 28 31 2c  |f2.mappix%,z%(1,|
00027950  30 29 2c 72 25 28 30 29  2c 67 25 28 30 29 2c 62  |0),r%(0),g%(0),b|
00027960  25 28 30 29 2c 72 62 25  2c 67 62 25 2c 62 62 25  |%(0),rb%,gb%,bb%|
00027970  0d f8 70 06 3d b9 0d f8  7a 0d dd 20 f2 72 65 77  |..p.=...z.. .rew|
00027980  69 6e 64 0d f8 84 17 72  6f 77 73 25 3d 73 79 25  |ind....rows%=sy%|
00027990  3a c8 8e 20 66 6c 61 67  20 ca 0d f8 8e 10 c9 20  |:.. flag ...... |
000279a0  30 3a cf 23 63 25 3d 73  74 25 0d f8 98 10 c9 20  |0:.#c%=st%..... |
000279b0  31 30 30 3a cf 23 63 25  3d 34 0d f8 a2 19 c9 20  |100:.#c%=4..... |
000279c0  32 30 30 3a cf 23 63 25  3d 73 74 25 3a 72 65 70  |200:.#c%=st%:rep|
000279d0  25 3d 30 0d f8 ac 1e c9  20 33 30 30 3a cf 23 63  |%=0..... 300:.#c|
000279e0  25 3d 73 74 25 3a cf 23  63 63 25 3d 73 74 63 63  |%=st%:.#cc%=stcc|
000279f0  25 0d f8 b6 19 c9 20 34  30 30 3a cf 23 63 25 3d  |%..... 400:.#c%=|
00027a00  73 74 25 3a 72 65 70 25  3d 30 0d f8 c0 35 c9 20  |st%:rep%=0...5. |
00027a10  35 30 30 3a e3 49 25 3d  30 b8 63 6c 65 61 72 63  |500:.I%=0.clearc|
00027a20  6f 64 65 25 2d 31 3a 74  61 62 6c 65 25 28 49 25  |ode%-1:table%(I%|
00027a30  29 3d 49 25 3a ed 3a cf  23 63 25 3d 73 74 25 0d  |)=I%:.:.#c%=st%.|
00027a40  f8 ca 46 21 66 69 72 73  74 63 6f 64 65 3d 30 3a  |..F!firstcode=0:|
00027a50  21 6f 6c 64 63 6f 64 65  3d 30 3a 21 63 6f 64 65  |!oldcode=0:!code|
00027a60  73 69 7a 65 3d 73 65 74  63 6f 64 65 73 25 2b 31  |size=setcodes%+1|
00027a70  3a 21 73 74 61 63 6b 3d  73 74 6b 25 3a 21 73 70  |:!stack=stk%:!sp|
00027a80  3d 73 74 6b 25 0d f8 d4  48 21 6d 61 78 63 6f 64  |=stk%...H!maxcod|
00027a90  65 3d 63 6c 65 61 72 63  6f 64 65 25 2b 32 3a 21  |e=clearcode%+2:!|
00027aa0  6d 61 78 63 6f 64 65 73  69 7a 65 3d 32 2a 63 6c  |maxcodesize=2*cl|
00027ab0  65 61 72 63 6f 64 65 25  3a 21 63 75 72 62 69 74  |earcode%:!curbit|
00027ac0  3d 30 3a 21 6c 61 73 74  62 69 74 3d 30 0d f8 de  |=0:!lastbit=0...|
00027ad0  1a c9 20 35 30 31 3a 62  75 66 66 25 3d 64 61 74  |.. 501:buff%=dat|
00027ae0  61 63 61 63 68 65 25 0d  f8 e8 13 c9 20 36 30 30  |acache%..... 600|
00027af0  3a cf 23 63 25 3d 26 33  38 30 0d f8 f2 12 c9 20  |:.#c%=&380..... |
00027b00  37 30 30 3a cf 23 63 25  3d 73 74 25 0d f8 fc 1d  |700:.#c%=st%....|
00027b10  c9 20 38 30 30 3a cf 23  63 25 3d 30 3a 72 65 70  |. 800:.#c%=0:rep|
00027b20  25 3d 30 3a 77 74 25 3d  30 0d f9 06 4e c9 20 38  |%=0:wt%=0...N. 8|
00027b30  30 31 3a cf 23 63 25 3d  30 3a cf 23 63 63 25 3d  |01:.#c%=0:.#cc%=|
00027b40  30 3a cf 23 63 63 63 25  3d 30 3a 72 65 70 31 25  |0:.#ccc%=0:rep1%|
00027b50  3d 30 3a 77 74 31 25 3d  30 3a 72 65 70 32 25 3d  |=0:wt1%=0:rep2%=|
00027b60  30 3a 77 74 32 25 3d 30  3a 72 65 70 33 25 3d 30  |0:wt2%=0:rep3%=0|
00027b70  3a 77 74 33 25 3d 30 0d  f9 10 10 c9 20 39 30 30  |:wt3%=0..... 900|
00027b80  3a cf 23 63 25 3d 30 0d  f9 1a 21 c9 20 39 30 31  |:.#c%=0...!. 901|
00027b90  3a cf 23 63 25 3d 30 3a  cf 23 63 63 25 3d 30 3a  |:.#c%=0:.#cc%=0:|
00027ba0  cf 23 63 63 63 25 3d 30  0d f9 24 12 c9 20 39 30  |.#ccc%=0..$.. 90|
00027bb0  32 3a cf 23 63 25 3d 73  74 25 0d f9 2e 2e c9 20  |2:.#c%=st%..... |
00027bc0  31 30 30 30 3a cf 23 63  25 3d 73 74 25 3a 70 61  |1000:.#c%=st%:pa|
00027bd0  25 3d 63 74 61 62 6c 65  25 3a 72 65 70 25 3d 30  |%=ctable%:rep%=0|
00027be0  3a 72 65 70 32 25 3d 30  0d f9 38 1a c9 20 31 31  |:rep2%=0..8.. 11|
00027bf0  30 30 3a cf 23 63 25 3d  73 74 25 3a 72 65 70 25  |00:.#c%=st%:rep%|
00027c00  3d 30 0d f9 42 14 c9 20  31 32 30 30 3a cf 23 63  |=0..B.. 1200:.#c|
00027c10  25 3d 31 36 30 30 0d f9  4c 11 c9 20 31 33 30 30  |%=1600..L.. 1300|
00027c20  3a cf 23 63 25 3d 30 0d  f9 56 22 c9 20 31 33 30  |:.#c%=0..V". 130|
00027c30  31 3a cf 23 63 25 3d 30  3a cf 23 63 63 25 3d 30  |1:.#c%=0:.#cc%=0|
00027c40  3a cf 23 63 63 63 25 3d  30 0d f9 60 1b c9 20 31  |:.#ccc%=0..`.. 1|
00027c50  34 30 30 3a cf 23 63 25  3d 73 74 25 3a 76 72 65  |400:.#c%=st%:vre|
00027c60  70 25 3d 30 0d f9 6a 36  c9 20 31 35 30 30 3a cf  |p%=0..j6. 1500:.|
00027c70  23 63 25 3d 73 74 25 28  30 29 3a 72 6f 77 73 74  |#c%=st%(0):rowst|
00027c80  6f 67 6f 25 3d 73 74 72  69 70 72 6f 77 73 25 3a  |ogo%=striprows%:|
00027c90  73 74 72 69 70 70 74 72  3d 30 0d f9 74 14 e7 63  |stripptr=0..t..c|
00027ca0  6f 6d 70 72 65 73 73 69  6f 6e 3d 35 20 8c 0d f9  |ompression=5 ...|
00027cb0  7e 46 21 66 69 72 73 74  63 6f 64 65 3d 30 3a 21  |~F!firstcode=0:!|
00027cc0  6f 6c 64 63 6f 64 65 3d  30 3a 21 63 6f 64 65 73  |oldcode=0:!codes|
00027cd0  69 7a 65 3d 73 65 74 63  6f 64 65 73 25 2b 31 3a  |ize=setcodes%+1:|
00027ce0  21 73 74 61 63 6b 3d 73  74 6b 25 3a 21 73 70 3d  |!stack=stk%:!sp=|
00027cf0  73 74 6b 25 0d f9 88 48  21 6d 61 78 63 6f 64 65  |stk%...H!maxcode|
00027d00  3d 63 6c 65 61 72 63 6f  64 65 25 2b 32 3a 21 6d  |=clearcode%+2:!m|
00027d10  61 78 63 6f 64 65 73 69  7a 65 3d 32 2a 63 6c 65  |axcodesize=2*cle|
00027d20  61 72 63 6f 64 65 25 3a  21 63 75 72 62 69 74 3d  |arcode%:!curbit=|
00027d30  30 3a 21 6c 61 73 74 62  69 74 3d 30 0d f9 92 05  |0:!lastbit=0....|
00027d40  cd 0d f9 9c 13 c9 20 31  36 30 30 3a cf 23 63 25  |...... 1600:.#c%|
00027d50  3d 73 74 25 0d f9 a6 12  c9 20 31 37 30 30 3a cf  |=st%..... 1700:.|
00027d60  23 63 25 3d 31 36 0d f9  b0 18 c9 20 31 38 30 30  |#c%=16..... 1800|
00027d70  2c 31 38 35 30 3a cf 23  63 25 3d 73 74 25 0d f9  |,1850:.#c%=st%..|
00027d80  ba 1b c9 20 31 39 30 30  3a cf 23 63 25 3d 31 32  |... 1900:.#c%=12|
00027d90  38 3a 72 65 70 25 3d 2d  31 0d f9 c4 13 c9 20 32  |8:rep%=-1..... 2|
00027da0  30 30 30 3a cf 23 63 25  3d 73 74 25 0d f9 ce 11  |000:.#c%=st%....|
00027db0  c9 20 32 31 30 30 3a cf  23 63 25 3d 37 0d f9 d8  |. 2100:.#c%=7...|
00027dc0  13 c9 20 32 32 30 30 3a  cf 23 63 25 3d 73 74 25  |.. 2200:.#c%=st%|
00027dd0  0d f9 e2 13 c9 20 32 32  35 30 3a cf 23 63 25 3d  |..... 2250:.#c%=|
00027de0  73 74 25 0d f9 ec 1b c9  20 32 33 30 30 3a cf 23  |st%..... 2300:.#|
00027df0  63 25 3d 73 74 25 3a 76  72 65 70 25 3d 30 0d f9  |c%=st%:vrep%=0..|
00027e00  f6 13 c9 20 32 34 30 30  3a cf 23 63 25 3d 73 74  |... 2400:.#c%=st|
00027e10  25 0d fa 00 13 c9 20 32  35 30 30 3a cf 23 63 25  |%..... 2500:.#c%|
00027e20  3d 73 74 25 0d fa 0a 13  c9 20 32 36 30 30 3a cf  |=st%..... 2600:.|
00027e30  23 63 25 3d 73 74 25 0d  fa 14 13 c9 20 32 37 30  |#c%=st%..... 270|
00027e40  30 3a cf 23 63 25 3d 73  74 25 0d fa 1e 13 c9 20  |0:.#c%=st%..... |
00027e50  32 38 30 30 3a cf 23 63  25 3d 73 74 25 0d fa 28  |2800:.#c%=st%..(|
00027e60  13 c9 20 32 39 30 30 3a  cf 23 63 25 3d 73 74 25  |.. 2900:.#c%=st%|
00027e70  0d fa 32 11 c9 20 33 30  30 30 3a cf 23 63 25 3d  |..2.. 3000:.#c%=|
00027e80  30 0d fa 3c 16 c9 20 33  36 30 30 3a 70 63 64 62  |0..<.. 3600:pcdb|
00027e90  6c 6b 25 21 34 3d 30 0d  fa 46 15 c9 20 33 37 30  |lk%!4=0..F.. 370|
00027ea0  30 3a 6a 70 65 67 79 25  3d 73 79 25 0d fa 50 18  |0:jpegy%=sy%..P.|
00027eb0  c9 20 33 39 30 30 2c 33  39 30 35 3a cf 23 63 25  |. 3900,3905:.#c%|
00027ec0  3d 73 74 25 0d fa 5a 05  cb 0d fa 64 0d e7 63 61  |=st%..Z....d..ca|
00027ed0  63 68 65 25 20 8c 0d fa  6e 10 e7 66 6c 61 67 3d  |che% ...n..flag=|
00027ee0  33 36 30 30 20 8c 0d fa  78 44 70 63 64 62 6c 6b  |3600 ...xDpcdblk|
00027ef0  25 21 31 32 3d 63 61 63  68 65 72 6f 77 73 25 3a  |%!12=cacherows%:|
00027f00  f2 72 65 66 69 6c 6c 70  63 64 3a e7 63 61 63 68  |.refillpcd:.cach|
00027f10  65 25 3e 3d 66 69 6c 65  73 69 7a 65 25 20 72 6f  |e%>=filesize% ro|
00027f20  77 73 74 6f 67 6f 25 3d  2d 31 0d fa 82 05 cc 0d  |wstogo%=-1......|
00027f30  fa 8c 46 e7 63 61 63 68  65 25 3c 66 69 6c 65 73  |..F.cache%<files|
00027f40  69 7a 65 25 20 c8 99 31  32 2c 34 2c 63 25 2c 64  |ize% ..12,4,c%,d|
00027f50  61 74 61 63 61 63 68 65  25 2c 63 61 63 68 65 25  |atacache%,cache%|
00027f60  3a 72 6f 77 73 74 6f 67  6f 25 3d 63 61 63 68 65  |:rowstogo%=cache|
00027f70  72 6f 77 73 25 0d fa 96  05 cd 0d fa a0 14 62 75  |rows%.........bu|
00027f80  66 66 25 3d 64 61 74 61  63 61 63 68 65 25 0d fa  |ff%=datacache%..|
00027f90  aa 3b e7 63 61 63 68 65  62 79 74 65 73 25 20 21  |.;.cachebytes% !|
00027fa0  69 6e 63 61 63 68 65 70  74 72 3d 64 61 74 61 63  |incacheptr=datac|
00027fb0  61 63 68 65 25 3a 21 6e  75 6d 6c 65 66 74 74 6f  |ache%:!numleftto|
00027fc0  67 6f 3d 63 61 63 68 65  25 0d fa b4 4c e7 69 6e  |go=cache%...L.in|
00027fd0  70 75 74 3d 32 34 84 69  6e 70 75 74 3d 34 38 20  |put=24.input=48 |
00027fe0  e7 72 62 6f 25 3e 3d 30  20 72 62 25 3d 62 75 66  |.rbo%>=0 rb%=buf|
00027ff0  66 25 2b 72 62 6f 25 3a  67 62 25 3d 62 75 66 66  |f%+rbo%:gb%=buff|
00028000  25 2b 67 62 6f 25 3a 62  62 25 3d 62 75 66 66 25  |%+gbo%:bb%=buff%|
00028010  2b 62 62 6f 25 0d fa be  05 cd 0d fa c8 32 e7 66  |+bbo%........2.f|
00028020  6c 61 67 3d 31 35 30 30  20 e7 63 6f 6d 70 72 65  |lag=1500 .compre|
00028030  73 73 69 6f 6e 3d 35 20  72 6f 77 73 74 6f 67 6f  |ssion=5 rowstogo|
00028040  25 3d 73 74 72 69 70 72  6f 77 73 25 0d fa d2 05  |%=striprows%....|
00028050  e1 0d fa e6 15 dd 20 f2  41 73 73 65 6d 62 6c 65  |...... .Assemble|
00028060  5f 53 68 65 6c 6c 0d fa  f0 0d e3 49 25 3d 30 b8  |_Shell.....I%=0.|
00028070  32 88 32 0d fa fa 0c 50  25 3d 63 6f 64 65 25 0d  |2.2....P%=code%.|
00028080  fb 04 0c 5b 20 4f 50 54  20 49 25 0d fb 0e 0f 2e  |...[ OPT I%.....|
00028090  53 68 65 6c 6c 5f 43 61  6c 6c 0d fb 18 0f 4d 4f  |Shell_Call....MO|
000280a0  56 20 20 20 52 39 2c 52  30 0d fb 22 53 4d 4f 56  |V   R9,R0.."SMOV|
000280b0  20 52 30 2c 23 30 3a 4d  4f 56 20 52 31 2c 23 30  | R0,#0:MOV R1,#0|
000280c0  3a 4d 4f 56 20 52 32 2c  23 30 3a 4d 4f 56 20 52  |:MOV R2,#0:MOV R|
000280d0  33 2c 23 32 3a 4d 4f 56  20 52 34 2c 23 30 3a 4d  |3,#2:MOV R4,#0:M|
000280e0  4f 56 20 52 35 2c 23 30  3a 4d 4f 56 20 52 36 2c  |OV R5,#0:MOV R6,|
000280f0  23 30 3a 4d 4f 56 20 52  37 2c 23 30 0d fb 2c 15  |#0:MOV R7,#0..,.|
00028100  53 57 49 20 20 20 22 4f  53 5f 53 65 74 45 6e 76  |SWI   "OS_SetEnv|
00028110  22 0d fb 36 1b 53 54 4d  46 44 20 52 31 33 21 2c  |"..6.STMFD R13!,|
00028120  7b 52 30 2d 52 37 2c 20  52 31 32 7d 0d fb 40 2d  |{R0-R7, R12}..@-|
00028130  4d 4f 56 20 20 20 52 30  2c 23 30 3a 4d 4f 56 20  |MOV   R0,#0:MOV |
00028140  52 31 2c 23 30 3a 4d 4f  56 20 52 32 2c 23 30 3a  |R1,#0:MOV R2,#0:|
00028150  4d 4f 56 20 52 33 2c 23  30 0d fb 4a 16 53 57 49  |MOV R3,#0..J.SWI|
00028160  20 20 20 22 4f 53 5f 43  6f 6e 74 72 6f 6c 22 0d  |   "OS_Control".|
00028170  fb 54 16 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |.T.STMFD R13!,{R|
00028180  30 2d 52 33 7d 0d fb 5e  25 4d 4f 56 20 20 20 52  |0-R3}..^%MOV   R|
00028190  30 2c 23 26 31 30 3a 4d  4f 56 20 52 31 2c 23 30  |0,#&10:MOV R1,#0|
000281a0  3a 4d 4f 56 20 52 32 2c  23 30 0d fb 68 21 53 57  |:MOV R2,#0..h!SW|
000281b0  49 20 20 20 22 58 4f 53  5f 43 68 61 6e 67 65 45  |I   "XOS_ChangeE|
000281c0  6e 76 69 72 6f 6e 6d 65  6e 74 22 0d fb 72 16 53  |nvironment"..r.S|
000281d0  54 4d 46 44 20 52 31 33  21 2c 7b 52 31 2c 52 32  |TMFD R13!,{R1,R2|
000281e0  7d 0d fb 7c 16 4c 44 52  20 20 20 52 33 2c 5b 52  |}..|.LDR   R3,[R|
000281f0  31 34 2c 23 32 38 5d 0d  fb 86 14 4c 44 52 20 20  |14,#28]....LDR  |
00028200  20 52 33 2c 5b 52 38 2c  52 33 5d 0d fb 90 1a 53  | R3,[R8,R3]....S|
00028210  54 4d 46 44 20 52 31 33  21 2c 7b 52 33 2c 52 39  |TMFD R13!,{R3,R9|
00028220  2c 52 31 34 7d 0d fb 9a  16 53 55 42 20 20 20 52  |,R14}....SUB   R|
00028230  39 2c 52 31 33 2c 23 31  30 32 34 0d fb a4 0f 4d  |9,R13,#1024....M|
00028240  4f 56 20 20 20 52 35 2c  52 39 0d fb ae 2d 41 44  |OV   R5,R9...-AD|
00028250  52 20 20 20 52 36 2c 53  68 65 6c 6c 5f 4a 6f 62  |R   R6,Shell_Job|
00028260  3a 41 44 52 20 20 20 52  34 2c 53 68 65 6c 6c 5f  |:ADR   R4,Shell_|
00028270  4a 6f 62 5f 45 6e 64 0d  fb b8 0f 2e 53 68 65 6c  |Job_End.....Shel|
00028280  6c 5f 43 6f 70 79 0d fb  c2 14 4c 44 52 20 20 20  |l_Copy....LDR   |
00028290  52 32 2c 5b 52 36 5d 2c  23 34 0d fb cc 14 53 54  |R2,[R6],#4....ST|
000282a0  52 20 20 20 52 32 2c 5b  52 35 5d 2c 23 34 0d fb  |R   R2,[R5],#4..|
000282b0  d6 0f 43 4d 50 20 20 20  52 36 2c 52 34 0d fb e0  |..CMP   R6,R4...|
000282c0  14 42 43 43 20 20 20 53  68 65 6c 6c 5f 43 6f 70  |.BCC   Shell_Cop|
000282d0  79 0d fb ea 0f 4d 4f 56  20 20 20 50 43 2c 52 39  |y....MOV   PC,R9|
000282e0  0d fb f4 0e 2e 53 68 65  6c 6c 5f 4a 6f 62 0d fb  |.....Shell_Job..|
000282f0  fe 16 4c 44 52 20 20 20  52 32 2c 5b 52 33 2c 23  |..LDR   R2,[R3,#|
00028300  2d 34 5d 21 0d fc 08 16  53 54 52 20 20 20 52 32  |-4]!....STR   R2|
00028310  2c 5b 52 39 2c 23 2d 34  5d 21 0d fc 12 13 43 4d  |,[R9,#-4]!....CM|
00028320  50 20 20 20 52 33 2c 23  26 38 30 30 30 0d fc 1c  |P   R3,#&8000...|
00028330  13 42 48 49 20 20 20 53  68 65 6c 6c 5f 4a 6f 62  |.BHI   Shell_Job|
00028340  0d fc 26 13 53 54 4d 46  44 20 52 31 33 21 2c 7b  |..&.STMFD R13!,{|
00028350  52 39 7d 0d fc 30 17 41  44 52 20 20 20 52 30 2c  |R9}..0.ADR   R0,|
00028360  53 68 65 6c 6c 5f 45 78  69 74 0d fc 3a 4b 4d 4f  |Shell_Exit..:KMO|
00028370  56 20 20 20 52 31 2c 52  39 3a 4d 4f 56 20 52 32  |V   R1,R9:MOV R2|
00028380  2c 23 30 3a 4d 4f 56 20  52 33 2c 23 32 3a 4d 4f  |,#0:MOV R3,#2:MO|
00028390  56 20 52 34 2c 23 30 3a  4d 4f 56 20 52 35 2c 23  |V R4,#0:MOV R5,#|
000283a0  30 3a 4d 4f 56 20 52 36  2c 23 30 3a 4d 4f 56 20  |0:MOV R6,#0:MOV |
000283b0  52 37 2c 23 30 0d fc 44  15 53 57 49 20 20 20 22  |R7,#0..D.SWI   "|
000283c0  4f 53 5f 53 65 74 45 6e  76 22 0d fc 4e 18 41 44  |OS_SetEnv"..N.AD|
000283d0  52 20 20 20 52 30 2c 53  68 65 6c 6c 5f 45 72 72  |R   R0,Shell_Err|
000283e0  6f 72 0d fc 58 19 41 44  52 20 20 20 52 31 2c 53  |or..X.ADR   R1,S|
000283f0  68 65 6c 6c 5f 42 75 66  66 65 72 0d fc 62 19 4d  |hell_Buffer..b.M|
00028400  4f 56 20 20 20 52 32 2c  23 30 3a 4d 4f 56 20 52  |OV   R2,#0:MOV R|
00028410  33 2c 23 30 0d fc 6c 16  53 57 49 20 20 20 22 4f  |3,#0..l.SWI   "O|
00028420  53 5f 43 6f 6e 74 72 6f  6c 22 0d fc 76 11 4d 4f  |S_Control"..v.MO|
00028430  56 20 20 20 52 30 2c 23  26 31 30 0d fc 80 19 41  |V   R0,#&10....A|
00028440  44 52 20 20 20 52 31 2c  53 68 65 6c 6c 5f 55 70  |DR   R1,Shell_Up|
00028450  43 61 6c 6c 0d fc 8a 0f  4d 56 4e 20 20 20 52 32  |Call....MVN   R2|
00028460  2c 23 30 0d fc 94 21 53  57 49 20 20 20 22 58 4f  |,#0...!SWI   "XO|
00028470  53 5f 43 68 61 6e 67 65  45 6e 76 69 72 6f 6e 6d  |S_ChangeEnvironm|
00028480  65 6e 74 22 0d fc 9e 1b  53 54 52 20 20 20 52 31  |ent"....STR   R1|
00028490  33 2c 53 68 65 6c 6c 5f  4a 6f 62 5f 45 6e 64 0d  |3,Shell_Job_End.|
000284a0  fc a8 17 4c 44 52 20 20  20 52 30 2c 5b 52 31 33  |...LDR   R0,[R13|
000284b0  2c 23 34 2a 32 5d 0d fc  b2 12 41 44 44 20 20 20  |,#4*2]....ADD   |
000284c0  52 30 2c 52 30 2c 52 39  0d fc bc 16 53 55 42 20  |R0,R0,R9....SUB |
000284d0  20 20 52 30 2c 52 30 2c  23 26 38 30 30 30 0d fc  |  R0,R0,#&8000..|
000284e0  c6 12 53 57 49 20 20 20  22 4f 53 5f 43 4c 49 22  |..SWI   "OS_CLI"|
000284f0  0d fc d0 0f 2e 53 68 65  6c 6c 5f 45 78 69 74 0d  |.....Shell_Exit.|
00028500  fc da 10 4d 4f 56 20 20  20 72 30 2c 20 23 30 0d  |...MOV   r0, #0.|
00028510  fc e4 11 2e 53 68 65 6c  6c 5f 43 6f 6d 6d 6f 6e  |....Shell_Common|
00028520  0d fc ee 1d 53 54 52 20  20 20 72 30 2c 20 53 68  |....STR   r0, Sh|
00028530  65 6c 6c 5f 45 72 72 6f  72 57 6f 72 64 0d fc f8  |ell_ErrorWord...|
00028540  1b 4c 44 52 20 20 20 52  31 33 2c 53 68 65 6c 6c  |.LDR   R13,Shell|
00028550  5f 4a 6f 62 5f 45 6e 64  0d fd 02 1e 4c 44 4d 46  |_Job_End....LDMF|
00028560  44 20 52 31 33 21 2c 7b  52 38 2c 52 39 2c 52 31  |D R13!,{R8,R9,R1|
00028570  30 2c 52 31 34 7d 0d fd  0c 16 4c 44 4d 46 44 20  |0,R14}....LDMFD |
00028580  52 31 33 21 2c 7b 52 31  2d 52 32 7d 0d fd 16 11  |R13!,{R1-R2}....|
00028590  4d 4f 56 20 20 20 52 30  2c 23 26 31 30 0d fd 20  |MOV   R0,#&10.. |
000285a0  20 53 57 49 20 20 20 22  4f 53 5f 43 68 61 6e 67  | SWI   "OS_Chang|
000285b0  65 45 6e 76 69 72 6f 6e  6d 65 6e 74 22 0d fd 2a  |eEnvironment"..*|
000285c0  16 4c 44 4d 46 44 20 52  31 33 21 2c 7b 52 30 2d  |.LDMFD R13!,{R0-|
000285d0  52 33 7d 0d fd 34 16 53  57 49 20 20 20 22 4f 53  |R3}..4.SWI   "OS|
000285e0  5f 43 6f 6e 74 72 6f 6c  22 0d fd 3e 1b 4c 44 4d  |_Control"..>.LDM|
000285f0  46 44 20 52 31 33 21 2c  7b 52 30 2d 52 37 2c 20  |FD R13!,{R0-R7, |
00028600  52 31 32 7d 0d fd 48 15  53 57 49 20 20 20 22 4f  |R12}..H.SWI   "O|
00028610  53 5f 53 65 74 45 6e 76  22 0d fd 52 13 4d 4f 56  |S_SetEnv"..R.MOV|
00028620  20 20 20 52 31 2c 23 26  38 30 30 30 0d fd 5c 12  |   R1,#&8000..\.|
00028630  2e 53 68 65 6c 6c 5f 52  65 73 74 6f 72 65 0d fd  |.Shell_Restore..|
00028640  66 14 4c 44 52 20 20 20  52 32 2c 5b 52 38 5d 2c  |f.LDR   R2,[R8],|
00028650  23 34 0d fd 70 14 53 54  52 20 20 20 52 32 2c 5b  |#4..p.STR   R2,[|
00028660  52 31 5d 2c 23 34 0d fd  7a 0f 43 4d 50 20 20 20  |R1],#4..z.CMP   |
00028670  52 31 2c 52 39 0d fd 84  17 42 43 43 20 20 20 53  |R1,R9....BCC   S|
00028680  68 65 6c 6c 5f 52 65 73  74 6f 72 65 0d fd 8e 1c  |hell_Restore....|
00028690  4c 44 52 20 20 20 52 30  2c 53 68 65 6c 6c 5f 45  |LDR   R0,Shell_E|
000286a0  72 72 6f 72 57 6f 72 64  0d fd 98 0f 54 45 51 20  |rrorWord....TEQ |
000286b0  20 20 52 30 2c 23 30 0d  fd a2 1c 42 49 43 45 51  |  R0,#0....BICEQ|
000286c0  53 20 50 43 2c 52 31 34  2c 23 26 31 30 30 30 30  |S PC,R14,#&10000|
000286d0  30 30 30 0d fd ac 1b 84  52 4e 45 53 20 50 43 2c  |000.....RNES PC,|
000286e0  52 31 34 2c 23 26 31 30  30 30 30 30 30 30 0d fd  |R14,#&10000000..|
000286f0  b6 11 2e 53 68 65 6c 6c  5f 55 70 43 61 6c 6c 0d  |...Shell_UpCall.|
00028700  fd c0 10 4d 4f 56 20 20  20 50 43 2c 52 31 34 0d  |...MOV   PC,R14.|
00028710  fd ca 10 2e 53 68 65 6c  6c 5f 45 72 72 6f 72 0d  |....Shell_Error.|
00028720  fd d4 1e 41 44 52 20 20  20 72 30 2c 20 53 68 65  |...ADR   r0, She|
00028730  6c 6c 5f 42 75 66 66 65  72 20 2b 20 34 0d fd de  |ll_Buffer + 4...|
00028740  16 42 20 20 20 20 20 53  68 65 6c 6c 5f 43 6f 6d  |.B     Shell_Com|
00028750  6d 6f 6e 0d fd e8 11 2e  53 68 65 6c 6c 5f 42 75  |mon.....Shell_Bu|
00028760  66 66 65 72 0d fd f2 0a  45 51 55 44 20 30 0d fd  |ffer....EQUD 0..|
00028770  fc 12 45 51 55 44 20 26  31 32 33 34 35 36 37 38  |..EQUD &12345678|
00028780  0d fe 06 12 45 51 55 53  20 c4 31 32 38 2c bd 31  |....EQUS .128,.1|
00028790  33 29 0d fe 10 12 45 51  55 53 20 c4 31 32 38 2c  |3)....EQUS .128,|
000287a0  bd 31 33 29 0d fe 1a 14  2e 53 68 65 6c 6c 5f 45  |.13).....Shell_E|
000287b0  72 72 6f 72 57 6f 72 64  0d fe 24 0a 45 51 55 44  |rrorWord..$.EQUD|
000287c0  20 30 0d fe 2e 12 2e 53  68 65 6c 6c 5f 4a 6f 62  | 0.....Shell_Job|
000287d0  5f 45 6e 64 0d fe 38 0a  45 51 55 44 20 30 0d fe  |_End..8.EQUD 0..|
000287e0  42 05 5d 0d fe 4c 05 ed  0d fe 56 16 41 25 3d 53  |B.]..L....V.A%=S|
000287f0  68 65 6c 6c 5f 4a 6f 62  5f 45 6e 64 2b 34 0d fe  |hell_Job_End+4..|
00028800  60 05 e1 0d fe 74 12 dd  20 f2 73 75 62 74 61 73  |`....t.. .subtas|
00028810  6b 28 61 24 29 0d fe 7e  0d e7 20 74 61 73 6b 25  |k(a$)..~.. task%|
00028820  20 8c 0d fe 88 19 c8 99  22 57 69 6d 70 5f 53 74  | ......."Wimp_St|
00028830  61 72 74 54 61 73 6b 22  2c 61 24 0d fe 92 05 cc  |artTask",a$.....|
00028840  0d fe a6 10 de 20 63 6f  64 65 25 20 31 30 32 34  |..... code% 1024|
00028850  0d fe b0 13 f2 41 73 73  65 6d 62 6c 65 5f 53 68  |.....Assemble_Sh|
00028860  65 6c 6c 0d fe ba 16 24  41 25 3d 61 24 3a d6 53  |ell....$A%=a$:.S|
00028870  68 65 6c 6c 5f 43 61 6c  6c 0d fe c4 05 cd 0d fe  |hell_Call.......|
00028880  ce 05 e1 0d ff                                    |.....|
00028885