Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199211.adf » AWNov92 » !AWNov92/Goodies/QFR/!QFR/qfr

!AWNov92/Goodies/QFR/!QFR/qfr

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

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

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199211.adf » AWNov92
Filename: !AWNov92/Goodies/QFR/!QFR/qfr
Read OK:
File size: 6459 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM --> qfr        Quick File Recover
   20
   30REM  FNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFN
   40REM  FN  This program and all documentation (C) D.J.Holden June 1992  FN
   50REM  FNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFN
   60
   70version$="QFR   Ver 2.0"
   80help_fgnd%=5 : help_bgnd%=12
   90PROCinitialise
  100
  110
  120REPEAT
  130SYS "Wimp_Poll",mask%,blk% TO reason%
  140CASE reason% OF
  150 WHEN 1:IF !blk%=view_w% PROCredraw_view ELSEIF !blk%=help_w% PROCredraw_help
  160 WHEN 2:SYS"Wimp_OpenWindow",,blk%
  170 WHEN 3:SYS"Wimp_CloseWindow",,blk%:IF !blk%=view_w% flag%=flag%ANDNOT1
  180        IF !blk%=tool_w% THEN
  190         !blk%=view_w%:SYS"Wimp_CloseWindow",,blk%:flag%=flag%ANDNOT5
  200         !blk%=endrec_w%:SYS"Wimp_CloseWindow",,blk%
  210        ENDIF
  220 WHEN 6:PROCclick
  230 WHEN 7:PROCdrag_term
  240 WHEN 8:IF blk%?24=13 PROCreturn_key ELSE SYS"Wimp_ProcessKey",blk%!24
  250 WHEN 9:PROCselect
  260 WHEN 17,18:CASE blk%!16 OF
  270     WHEN 0:PROCdie
  280     WHEN 2:I%=blk%+44:WHILE?I%>31:I%+=1:ENDWHILE:?I%=13:PROCsave($(blk%+44),1)
  290     WHEN &502:PROChelp
  300            ENDCASE
  310ENDCASE
  320UNTIL FALSE
  330
  340    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  350    Menu and Window click and select routines
  360    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  370DEFPROCclick
  380SYS"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
  390CASE blk%!12 OF
  400 WHEN -2:IF blk%!16=icon% THEN
  410          CASE mb% OF
  420           WHEN 2:mx%=blk%!&C0-140:mh%=354:SYS"Wimp_CreateMenu",,menu%,mx%,mh%
  430           WHEN 4:IF type%=-1 I%=FNalert("You must first identify the disc type.") ELSE PROCopen_view:PROCsetcaret(tool_w%,24)
  440          ENDCASE
  450         ENDIF
  460 WHEN tool_w%:PROCtool_click
  470 WHEN save_w%:IF blk%!16=2 THEN
  480               !blk%=save_w%:blk%!4=1:SYS"Wimp_GetIconState",,blk%
  490               PROCsave($(blk%!28),0)
  500              ELSE
  510               IF blk%!16=0 AND blk%!8=4 PROCdrag_file
  520              ENDIF
  530ENDCASE
  540ENDPROC
  550
  560DEFPROCselect
  570SYS"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
  580CASE !blk% OF
  590 WHEN 0:IF NOT blk%!4 PROCget_format
  600 WHEN 1:PROCchange_drive
  610 WHEN 2:!blk%=help_w%:SYS"Wimp_GetWindowInfo",,blk%:SYS"Wimp_OpenWindow",,blk%
  620 WHEN 4:PROCdie
  630ENDCASE
  640IF mb%=1 SYS"Wimp_CreateMenu",,menu%,mx%,mh%
  650ENDPROC
  660
  670DEFPROCreturn_key
  680CASE !blk% OF
  690 WHEN tool_w%:
  700      IF blk%!4=24 THEN
  710       SYS "Wimp_GetIconState",,blk%
  720       SYS "OS_ReadUnsigned",16,blk%!28 TO ,,A%
  730       IF A%>max_addr% THEN
  740        I%=FNalert("Invalid disk address")
  750        PROCaddr_icon
  760       ELSE
  770        IF address%<>A% address%=A%ANDNOT(sec_size%-1):PROCcalc_ths:PROCths_icons:PROCview_load:PROCopen_view
  780       ENDIF
  790      PROCclose_odds
  800      ENDIF
  810 WHEN save_w%:SYS"Wimp_GetIconState",,blk%:PROCsave($(blk%!28),0)
  820 WHEN define_w%:CASE blk%!4 OF
  830                 WHEN 1:PROCsetcaret(define_w%,2)
  840                 WHEN 2:PROCsetcaret(define_w%,3)
  850                 WHEN 3:PROCsetcaret(define_w%,4)
  860                 WHEN 4:SYS"Wimp_CloseWindow",,blk%:blk%!4=6:PROCget_format
  870                ENDCASE
  880 WHEN endrec_w%:PROCend_address
  890ENDCASE
  900ENDPROC
  910
  920DEFPROCtool_click
  930IF mb%=2 THEN
  940 mx%=blk%!&C0-140:mh%=blk%!&C4+96
  950 SYS"Wimp_CreateMenu",,menu%,mx%,mh%
  960ELSE
  970CASE blk%!16 OF
  980 WHEN 27:IF flag%AND8 PROCopen_view ELSE PROCview_load:PROCopen_view
  990 WHEN 18:IF NOT(flag%AND2) flag%=flag%OR&C2:PROCopen_view
 1000 WHEN 17:IF flag%AND2 flag%=flag%AND(NOT2):flag%=flag%OR&C0:PROCopen_view
 1010 WHEN 25:!blk%=tool_w%:blk%!4=25:SYS"Wimp_GetIconState",,blk%
 1020         IF blk%!24AND(1<<21) mark1%=-1 ELSE mark1%=address%
 1030         blk%!12=0:blk%!8=1<<21:SYS"Wimp_SetIconState",,blk%
 1040         PROCclose_odds
 1050 WHEN 26:!blk%=tool_w%:blk%!4=26:SYS"Wimp_GetIconState",,blk%
 1060         IF blk%!24AND(1<<21) mark2%=-1 ELSE mark2%=address%
 1070         blk%!12=0:blk%!8=1<<21:SYS"Wimp_SetIconState",,blk%
 1080         PROCclose_odds
 1090 WHEN 28:track%+=1:IF track%>=cyls% track%=0
 1100         address%=FNcalc_addr:PROCths_icons:PROCclose_odds
 1110         IF mb%=4 PROCview_load:PROCopen_view
 1120         IF mb%=1 THEN
 1130          IF flag%AND9=9 PROCblank_view
 1140          flag%=flag% ANDNOT%11000
 1150         ENDIF
 1160 WHEN 29:track%-=1:IF track%<0 track%=cyls%-1
 1170         address%=FNcalc_addr:PROCths_icons:PROCclose_odds
 1180         IF mb%=4 PROCview_load:PROCopen_view
 1190         IF mb%=1 THEN
 1200          IF flag%AND9=9 PROCblank_view
 1210          flag%=flag% ANDNOT%11000
 1220         ENDIF
 1230 WHEN 30:head%+=1
 1240         IF head%>=heads% head%=0:IF type%<5 track%+=1:IFtrack%>=cyls% track%=0
 1250         address%=FNcalc_addr:PROCths_icons:PROCclose_odds
 1260         IF mb%=4 PROCview_load:PROCopen_view
 1270         IF mb%=1 THEN
 1280          IF flag%AND9=9 PROCblank_view
 1290          flag%=flag% ANDNOT%11000
 1300         ENDIF
 1310 WHEN 31:head%-=1
 1320         IFhead%<0 head%=heads%-1:IFtype%<5 track%-=1:IFtrack%<0 track%=cyls%-1
 1330         address%=FNcalc_addr:PROCths_icons:PROCclose_odds
 1340         IF mb%=4 PROCview_load:PROCopen_view
 1350         IF mb%=1 THEN
 1360          IF flag%AND9=9 PROCblank_view
 1370          flag%=flag% ANDNOT%11000
 1380         ENDIF
 1390 WHEN 32:address%+=sec_size%:IF type%=3 IF sector%=8 address%+=sec_size%
 1400         PROCcalc_ths:PROCths_icons:PROCclose_odds
 1410         IF mb%=4 PROCview_load:PROCopen_view
 1420         IF mb%=1 THEN
 1430          IF flag%AND9=9 PROCblank_view
 1440          flag%=flag% ANDNOT%11000
 1450         ENDIF
 1460 WHEN 33:address%-=sec_size%:IF type%=3 IF sector%=0 address%-=sec_size%
 1470         PROCcalc_ths:PROCths_icons:PROCclose_odds
 1480         IF mb%=4 PROCview_load:PROCopen_view
 1490         IF mb%=1 THEN
 1500          IF flag%AND9=9 PROCblank_view
 1510          flag%=flag% ANDNOT%11000
 1520         ENDIF
 1530 WHEN 34:PROCrecover
 1540ENDCASE
 1550ENDIF
 1560ENDPROC
 1570
 1580    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 1590    Routines to Load and Save from/to disk
 1600    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 1610
 1620DEFPROCload
 1630IF FNwkspc(length%)=FALSE I%=FNalert("Unable to claim workspace to recover file"):I%=FNwkspc(0):ENDPROC
 1640IF type%=3 THEN
 1650 S%=(start%DIVsec_size%)MODsecs_trk%:E%=filebuff%
 1660 adr%=(start%+sec_size%)OR(drive%<<29)
 1670 SYS "ADFS_Retries",&FF00,&0200 TO ,,ort%
 1680 REPEAT
 1690  SYS "XADFS_DiscOp",,(drec%<<6)OR1,adr%,E%,sec_size% TO err%;F%
 1700  IF F%AND1 SYS "ADFS_Retries",&FF00,ort%:PROCx_error:I%=FNwkspc(0):ENDPROC
 1710  E%+=sec_size%:S%+=1:adr%+=sec_size%
 1720  IF S%=9 S%=0:adr%+=sec_size%:length%-=sec_size%
 1730 UNTIL E%-filebuff%>=length%
 1740 SYS "ADFS_Retries",&FF00,ort%
 1750ELSE
 1760 SYS "ADFS_Retries",&FF00,&0200 TO ,,ort%
 1770 adr%=start% OR(drive%<<29)
 1780 SYS "XADFS_DiscOp",,(drec%<<6)OR1,adr%,filebuff%,length% TO err%;F%
 1790 SYS "ADFS_Retries",&FF00,ort%
 1800 IF F%AND1 PROCx_error:I%=FNwkspc(0):ENDPROC
 1810ENDIF
 1820PROCopen_save
 1830ENDPROC
 1840
 1850DEFPROCsave(name$,c%)
 1860IF c%=0 IF INSTR(name$,".")=0 I%=FNalert("You must drag the file icon to a directory viewer"):ENDPROC
 1870SYS "XOS_File",10,name$,&FFD,,filebuff%,filebuff%+length% TO err%;F%
 1880IF F%AND1 PROCx_error:PROCclose_odds:I%=FNwkspc(0):ENDPROC
 1890IF c% THEN
 1900 S%=blk%!36:blk%!12=blk%!8:blk%!16=3
 1910 $(blk%+44)=name$:!blk%=(LEN(name$)+49)ANDNOT3
 1920 SYS"Wimp_SendMessage",18,blk%,blk%!20,blk%!24
 1930 IF S%=-1 ENDPROC
 1940ENDIF
 1950IF mark1%>=0 mark1%=-1:!blk%=tool_w%:blk%!4=25:SYS"Wimp_GetIconState",,blk%:blk%!12=0:blk%!8=1<<21:SYS"Wimp_SetIconState",,blk%
 1960IF mark2%>=0 mark2%=-1:!blk%=tool_w%:blk%!4=26:SYS"Wimp_GetIconState",,blk%:blk%!12=0:blk%!8=1<<21:SYS"Wimp_SetIconState",,blk%
 1970PROCclose_odds:I%=FNwkspc(0)
 1980ENDPROC
 1990
 2000DEFPROCview_load
 2010flag%=flag%ANDNOT%11000
 2020adr%=address%OR(drive%<<29):IF type%=3 adr%+=&200
 2030SYS "ADFS_Retries",&FF00,&0200 TO ,,ort%
 2040SYS "XADFS_DiscOp",,(drec%<<6)OR1,adr%,viewbuff%,chunk% TO err%;F%
 2050SYS "ADFS_Retries",&FF00,ort%
 2060IF F%AND1 PROCx_error:PROCblank_view ELSE flag%=flag%OR&88
 2070ENDPROC
 2080
 2090DEFPROCdrag_file
 2100!blk%=save_w%:SYS"Wimp_GetWindowState",,blk%
 2110X%=blk%!4-blk%!20:Y%=blk%!16-blk%!24
 2120blk%!4=0:SYS"Wimp_GetIconState",,blk%
 2130!blk%=save_w%:blk%!4=5:blk%!8=blk%!8+X%:blk%!12=blk%!12+Y%
 2140blk%!16=blk%!16+X%:blk%!20=blk%!20+Y%:blk%!24=0:blk%!28=0
 2150blk%!32=&7FFFFFFF:blk%!36=&7FFFFFFF
 2160SYS"Wimp_DragBox",,blk%
 2170ENDPROC
 2180
 2190DEFPROCdrag_term
 2200blk%!&80=save_w%:blk%!&84=1:SYS"Wimp_GetIconState",,blk%+&80
 2210I%=(blk%!&9C):WHILE INSTR($(I%),"."):I%+=1:ENDWHILE:leaf$=$(I%)
 2220SYS"Wimp_GetPointerInfo",,blk%
 2230blk%!20=blk%!12:blk%!24=blk%!16:blk%!28=!blk%:blk%!32=blk%!4
 2240blk%!36=length%:blk%!40=&FFD:blk%!16=1:$(blk%+44)=leaf$
 2250!blk%=(LEN(leaf$)+49)ANDNOT3:blk%!12=0
 2260SYS"Wimp_SendMessage",17,blk%,blk%!20,blk%!24
 2270ENDPROC
 2280
 2290DEFPROCrecover
 2300IF mark1%=-1 AND mark2%=-1 I%=FNalert("You must have at least one marker set before you can recover a file"):ENDPROC
 2310IF mark1%=-1 OR mark2%=-1 PROCopen_endrec:ENDPROC
 2320IF mark1%<mark2% start%=mark1% ELSE start%=mark2%
 2330length%=ABS(mark1%-mark2%)+sec_size%
 2340PROCload
 2350ENDIF
 2360ENDPROC
 2370
 2380    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 2390    Open or Redraw various windows etc.
 2400    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 2410
 2420DEFPROCopen_endrec
 2430IF mark1%=-1 start%=mark2% ELSE start%=mark1%
 2440!blk%=endrec_w%:blk%!4=1:SYS"Wimp_GetIconState",,blk%
 2450$(blk%!28)=RIGHT$("000000"+STR$~(start%),6)
 2460blk%!4=2:SYS"Wimp_GetIconState",,blk%
 2470$(blk%!28)=STR$~(chunk%)
 2480!blk%=endrec_w%:SYS"Wimp_GetWindowState",,blk%
 2490blk%!28=-1:SYS"Wimp_OpenWindow",,blk%
 2500ENDPROC
 2510
 2520DEFPROCopen_save
 2530!blk%=save_w%:blk%!4=1:SYS"Wimp_GetIconState",,blk%
 2540$(blk%!28)=path$+"Recovered"
 2550SYS"Wimp_GetWindowState",,blk%
 2560blk%!28=-1:SYS"Wimp_OpenWindow",,blk%
 2570PROCsetcaret(save_w%,1)
 2580ENDPROC
 2590
 2600DEFPROCopen_view
 2610W%=FNw_ext
 2620IF W%<>w_ext% w_ext%=W%:!blk%=0:blk%!4=-w_ext%:blk%!8=1152:blk%!12=0:SYS"Wimp_SetExtent",view_w%,blk%
 2630IF NOTflag%AND16 C%=chunk%:F%=flag%:CALL code%:IF flag%AND8 flag%=flag%OR&90
 2640IF NOTflag%AND1 !blk%=view_w%:SYS"Wimp_GetWindowState",,blk%:blk%!20=0:blk%!24=0:SYS"Wimp_OpenWindow",,blk%:flag%=flag%OR1
 2650IF flag%AND&80 THEN
 2660 IF flag%AND&40 !blk%=view_w%:SYS"Wimp_GetWindowState",,blk%:blk%!24=0:SYS"Wimp_OpenWindow",,blk%
 2670 SYS"Wimp_ForceRedraw",view_w%,0,-w_ext%,1152,0
 2680 flag%=flag%ANDNOT&C0
 2690ENDIF
 2700IF NOTflag%AND4 !blk%=tool_w%:SYS"Wimp_GetWindowState",,blk%:SYS"Wimp_OpenWindow",,blk%:flag%=flag%OR4
 2710ENDPROC
 2720
 2730DEFPROCclose_all
 2740flag%=flag%ANDNOT%101
 2750blk%!&A0=tool_w%:SYS"Wimp_CloseWindow",,blk%+&A0
 2760blk%!&A0=view_w%:SYS"Wimp_CloseWindow",,blk%+&A0
 2770DEFPROCclose_odds
 2780blk%!&A0=save_w%:SYS"Wimp_CloseWindow",,blk%+&A0
 2790blk%!&A0=endrec_w%:SYS"Wimp_CloseWindow",,blk%+&A0
 2800ENDPROC
 2810
 2820DEFPROCblank_view
 2830flag%=flag%ANDNOT8
 2840!blk%=view_w%:SYS"Wimp_GetWindowState",,blk%
 2850SYS"Wimp_ForceRedraw",view_w%,0,-w_ext%,1152,0
 2860ENDPROC
 2870
 2880DEFPROCsetcaret(w%,i%)
 2890!blk%=w%:blk%!4=i%:SYS"Wimp_GetIconState",,blk%
 2900SYS"Wimp_SetCaretPosition",w%,i%,,,-1,LEN$(blk%!28)
 2910ENDPROC
 2920
 2930DEFPROCredraw_help
 2940SYS "Wimp_RedrawWindow",,blk% TO M%
 2950WHILE M%
 2960 X%=blk%!4-blk%!20+16:Y%=blk%!16-blk%!24-4:I%=helptext%
 2970 WHILE?I%<255:MOVE X%,Y%:PRINT$I%:I%+=(LEN$(I%)+1):Y%-=32:ENDWHILE
 2980 SYS "Wimp_GetRectangle",,blk% TO M%
 2990ENDWHILE
 3000ENDPROC
 3010
 3020DEFPROCredraw_view
 3030flag%=flag%ANDNOT&80
 3040SYS &400C8,,blk% TO M%
 3050IFNOTflag%AND16:WHILEM%:SYS&400C8,,blk% TO M%:ENDWHILE:ENDPROC
 3060IF flag%AND2THEN
 3070WHILEM%:S%=ABS(blk%!24DIV32):E%=(blk%!16-blk%!8)DIV32+S%:X%=blk%!4-blk%!20+16:Y%=blk%!16-blk%!24-4:B%=scrnbuff%+1+(S%*72):Y%-=(S%*32):FORI%=S%TOE%:MOVEX%,Y%:PRINT$B%:B%+=72:Y%-=32:NEXT:SYS&400C8,,blk%TOM%:ENDWHILE
 3080ELSE
 3090WHILEM%:S%=ABS(blk%!24DIV32):E%=(blk%!16-blk%!8)DIV32+S%:X%=blk%!4-blk%!20+16:Y%=blk%!16-blk%!24-4:B%=scrnbuff%+1153+(S%*72):Y%-=(S%*32):FORI%=S%TOE%:MOVEX%,Y%:PRINT$B%:B%+=72:Y%-=32:NEXT:SYS&400C8,,blk%TOM%:ENDWHILE
 3100ENDIF
 3110ENDPROC
 3120
 3130    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 3140    Read and write info from/to menus and icons
 3150    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 3160
 3170DEFPROCend_address
 3180CASE blk%!4 OF
 3190 WHEN 1:SYS "Wimp_GetIconState",,blk%
 3200        SYS "OS_ReadUnsigned",16,blk%!28 TO ,,A%:L%=A%-start%
 3210     CASE TRUE OF
 3220      WHEN L%<=0:I%=FNalert("End Address must be greater than the Marker")
 3230      WHEN A%>(max_addr%+sec_size%):I%=FNalert("End Address after end of disk")
 3240      OTHERWISE:length%=L%:PROCclose_odds:PROCload
 3250     ENDCASE
 3260 WHEN 2:SYS "Wimp_GetIconState",,blk%
 3270        SYS "OS_ReadUnsigned",16,blk%!28 TO ,,length%
 3280        IF length%+start%>max_addr%+sec_size% THEN
 3290         I%=FNalert("Length goes past the end of the disk")
 3300        ELSE
 3310         PROCclose_odds:PROCload
 3320        ENDIF
 3330ENDCASE
 3340ENDPROC
 3350
 3360DEFPROCtype_icons
 3370!blk%=define_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%
 3380$(blk%!28)=STR$(cyls%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3390blk%!4=2:SYS "Wimp_GetIconState",,blk%
 3400$(blk%!28)=STR$(heads%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3410blk%!4=3:SYS "Wimp_GetIconState",,blk%
 3420$(blk%!28)=STR$(secs_trk%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3430blk%!4=4:SYS "Wimp_GetIconState",,blk%
 3440$(blk%!28)=STR$(sec_size%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3450!blk%=tool_w%:blk%!4=20:SYS "Wimp_GetIconState",,blk%
 3460$(blk%!28)=type$:blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3470ENDPROC
 3480
 3490DEFPROCths_icons
 3500!blk%=tool_w%:blk%!4=21:SYS "Wimp_GetIconState",,blk%
 3510$(blk%!28)=STR$(track%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3520blk%!4=22:SYS "Wimp_GetIconState",,blk%
 3530$(blk%!28)=STR$(head%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3540blk%!4=23:SYS "Wimp_GetIconState",,blk%
 3550$(blk%!28)=STR$(sector%):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
 3560DEFPROCaddr_icon
 3570!blk%=tool_w%:blk%!4=24:SYS "Wimp_GetIconState",,blk%
 3580$(blk%!28)=RIGHT$("000000"+STR$~(address%),6):blk%!8=0:blk%!12=0
 3590SYS "Wimp_SetIconState",,blk%
 3600ENDPROC
 3610
 3620DEFPROCchange_drive
 3630D%=blk%!4:PROCreset
 3640IF NOT D% THEN
 3650 IF D%<fp% drive%=D% ELSE drive%=D%-fp%+4
 3660 PROCtick_item(drive_m%,D%)
 3670 !blk%=tool_w%:blk%!4=19:SYS "Wimp_GetIconState",,blk%
 3680 blk%!8=0:blk%!12=0:$(blk%!28)=STR$(drive%):SYS "Wimp_SetIconState",,blk%
 3690ENDIF
 3700PROCtype_icons
 3710ENDPROC
 3720
 3730DEFPROCget_format
 3740IF blk%!4=0 ENDPROC
 3750T%=blk%!4:PROCreset
 3760CASE T% OF
 3770 WHEN 1:IF drive%<4 PROCident_floppy ELSE PROCident_hard
 3780 WHEN 3:type%=2:cyls%=80:heads%=2:secs_trk%=5:sec_size%=&400:type$="Normal"
 3790 WHEN 4:type%=3:cyls%=80:heads%=2:secs_trk%=10:sec_size%=&200:type$="MS-Dos"
 3800 WHEN 5:IF FNvalidate_ths THEN
 3810         type%=4:type$="Special"
 3820        ELSE
 3830         type%=-1:type$=""
 3840         !blk%=define_w%:SYS"Wimp_GetWindowState",,blk%
 3850         blk%!28=-1:SYS"Wimp_OpenWindow",,blk%
 3860         PROCsetcaret(define_w%,1)
 3870        ENDIF
 3880 WHEN 6:type%=5:cyls%=80:heads%=2:secs_trk%=16:sec_size%=&100:type$="640K"
 3890 WHEN 7:type%=6:cyls%=80:heads%=2:secs_trk%=16:sec_size%=&100:type$="DFS 320K"
 3900 WHEN 8:type%=7:cyls%=80:heads%=2:secs_trk%=18:sec_size%=&100:type$="DFS 360K"
 3910ENDCASE
 3920PROCtick_item(type_m%,type%)
 3930IF type%>=0 PROCtype_icons:max_addr%=FNmaxaddr
 3940chunk%=sec_size%:IF chunk%>&400 chunk%=&400
 3950PROCset_record
 3960ENDPROC
 3970
 3980DEFFNvalidate_ths
 3990J%=TRUE
 4000!blk%=define_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%
 4010cyls%=VAL$(blk%!28)
 4020IF cyls%<40 I%=FNalert("Invalid number of tracks"):J%=FALSE
 4030blk%!4=2:SYS "Wimp_GetIconState",,blk%:heads%=VAL$(blk%!28)
 4040IF heads%=0 I%=FNalert("Can't have 0 heads"):J%=FALSE
 4050blk%!4=3:SYS "Wimp_GetIconState",,blk%:secs_trk%=VAL$(blk%!28)
 4060IF secs_trk%<4 I%=FNalert("Invalid number of sectors"):J%=FALSE
 4070blk%!4=4:SYS "Wimp_GetIconState",,blk%:sec_size%=VAL$(blk%!28)
 4080sec_size%=sec_size%ANDNOT&FF
 4090IF sec_size%=0 I%=FNalert("Bad sector size"):J%=FALSE
 4100=J%
 4110
 4120DEFPROCident_hard
 4130PROCset_record:?drec%=8:drec%?1=32
 4140SYS "XADFS_DiscOp",,(drec%<<6)OR 1,&C00 OR(drive%<<29),viewbuff%,&200 TOerr%;F%
 4150IF F%AND1 PROCx_error:ENDPROC
 4160type$="HardDisc":type%=4
 4170sec_size%=2^(viewbuff%?&1C0)
 4180secs_trk%=viewbuff%?&1C1
 4190heads%=viewbuff%?&1C2
 4200cyls%=(viewbuff%!&1D0)DIV(heads%*sec_size%*secs_trk%)
 4210ENDPROC
 4220
 4230DEFPROCident_floppy
 4240PROCset_record
 4250SYS "XADFS_DiscOp",,(drec%<<6)OR 1,&400 OR(drive%<<29),viewbuff%,&200 TOerr%;F%
 4260IF (F%AND1)=1 PROCx_error:ENDPROC
 4270CASE TRUE OF
 4280 WHEN viewbuff%!257=hg%:
 4290      type%=5:type$="640K":sec_size%=256:secs_trk%=16:heads%=2:cyls%=80
 4300 WHEN viewbuff%!1=hg%:
 4310      type%=2:type$="Normal":sec_size%=&400:secs_trk%=5:heads%=2:cyls%=80
 4320 WHEN (viewbuff%!21 AND&FFFFFF)=&C80:type%=2:
 4330      type$="Normal":sec_size%=&400:secs_trk%=5:heads%=2:cyls%=80
 4340 WHEN (viewbuff%!21 AND&FFFFFF)=&1900:type%=1:
 4350      type$="Hi Dens":sec_size%=&400:secs_trk%=10:heads%=2:cyls%=80
 4360 WHEN ?viewbuff%=&E9 OR (?viewbuff%=&EB AND viewbuff%?2=&90):
 4370      type%=3:type$="MS-Dos":sec_size%=&200:secs_trk%=10:heads%=2:cyls%=80
 4380 WHEN (viewbuff%?6AND15)*&100+viewbuff%?7=&500:
 4390      type%=6:type$="DFS 320K":sec_size%=256:secs_trk%=16:heads%=2:cyls%=80
 4400 WHEN (viewbuff%?6AND15)*&100+viewbuff%?7=&5A0:
 4410      type%=7:type$="DFS 360K":sec_size%=256:secs_trk%=18:heads%=2:cyls%=80
 4420 OTHERWISE:I%=FNalert("Unable to identify disc type")
 4430ENDCASE
 4440ENDPROC
 4450
 4460DEFPROCset_record
 4470FOR I%=drec%TOdrec%+&4C STEP4:!I%=0:NEXT
 4480drec%!64=&20000000:drec%?34=drive%
 4490CASE type% OF
 4500 WHEN -1:?drec%=10:drec%?1=5:drec%?2=2:drec%?3=2:drec%!16=&C8000
 4510 WHEN 3:?drec%=9:drec%?1=10:drec%?2=2:drec%?3=2:drec%!16=&C8000
 4520 WHEN 5,6:?drec%=8:drec%?1=16:drec%?2=2:drec%?3=2:drec%!16=&A0000
 4530 WHEN 7:?drec%=8:drec%?1=18:drec%?2=2:drec%?3=2:drec%!16=&B4000
 4540 OTHERWISE
 4550         I%=0:REPEAT:I%+=1:UNTIL sec_size% DIV 2^I%=1:?drec%=I%
 4560         drec%?1=secs_trk%:drec%?2=heads%:drec%?3=2
 4570         max_addr%=FNmaxaddr:drec%!16=max_addr%+sec_size%
 4580ENDCASE
 4590ENDPROC
 4600
 4610    %%%%%%%%%%%%
 4620    Calculations
 4630    %%%%%%%%%%%%
 4640
 4650DEFFNmaxaddr
 4660IF type%=3:=cyls%*heads%*secs_trk%*sec_size%-(2*sec_size%)
 4670=cyls%*heads%*secs_trk%*sec_size%-sec_size%
 4680
 4690DEFFNwkspc(sz%)
 4700SYS"Wimp_SlotSize",mem%+sz%,-1 TO e%
 4710IF e%<(mem%+sz%):=FALSE:ELSE:=TRUE
 4720
 4730DEFFNw_ext
 4740IF NOTflag%AND2:=chunk%*2
 4750IF chunk%>&400:=chunk%DIV2:ELSE:=512
 4760
 4770DEFFNcalc_addr
 4780IF type%>4:=((head%*cyls%+track%)*secs_trk%+sector%)*sec_size%
 4790=(((track%*heads%+head%)*secs_trk%)+sector%)*sec_size%
 4800
 4810DEFPROCcalc_ths
 4820IF address%>max_addr% address%=0 ELSEIF address%<0 address%=max_addr%
 4830S%=address% DIV sec_size%:address%=S%*sec_size%
 4840IF type%>4 THEN
 4850 sector%=S% MOD secs_trk%:track%=S% DIV secs_trk%
 4860 head%=track% DIV cyls%:track%=track% MOD cyls%
 4870ELSE
 4880 sector%=S% MOD secs_trk%:track%=S% DIV secs_trk%
 4890 head%=track% MOD heads%:track%=track% DIV heads%
 4900ENDIF
 4910IF type%=3 IF sector%=9 address%+=sec_size%:PROCcalc_ths:ENDPROC
 4920ENDPROC
 4930
 4940    %%%%%%%%%%%%%%%%%%%%%%%%
 4950    Basic program structures
 4960    %%%%%%%%%%%%%%%%%%%%%%%%
 4970
 4980DEFPROCtick_item(m%,i%)
 4990I%=m%+4
 5000REPEAT:I%+=24:!I%=!I%AND NOT 1:UNTIL !I%AND&80
 5010IF NOT i% I%=m%+28+(i%*24):!I%=!I%OR1
 5020ENDPROC
 5030
 5040DEFFNmenu_item (itemname$,menuflags%,submenu%)
 5050m%!0=menuflags%:m%!4=submenu%:m%!8=&7000001:$(m%+12)=itemname$
 5060=m%+24
 5070
 5080DEFFNmenu (a%,menutitle$,menuwidth%)
 5090$a%=menutitle$:a%!12=&70207:a%!16=menuwidth%:a%!20=40:a%!24=0
 5100m%=a%+28
 5110=a%
 5120
 5130DEFPROCreport_error
 5140SYS"Hourglass_Smash"
 5150!blk%=ERR:$(blk%+4)=REPORT$+" at line "+STR$(ERL)+CHR$0
 5160SYS "Wimp_ReportError",blk%,1,title%
 5170IF ERR>52 ENDPROC
 5180DEFPROCdie
 5190ONERROROFF
 5200SYS "XOS_ReadVarVal","qfrsave$path",viewbuff%,-1,0,0 TO ,,F%
 5210IF F%<0:OSCLI "*unset qfrsave$path"
 5220SYS "Wimp_CloseDown",hand%,&4B534154
 5230END
 5240
 5250DEFFNalert(a$)
 5260blk%!&80=0:$(blk%+&84)=a$+CHR$0
 5270SYS"Wimp_ReportError",blk%+&80,17,title% TO ,I%
 5280=I%
 5290
 5300DEFPROCx_error
 5310SYS"Wimp_ReportError",err%,17,title%
 5320ENDPROC
 5330
 5340    %%%%%%%%%%%%%%%%%%%%%%%
 5350    Initialisation routines
 5360    %%%%%%%%%%%%%%%%%%%%%%%
 5370
 5380DEFPROCcreate_menu
 5390type_m%=FNmenu (menubuff%,"Disc Type",168)
 5400m%=FNmenu_item ("Format",2,define_w%)
 5410m%=FNmenu_item ("Read disc",0,0)
 5420m%=FNmenu_item ("Normal",0,0)
 5430m%=FNmenu_item ("MS-Dos",0,0)
 5440m%=FNmenu_item ("User Spec.",0,0)
 5450m%=FNmenu_item ("640K",0,0)
 5460m%=FNmenu_item ("DFS 320k",0,0)
 5470m%=FNmenu_item ("DFS 360k",&80,0)
 5480drive_m%=FNmenu (m%,"Floppy",168)
 5490FOR I%=1TOfp%:a$="Floppy "+STR$(I%-1):m%=FNmenu_item (a$,0,0):NEXT
 5500IF hd%>0 m%!-24=m%!-24OR2:FOR I%=1TOhd%:a$="HardDisc "+STR$(I%+3):m%=FNmenu_item (a$,0,0):NEXT
 5510m%!-24=m%!-24 OR &80
 5520menu%=FNmenu (m%,"Q.F.R.",160)
 5530m%=FNmenu_item ("Disc type",0,type_m%)
 5540m%=FNmenu_item ("Drive",0,drive_m%)
 5550m%=FNmenu_item("Help text",0,0)
 5560IF NOT help_OK% m%!-16=m%!-16OR1<<22
 5570m%=FNmenu_item ("Info",2,info_w%)
 5580m%=FNmenu_item ("Quit",&80,0)
 5590ENDPROC
 5600
 5610DEFPROCreset
 5620PROCclose_all
 5630type%=-1:type$="":flag%=flag%ANDNOT%11101
 5640track%=0:head%=0:sector%=0:address%=0
 5650PROCths_icons:PROCtick_item(type_m%,type%)
 5660mark1%=-1:mark2%=-1
 5670!blk%=tool_w%:blk%!4=25:SYS"Wimp_GetIconState",,blk%
 5680blk%!8=0:blk%!12=1<<21:SYS"Wimp_SetIconState",,blk%
 5690!blk%=tool_w%:blk%!4=26:SYS"Wimp_GetIconState",,blk%
 5700blk%!8=0:blk%!12=1<<21:SYS"Wimp_SetIconState",,blk%
 5710ENDPROC
 5720
 5730DEFPROCsetup_helptext
 5740H%=0:help_OK%=TRUE
 5750FOR I%=helptext% TO helptext%+L%
 5760 IF ?I%<32 ?I%=13:H%+=1
 5770NEXT
 5780IF helptext%?(L%-1)<>13:helptext%?L%=13:helptext%?(L%+1)=13:L%+=2:H%+=2
 5790helptext%?L%=255
 5800!blk%=0:blk%!4=460:blk%!8=1280:blk%!12=1004
 5810blk%?32=0:blk%?33=8:blk%?34=help_fgnd%:blk%?35=help_bgnd%
 5820blk%!44=-(H%*32):blk%!48=1248
 5830SYS "Wimp_CreateWindow",,blk% TO help_w%
 5840ENDPROC
 5850
 5860DEFPROCinitialise
 5870SYS "Wimp_Initialise",200,&4B534154,"QFR" TO ,hand%
 5880SYS "Wimp_SlotSize",-1,-1 TO mem%
 5890filebuff%=mem%+&8000:indirsz%=&340
 5900ON ERROR PROCreport_error
 5910DIM indir% indirsz%, blk% &100, menubuff% &280, title% &20, drec% &50
 5920DIM code% &120, viewbuff% &400, scrnbuff% &1700
 5930PROCassemble
 5940$title%="Hugo":hg%=!title%:$title%="Quick File Recover"
 5950IF FNwkspc(&2000)=FALSE I%=FNalert("Unable to claim sufficient workspace to run!"):PROCdie
 5960SYS"Hourglass_On"
 5970SYS "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
 5980SYS "Wimp_LoadTemplate",,filebuff%,indir%,indir%+indirsz%,-1,"info",0 TO ,,R%
 5990SYS "Wimp_CreateWindow",,filebuff% TO info_w%
 6000SYS "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"define",0 TO ,,R%
 6010SYS "Wimp_CreateWindow",,filebuff% TO define_w%
 6020SYS "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"endrec",0 TO ,,R%
 6030SYS "Wimp_CreateWindow",,filebuff% TO endrec_w%
 6040SYS "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"tool",0 TO ,,R%
 6050SYS "Wimp_CreateWindow",,filebuff% TO tool_w%
 6060SYS "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"save",0 TO ,,R%
 6070SYS "Wimp_CreateWindow",,filebuff% TO save_w%
 6080SYS "Wimp_CloseTemplate"
 6090!blk%=info_w%:blk%!4=0:SYS "Wimp_GetIconState",,blk%:$(blk%!28)=version$
 6100FOR I%=blk%TOblk%+84STEP4:!I%=0:NEXT
 6110w_ext%=512
 6120!blk%=64:blk%!4=460:blk%!8=64+1152:blk%!12=460+w_ext%
 6130blk%!24=-1:blk%!28=&FF00000F:blk%!32=&1070207:blk%!36=&C0103
 6140blk%!44=-512:blk%!48=1152:blk%!56=&13D:blk%!60=3<<12
 6150blk%!72=title%
 6160SYS "Wimp_CreateWindow",,blk% TO view_w%
 6170help_OK%=FALSE
 6180SYS"OS_File",17,"<Obey$Dir>.HelpText" TO D%,,,,L%
 6190IF D%=1 THEN
 6200 DIM helptext% L%+&20
 6210 SYS "XOS_File",16,"<Obey$Dir>.HelpText",helptext%,0 TO err%;F%
 6220 IF F%AND1 PROCx_error ELSE PROCsetup_helptext
 6230ELSE
 6240 I%=FNalert("Help Text not found so no instructions will be available")
 6250ENDIF
 6260SYS "ADFS_Drives" TO ,fp%,hd%
 6270cyls%=80:heads%=2:secs_trk%=5:sec_size%=&400
 6280drive%=0:mh%=354:flag%=2:chunk%=&400
 6290mask%=%110000110001
 6300PROChelp_strings:PROCcreate_menu:PROCtick_item(drive_m%,0)
 6310PROCreset:PROCtype_icons:I%=FNwkspc(0)
 6320blk%!0=-1:blk%!4=0:blk%!8=0:blk%!12=56
 6330blk%!16=96:blk%!20=&2002:$(blk%+24)="!QFR"
 6340SYS "Wimp_CreateIcon",,blk% TO icon%
 6350path$="":SYS "XOS_ReadVarVal","qfrsave$path",viewbuff%,-1,0,0 TO ,,F%
 6360IF F% <0 THEN
 6370 SYS "OS_ReadVarVal","qfrsave$path",viewbuff%,&3F,0,0 TO ,,len%
 6380 viewbuff%?len%=13:path$=$viewbuff%
 6390 IF RIGHT$(path$) <>"." path$+="."
 6400ENDIF
 6410SYS"Hourglass_Off"
 6420ENDPROC
 6430
 6440    %%%%%%%%%%%%%%%%%%%%%%%%%
 6450    Interactive Help routines
 6460    %%%%%%%%%%%%%%%%%%%%%%%%%
 6470
 6480DEFPROChelp_strings
 6490ck1$="Click with SELECT to load and view the new sector or ADJUST to just change the address"
 6500ck2$="Click here to ":ts$="This shows the "
 6510gt$="|MIf you press RETURN you will go to the next item"
 6520ENDPROC
 6530
 6540DEFPROChelp
 6550$(blk%+20)=FNfind_help(blk%!32,blk%!36)
 6560blk%!16=&503:blk%!12=blk%!8
 6570!blk%=(LEN$(blk%+20)+25)ANDNOT3
 6580SYS"Wimp_SendMessage",17,blk%,blk%!4
 6590ENDPROC
 6600
 6610DEFFNfind_help(w%,i%)
 6620CASE w% OF
 6630WHEN tool_w%:
 6640 CASE i% OF
 6650  WHEN 17:=ck2$+"display sectors in Hexadecimal format"
 6660  WHEN 18:=ck2$+"display sectors in Text format"
 6670  WHEN 19:=ts$+"current Drive"
 6680  WHEN 20:=ts$+"type of disk being examined"
 6690  WHEN 21:=ts$+"current Track"
 6700  WHEN 22:=ts$+"current Head"
 6710  WHEN 23:=ts$+"current Sector"
 6720  WHEN 24:="This is the current Disk Address|MYou can enter a new Address here"
 6730  WHEN 25,26:="Click on either of these to Set or Unset a Marker"
 6740  WHEN 27:=ck2$+"load a new sector or re-open the main window if it is closed"
 6750  WHEN 28:=ck2$+"step forward one Track|M"+ck1$
 6760  WHEN 29:=ck2$+"step backwards one Track|M"+ck1$
 6770  WHEN 30:=ck2$+"move to the next Head|M"+ck1$
 6780  WHEN 31:=ck2$+"move to the previous Head|M"+ck1$
 6790  WHEN 32:=ck2$+"step forward one Sector|M"+ck1$
 6800  WHEN 33:=ck2$+"step backwards one Sector|M"+ck1$
 6810  WHEN 34:="When you have found and marked the data you want to recover click here"
 6820 ENDCASE
 6830WHEN endrec_w%
 6840 CASE i% OF
 6850  WHEN 1:=ck2$+"enter an Absolute Disk Address|MThen press RETURN to recover the data"
 6860  WHEN 2:=ck2$+"enter the length of the data you want to recover|MThen press RETURN to save it"
 6870 ENDCASE
 6880WHEN define_w%
 6890 CASE i% OF
 6900  WHEN 1:="Enter the number of Tracks here"+gt$
 6910  WHEN 2:="Enter the number of Heads here"+gt$
 6920  WHEN 3:="Enter the number of Sectors per Track here"+gt$
 6930  WHEN 4:="Enter the Sector Size here|MIf you press RETURN this will become the Disk Format"
 6940 ENDCASE
 6950WHEN save_w%
 6960 CASE i% OF
 6970  WHEN 0:="Drag this to a Directory Viewer to save the recovered data"
 6980  WHEN 1:="Enter a name for the recovered file here"
 6990  WHEN 2:="Only use this if you have set a Save Path variable or entered a full drive/directory/filename"
 7000 ENDCASE
 7010WHEN -2:IF i%=icon%:="This is the Quick File Recover icon|MClick with MENU to display the menus|MClick with SELECT after you have selected the Drive and Disk Format to display the disk contents"
 7020ENDCASE
 7030=""
 7040
 7050DEFPROCassemble
 7060FOR PASS=0TO2STEP2
 7070P%=code%
 7080[OPTPASS
 7090mov r10,r2
 7100adr r12,data:ldr r3,[r12,#0]:add r4,r3,#&1640
 7110mov r1,#&0D20
 7120.loop str r1,[r3],#72:cmp r3,r4:blt loop
 7130tst r5,#8:moveq pc,r14
 7140ldr r6,[r12,#0]:ldr r7,[r12,#4]:add r8,r10,r7
 7150.loop2 ldr r0,[r12,#4]:sub r0,r7,r0:mov r1,r6:mov r2,#8:swi &D2
 7160mov r0,#&20:strb r0,[r6,#4]:strb r0,[r6,#5]
 7170add r6,r6,#6:mov r9,#63
 7180.loop3 ldrb r0,[r7],#1
 7190cmp r0,#127:cmpne r0,#31:movle r0,#46
 7200strb r0,[r6],#1:subs r9,r9,#1:bpl loop3
 7210mov r0,#13:strb r0,[r6],#2:cmp r7,r8:blt loop2
 7220ldr r6,[r12,#0]:add r6,r6,#&480:ldr r7,[r12,#4]:add r8,r10,r7
 7230.loop4 ldr r0,[r12,#4]:sub r0,r7,r0:mov r1,r6:mov r2,#8:swi &D2
 7240mov r0,#&20:strb r0,[r6,#4]:strb r0,[r6,#5]
 7250add r6,r6,#6:mov r9,#0
 7260.loop5 ldrb r0,[r7,r9]:mov r1,r6:mov r2,#4:swi &D1
 7270mov r0,#32:strb r0,[r6,#2]:add r6,r6,#3:add r9,r9,#1:cmp r9,#16:blt loop5
 7280strb r0,[r6],#1
 7290.loop6 ldrb r0,[r7],#1
 7300cmp r0,#127:cmpne r0,#31:movle r0,#46
 7310strb r0,[r6],#1:subs r9,r9,#1:bne loop6
 7320mov r0,#13:strb r0,[r6],#1:cmp r7,r8:blt loop4
 7330mov pc,r14
 7340.data equd scrnbuff%:equd viewbuff%
 7350]
 7360NEXT
 7370ENDPROC

'� --> qfr        Quick File Recover

H�  �����������������������������������������������������������������
(H�  �  This program and all documentation (C) D.J.Holden June 1992  �
2H�  �����������������������������������������������������������������
<
Fversion$="QFR   Ver 2.0"
P help_fgnd%=5 : help_bgnd%=12
Z�initialise
d
n
x�
�'ș "Wimp_Poll",mask%,blk% � reason%
�Ȏ reason% �
�C � 1:� !blk%=view_w% �redraw_view �� !blk%=help_w% �redraw_help
�" � 2:ș"Wimp_OpenWindow",,blk%
�B � 3:ș"Wimp_CloseWindow",,blk%:� !blk%=view_w% flag%=flag%��1
�        � !blk%=tool_w% �
�D         !blk%=view_w%:ș"Wimp_CloseWindow",,blk%:flag%=flag%��5
�7         !blk%=endrec_w%:ș"Wimp_CloseWindow",,blk%
�
        �
� � 6:�click
� � 7:�drag_term
�? � 8:� blk%?24=13 �return_key � ș"Wimp_ProcessKey",blk%!24
� � 9:�select
 � 17,18:Ȏ blk%!16 �
     � 0:�die
C     � 2:I%=blk%+44:ȕ?I%>31:I%+=1:�:?I%=13:�save($(blk%+44),1)
"     � &502:�help
,            �
6�
@� �
J
T1    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
^1    Menu and Window click and select routines
h1    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
r��click
|2ș"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
�Ȏ blk%!12 �
� � -2:� blk%!16=icon% �
�          Ȏ mb% �
�N           � 2:mx%=blk%!&C0-140:mh%=354:ș"Wimp_CreateMenu",,menu%,mx%,mh%
�t           � 4:� type%=-1 I%=�alert("You must first identify the disc type.") � �open_view:�setcaret(tool_w%,24)
�          �
�         �
� � tool_w%:�tool_click
� � save_w%:� blk%!16=2 �
�E               !blk%=save_w%:blk%!4=1:ș"Wimp_GetIconState",,blk%
�&               �save($(blk%!28),0)
�              �
�4               � blk%!16=0 � blk%!8=4 �drag_file
              �
�
�
&
0��select
:2ș"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
DȎ !blk% �
N � 0:� � blk%!4 �get_format
X � 1:�change_drive
bM � 2:!blk%=help_w%:ș"Wimp_GetWindowInfo",,blk%:ș"Wimp_OpenWindow",,blk%
l
 � 4:�die
v�
�.� mb%=1 ș"Wimp_CreateMenu",,menu%,mx%,mh%
��
�
���return_key
�Ȏ !blk% �
� � tool_w%:
�      � blk%!4=24 �
�'       ș "Wimp_GetIconState",,blk%
�1       ș "OS_ReadUnsigned",16,blk%!28 � ,,A%
�       � A%>max_addr% �
�-        I%=�alert("Invalid disk address")
�        �addr_icon
�       �
`        � address%<>A% address%=A%��(sec_size%-1):�calc_ths:�ths_icons:�view_load:�open_view
       �
      �close_odds
       �
*> � save_w%:ș"Wimp_GetIconState",,blk%:�save($(blk%!28),0)
4 � define_w%:Ȏ blk%!4 �
>/                 � 1:�setcaret(define_w%,2)
H/                 � 2:�setcaret(define_w%,3)
R/                 � 3:�setcaret(define_w%,4)
\H                 � 4:ș"Wimp_CloseWindow",,blk%:blk%!4=6:�get_format
f                �
p � endrec_w%:�end_address
z�
��
�
���tool_click
�
� mb%=2 �
�% mx%=blk%!&C0-140:mh%=blk%!&C4+96
�' ș"Wimp_CreateMenu",,menu%,mx%,mh%
��
�Ȏ blk%!16 �
�6 � 27:� flag%�8 �open_view � �view_load:�open_view
�1 � 18:� �(flag%�2) flag%=flag%�&C2:�open_view
�? � 17:� flag%�2 flag%=flag%�(�2):flag%=flag%�&C0:�open_view
�= � 25:!blk%=tool_w%:blk%!4=25:ș"Wimp_GetIconState",,blk%
�:         � blk%!24�(1<<21) mark1%=-1 � mark1%=address%
?         blk%!12=0:blk%!8=1<<21:ș"Wimp_SetIconState",,blk%
         �close_odds
= � 26:!blk%=tool_w%:blk%!4=26:ș"Wimp_GetIconState",,blk%
$:         � blk%!24�(1<<21) mark2%=-1 � mark2%=address%
.?         blk%!12=0:blk%!8=1<<21:ș"Wimp_SetIconState",,blk%
8         �close_odds
B, � 28:track%+=1:� track%>=cyls% track%=0
L7         address%=�calc_addr:�ths_icons:�close_odds
V*         � mb%=4 �view_load:�open_view
`         � mb%=1 �
j%          � flag%�9=9 �blank_view
t"          flag%=flag% ��%11000
~         �
�- � 29:track%-=1:� track%<0 track%=cyls%-1
�7         address%=�calc_addr:�ths_icons:�close_odds
�*         � mb%=4 �view_load:�open_view
�         � mb%=1 �
�%          � flag%�9=9 �blank_view
�"          flag%=flag% ��%11000
�         �
� � 30:head%+=1
�P         � head%>=heads% head%=0:� type%<5 track%+=1:�track%>=cyls% track%=0
�7         address%=�calc_addr:�ths_icons:�close_odds
�*         � mb%=4 �view_load:�open_view
�         � mb%=1 �
%          � flag%�9=9 �blank_view

"          flag%=flag% ��%11000
         �
 � 31:head%-=1
(P         �head%<0 head%=heads%-1:�type%<5 track%-=1:�track%<0 track%=cyls%-1
27         address%=�calc_addr:�ths_icons:�close_odds
<*         � mb%=4 �view_load:�open_view
F         � mb%=1 �
P%          � flag%�9=9 �blank_view
Z"          flag%=flag% ��%11000
d         �
nG � 32:address%+=sec_size%:� type%=3 � sector%=8 address%+=sec_size%
x-         �calc_ths:�ths_icons:�close_odds
�*         � mb%=4 �view_load:�open_view
�         � mb%=1 �
�%          � flag%�9=9 �blank_view
�"          flag%=flag% ��%11000
�         �
�G � 33:address%-=sec_size%:� type%=3 � sector%=0 address%-=sec_size%
�-         �calc_ths:�ths_icons:�close_odds
�*         � mb%=4 �view_load:�open_view
�         � mb%=1 �
�%          � flag%�9=9 �blank_view
�"          flag%=flag% ��%11000
�         �
� � 34:�recover
�
�
�
"
,.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6.    Routines to Load and Save from/to disk
@.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
J
T
��load
^]� �wkspc(length%)=� I%=�alert("Unable to claim workspace to recover file"):I%=�wkspc(0):�
h� type%=3 �
r1 S%=(start%�sec_size%)�secs_trk%:E%=filebuff%
|) adr%=(start%+sec_size%)�(drive%<<29)
�+ ș "ADFS_Retries",&FF00,&0200 � ,,ort%
� �
�A  ș "XADFS_DiscOp",,(drec%<<6)�1,adr%,E%,sec_size% � err%;F%
�A  � F%�1 ș "ADFS_Retries",&FF00,ort%:�x_error:I%=�wkspc(0):�
�)  E%+=sec_size%:S%+=1:adr%+=sec_size%
�4  � S%=9 S%=0:adr%+=sec_size%:length%-=sec_size%
� � E%-filebuff%>=length%
�! ș "ADFS_Retries",&FF00,ort%
��
�+ ș "ADFS_Retries",&FF00,&0200 � ,,ort%
� adr%=start% �(drive%<<29)
�E ș "XADFS_DiscOp",,(drec%<<6)�1,adr%,filebuff%,length% � err%;F%
�! ș "ADFS_Retries",&FF00,ort%
# � F%�1 �x_error:I%=�wkspc(0):�
�
�open_save
&�
0
:��save(name$,c%)
D[� c%=0 � �name$,".")=0 I%=�alert("You must drag the file icon to a directory viewer"):�
NFș "XOS_File",10,name$,&FFD,,filebuff%,filebuff%+length% � err%;F%
X.� F%�1 �x_error:�close_odds:I%=�wkspc(0):�
b
� c% �
l( S%=blk%!36:blk%!12=blk%!8:blk%!16=3
v, $(blk%+44)=name$:!blk%=(�(name$)+49)��3
�1 ș"Wimp_SendMessage",18,blk%,blk%!20,blk%!24
� � S%=-1 �
��
��� mark1%>=0 mark1%=-1:!blk%=tool_w%:blk%!4=25:ș"Wimp_GetIconState",,blk%:blk%!12=0:blk%!8=1<<21:ș"Wimp_SetIconState",,blk%
��� mark2%>=0 mark2%=-1:!blk%=tool_w%:blk%!4=26:ș"Wimp_GetIconState",,blk%:blk%!12=0:blk%!8=1<<21:ș"Wimp_SetIconState",,blk%
��close_odds:I%=�wkspc(0)
��
�
���view_load
�flag%=flag%��%11000
�3adr%=address%�(drive%<<29):� type%=3 adr%+=&200
�*ș "ADFS_Retries",&FF00,&0200 � ,,ort%
�Cș "XADFS_DiscOp",,(drec%<<6)�1,adr%,viewbuff%,chunk% � err%;F%
 ș "ADFS_Retries",&FF00,ort%
1� F%�1 �x_error:�blank_view � flag%=flag%�&88
�
 
*��drag_file
4/!blk%=save_w%:ș"Wimp_GetWindowState",,blk%
>(X%=blk%!4-blk%!20:Y%=blk%!16-blk%!24
H(blk%!4=0:ș"Wimp_GetIconState",,blk%
R>!blk%=save_w%:blk%!4=5:blk%!8=blk%!8+X%:blk%!12=blk%!12+Y%
\=blk%!16=blk%!16+X%:blk%!20=blk%!20+Y%:blk%!24=0:blk%!28=0
f'blk%!32=&7FFFFFFF:blk%!36=&7FFFFFFF
pș"Wimp_DragBox",,blk%
z�
�
���drag_term
�?blk%!&80=save_w%:blk%!&84=1:ș"Wimp_GetIconState",,blk%+&80
�4I%=(blk%!&9C):ȕ �$(I%),"."):I%+=1:�:leaf$=$(I%)
�!ș"Wimp_GetPointerInfo",,blk%
�@blk%!20=blk%!12:blk%!24=blk%!16:blk%!28=!blk%:blk%!32=blk%!4
�;blk%!36=length%:blk%!40=&FFD:blk%!16=1:$(blk%+44)=leaf$
�$!blk%=(�(leaf$)+49)��3:blk%!12=0
�0ș"Wimp_SendMessage",17,blk%,blk%!20,blk%!24
��
�
�
��recover
�n� mark1%=-1 � mark2%=-1 I%=�alert("You must have at least one marker set before you can recover a file"):�
	*� mark1%=-1 � mark2%=-1 �open_endrec:�
	1� mark1%<mark2% start%=mark1% � start%=mark2%
	&length%=�(mark1%-mark2%)+sec_size%
	$	�load
	.�
	8�
	B
	L+    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	V+    Open or Redraw various windows etc.
	`+    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	j
	t��open_endrec
	~-� mark1%=-1 start%=mark2% � start%=mark1%
	�8!blk%=endrec_w%:blk%!4=1:ș"Wimp_GetIconState",,blk%
	�&$(blk%!28)=�"000000"+�~(start%),6)
	�(blk%!4=2:ș"Wimp_GetIconState",,blk%
	�$(blk%!28)=�~(chunk%)
	�1!blk%=endrec_w%:ș"Wimp_GetWindowState",,blk%
	�(blk%!28=-1:ș"Wimp_OpenWindow",,blk%
	��
	�
	���open_save
	�6!blk%=save_w%:blk%!4=1:ș"Wimp_GetIconState",,blk%
	� $(blk%!28)=path$+"Recovered"
	�!ș"Wimp_GetWindowState",,blk%
(blk%!28=-1:ș"Wimp_OpenWindow",,blk%

�setcaret(save_w%,1)
�

(��open_view
2
W%=�w_ext
<g� W%<>w_ext% w_ext%=W%:!blk%=0:blk%!4=-w_ext%:blk%!8=1152:blk%!12=0:ș"Wimp_SetExtent",view_w%,blk%
FD� �flag%�16 C%=chunk%:F%=flag%:� code%:� flag%�8 flag%=flag%�&90
Pv� �flag%�1 !blk%=view_w%:ș"Wimp_GetWindowState",,blk%:blk%!20=0:blk%!24=0:ș"Wimp_OpenWindow",,blk%:flag%=flag%�1
Z� flag%�&80 �
d` � flag%�&40 !blk%=view_w%:ș"Wimp_GetWindowState",,blk%:blk%!24=0:ș"Wimp_OpenWindow",,blk%
n2 ș"Wimp_ForceRedraw",view_w%,0,-w_ext%,1152,0
x flag%=flag%��&C0
��
�b� �flag%�4 !blk%=tool_w%:ș"Wimp_GetWindowState",,blk%:ș"Wimp_OpenWindow",,blk%:flag%=flag%�4
��
�
���close_all
�flag%=flag%��%101
�3blk%!&A0=tool_w%:ș"Wimp_CloseWindow",,blk%+&A0
�3blk%!&A0=view_w%:ș"Wimp_CloseWindow",,blk%+&A0
���close_odds
�3blk%!&A0=save_w%:ș"Wimp_CloseWindow",,blk%+&A0
�5blk%!&A0=endrec_w%:ș"Wimp_CloseWindow",,blk%+&A0
��
�
��blank_view
flag%=flag%��8
/!blk%=view_w%:ș"Wimp_GetWindowState",,blk%
"1ș"Wimp_ForceRedraw",view_w%,0,-w_ext%,1152,0
,�
6
@��setcaret(w%,i%)
J2!blk%=w%:blk%!4=i%:ș"Wimp_GetIconState",,blk%
T4ș"Wimp_SetCaretPosition",w%,i%,,,-1,�$(blk%!28)
^�
h
r��redraw_help
|%ș "Wimp_RedrawWindow",,blk% � M%
�	ȕ M%
�; X%=blk%!4-blk%!20+16:Y%=blk%!16-blk%!24-4:I%=helptext%
�3 ȕ?I%<255:� X%,Y%:�$I%:I%+=(�$(I%)+1):Y%-=32:�
�& ș "Wimp_GetRectangle",,blk% � M%
��
��
�
���redraw_view
�flag%=flag%��&80
�ș &400C8,,blk% � M%
�+�flag%�16:ȕM%:ș&400C8,,blk% � M%:�:�
�� flag%�2�
��ȕM%:S%=�(blk%!24�32):E%=(blk%!16-blk%!8)�32+S%:X%=blk%!4-blk%!20+16:Y%=blk%!16-blk%!24-4:B%=scrnbuff%+1+(S%*72):Y%-=(S%*32):�I%=S%�E%:�X%,Y%:�$B%:B%+=72:Y%-=32:�:ș&400C8,,blk%�M%:�
�
�ȕM%:S%=�(blk%!24�32):E%=(blk%!16-blk%!8)�32+S%:X%=blk%!4-blk%!20+16:Y%=blk%!16-blk%!24-4:B%=scrnbuff%+1153+(S%*72):Y%-=(S%*32):�I%=S%�E%:�X%,Y%:�$B%:B%+=72:Y%-=32:�:ș&400C8,,blk%�M%:�
�
&�
0
:3    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
D3    Read and write info from/to menus and icons
N3    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
b��end_address
lȎ blk%!4 �
v% � 1:ș "Wimp_GetIconState",,blk%
�?        ș "OS_ReadUnsigned",16,blk%!28 � ,,A%:L%=A%-start%
�     Ȏ � �
�J      � L%<=0:I%=�alert("End Address must be greater than the Marker")
�O      � A%>(max_addr%+sec_size%):I%=�alert("End Address after end of disk")
�(      :length%=L%:�close_odds:�load
�
     �
�% � 2:ș "Wimp_GetIconState",,blk%
�7        ș "OS_ReadUnsigned",16,blk%!28 � ,,length%
�2        � length%+start%>max_addr%+sec_size% �
�>         I%=�alert("Length goes past the end of the disk")
�
        �
�         �close_odds:�load
�
        �

�

�



 ��type_icons

*9!blk%=define_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%

4G$(blk%!28)=�(cyls%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

>)blk%!4=2:ș "Wimp_GetIconState",,blk%

HH$(blk%!28)=�(heads%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

R)blk%!4=3:ș "Wimp_GetIconState",,blk%

\K$(blk%!28)=�(secs_trk%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

f)blk%!4=4:ș "Wimp_GetIconState",,blk%

pK$(blk%!28)=�(sec_size%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

z8!blk%=tool_w%:blk%!4=20:ș "Wimp_GetIconState",,blk%

�D$(blk%!28)=type$:blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

��

�

���ths_icons

�8!blk%=tool_w%:blk%!4=21:ș "Wimp_GetIconState",,blk%

�H$(blk%!28)=�(track%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

�*blk%!4=22:ș "Wimp_GetIconState",,blk%

�G$(blk%!28)=�(head%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

�*blk%!4=23:ș "Wimp_GetIconState",,blk%

�I$(blk%!28)=�(sector%):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%

���addr_icon

�8!blk%=tool_w%:blk%!4=24:ș "Wimp_GetIconState",,blk%

�;$(blk%!28)=�"000000"+�~(address%),6):blk%!8=0:blk%!12=0
 ș "Wimp_SetIconState",,blk%
�

$��change_drive
.D%=blk%!4:�reset
8� � D% �
B) � D%<fp% drive%=D% � drive%=D%-fp%+4
L �tick_item(drive_m%,D%)
V9 !blk%=tool_w%:blk%!4=19:ș "Wimp_GetIconState",,blk%
`I blk%!8=0:blk%!12=0:$(blk%!28)=�(drive%):ș "Wimp_SetIconState",,blk%
j�
t�type_icons
~�
�
���get_format
�� blk%!4=0 �
�T%=blk%!4:�reset
�Ȏ T% �
�/ � 1:� drive%<4 �ident_floppy � �ident_hard
�L � 3:type%=2:cyls%=80:heads%=2:secs_trk%=5:sec_size%=&400:type$="Normal"
�M � 4:type%=3:cyls%=80:heads%=2:secs_trk%=10:sec_size%=&200:type$="MS-Dos"
� � 5:� �validate_ths �
�$         type%=4:type$="Special"
�
        �
�         type%=-1:type$=""
:         !blk%=define_w%:ș"Wimp_GetWindowState",,blk%

1         blk%!28=-1:ș"Wimp_OpenWindow",,blk%
#         �setcaret(define_w%,1)

        �
(K � 6:type%=5:cyls%=80:heads%=2:secs_trk%=16:sec_size%=&100:type$="640K"
2O � 7:type%=6:cyls%=80:heads%=2:secs_trk%=16:sec_size%=&100:type$="DFS 320K"
<O � 8:type%=7:cyls%=80:heads%=2:secs_trk%=18:sec_size%=&100:type$="DFS 360K"
F�
P�tick_item(type_m%,type%)
Z-� type%>=0 �type_icons:max_addr%=�maxaddr
d.chunk%=sec_size%:� chunk%>&400 chunk%=&400
n�set_record
x�
�
�ݤvalidate_ths
�J%=�
�9!blk%=define_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%
�cyls%=�$(blk%!28)
�9� cyls%<40 I%=�alert("Invalid number of tracks"):J%=�
�<blk%!4=2:ș "Wimp_GetIconState",,blk%:heads%=�$(blk%!28)
�3� heads%=0 I%=�alert("Can't have 0 heads"):J%=�
�?blk%!4=3:ș "Wimp_GetIconState",,blk%:secs_trk%=�$(blk%!28)
�=� secs_trk%<4 I%=�alert("Invalid number of sectors"):J%=�
�?blk%!4=4:ș "Wimp_GetIconState",,blk%:sec_size%=�$(blk%!28)
�sec_size%=sec_size%��&FF
�3� sec_size%=0 I%=�alert("Bad sector size"):J%=�
=J%

��ident_hard
"#�set_record:?drec%=8:drec%?1=32
,Oș "XADFS_DiscOp",,(drec%<<6)� 1,&C00 �(drive%<<29),viewbuff%,&200 �err%;F%
6� F%�1 �x_error:�
@type$="HardDisc":type%=4
J sec_size%=2^(viewbuff%?&1C0)
Tsecs_trk%=viewbuff%?&1C1
^heads%=viewbuff%?&1C2
h7cyls%=(viewbuff%!&1D0)�(heads%*sec_size%*secs_trk%)
r�
|
���ident_floppy
��set_record
�Oș "XADFS_DiscOp",,(drec%<<6)� 1,&400 �(drive%<<29),viewbuff%,&200 �err%;F%
�� (F%�1)=1 �x_error:�
�
Ȏ � �
� � viewbuff%!257=hg%:
�K      type%=5:type$="640K":sec_size%=256:secs_trk%=16:heads%=2:cyls%=80
� � viewbuff%!1=hg%:
�M      type%=2:type$="Normal":sec_size%=&400:secs_trk%=5:heads%=2:cyls%=80
�, � (viewbuff%!21 �&FFFFFF)=&C80:type%=2:
�E      type$="Normal":sec_size%=&400:secs_trk%=5:heads%=2:cyls%=80
�- � (viewbuff%!21 �&FFFFFF)=&1900:type%=1:
�G      type$="Hi Dens":sec_size%=&400:secs_trk%=10:heads%=2:cyls%=80
; � ?viewbuff%=&E9 � (?viewbuff%=&EB � viewbuff%?2=&90):
N      type%=3:type$="MS-Dos":sec_size%=&200:secs_trk%=10:heads%=2:cyls%=80
. � (viewbuff%?6�15)*&100+viewbuff%?7=&500:
&O      type%=6:type$="DFS 320K":sec_size%=256:secs_trk%=16:heads%=2:cyls%=80
0. � (viewbuff%?6�15)*&100+viewbuff%?7=&5A0:
:O      type%=7:type$="DFS 360K":sec_size%=256:secs_trk%=18:heads%=2:cyls%=80
D0 :I%=�alert("Unable to identify disc type")
N�
X�
b
l��set_record
v#� I%=drec%�drec%+&4C �4:!I%=0:�
�&drec%!64=&20000000:drec%?34=drive%
�Ȏ type% �
�A � -1:?drec%=10:drec%?1=5:drec%?2=2:drec%?3=2:drec%!16=&C8000
�@ � 3:?drec%=9:drec%?1=10:drec%?2=2:drec%?3=2:drec%!16=&C8000
�B � 5,6:?drec%=8:drec%?1=16:drec%?2=2:drec%?3=2:drec%!16=&A0000
�@ � 7:?drec%=8:drec%?1=18:drec%?2=2:drec%?3=2:drec%!16=&B4000
� 
�8         I%=0:�:I%+=1:� sec_size% � 2^I%=1:?drec%=I%
�7         drec%?1=secs_trk%:drec%?2=heads%:drec%?3=2
�<         max_addr%=�maxaddr:drec%!16=max_addr%+sec_size%
��
��
�
    %%%%%%%%%%%%
    Calculations
    %%%%%%%%%%%%
 
*
ݤmaxaddr
4=� type%=3:=cyls%*heads%*secs_trk%*sec_size%-(2*sec_size%)
>/=cyls%*heads%*secs_trk%*sec_size%-sec_size%
H
Rݤwkspc(sz%)
\&ș"Wimp_SlotSize",mem%+sz%,-1 � e%
f� e%<(mem%+sz%):=�:�:=�
p
zݤw_ext
�� �flag%�2:=chunk%*2
�"� chunk%>&400:=chunk%�2:�:=512
�
�ݤcalc_addr
�A� type%>4:=((head%*cyls%+track%)*secs_trk%+sector%)*sec_size%
�:=(((track%*heads%+head%)*secs_trk%)+sector%)*sec_size%
�
���calc_ths
�D� address%>max_addr% address%=0 �� address%<0 address%=max_addr%
�1S%=address% � sec_size%:address%=S%*sec_size%
�� type%>4 �
�1 sector%=S% � secs_trk%:track%=S% � secs_trk%
�/ head%=track% � cyls%:track%=track% � cyls%
�
1 sector%=S% � secs_trk%:track%=S% � secs_trk%
1 head%=track% � heads%:track%=track% � heads%
$�
.9� type%=3 � sector%=9 address%+=sec_size%:�calc_ths:�
8�
B
L     %%%%%%%%%%%%%%%%%%%%%%%%
V     Basic program structures
`     %%%%%%%%%%%%%%%%%%%%%%%%
j
t��tick_item(m%,i%)
~I%=m%+4
�#�:I%+=24:!I%=!I%� � 1:� !I%�&80
�%� � i% I%=m%+28+(i%*24):!I%=!I%�1
��
�
�/ݤmenu_item (itemname$,menuflags%,submenu%)
�Bm%!0=menuflags%:m%!4=submenu%:m%!8=&7000001:$(m%+12)=itemname$
�
=m%+24
�
�%ݤmenu (a%,menutitle$,menuwidth%)
�A$a%=menutitle$:a%!12=&70207:a%!16=menuwidth%:a%!20=40:a%!24=0
�m%=a%+28
�=a%


��report_error
ș"Hourglass_Smash"
,!blk%=�:$(blk%+4)=�$+" at line "+�(�)+�0
('ș "Wimp_ReportError",blk%,1,title%
2� �>52 �
<	��die
F
P>ș "XOS_ReadVarVal","qfrsave$path",viewbuff%,-1,0,0 � ,,F%
Z"� F%<0:� "*unset qfrsave$path"
d'ș "Wimp_CloseDown",hand%,&4B534154
n�
x
�ݤalert(a$)
� blk%!&80=0:$(blk%+&84)=a$+�0
�1ș"Wimp_ReportError",blk%+&80,17,title% � ,I%
�=I%
�
�
��x_error
�'ș"Wimp_ReportError",err%,17,title%
��
�
�    %%%%%%%%%%%%%%%%%%%%%%%
�    Initialisation routines
�    %%%%%%%%%%%%%%%%%%%%%%%
�
��create_menu
-type_m%=�menu (menubuff%,"Disc Type",168)
(m%=�menu_item ("Format",2,define_w%)
"#m%=�menu_item ("Read disc",0,0)
, m%=�menu_item ("Normal",0,0)
6 m%=�menu_item ("MS-Dos",0,0)
@$m%=�menu_item ("User Spec.",0,0)
Jm%=�menu_item ("640K",0,0)
T"m%=�menu_item ("DFS 320k",0,0)
^$m%=�menu_item ("DFS 360k",&80,0)
h$drive_m%=�menu (m%,"Floppy",168)
r<� I%=1�fp%:a$="Floppy "+�(I%-1):m%=�menu_item (a$,0,0):�
|V� hd%>0 m%!-24=m%!-24�2:� I%=1�hd%:a$="HardDisc "+�(I%+3):m%=�menu_item (a$,0,0):�
�m%!-24=m%!-24 � &80
�!menu%=�menu (m%,"Q.F.R.",160)
�)m%=�menu_item ("Disc type",0,type_m%)
�&m%=�menu_item ("Drive",0,drive_m%)
�"m%=�menu_item("Help text",0,0)
�$� � help_OK% m%!-16=m%!-16�1<<22
�$m%=�menu_item ("Info",2,info_w%)
� m%=�menu_item ("Quit",&80,0)
��
�
���reset
��close_all
�)type%=-1:type$="":flag%=flag%��%11101
)track%=0:head%=0:sector%=0:address%=0
(�ths_icons:�tick_item(type_m%,type%)
mark1%=-1:mark2%=-1
&7!blk%=tool_w%:blk%!4=25:ș"Wimp_GetIconState",,blk%
06blk%!8=0:blk%!12=1<<21:ș"Wimp_SetIconState",,blk%
:7!blk%=tool_w%:blk%!4=26:ș"Wimp_GetIconState",,blk%
D6blk%!8=0:blk%!12=1<<21:ș"Wimp_SetIconState",,blk%
N�
X
b��setup_helptext
lH%=0:help_OK%=�
v!� I%=helptext% � helptext%+L%
� � ?I%<32 ?I%=13:H%+=1
��
�J� helptext%?(L%-1)<>13:helptext%?L%=13:helptext%?(L%+1)=13:L%+=2:H%+=2
�helptext%?L%=255
�/!blk%=0:blk%!4=460:blk%!8=1280:blk%!12=1004
�=blk%?32=0:blk%?33=8:blk%?34=help_fgnd%:blk%?35=help_bgnd%
�!blk%!44=-(H%*32):blk%!48=1248
�*ș "Wimp_CreateWindow",,blk% � help_w%
��
�
���initialise
�5ș "Wimp_Initialise",200,&4B534154,"QFR" � ,hand%
�#ș "Wimp_SlotSize",-1,-1 � mem%
&filebuff%=mem%+&8000:indirsz%=&340
� � �report_error
G� indir% indirsz%, blk% &100, menubuff% &280, title% &20, drec% &50
 1� code% &120, viewbuff% &400, scrnbuff% &1700
*
�assemble
4;$title%="Hugo":hg%=!title%:$title%="Quick File Recover"
>T� �wkspc(&2000)=� I%=�alert("Unable to claim sufficient workspace to run!"):�die
Hș"Hourglass_On"
R2ș "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
\Oș "Wimp_LoadTemplate",,filebuff%,indir%,indir%+indirsz%,-1,"info",0 � ,,R%
f/ș "Wimp_CreateWindow",,filebuff% � info_w%
pMș "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"define",0 � ,,R%
z1ș "Wimp_CreateWindow",,filebuff% � define_w%
�Mș "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"endrec",0 � ,,R%
�1ș "Wimp_CreateWindow",,filebuff% � endrec_w%
�Kș "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"tool",0 � ,,R%
�/ș "Wimp_CreateWindow",,filebuff% � tool_w%
�Kș "Wimp_LoadTemplate",,filebuff%,R%,indir%+indirsz%,-1,"save",0 � ,,R%
�/ș "Wimp_CreateWindow",,filebuff% � save_w%
�ș "Wimp_CloseTemplate"
�K!blk%=info_w%:blk%!4=0:ș "Wimp_GetIconState",,blk%:$(blk%!28)=version$
�� I%=blk%�blk%+84�4:!I%=0:�
�w_ext%=512
�9!blk%=64:blk%!4=460:blk%!8=64+1152:blk%!12=460+w_ext%
�@blk%!24=-1:blk%!28=&FF00000F:blk%!32=&1070207:blk%!36=&C0103
�8blk%!44=-512:blk%!48=1152:blk%!56=&13D:blk%!60=3<<12
blk%!72=title%
*ș "Wimp_CreateWindow",,blk% � view_w%
help_OK%=�
$3ș"OS_File",17,"<Obey$Dir>.HelpText" � D%,,,,L%
.� D%=1 �
8 � helptext% L%+&20
BA ș "XOS_File",16,"<Obey$Dir>.HelpText",helptext%,0 � err%;F%
L& � F%�1 �x_error � �setup_helptext
V�
`J I%=�alert("Help Text not found so no instructions will be available")
j�
tș "ADFS_Drives" � ,fp%,hd%
~0cyls%=80:heads%=2:secs_trk%=5:sec_size%=&400
�(drive%=0:mh%=354:flag%=2:chunk%=&400
�mask%=%110000110001
�5�help_strings:�create_menu:�tick_item(drive_m%,0)
�#�reset:�type_icons:I%=�wkspc(0)
�*blk%!0=-1:blk%!4=0:blk%!8=0:blk%!12=56
�.blk%!16=96:blk%!20=&2002:$(blk%+24)="!QFR"
�&ș "Wimp_CreateIcon",,blk% � icon%
�Gpath$="":ș "XOS_ReadVarVal","qfrsave$path",viewbuff%,-1,0,0 � ,,F%
�
� F% <0 �
�A ș "OS_ReadVarVal","qfrsave$path",viewbuff%,&3F,0,0 � ,,len%
�' viewbuff%?len%=13:path$=$viewbuff%
� � �path$) <>"." path$+="."
�

ș"Hourglass_Off"
�

(!    %%%%%%%%%%%%%%%%%%%%%%%%%
2!    Interactive Help routines
<!    %%%%%%%%%%%%%%%%%%%%%%%%%
F
P��help_strings
Zack1$="Click with SELECT to load and view the new sector or ADJUST to just change the address"
d/ck2$="Click here to ":ts$="This shows the "
n<gt$="|MIf you press RETURN you will go to the next item"
x�
�
�
��help
�*$(blk%+20)=�find_help(blk%!32,blk%!36)
�blk%!16=&503:blk%!12=blk%!8
�!blk%=(�$(blk%+20)+25)��3
�'ș"Wimp_SendMessage",17,blk%,blk%!4
��
�
�ݤfind_help(w%,i%)
�Ȏ w% �
�� tool_w%:
� Ȏ i% �
�8  � 17:=ck2$+"display sectors in Hexadecimal format"
1  � 18:=ck2$+"display sectors in Text format"
  � 19:=ts$+"current Drive"
-  � 20:=ts$+"type of disk being examined"
"  � 21:=ts$+"current Track"
,  � 22:=ts$+"current Head"
6   � 23:=ts$+"current Sector"
@P  � 24:="This is the current Disk Address|MYou can enter a new Address here"
JB  � 25,26:="Click on either of these to Set or Unset a Marker"
TO  � 27:=ck2$+"load a new sector or re-open the main window if it is closed"
^0  � 28:=ck2$+"step forward one Track|M"+ck1$
h2  � 29:=ck2$+"step backwards one Track|M"+ck1$
r/  � 30:=ck2$+"move to the next Head|M"+ck1$
|3  � 31:=ck2$+"move to the previous Head|M"+ck1$
�1  � 32:=ck2$+"step forward one Sector|M"+ck1$
�3  � 33:=ck2$+"step backwards one Sector|M"+ck1$
�T  � 34:="When you have found and marked the data you want to recover click here"
� �
�� endrec_w%
� Ȏ i% �
�W  � 1:=ck2$+"enter an Absolute Disk Address|MThen press RETURN to recover the data"
�`  � 2:=ck2$+"enter the length of the data you want to recover|MThen press RETURN to save it"
� �
�� define_w%
� Ȏ i% �
�0  � 1:="Enter the number of Tracks here"+gt$
�/  � 2:="Enter the number of Heads here"+gt$
;  � 3:="Enter the number of Sectors per Track here"+gt$
]  � 4:="Enter the Sector Size here|MIf you press RETURN this will become the Disk Format"
 �
&
� save_w%
0 Ȏ i% �
:G  � 0:="Drag this to a Directory Viewer to save the recovered data"
D5  � 1:="Enter a name for the recovered file here"
Nj  � 2:="Only use this if you have set a Save Path variable or entered a full drive/directory/filename"
X �
b�� -2:� i%=icon%:="This is the Quick File Recover icon|MClick with MENU to display the menus|MClick with SELECT after you have selected the Drive and Disk Format to display the disk contents"
l�
v=""
�
���assemble
�� PASS=0�2�2
�P%=code%
�[OPTPASS
�mov r10,r2
�1adr r12,data:ldr r3,[r12,#0]:add r4,r3,#&1640
�mov r1,#&0D20
�,.loop str r1,[r3],#72:cmp r3,r4:blt loop
�tst r5,#8:moveq pc,r14
�1ldr r6,[r12,#0]:ldr r7,[r12,#4]:add r8,r10,r7
�C.loop2 ldr r0,[r12,#4]:sub r0,r7,r0:mov r1,r6:mov r2,#8:swi &D2
�/mov r0,#&20:strb r0,[r6,#4]:strb r0,[r6,#5]
add r6,r6,#6:mov r9,#63
.loop3 ldrb r0,[r7],#1
)cmp r0,#127:cmpne r0,#31:movle r0,#46
 +strb r0,[r6],#1:subs r9,r9,#1:bpl loop3
*2mov r0,#13:strb r0,[r6],#2:cmp r7,r8:blt loop2
4Aldr r6,[r12,#0]:add r6,r6,#&480:ldr r7,[r12,#4]:add r8,r10,r7
>C.loop4 ldr r0,[r12,#4]:sub r0,r7,r0:mov r1,r6:mov r2,#8:swi &D2
H/mov r0,#&20:strb r0,[r6,#4]:strb r0,[r6,#5]
Radd r6,r6,#6:mov r9,#0
\6.loop5 ldrb r0,[r7,r9]:mov r1,r6:mov r2,#4:swi &D1
fMmov r0,#32:strb r0,[r6,#2]:add r6,r6,#3:add r9,r9,#1:cmp r9,#16:blt loop5
pstrb r0,[r6],#1
z.loop6 ldrb r0,[r7],#1
�)cmp r0,#127:cmpne r0,#31:movle r0,#46
�+strb r0,[r6],#1:subs r9,r9,#1:bne loop6
�2mov r0,#13:strb r0,[r6],#1:cmp r7,r8:blt loop4
�mov pc,r14
�'.data equd scrnbuff%:equd viewbuff%
�]
��
��
�
00000000  0d 00 0a 27 f4 20 2d 2d  3e 20 71 66 72 20 20 20  |...'. --> qfr   |
00000010  20 20 20 20 20 51 75 69  63 6b 20 46 69 6c 65 20  |     Quick File |
00000020  52 65 63 6f 76 65 72 0d  00 14 04 0d 00 1e 48 f4  |Recover.......H.|
00000030  20 20 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 a4 a4 a4  |  ..............|
00000040  a4 a4 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 a4 a4 a4  |................|
*
00000070  a4 a4 a4 0d 00 28 48 f4  20 20 a4 20 20 54 68 69  |.....(H.  .  Thi|
00000080  73 20 70 72 6f 67 72 61  6d 20 61 6e 64 20 61 6c  |s program and al|
00000090  6c 20 64 6f 63 75 6d 65  6e 74 61 74 69 6f 6e 20  |l documentation |
000000a0  28 43 29 20 44 2e 4a 2e  48 6f 6c 64 65 6e 20 4a  |(C) D.J.Holden J|
000000b0  75 6e 65 20 31 39 39 32  20 20 a4 0d 00 32 48 f4  |une 1992  ...2H.|
000000c0  20 20 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 a4 a4 a4  |  ..............|
000000d0  a4 a4 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 a4 a4 a4  |................|
*
00000100  a4 a4 a4 0d 00 3c 04 0d  00 46 1c 76 65 72 73 69  |.....<...F.versi|
00000110  6f 6e 24 3d 22 51 46 52  20 20 20 56 65 72 20 32  |on$="QFR   Ver 2|
00000120  2e 30 22 0d 00 50 20 68  65 6c 70 5f 66 67 6e 64  |.0"..P help_fgnd|
00000130  25 3d 35 20 3a 20 68 65  6c 70 5f 62 67 6e 64 25  |%=5 : help_bgnd%|
00000140  3d 31 32 0d 00 5a 0f f2  69 6e 69 74 69 61 6c 69  |=12..Z..initiali|
00000150  73 65 0d 00 64 04 0d 00  6e 04 0d 00 78 05 f5 0d  |se..d...n...x...|
00000160  00 82 27 c8 99 20 22 57  69 6d 70 5f 50 6f 6c 6c  |..'.. "Wimp_Poll|
00000170  22 2c 6d 61 73 6b 25 2c  62 6c 6b 25 20 b8 20 72  |",mask%,blk% . r|
00000180  65 61 73 6f 6e 25 0d 00  8c 10 c8 8e 20 72 65 61  |eason%...... rea|
00000190  73 6f 6e 25 20 ca 0d 00  96 43 20 c9 20 31 3a e7  |son% ....C . 1:.|
000001a0  20 21 62 6c 6b 25 3d 76  69 65 77 5f 77 25 20 f2  | !blk%=view_w% .|
000001b0  72 65 64 72 61 77 5f 76  69 65 77 20 8b e7 20 21  |redraw_view .. !|
000001c0  62 6c 6b 25 3d 68 65 6c  70 5f 77 25 20 f2 72 65  |blk%=help_w% .re|
000001d0  64 72 61 77 5f 68 65 6c  70 0d 00 a0 22 20 c9 20  |draw_help..." . |
000001e0  32 3a c8 99 22 57 69 6d  70 5f 4f 70 65 6e 57 69  |2:.."Wimp_OpenWi|
000001f0  6e 64 6f 77 22 2c 2c 62  6c 6b 25 0d 00 aa 42 20  |ndow",,blk%...B |
00000200  c9 20 33 3a c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |. 3:.."Wimp_Clos|
00000210  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6b 25 3a e7  |eWindow",,blk%:.|
00000220  20 21 62 6c 6b 25 3d 76  69 65 77 5f 77 25 20 66  | !blk%=view_w% f|
00000230  6c 61 67 25 3d 66 6c 61  67 25 80 ac 31 0d 00 b4  |lag%=flag%..1...|
00000240  1d 20 20 20 20 20 20 20  20 e7 20 21 62 6c 6b 25  |.        . !blk%|
00000250  3d 74 6f 6f 6c 5f 77 25  20 8c 0d 00 be 44 20 20  |=tool_w% ....D  |
00000260  20 20 20 20 20 20 20 21  62 6c 6b 25 3d 76 69 65  |       !blk%=vie|
00000270  77 5f 77 25 3a c8 99 22  57 69 6d 70 5f 43 6c 6f  |w_w%:.."Wimp_Clo|
00000280  73 65 57 69 6e 64 6f 77  22 2c 2c 62 6c 6b 25 3a  |seWindow",,blk%:|
00000290  66 6c 61 67 25 3d 66 6c  61 67 25 80 ac 35 0d 00  |flag%=flag%..5..|
000002a0  c8 37 20 20 20 20 20 20  20 20 20 21 62 6c 6b 25  |.7         !blk%|
000002b0  3d 65 6e 64 72 65 63 5f  77 25 3a c8 99 22 57 69  |=endrec_w%:.."Wi|
000002c0  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
000002d0  2c 62 6c 6b 25 0d 00 d2  0d 20 20 20 20 20 20 20  |,blk%....       |
000002e0  20 cd 0d 00 dc 0f 20 c9  20 36 3a f2 63 6c 69 63  | ..... . 6:.clic|
000002f0  6b 0d 00 e6 13 20 c9 20  37 3a f2 64 72 61 67 5f  |k.... . 7:.drag_|
00000300  74 65 72 6d 0d 00 f0 3f  20 c9 20 38 3a e7 20 62  |term...? . 8:. b|
00000310  6c 6b 25 3f 32 34 3d 31  33 20 f2 72 65 74 75 72  |lk%?24=13 .retur|
00000320  6e 5f 6b 65 79 20 8b 20  c8 99 22 57 69 6d 70 5f  |n_key . .."Wimp_|
00000330  50 72 6f 63 65 73 73 4b  65 79 22 2c 62 6c 6b 25  |ProcessKey",blk%|
00000340  21 32 34 0d 00 fa 10 20  c9 20 39 3a f2 73 65 6c  |!24.... . 9:.sel|
00000350  65 63 74 0d 01 04 19 20  c9 20 31 37 2c 31 38 3a  |ect.... . 17,18:|
00000360  c8 8e 20 62 6c 6b 25 21  31 36 20 ca 0d 01 0e 11  |.. blk%!16 .....|
00000370  20 20 20 20 20 c9 20 30  3a f2 64 69 65 0d 01 18  |     . 0:.die...|
00000380  43 20 20 20 20 20 c9 20  32 3a 49 25 3d 62 6c 6b  |C     . 2:I%=blk|
00000390  25 2b 34 34 3a c8 95 3f  49 25 3e 33 31 3a 49 25  |%+44:..?I%>31:I%|
000003a0  2b 3d 31 3a ce 3a 3f 49  25 3d 31 33 3a f2 73 61  |+=1:.:?I%=13:.sa|
000003b0  76 65 28 24 28 62 6c 6b  25 2b 34 34 29 2c 31 29  |ve($(blk%+44),1)|
000003c0  0d 01 22 15 20 20 20 20  20 c9 20 26 35 30 32 3a  |..".     . &502:|
000003d0  f2 68 65 6c 70 0d 01 2c  11 20 20 20 20 20 20 20  |.help..,.       |
000003e0  20 20 20 20 20 cb 0d 01  36 05 cb 0d 01 40 07 fd  |     ...6....@..|
000003f0  20 a3 0d 01 4a 04 0d 01  54 31 20 20 20 20 25 25  | ...J...T1    %%|
00000400  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
*
00000420  25 25 25 25 25 25 25 0d  01 5e 31 20 20 20 20 4d  |%%%%%%%..^1    M|
00000430  65 6e 75 20 61 6e 64 20  57 69 6e 64 6f 77 20 63  |enu and Window c|
00000440  6c 69 63 6b 20 61 6e 64  20 73 65 6c 65 63 74 20  |lick and select |
00000450  72 6f 75 74 69 6e 65 73  0d 01 68 31 20 20 20 20  |routines..h1    |
00000460  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
*
00000480  25 25 25 25 25 25 25 25  25 0d 01 72 0b dd f2 63  |%%%%%%%%%..r...c|
00000490  6c 69 63 6b 0d 01 7c 32  c8 99 22 57 69 6d 70 5f  |lick..|2.."Wimp_|
000004a0  47 65 74 50 6f 69 6e 74  65 72 49 6e 66 6f 22 2c  |GetPointerInfo",|
000004b0  2c 62 6c 6b 25 2b 26 43  30 3a 6d 62 25 3d 62 6c  |,blk%+&C0:mb%=bl|
000004c0  6b 25 21 26 43 38 0d 01  86 10 c8 8e 20 62 6c 6b  |k%!&C8...... blk|
000004d0  25 21 31 32 20 ca 0d 01  90 1b 20 c9 20 2d 32 3a  |%!12 ..... . -2:|
000004e0  e7 20 62 6c 6b 25 21 31  36 3d 69 63 6f 6e 25 20  |. blk%!16=icon% |
000004f0  8c 0d 01 9a 16 20 20 20  20 20 20 20 20 20 20 c8  |.....          .|
00000500  8e 20 6d 62 25 20 ca 0d  01 a4 4e 20 20 20 20 20  |. mb% ....N     |
00000510  20 20 20 20 20 20 c9 20  32 3a 6d 78 25 3d 62 6c  |      . 2:mx%=bl|
00000520  6b 25 21 26 43 30 2d 31  34 30 3a 6d 68 25 3d 33  |k%!&C0-140:mh%=3|
00000530  35 34 3a c8 99 22 57 69  6d 70 5f 43 72 65 61 74  |54:.."Wimp_Creat|
00000540  65 4d 65 6e 75 22 2c 2c  6d 65 6e 75 25 2c 6d 78  |eMenu",,menu%,mx|
00000550  25 2c 6d 68 25 0d 01 ae  74 20 20 20 20 20 20 20  |%,mh%...t       |
00000560  20 20 20 20 c9 20 34 3a  e7 20 74 79 70 65 25 3d  |    . 4:. type%=|
00000570  2d 31 20 49 25 3d a4 61  6c 65 72 74 28 22 59 6f  |-1 I%=.alert("Yo|
00000580  75 20 6d 75 73 74 20 66  69 72 73 74 20 69 64 65  |u must first ide|
00000590  6e 74 69 66 79 20 74 68  65 20 64 69 73 63 20 74  |ntify the disc t|
000005a0  79 70 65 2e 22 29 20 8b  20 f2 6f 70 65 6e 5f 76  |ype.") . .open_v|
000005b0  69 65 77 3a f2 73 65 74  63 61 72 65 74 28 74 6f  |iew:.setcaret(to|
000005c0  6f 6c 5f 77 25 2c 32 34  29 0d 01 b8 0f 20 20 20  |ol_w%,24)....   |
000005d0  20 20 20 20 20 20 20 cb  0d 01 c2 0e 20 20 20 20  |       .....    |
000005e0  20 20 20 20 20 cd 0d 01  cc 1a 20 c9 20 74 6f 6f  |     ..... . too|
000005f0  6c 5f 77 25 3a f2 74 6f  6f 6c 5f 63 6c 69 63 6b  |l_w%:.tool_click|
00000600  0d 01 d6 1c 20 c9 20 73  61 76 65 5f 77 25 3a e7  |.... . save_w%:.|
00000610  20 62 6c 6b 25 21 31 36  3d 32 20 8c 0d 01 e0 45  | blk%!16=2 ....E|
00000620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 21  |               !|
00000630  62 6c 6b 25 3d 73 61 76  65 5f 77 25 3a 62 6c 6b  |blk%=save_w%:blk|
00000640  25 21 34 3d 31 3a c8 99  22 57 69 6d 70 5f 47 65  |%!4=1:.."Wimp_Ge|
00000650  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00000660  25 0d 01 ea 26 20 20 20  20 20 20 20 20 20 20 20  |%...&           |
00000670  20 20 20 20 f2 73 61 76  65 28 24 28 62 6c 6b 25  |    .save($(blk%|
00000680  21 32 38 29 2c 30 29 0d  01 f4 13 20 20 20 20 20  |!28),0)....     |
00000690  20 20 20 20 20 20 20 20  20 cc 0d 01 fe 34 20 20  |         ....4  |
000006a0  20 20 20 20 20 20 20 20  20 20 20 20 20 e7 20 62  |             . b|
000006b0  6c 6b 25 21 31 36 3d 30  20 80 20 62 6c 6b 25 21  |lk%!16=0 . blk%!|
000006c0  38 3d 34 20 f2 64 72 61  67 5f 66 69 6c 65 0d 02  |8=4 .drag_file..|
000006d0  08 13 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
000006e0  cd 0d 02 12 05 cb 0d 02  1c 05 e1 0d 02 26 04 0d  |.............&..|
000006f0  02 30 0c dd f2 73 65 6c  65 63 74 0d 02 3a 32 c8  |.0...select..:2.|
00000700  99 22 57 69 6d 70 5f 47  65 74 50 6f 69 6e 74 65  |."Wimp_GetPointe|
00000710  72 49 6e 66 6f 22 2c 2c  62 6c 6b 25 2b 26 43 30  |rInfo",,blk%+&C0|
00000720  3a 6d 62 25 3d 62 6c 6b  25 21 26 43 38 0d 02 44  |:mb%=blk%!&C8..D|
00000730  0e c8 8e 20 21 62 6c 6b  25 20 ca 0d 02 4e 1f 20  |... !blk% ...N. |
00000740  c9 20 30 3a e7 20 ac 20  62 6c 6b 25 21 34 20 f2  |. 0:. . blk%!4 .|
00000750  67 65 74 5f 66 6f 72 6d  61 74 0d 02 58 16 20 c9  |get_format..X. .|
00000760  20 31 3a f2 63 68 61 6e  67 65 5f 64 72 69 76 65  | 1:.change_drive|
00000770  0d 02 62 4d 20 c9 20 32  3a 21 62 6c 6b 25 3d 68  |..bM . 2:!blk%=h|
00000780  65 6c 70 5f 77 25 3a c8  99 22 57 69 6d 70 5f 47  |elp_w%:.."Wimp_G|
00000790  65 74 57 69 6e 64 6f 77  49 6e 66 6f 22 2c 2c 62  |etWindowInfo",,b|
000007a0  6c 6b 25 3a c8 99 22 57  69 6d 70 5f 4f 70 65 6e  |lk%:.."Wimp_Open|
000007b0  57 69 6e 64 6f 77 22 2c  2c 62 6c 6b 25 0d 02 6c  |Window",,blk%..l|
000007c0  0d 20 c9 20 34 3a f2 64  69 65 0d 02 76 05 cb 0d  |. . 4:.die..v...|
000007d0  02 80 2e e7 20 6d 62 25  3d 31 20 c8 99 22 57 69  |.... mb%=1 .."Wi|
000007e0  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
000007f0  6d 65 6e 75 25 2c 6d 78  25 2c 6d 68 25 0d 02 8a  |menu%,mx%,mh%...|
00000800  05 e1 0d 02 94 04 0d 02  9e 10 dd f2 72 65 74 75  |............retu|
00000810  72 6e 5f 6b 65 79 0d 02  a8 0e c8 8e 20 21 62 6c  |rn_key...... !bl|
00000820  6b 25 20 ca 0d 02 b2 0f  20 c9 20 74 6f 6f 6c 5f  |k% ..... . tool_|
00000830  77 25 3a 0d 02 bc 17 20  20 20 20 20 20 e7 20 62  |w%:....      . b|
00000840  6c 6b 25 21 34 3d 32 34  20 8c 0d 02 c6 27 20 20  |lk%!4=24 ....'  |
00000850  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 47 65  |     .. "Wimp_Ge|
00000860  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00000870  25 0d 02 d0 31 20 20 20  20 20 20 20 c8 99 20 22  |%...1       .. "|
00000880  4f 53 5f 52 65 61 64 55  6e 73 69 67 6e 65 64 22  |OS_ReadUnsigned"|
00000890  2c 31 36 2c 62 6c 6b 25  21 32 38 20 b8 20 2c 2c  |,16,blk%!28 . ,,|
000008a0  41 25 0d 02 da 1b 20 20  20 20 20 20 20 e7 20 41  |A%....       . A|
000008b0  25 3e 6d 61 78 5f 61 64  64 72 25 20 8c 0d 02 e4  |%>max_addr% ....|
000008c0  2d 20 20 20 20 20 20 20  20 49 25 3d a4 61 6c 65  |-        I%=.ale|
000008d0  72 74 28 22 49 6e 76 61  6c 69 64 20 64 69 73 6b  |rt("Invalid disk|
000008e0  20 61 64 64 72 65 73 73  22 29 0d 02 ee 16 20 20  | address")....  |
000008f0  20 20 20 20 20 20 f2 61  64 64 72 5f 69 63 6f 6e  |      .addr_icon|
00000900  0d 02 f8 0c 20 20 20 20  20 20 20 cc 0d 03 02 60  |....       ....`|
00000910  20 20 20 20 20 20 20 20  e7 20 61 64 64 72 65 73  |        . addres|
00000920  73 25 3c 3e 41 25 20 61  64 64 72 65 73 73 25 3d  |s%<>A% address%=|
00000930  41 25 80 ac 28 73 65 63  5f 73 69 7a 65 25 2d 31  |A%..(sec_size%-1|
00000940  29 3a f2 63 61 6c 63 5f  74 68 73 3a f2 74 68 73  |):.calc_ths:.ths|
00000950  5f 69 63 6f 6e 73 3a f2  76 69 65 77 5f 6c 6f 61  |_icons:.view_loa|
00000960  64 3a f2 6f 70 65 6e 5f  76 69 65 77 0d 03 0c 0c  |d:.open_view....|
00000970  20 20 20 20 20 20 20 cd  0d 03 16 15 20 20 20 20  |       .....    |
00000980  20 20 f2 63 6c 6f 73 65  5f 6f 64 64 73 0d 03 20  |  .close_odds.. |
00000990  0b 20 20 20 20 20 20 cd  0d 03 2a 3e 20 c9 20 73  |.      ...*> . s|
000009a0  61 76 65 5f 77 25 3a c8  99 22 57 69 6d 70 5f 47  |ave_w%:.."Wimp_G|
000009b0  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
000009c0  6b 25 3a f2 73 61 76 65  28 24 28 62 6c 6b 25 21  |k%:.save($(blk%!|
000009d0  32 38 29 2c 30 29 0d 03  34 1c 20 c9 20 64 65 66  |28),0)..4. . def|
000009e0  69 6e 65 5f 77 25 3a c8  8e 20 62 6c 6b 25 21 34  |ine_w%:.. blk%!4|
000009f0  20 ca 0d 03 3e 2f 20 20  20 20 20 20 20 20 20 20  | ...>/          |
00000a00  20 20 20 20 20 20 20 c9  20 31 3a f2 73 65 74 63  |       . 1:.setc|
00000a10  61 72 65 74 28 64 65 66  69 6e 65 5f 77 25 2c 32  |aret(define_w%,2|
00000a20  29 0d 03 48 2f 20 20 20  20 20 20 20 20 20 20 20  |)..H/           |
00000a30  20 20 20 20 20 20 c9 20  32 3a f2 73 65 74 63 61  |      . 2:.setca|
00000a40  72 65 74 28 64 65 66 69  6e 65 5f 77 25 2c 33 29  |ret(define_w%,3)|
00000a50  0d 03 52 2f 20 20 20 20  20 20 20 20 20 20 20 20  |..R/            |
00000a60  20 20 20 20 20 c9 20 33  3a f2 73 65 74 63 61 72  |     . 3:.setcar|
00000a70  65 74 28 64 65 66 69 6e  65 5f 77 25 2c 34 29 0d  |et(define_w%,4).|
00000a80  03 5c 48 20 20 20 20 20  20 20 20 20 20 20 20 20  |.\H             |
00000a90  20 20 20 20 c9 20 34 3a  c8 99 22 57 69 6d 70 5f  |    . 4:.."Wimp_|
00000aa0  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6c  |CloseWindow",,bl|
00000ab0  6b 25 3a 62 6c 6b 25 21  34 3d 36 3a f2 67 65 74  |k%:blk%!4=6:.get|
00000ac0  5f 66 6f 72 6d 61 74 0d  03 66 15 20 20 20 20 20  |_format..f.     |
00000ad0  20 20 20 20 20 20 20 20  20 20 20 cb 0d 03 70 1d  |           ...p.|
00000ae0  20 c9 20 65 6e 64 72 65  63 5f 77 25 3a f2 65 6e  | . endrec_w%:.en|
00000af0  64 5f 61 64 64 72 65 73  73 0d 03 7a 05 cb 0d 03  |d_address..z....|
00000b00  84 05 e1 0d 03 8e 04 0d  03 98 10 dd f2 74 6f 6f  |.............too|
00000b10  6c 5f 63 6c 69 63 6b 0d  03 a2 0d e7 20 6d 62 25  |l_click..... mb%|
00000b20  3d 32 20 8c 0d 03 ac 25  20 6d 78 25 3d 62 6c 6b  |=2 ....% mx%=blk|
00000b30  25 21 26 43 30 2d 31 34  30 3a 6d 68 25 3d 62 6c  |%!&C0-140:mh%=bl|
00000b40  6b 25 21 26 43 34 2b 39  36 0d 03 b6 27 20 c8 99  |k%!&C4+96...' ..|
00000b50  22 57 69 6d 70 5f 43 72  65 61 74 65 4d 65 6e 75  |"Wimp_CreateMenu|
00000b60  22 2c 2c 6d 65 6e 75 25  2c 6d 78 25 2c 6d 68 25  |",,menu%,mx%,mh%|
00000b70  0d 03 c0 05 cc 0d 03 ca  10 c8 8e 20 62 6c 6b 25  |........... blk%|
00000b80  21 31 36 20 ca 0d 03 d4  36 20 c9 20 32 37 3a e7  |!16 ....6 . 27:.|
00000b90  20 66 6c 61 67 25 80 38  20 f2 6f 70 65 6e 5f 76  | flag%.8 .open_v|
00000ba0  69 65 77 20 8b 20 f2 76  69 65 77 5f 6c 6f 61 64  |iew . .view_load|
00000bb0  3a f2 6f 70 65 6e 5f 76  69 65 77 0d 03 de 31 20  |:.open_view...1 |
00000bc0  c9 20 31 38 3a e7 20 ac  28 66 6c 61 67 25 80 32  |. 18:. .(flag%.2|
00000bd0  29 20 66 6c 61 67 25 3d  66 6c 61 67 25 84 26 43  |) flag%=flag%.&C|
00000be0  32 3a f2 6f 70 65 6e 5f  76 69 65 77 0d 03 e8 3f  |2:.open_view...?|
00000bf0  20 c9 20 31 37 3a e7 20  66 6c 61 67 25 80 32 20  | . 17:. flag%.2 |
00000c00  66 6c 61 67 25 3d 66 6c  61 67 25 80 28 ac 32 29  |flag%=flag%.(.2)|
00000c10  3a 66 6c 61 67 25 3d 66  6c 61 67 25 84 26 43 30  |:flag%=flag%.&C0|
00000c20  3a f2 6f 70 65 6e 5f 76  69 65 77 0d 03 f2 3d 20  |:.open_view...= |
00000c30  c9 20 32 35 3a 21 62 6c  6b 25 3d 74 6f 6f 6c 5f  |. 25:!blk%=tool_|
00000c40  77 25 3a 62 6c 6b 25 21  34 3d 32 35 3a c8 99 22  |w%:blk%!4=25:.."|
00000c50  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
00000c60  65 22 2c 2c 62 6c 6b 25  0d 03 fc 3a 20 20 20 20  |e",,blk%...:    |
00000c70  20 20 20 20 20 e7 20 62  6c 6b 25 21 32 34 80 28  |     . blk%!24.(|
00000c80  31 3c 3c 32 31 29 20 6d  61 72 6b 31 25 3d 2d 31  |1<<21) mark1%=-1|
00000c90  20 8b 20 6d 61 72 6b 31  25 3d 61 64 64 72 65 73  | . mark1%=addres|
00000ca0  73 25 0d 04 06 3f 20 20  20 20 20 20 20 20 20 62  |s%...?         b|
00000cb0  6c 6b 25 21 31 32 3d 30  3a 62 6c 6b 25 21 38 3d  |lk%!12=0:blk%!8=|
00000cc0  31 3c 3c 32 31 3a c8 99  22 57 69 6d 70 5f 53 65  |1<<21:.."Wimp_Se|
00000cd0  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00000ce0  25 0d 04 10 18 20 20 20  20 20 20 20 20 20 f2 63  |%....         .c|
00000cf0  6c 6f 73 65 5f 6f 64 64  73 0d 04 1a 3d 20 c9 20  |lose_odds...= . |
00000d00  32 36 3a 21 62 6c 6b 25  3d 74 6f 6f 6c 5f 77 25  |26:!blk%=tool_w%|
00000d10  3a 62 6c 6b 25 21 34 3d  32 36 3a c8 99 22 57 69  |:blk%!4=26:.."Wi|
00000d20  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00000d30  2c 2c 62 6c 6b 25 0d 04  24 3a 20 20 20 20 20 20  |,,blk%..$:      |
00000d40  20 20 20 e7 20 62 6c 6b  25 21 32 34 80 28 31 3c  |   . blk%!24.(1<|
00000d50  3c 32 31 29 20 6d 61 72  6b 32 25 3d 2d 31 20 8b  |<21) mark2%=-1 .|
00000d60  20 6d 61 72 6b 32 25 3d  61 64 64 72 65 73 73 25  | mark2%=address%|
00000d70  0d 04 2e 3f 20 20 20 20  20 20 20 20 20 62 6c 6b  |...?         blk|
00000d80  25 21 31 32 3d 30 3a 62  6c 6b 25 21 38 3d 31 3c  |%!12=0:blk%!8=1<|
00000d90  3c 32 31 3a c8 99 22 57  69 6d 70 5f 53 65 74 49  |<21:.."Wimp_SetI|
00000da0  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6b 25 0d  |conState",,blk%.|
00000db0  04 38 18 20 20 20 20 20  20 20 20 20 f2 63 6c 6f  |.8.         .clo|
00000dc0  73 65 5f 6f 64 64 73 0d  04 42 2c 20 c9 20 32 38  |se_odds..B, . 28|
00000dd0  3a 74 72 61 63 6b 25 2b  3d 31 3a e7 20 74 72 61  |:track%+=1:. tra|
00000de0  63 6b 25 3e 3d 63 79 6c  73 25 20 74 72 61 63 6b  |ck%>=cyls% track|
00000df0  25 3d 30 0d 04 4c 37 20  20 20 20 20 20 20 20 20  |%=0..L7         |
00000e00  61 64 64 72 65 73 73 25  3d a4 63 61 6c 63 5f 61  |address%=.calc_a|
00000e10  64 64 72 3a f2 74 68 73  5f 69 63 6f 6e 73 3a f2  |ddr:.ths_icons:.|
00000e20  63 6c 6f 73 65 5f 6f 64  64 73 0d 04 56 2a 20 20  |close_odds..V*  |
00000e30  20 20 20 20 20 20 20 e7  20 6d 62 25 3d 34 20 f2  |       . mb%=4 .|
00000e40  76 69 65 77 5f 6c 6f 61  64 3a f2 6f 70 65 6e 5f  |view_load:.open_|
00000e50  76 69 65 77 0d 04 60 16  20 20 20 20 20 20 20 20  |view..`.        |
00000e60  20 e7 20 6d 62 25 3d 31  20 8c 0d 04 6a 25 20 20  | . mb%=1 ...j%  |
00000e70  20 20 20 20 20 20 20 20  e7 20 66 6c 61 67 25 80  |        . flag%.|
00000e80  39 3d 39 20 f2 62 6c 61  6e 6b 5f 76 69 65 77 0d  |9=9 .blank_view.|
00000e90  04 74 22 20 20 20 20 20  20 20 20 20 20 66 6c 61  |.t"          fla|
00000ea0  67 25 3d 66 6c 61 67 25  20 80 ac 25 31 31 30 30  |g%=flag% ..%1100|
00000eb0  30 0d 04 7e 0e 20 20 20  20 20 20 20 20 20 cd 0d  |0..~.         ..|
00000ec0  04 88 2d 20 c9 20 32 39  3a 74 72 61 63 6b 25 2d  |..- . 29:track%-|
00000ed0  3d 31 3a e7 20 74 72 61  63 6b 25 3c 30 20 74 72  |=1:. track%<0 tr|
00000ee0  61 63 6b 25 3d 63 79 6c  73 25 2d 31 0d 04 92 37  |ack%=cyls%-1...7|
00000ef0  20 20 20 20 20 20 20 20  20 61 64 64 72 65 73 73  |         address|
00000f00  25 3d a4 63 61 6c 63 5f  61 64 64 72 3a f2 74 68  |%=.calc_addr:.th|
00000f10  73 5f 69 63 6f 6e 73 3a  f2 63 6c 6f 73 65 5f 6f  |s_icons:.close_o|
00000f20  64 64 73 0d 04 9c 2a 20  20 20 20 20 20 20 20 20  |dds...*         |
00000f30  e7 20 6d 62 25 3d 34 20  f2 76 69 65 77 5f 6c 6f  |. mb%=4 .view_lo|
00000f40  61 64 3a f2 6f 70 65 6e  5f 76 69 65 77 0d 04 a6  |ad:.open_view...|
00000f50  16 20 20 20 20 20 20 20  20 20 e7 20 6d 62 25 3d  |.         . mb%=|
00000f60  31 20 8c 0d 04 b0 25 20  20 20 20 20 20 20 20 20  |1 ....%         |
00000f70  20 e7 20 66 6c 61 67 25  80 39 3d 39 20 f2 62 6c  | . flag%.9=9 .bl|
00000f80  61 6e 6b 5f 76 69 65 77  0d 04 ba 22 20 20 20 20  |ank_view..."    |
00000f90  20 20 20 20 20 20 66 6c  61 67 25 3d 66 6c 61 67  |      flag%=flag|
00000fa0  25 20 80 ac 25 31 31 30  30 30 0d 04 c4 0e 20 20  |% ..%11000....  |
00000fb0  20 20 20 20 20 20 20 cd  0d 04 ce 12 20 c9 20 33  |       ..... . 3|
00000fc0  30 3a 68 65 61 64 25 2b  3d 31 0d 04 d8 50 20 20  |0:head%+=1...P  |
00000fd0  20 20 20 20 20 20 20 e7  20 68 65 61 64 25 3e 3d  |       . head%>=|
00000fe0  68 65 61 64 73 25 20 68  65 61 64 25 3d 30 3a e7  |heads% head%=0:.|
00000ff0  20 74 79 70 65 25 3c 35  20 74 72 61 63 6b 25 2b  | type%<5 track%+|
00001000  3d 31 3a e7 74 72 61 63  6b 25 3e 3d 63 79 6c 73  |=1:.track%>=cyls|
00001010  25 20 74 72 61 63 6b 25  3d 30 0d 04 e2 37 20 20  |% track%=0...7  |
00001020  20 20 20 20 20 20 20 61  64 64 72 65 73 73 25 3d  |       address%=|
00001030  a4 63 61 6c 63 5f 61 64  64 72 3a f2 74 68 73 5f  |.calc_addr:.ths_|
00001040  69 63 6f 6e 73 3a f2 63  6c 6f 73 65 5f 6f 64 64  |icons:.close_odd|
00001050  73 0d 04 ec 2a 20 20 20  20 20 20 20 20 20 e7 20  |s...*         . |
00001060  6d 62 25 3d 34 20 f2 76  69 65 77 5f 6c 6f 61 64  |mb%=4 .view_load|
00001070  3a f2 6f 70 65 6e 5f 76  69 65 77 0d 04 f6 16 20  |:.open_view.... |
00001080  20 20 20 20 20 20 20 20  e7 20 6d 62 25 3d 31 20  |        . mb%=1 |
00001090  8c 0d 05 00 25 20 20 20  20 20 20 20 20 20 20 e7  |....%          .|
000010a0  20 66 6c 61 67 25 80 39  3d 39 20 f2 62 6c 61 6e  | flag%.9=9 .blan|
000010b0  6b 5f 76 69 65 77 0d 05  0a 22 20 20 20 20 20 20  |k_view..."      |
000010c0  20 20 20 20 66 6c 61 67  25 3d 66 6c 61 67 25 20  |    flag%=flag% |
000010d0  80 ac 25 31 31 30 30 30  0d 05 14 0e 20 20 20 20  |..%11000....    |
000010e0  20 20 20 20 20 cd 0d 05  1e 12 20 c9 20 33 31 3a  |     ..... . 31:|
000010f0  68 65 61 64 25 2d 3d 31  0d 05 28 50 20 20 20 20  |head%-=1..(P    |
00001100  20 20 20 20 20 e7 68 65  61 64 25 3c 30 20 68 65  |     .head%<0 he|
00001110  61 64 25 3d 68 65 61 64  73 25 2d 31 3a e7 74 79  |ad%=heads%-1:.ty|
00001120  70 65 25 3c 35 20 74 72  61 63 6b 25 2d 3d 31 3a  |pe%<5 track%-=1:|
00001130  e7 74 72 61 63 6b 25 3c  30 20 74 72 61 63 6b 25  |.track%<0 track%|
00001140  3d 63 79 6c 73 25 2d 31  0d 05 32 37 20 20 20 20  |=cyls%-1..27    |
00001150  20 20 20 20 20 61 64 64  72 65 73 73 25 3d a4 63  |     address%=.c|
00001160  61 6c 63 5f 61 64 64 72  3a f2 74 68 73 5f 69 63  |alc_addr:.ths_ic|
00001170  6f 6e 73 3a f2 63 6c 6f  73 65 5f 6f 64 64 73 0d  |ons:.close_odds.|
00001180  05 3c 2a 20 20 20 20 20  20 20 20 20 e7 20 6d 62  |.<*         . mb|
00001190  25 3d 34 20 f2 76 69 65  77 5f 6c 6f 61 64 3a f2  |%=4 .view_load:.|
000011a0  6f 70 65 6e 5f 76 69 65  77 0d 05 46 16 20 20 20  |open_view..F.   |
000011b0  20 20 20 20 20 20 e7 20  6d 62 25 3d 31 20 8c 0d  |      . mb%=1 ..|
000011c0  05 50 25 20 20 20 20 20  20 20 20 20 20 e7 20 66  |.P%          . f|
000011d0  6c 61 67 25 80 39 3d 39  20 f2 62 6c 61 6e 6b 5f  |lag%.9=9 .blank_|
000011e0  76 69 65 77 0d 05 5a 22  20 20 20 20 20 20 20 20  |view..Z"        |
000011f0  20 20 66 6c 61 67 25 3d  66 6c 61 67 25 20 80 ac  |  flag%=flag% ..|
00001200  25 31 31 30 30 30 0d 05  64 0e 20 20 20 20 20 20  |%11000..d.      |
00001210  20 20 20 cd 0d 05 6e 47  20 c9 20 33 32 3a 61 64  |   ...nG . 32:ad|
00001220  64 72 65 73 73 25 2b 3d  73 65 63 5f 73 69 7a 65  |dress%+=sec_size|
00001230  25 3a e7 20 74 79 70 65  25 3d 33 20 e7 20 73 65  |%:. type%=3 . se|
00001240  63 74 6f 72 25 3d 38 20  61 64 64 72 65 73 73 25  |ctor%=8 address%|
00001250  2b 3d 73 65 63 5f 73 69  7a 65 25 0d 05 78 2d 20  |+=sec_size%..x- |
00001260  20 20 20 20 20 20 20 20  f2 63 61 6c 63 5f 74 68  |        .calc_th|
00001270  73 3a f2 74 68 73 5f 69  63 6f 6e 73 3a f2 63 6c  |s:.ths_icons:.cl|
00001280  6f 73 65 5f 6f 64 64 73  0d 05 82 2a 20 20 20 20  |ose_odds...*    |
00001290  20 20 20 20 20 e7 20 6d  62 25 3d 34 20 f2 76 69  |     . mb%=4 .vi|
000012a0  65 77 5f 6c 6f 61 64 3a  f2 6f 70 65 6e 5f 76 69  |ew_load:.open_vi|
000012b0  65 77 0d 05 8c 16 20 20  20 20 20 20 20 20 20 e7  |ew....         .|
000012c0  20 6d 62 25 3d 31 20 8c  0d 05 96 25 20 20 20 20  | mb%=1 ....%    |
000012d0  20 20 20 20 20 20 e7 20  66 6c 61 67 25 80 39 3d  |      . flag%.9=|
000012e0  39 20 f2 62 6c 61 6e 6b  5f 76 69 65 77 0d 05 a0  |9 .blank_view...|
000012f0  22 20 20 20 20 20 20 20  20 20 20 66 6c 61 67 25  |"          flag%|
00001300  3d 66 6c 61 67 25 20 80  ac 25 31 31 30 30 30 0d  |=flag% ..%11000.|
00001310  05 aa 0e 20 20 20 20 20  20 20 20 20 cd 0d 05 b4  |...         ....|
00001320  47 20 c9 20 33 33 3a 61  64 64 72 65 73 73 25 2d  |G . 33:address%-|
00001330  3d 73 65 63 5f 73 69 7a  65 25 3a e7 20 74 79 70  |=sec_size%:. typ|
00001340  65 25 3d 33 20 e7 20 73  65 63 74 6f 72 25 3d 30  |e%=3 . sector%=0|
00001350  20 61 64 64 72 65 73 73  25 2d 3d 73 65 63 5f 73  | address%-=sec_s|
00001360  69 7a 65 25 0d 05 be 2d  20 20 20 20 20 20 20 20  |ize%...-        |
00001370  20 f2 63 61 6c 63 5f 74  68 73 3a f2 74 68 73 5f  | .calc_ths:.ths_|
00001380  69 63 6f 6e 73 3a f2 63  6c 6f 73 65 5f 6f 64 64  |icons:.close_odd|
00001390  73 0d 05 c8 2a 20 20 20  20 20 20 20 20 20 e7 20  |s...*         . |
000013a0  6d 62 25 3d 34 20 f2 76  69 65 77 5f 6c 6f 61 64  |mb%=4 .view_load|
000013b0  3a f2 6f 70 65 6e 5f 76  69 65 77 0d 05 d2 16 20  |:.open_view.... |
000013c0  20 20 20 20 20 20 20 20  e7 20 6d 62 25 3d 31 20  |        . mb%=1 |
000013d0  8c 0d 05 dc 25 20 20 20  20 20 20 20 20 20 20 e7  |....%          .|
000013e0  20 66 6c 61 67 25 80 39  3d 39 20 f2 62 6c 61 6e  | flag%.9=9 .blan|
000013f0  6b 5f 76 69 65 77 0d 05  e6 22 20 20 20 20 20 20  |k_view..."      |
00001400  20 20 20 20 66 6c 61 67  25 3d 66 6c 61 67 25 20  |    flag%=flag% |
00001410  80 ac 25 31 31 30 30 30  0d 05 f0 0e 20 20 20 20  |..%11000....    |
00001420  20 20 20 20 20 cd 0d 05  fa 12 20 c9 20 33 34 3a  |     ..... . 34:|
00001430  f2 72 65 63 6f 76 65 72  0d 06 04 05 cb 0d 06 0e  |.recover........|
00001440  05 cd 0d 06 18 05 e1 0d  06 22 04 0d 06 2c 2e 20  |........."...,. |
00001450  20 20 20 25 25 25 25 25  25 25 25 25 25 25 25 25  |   %%%%%%%%%%%%%|
00001460  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
00001470  25 25 25 25 25 25 25 25  25 0d 06 36 2e 20 20 20  |%%%%%%%%%..6.   |
00001480  20 52 6f 75 74 69 6e 65  73 20 74 6f 20 4c 6f 61  | Routines to Loa|
00001490  64 20 61 6e 64 20 53 61  76 65 20 66 72 6f 6d 2f  |d and Save from/|
000014a0  74 6f 20 64 69 73 6b 0d  06 40 2e 20 20 20 20 25  |to disk..@.    %|
000014b0  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
*
000014d0  25 25 25 25 25 0d 06 4a  04 0d 06 54 0a dd f2 6c  |%%%%%..J...T...l|
000014e0  6f 61 64 0d 06 5e 5d e7  20 a4 77 6b 73 70 63 28  |oad..^]. .wkspc(|
000014f0  6c 65 6e 67 74 68 25 29  3d a3 20 49 25 3d a4 61  |length%)=. I%=.a|
00001500  6c 65 72 74 28 22 55 6e  61 62 6c 65 20 74 6f 20  |lert("Unable to |
00001510  63 6c 61 69 6d 20 77 6f  72 6b 73 70 61 63 65 20  |claim workspace |
00001520  74 6f 20 72 65 63 6f 76  65 72 20 66 69 6c 65 22  |to recover file"|
00001530  29 3a 49 25 3d a4 77 6b  73 70 63 28 30 29 3a e1  |):I%=.wkspc(0):.|
00001540  0d 06 68 0f e7 20 74 79  70 65 25 3d 33 20 8c 0d  |..h.. type%=3 ..|
00001550  06 72 31 20 53 25 3d 28  73 74 61 72 74 25 81 73  |.r1 S%=(start%.s|
00001560  65 63 5f 73 69 7a 65 25  29 83 73 65 63 73 5f 74  |ec_size%).secs_t|
00001570  72 6b 25 3a 45 25 3d 66  69 6c 65 62 75 66 66 25  |rk%:E%=filebuff%|
00001580  0d 06 7c 29 20 61 64 72  25 3d 28 73 74 61 72 74  |..|) adr%=(start|
00001590  25 2b 73 65 63 5f 73 69  7a 65 25 29 84 28 64 72  |%+sec_size%).(dr|
000015a0  69 76 65 25 3c 3c 32 39  29 0d 06 86 2b 20 c8 99  |ive%<<29)...+ ..|
000015b0  20 22 41 44 46 53 5f 52  65 74 72 69 65 73 22 2c  | "ADFS_Retries",|
000015c0  26 46 46 30 30 2c 26 30  32 30 30 20 b8 20 2c 2c  |&FF00,&0200 . ,,|
000015d0  6f 72 74 25 0d 06 90 06  20 f5 0d 06 9a 41 20 20  |ort%.... ....A  |
000015e0  c8 99 20 22 58 41 44 46  53 5f 44 69 73 63 4f 70  |.. "XADFS_DiscOp|
000015f0  22 2c 2c 28 64 72 65 63  25 3c 3c 36 29 84 31 2c  |",,(drec%<<6).1,|
00001600  61 64 72 25 2c 45 25 2c  73 65 63 5f 73 69 7a 65  |adr%,E%,sec_size|
00001610  25 20 b8 20 65 72 72 25  3b 46 25 0d 06 a4 41 20  |% . err%;F%...A |
00001620  20 e7 20 46 25 80 31 20  c8 99 20 22 41 44 46 53  | . F%.1 .. "ADFS|
00001630  5f 52 65 74 72 69 65 73  22 2c 26 46 46 30 30 2c  |_Retries",&FF00,|
00001640  6f 72 74 25 3a f2 78 5f  65 72 72 6f 72 3a 49 25  |ort%:.x_error:I%|
00001650  3d a4 77 6b 73 70 63 28  30 29 3a e1 0d 06 ae 29  |=.wkspc(0):....)|
00001660  20 20 45 25 2b 3d 73 65  63 5f 73 69 7a 65 25 3a  |  E%+=sec_size%:|
00001670  53 25 2b 3d 31 3a 61 64  72 25 2b 3d 73 65 63 5f  |S%+=1:adr%+=sec_|
00001680  73 69 7a 65 25 0d 06 b8  34 20 20 e7 20 53 25 3d  |size%...4  . S%=|
00001690  39 20 53 25 3d 30 3a 61  64 72 25 2b 3d 73 65 63  |9 S%=0:adr%+=sec|
000016a0  5f 73 69 7a 65 25 3a 6c  65 6e 67 74 68 25 2d 3d  |_size%:length%-=|
000016b0  73 65 63 5f 73 69 7a 65  25 0d 06 c2 1c 20 fd 20  |sec_size%.... . |
000016c0  45 25 2d 66 69 6c 65 62  75 66 66 25 3e 3d 6c 65  |E%-filebuff%>=le|
000016d0  6e 67 74 68 25 0d 06 cc  21 20 c8 99 20 22 41 44  |ngth%...! .. "AD|
000016e0  46 53 5f 52 65 74 72 69  65 73 22 2c 26 46 46 30  |FS_Retries",&FF0|
000016f0  30 2c 6f 72 74 25 0d 06  d6 05 cc 0d 06 e0 2b 20  |0,ort%........+ |
00001700  c8 99 20 22 41 44 46 53  5f 52 65 74 72 69 65 73  |.. "ADFS_Retries|
00001710  22 2c 26 46 46 30 30 2c  26 30 32 30 30 20 b8 20  |",&FF00,&0200 . |
00001720  2c 2c 6f 72 74 25 0d 06  ea 1e 20 61 64 72 25 3d  |,,ort%.... adr%=|
00001730  73 74 61 72 74 25 20 84  28 64 72 69 76 65 25 3c  |start% .(drive%<|
00001740  3c 32 39 29 0d 06 f4 45  20 c8 99 20 22 58 41 44  |<29)...E .. "XAD|
00001750  46 53 5f 44 69 73 63 4f  70 22 2c 2c 28 64 72 65  |FS_DiscOp",,(dre|
00001760  63 25 3c 3c 36 29 84 31  2c 61 64 72 25 2c 66 69  |c%<<6).1,adr%,fi|
00001770  6c 65 62 75 66 66 25 2c  6c 65 6e 67 74 68 25 20  |lebuff%,length% |
00001780  b8 20 65 72 72 25 3b 46  25 0d 06 fe 21 20 c8 99  |. err%;F%...! ..|
00001790  20 22 41 44 46 53 5f 52  65 74 72 69 65 73 22 2c  | "ADFS_Retries",|
000017a0  26 46 46 30 30 2c 6f 72  74 25 0d 07 08 23 20 e7  |&FF00,ort%...# .|
000017b0  20 46 25 80 31 20 f2 78  5f 65 72 72 6f 72 3a 49  | F%.1 .x_error:I|
000017c0  25 3d a4 77 6b 73 70 63  28 30 29 3a e1 0d 07 12  |%=.wkspc(0):....|
000017d0  05 cd 0d 07 1c 0e f2 6f  70 65 6e 5f 73 61 76 65  |.......open_save|
000017e0  0d 07 26 05 e1 0d 07 30  04 0d 07 3a 14 dd f2 73  |..&....0...:...s|
000017f0  61 76 65 28 6e 61 6d 65  24 2c 63 25 29 0d 07 44  |ave(name$,c%)..D|
00001800  5b e7 20 63 25 3d 30 20  e7 20 a7 6e 61 6d 65 24  |[. c%=0 . .name$|
00001810  2c 22 2e 22 29 3d 30 20  49 25 3d a4 61 6c 65 72  |,".")=0 I%=.aler|
00001820  74 28 22 59 6f 75 20 6d  75 73 74 20 64 72 61 67  |t("You must drag|
00001830  20 74 68 65 20 66 69 6c  65 20 69 63 6f 6e 20 74  | the file icon t|
00001840  6f 20 61 20 64 69 72 65  63 74 6f 72 79 20 76 69  |o a directory vi|
00001850  65 77 65 72 22 29 3a e1  0d 07 4e 46 c8 99 20 22  |ewer"):...NF.. "|
00001860  58 4f 53 5f 46 69 6c 65  22 2c 31 30 2c 6e 61 6d  |XOS_File",10,nam|
00001870  65 24 2c 26 46 46 44 2c  2c 66 69 6c 65 62 75 66  |e$,&FFD,,filebuf|
00001880  66 25 2c 66 69 6c 65 62  75 66 66 25 2b 6c 65 6e  |f%,filebuff%+len|
00001890  67 74 68 25 20 b8 20 65  72 72 25 3b 46 25 0d 07  |gth% . err%;F%..|
000018a0  58 2e e7 20 46 25 80 31  20 f2 78 5f 65 72 72 6f  |X.. F%.1 .x_erro|
000018b0  72 3a f2 63 6c 6f 73 65  5f 6f 64 64 73 3a 49 25  |r:.close_odds:I%|
000018c0  3d a4 77 6b 73 70 63 28  30 29 3a e1 0d 07 62 0a  |=.wkspc(0):...b.|
000018d0  e7 20 63 25 20 8c 0d 07  6c 28 20 53 25 3d 62 6c  |. c% ...l( S%=bl|
000018e0  6b 25 21 33 36 3a 62 6c  6b 25 21 31 32 3d 62 6c  |k%!36:blk%!12=bl|
000018f0  6b 25 21 38 3a 62 6c 6b  25 21 31 36 3d 33 0d 07  |k%!8:blk%!16=3..|
00001900  76 2c 20 24 28 62 6c 6b  25 2b 34 34 29 3d 6e 61  |v, $(blk%+44)=na|
00001910  6d 65 24 3a 21 62 6c 6b  25 3d 28 a9 28 6e 61 6d  |me$:!blk%=(.(nam|
00001920  65 24 29 2b 34 39 29 80  ac 33 0d 07 80 31 20 c8  |e$)+49)..3...1 .|
00001930  99 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  |."Wimp_SendMessa|
00001940  67 65 22 2c 31 38 2c 62  6c 6b 25 2c 62 6c 6b 25  |ge",18,blk%,blk%|
00001950  21 32 30 2c 62 6c 6b 25  21 32 34 0d 07 8a 0e 20  |!20,blk%!24.... |
00001960  e7 20 53 25 3d 2d 31 20  e1 0d 07 94 05 cd 0d 07  |. S%=-1 ........|
00001970  9e 80 e7 20 6d 61 72 6b  31 25 3e 3d 30 20 6d 61  |... mark1%>=0 ma|
00001980  72 6b 31 25 3d 2d 31 3a  21 62 6c 6b 25 3d 74 6f  |rk1%=-1:!blk%=to|
00001990  6f 6c 5f 77 25 3a 62 6c  6b 25 21 34 3d 32 35 3a  |ol_w%:blk%!4=25:|
000019a0  c8 99 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |.."Wimp_GetIconS|
000019b0  74 61 74 65 22 2c 2c 62  6c 6b 25 3a 62 6c 6b 25  |tate",,blk%:blk%|
000019c0  21 31 32 3d 30 3a 62 6c  6b 25 21 38 3d 31 3c 3c  |!12=0:blk%!8=1<<|
000019d0  32 31 3a c8 99 22 57 69  6d 70 5f 53 65 74 49 63  |21:.."Wimp_SetIc|
000019e0  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 07  |onState",,blk%..|
000019f0  a8 80 e7 20 6d 61 72 6b  32 25 3e 3d 30 20 6d 61  |... mark2%>=0 ma|
00001a00  72 6b 32 25 3d 2d 31 3a  21 62 6c 6b 25 3d 74 6f  |rk2%=-1:!blk%=to|
00001a10  6f 6c 5f 77 25 3a 62 6c  6b 25 21 34 3d 32 36 3a  |ol_w%:blk%!4=26:|
00001a20  c8 99 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |.."Wimp_GetIconS|
00001a30  74 61 74 65 22 2c 2c 62  6c 6b 25 3a 62 6c 6b 25  |tate",,blk%:blk%|
00001a40  21 31 32 3d 30 3a 62 6c  6b 25 21 38 3d 31 3c 3c  |!12=0:blk%!8=1<<|
00001a50  32 31 3a c8 99 22 57 69  6d 70 5f 53 65 74 49 63  |21:.."Wimp_SetIc|
00001a60  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 07  |onState",,blk%..|
00001a70  b2 1c f2 63 6c 6f 73 65  5f 6f 64 64 73 3a 49 25  |...close_odds:I%|
00001a80  3d a4 77 6b 73 70 63 28  30 29 0d 07 bc 05 e1 0d  |=.wkspc(0)......|
00001a90  07 c6 04 0d 07 d0 0f dd  f2 76 69 65 77 5f 6c 6f  |.........view_lo|
00001aa0  61 64 0d 07 da 17 66 6c  61 67 25 3d 66 6c 61 67  |ad....flag%=flag|
00001ab0  25 80 ac 25 31 31 30 30  30 0d 07 e4 33 61 64 72  |%..%11000...3adr|
00001ac0  25 3d 61 64 64 72 65 73  73 25 84 28 64 72 69 76  |%=address%.(driv|
00001ad0  65 25 3c 3c 32 39 29 3a  e7 20 74 79 70 65 25 3d  |e%<<29):. type%=|
00001ae0  33 20 61 64 72 25 2b 3d  26 32 30 30 0d 07 ee 2a  |3 adr%+=&200...*|
00001af0  c8 99 20 22 41 44 46 53  5f 52 65 74 72 69 65 73  |.. "ADFS_Retries|
00001b00  22 2c 26 46 46 30 30 2c  26 30 32 30 30 20 b8 20  |",&FF00,&0200 . |
00001b10  2c 2c 6f 72 74 25 0d 07  f8 43 c8 99 20 22 58 41  |,,ort%...C.. "XA|
00001b20  44 46 53 5f 44 69 73 63  4f 70 22 2c 2c 28 64 72  |DFS_DiscOp",,(dr|
00001b30  65 63 25 3c 3c 36 29 84  31 2c 61 64 72 25 2c 76  |ec%<<6).1,adr%,v|
00001b40  69 65 77 62 75 66 66 25  2c 63 68 75 6e 6b 25 20  |iewbuff%,chunk% |
00001b50  b8 20 65 72 72 25 3b 46  25 0d 08 02 20 c8 99 20  |. err%;F%... .. |
00001b60  22 41 44 46 53 5f 52 65  74 72 69 65 73 22 2c 26  |"ADFS_Retries",&|
00001b70  46 46 30 30 2c 6f 72 74  25 0d 08 0c 31 e7 20 46  |FF00,ort%...1. F|
00001b80  25 80 31 20 f2 78 5f 65  72 72 6f 72 3a f2 62 6c  |%.1 .x_error:.bl|
00001b90  61 6e 6b 5f 76 69 65 77  20 8b 20 66 6c 61 67 25  |ank_view . flag%|
00001ba0  3d 66 6c 61 67 25 84 26  38 38 0d 08 16 05 e1 0d  |=flag%.&88......|
00001bb0  08 20 04 0d 08 2a 0f dd  f2 64 72 61 67 5f 66 69  |. ...*...drag_fi|
00001bc0  6c 65 0d 08 34 2f 21 62  6c 6b 25 3d 73 61 76 65  |le..4/!blk%=save|
00001bd0  5f 77 25 3a c8 99 22 57  69 6d 70 5f 47 65 74 57  |_w%:.."Wimp_GetW|
00001be0  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 62 6c 6b  |indowState",,blk|
00001bf0  25 0d 08 3e 28 58 25 3d  62 6c 6b 25 21 34 2d 62  |%..>(X%=blk%!4-b|
00001c00  6c 6b 25 21 32 30 3a 59  25 3d 62 6c 6b 25 21 31  |lk%!20:Y%=blk%!1|
00001c10  36 2d 62 6c 6b 25 21 32  34 0d 08 48 28 62 6c 6b  |6-blk%!24..H(blk|
00001c20  25 21 34 3d 30 3a c8 99  22 57 69 6d 70 5f 47 65  |%!4=0:.."Wimp_Ge|
00001c30  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00001c40  25 0d 08 52 3e 21 62 6c  6b 25 3d 73 61 76 65 5f  |%..R>!blk%=save_|
00001c50  77 25 3a 62 6c 6b 25 21  34 3d 35 3a 62 6c 6b 25  |w%:blk%!4=5:blk%|
00001c60  21 38 3d 62 6c 6b 25 21  38 2b 58 25 3a 62 6c 6b  |!8=blk%!8+X%:blk|
00001c70  25 21 31 32 3d 62 6c 6b  25 21 31 32 2b 59 25 0d  |%!12=blk%!12+Y%.|
00001c80  08 5c 3d 62 6c 6b 25 21  31 36 3d 62 6c 6b 25 21  |.\=blk%!16=blk%!|
00001c90  31 36 2b 58 25 3a 62 6c  6b 25 21 32 30 3d 62 6c  |16+X%:blk%!20=bl|
00001ca0  6b 25 21 32 30 2b 59 25  3a 62 6c 6b 25 21 32 34  |k%!20+Y%:blk%!24|
00001cb0  3d 30 3a 62 6c 6b 25 21  32 38 3d 30 0d 08 66 27  |=0:blk%!28=0..f'|
00001cc0  62 6c 6b 25 21 33 32 3d  26 37 46 46 46 46 46 46  |blk%!32=&7FFFFFF|
00001cd0  46 3a 62 6c 6b 25 21 33  36 3d 26 37 46 46 46 46  |F:blk%!36=&7FFFF|
00001ce0  46 46 46 0d 08 70 1a c8  99 22 57 69 6d 70 5f 44  |FFF..p..."Wimp_D|
00001cf0  72 61 67 42 6f 78 22 2c  2c 62 6c 6b 25 0d 08 7a  |ragBox",,blk%..z|
00001d00  05 e1 0d 08 84 04 0d 08  8e 0f dd f2 64 72 61 67  |............drag|
00001d10  5f 74 65 72 6d 0d 08 98  3f 62 6c 6b 25 21 26 38  |_term...?blk%!&8|
00001d20  30 3d 73 61 76 65 5f 77  25 3a 62 6c 6b 25 21 26  |0=save_w%:blk%!&|
00001d30  38 34 3d 31 3a c8 99 22  57 69 6d 70 5f 47 65 74  |84=1:.."Wimp_Get|
00001d40  49 63 6f 6e 53 74 61 74  65 22 2c 2c 62 6c 6b 25  |IconState",,blk%|
00001d50  2b 26 38 30 0d 08 a2 34  49 25 3d 28 62 6c 6b 25  |+&80...4I%=(blk%|
00001d60  21 26 39 43 29 3a c8 95  20 a7 24 28 49 25 29 2c  |!&9C):.. .$(I%),|
00001d70  22 2e 22 29 3a 49 25 2b  3d 31 3a ce 3a 6c 65 61  |"."):I%+=1:.:lea|
00001d80  66 24 3d 24 28 49 25 29  0d 08 ac 21 c8 99 22 57  |f$=$(I%)...!.."W|
00001d90  69 6d 70 5f 47 65 74 50  6f 69 6e 74 65 72 49 6e  |imp_GetPointerIn|
00001da0  66 6f 22 2c 2c 62 6c 6b  25 0d 08 b6 40 62 6c 6b  |fo",,blk%...@blk|
00001db0  25 21 32 30 3d 62 6c 6b  25 21 31 32 3a 62 6c 6b  |%!20=blk%!12:blk|
00001dc0  25 21 32 34 3d 62 6c 6b  25 21 31 36 3a 62 6c 6b  |%!24=blk%!16:blk|
00001dd0  25 21 32 38 3d 21 62 6c  6b 25 3a 62 6c 6b 25 21  |%!28=!blk%:blk%!|
00001de0  33 32 3d 62 6c 6b 25 21  34 0d 08 c0 3b 62 6c 6b  |32=blk%!4...;blk|
00001df0  25 21 33 36 3d 6c 65 6e  67 74 68 25 3a 62 6c 6b  |%!36=length%:blk|
00001e00  25 21 34 30 3d 26 46 46  44 3a 62 6c 6b 25 21 31  |%!40=&FFD:blk%!1|
00001e10  36 3d 31 3a 24 28 62 6c  6b 25 2b 34 34 29 3d 6c  |6=1:$(blk%+44)=l|
00001e20  65 61 66 24 0d 08 ca 24  21 62 6c 6b 25 3d 28 a9  |eaf$...$!blk%=(.|
00001e30  28 6c 65 61 66 24 29 2b  34 39 29 80 ac 33 3a 62  |(leaf$)+49)..3:b|
00001e40  6c 6b 25 21 31 32 3d 30  0d 08 d4 30 c8 99 22 57  |lk%!12=0...0.."W|
00001e50  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
00001e60  2c 31 37 2c 62 6c 6b 25  2c 62 6c 6b 25 21 32 30  |,17,blk%,blk%!20|
00001e70  2c 62 6c 6b 25 21 32 34  0d 08 de 05 e1 0d 08 e8  |,blk%!24........|
00001e80  04 0d 08 f2 0d dd f2 72  65 63 6f 76 65 72 0d 08  |.......recover..|
00001e90  fc 6e e7 20 6d 61 72 6b  31 25 3d 2d 31 20 80 20  |.n. mark1%=-1 . |
00001ea0  6d 61 72 6b 32 25 3d 2d  31 20 49 25 3d a4 61 6c  |mark2%=-1 I%=.al|
00001eb0  65 72 74 28 22 59 6f 75  20 6d 75 73 74 20 68 61  |ert("You must ha|
00001ec0  76 65 20 61 74 20 6c 65  61 73 74 20 6f 6e 65 20  |ve at least one |
00001ed0  6d 61 72 6b 65 72 20 73  65 74 20 62 65 66 6f 72  |marker set befor|
00001ee0  65 20 79 6f 75 20 63 61  6e 20 72 65 63 6f 76 65  |e you can recove|
00001ef0  72 20 61 20 66 69 6c 65  22 29 3a e1 0d 09 06 2a  |r a file"):....*|
00001f00  e7 20 6d 61 72 6b 31 25  3d 2d 31 20 84 20 6d 61  |. mark1%=-1 . ma|
00001f10  72 6b 32 25 3d 2d 31 20  f2 6f 70 65 6e 5f 65 6e  |rk2%=-1 .open_en|
00001f20  64 72 65 63 3a e1 0d 09  10 31 e7 20 6d 61 72 6b  |drec:....1. mark|
00001f30  31 25 3c 6d 61 72 6b 32  25 20 73 74 61 72 74 25  |1%<mark2% start%|
00001f40  3d 6d 61 72 6b 31 25 20  8b 20 73 74 61 72 74 25  |=mark1% . start%|
00001f50  3d 6d 61 72 6b 32 25 0d  09 1a 26 6c 65 6e 67 74  |=mark2%...&lengt|
00001f60  68 25 3d 94 28 6d 61 72  6b 31 25 2d 6d 61 72 6b  |h%=.(mark1%-mark|
00001f70  32 25 29 2b 73 65 63 5f  73 69 7a 65 25 0d 09 24  |2%)+sec_size%..$|
00001f80  09 f2 6c 6f 61 64 0d 09  2e 05 cd 0d 09 38 05 e1  |..load.......8..|
00001f90  0d 09 42 04 0d 09 4c 2b  20 20 20 20 25 25 25 25  |..B...L+    %%%%|
00001fa0  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
00001fb0  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 0d  |%%%%%%%%%%%%%%%.|
00001fc0  09 56 2b 20 20 20 20 4f  70 65 6e 20 6f 72 20 52  |.V+    Open or R|
00001fd0  65 64 72 61 77 20 76 61  72 69 6f 75 73 20 77 69  |edraw various wi|
00001fe0  6e 64 6f 77 73 20 65 74  63 2e 0d 09 60 2b 20 20  |ndows etc...`+  |
00001ff0  20 20 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |  %%%%%%%%%%%%%%|
00002000  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
00002010  25 25 25 25 25 0d 09 6a  04 0d 09 74 11 dd f2 6f  |%%%%%..j...t...o|
00002020  70 65 6e 5f 65 6e 64 72  65 63 0d 09 7e 2d e7 20  |pen_endrec..~-. |
00002030  6d 61 72 6b 31 25 3d 2d  31 20 73 74 61 72 74 25  |mark1%=-1 start%|
00002040  3d 6d 61 72 6b 32 25 20  8b 20 73 74 61 72 74 25  |=mark2% . start%|
00002050  3d 6d 61 72 6b 31 25 0d  09 88 38 21 62 6c 6b 25  |=mark1%...8!blk%|
00002060  3d 65 6e 64 72 65 63 5f  77 25 3a 62 6c 6b 25 21  |=endrec_w%:blk%!|
00002070  34 3d 31 3a c8 99 22 57  69 6d 70 5f 47 65 74 49  |4=1:.."Wimp_GetI|
00002080  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6b 25 0d  |conState",,blk%.|
00002090  09 92 26 24 28 62 6c 6b  25 21 32 38 29 3d c2 22  |..&$(blk%!28)=."|
000020a0  30 30 30 30 30 30 22 2b  c3 7e 28 73 74 61 72 74  |000000"+.~(start|
000020b0  25 29 2c 36 29 0d 09 9c  28 62 6c 6b 25 21 34 3d  |%),6)...(blk%!4=|
000020c0  32 3a c8 99 22 57 69 6d  70 5f 47 65 74 49 63 6f  |2:.."Wimp_GetIco|
000020d0  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 09 a6  |nState",,blk%...|
000020e0  19 24 28 62 6c 6b 25 21  32 38 29 3d c3 7e 28 63  |.$(blk%!28)=.~(c|
000020f0  68 75 6e 6b 25 29 0d 09  b0 31 21 62 6c 6b 25 3d  |hunk%)...1!blk%=|
00002100  65 6e 64 72 65 63 5f 77  25 3a c8 99 22 57 69 6d  |endrec_w%:.."Wim|
00002110  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
00002120  22 2c 2c 62 6c 6b 25 0d  09 ba 28 62 6c 6b 25 21  |",,blk%...(blk%!|
00002130  32 38 3d 2d 31 3a c8 99  22 57 69 6d 70 5f 4f 70  |28=-1:.."Wimp_Op|
00002140  65 6e 57 69 6e 64 6f 77  22 2c 2c 62 6c 6b 25 0d  |enWindow",,blk%.|
00002150  09 c4 05 e1 0d 09 ce 04  0d 09 d8 0f dd f2 6f 70  |..............op|
00002160  65 6e 5f 73 61 76 65 0d  09 e2 36 21 62 6c 6b 25  |en_save...6!blk%|
00002170  3d 73 61 76 65 5f 77 25  3a 62 6c 6b 25 21 34 3d  |=save_w%:blk%!4=|
00002180  31 3a c8 99 22 57 69 6d  70 5f 47 65 74 49 63 6f  |1:.."Wimp_GetIco|
00002190  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 09 ec  |nState",,blk%...|
000021a0  20 24 28 62 6c 6b 25 21  32 38 29 3d 70 61 74 68  | $(blk%!28)=path|
000021b0  24 2b 22 52 65 63 6f 76  65 72 65 64 22 0d 09 f6  |$+"Recovered"...|
000021c0  21 c8 99 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |!.."Wimp_GetWind|
000021d0  6f 77 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 0a  |owState",,blk%..|
000021e0  00 28 62 6c 6b 25 21 32  38 3d 2d 31 3a c8 99 22  |.(blk%!28=-1:.."|
000021f0  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00002200  2c 2c 62 6c 6b 25 0d 0a  0a 18 f2 73 65 74 63 61  |,,blk%.....setca|
00002210  72 65 74 28 73 61 76 65  5f 77 25 2c 31 29 0d 0a  |ret(save_w%,1)..|
00002220  14 05 e1 0d 0a 1e 04 0d  0a 28 0f dd f2 6f 70 65  |.........(...ope|
00002230  6e 5f 76 69 65 77 0d 0a  32 0d 57 25 3d a4 77 5f  |n_view..2.W%=.w_|
00002240  65 78 74 0d 0a 3c 67 e7  20 57 25 3c 3e 77 5f 65  |ext..<g. W%<>w_e|
00002250  78 74 25 20 77 5f 65 78  74 25 3d 57 25 3a 21 62  |xt% w_ext%=W%:!b|
00002260  6c 6b 25 3d 30 3a 62 6c  6b 25 21 34 3d 2d 77 5f  |lk%=0:blk%!4=-w_|
00002270  65 78 74 25 3a 62 6c 6b  25 21 38 3d 31 31 35 32  |ext%:blk%!8=1152|
00002280  3a 62 6c 6b 25 21 31 32  3d 30 3a c8 99 22 57 69  |:blk%!12=0:.."Wi|
00002290  6d 70 5f 53 65 74 45 78  74 65 6e 74 22 2c 76 69  |mp_SetExtent",vi|
000022a0  65 77 5f 77 25 2c 62 6c  6b 25 0d 0a 46 44 e7 20  |ew_w%,blk%..FD. |
000022b0  ac 66 6c 61 67 25 80 31  36 20 43 25 3d 63 68 75  |.flag%.16 C%=chu|
000022c0  6e 6b 25 3a 46 25 3d 66  6c 61 67 25 3a d6 20 63  |nk%:F%=flag%:. c|
000022d0  6f 64 65 25 3a e7 20 66  6c 61 67 25 80 38 20 66  |ode%:. flag%.8 f|
000022e0  6c 61 67 25 3d 66 6c 61  67 25 84 26 39 30 0d 0a  |lag%=flag%.&90..|
000022f0  50 76 e7 20 ac 66 6c 61  67 25 80 31 20 21 62 6c  |Pv. .flag%.1 !bl|
00002300  6b 25 3d 76 69 65 77 5f  77 25 3a c8 99 22 57 69  |k%=view_w%:.."Wi|
00002310  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00002320  65 22 2c 2c 62 6c 6b 25  3a 62 6c 6b 25 21 32 30  |e",,blk%:blk%!20|
00002330  3d 30 3a 62 6c 6b 25 21  32 34 3d 30 3a c8 99 22  |=0:blk%!24=0:.."|
00002340  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00002350  2c 2c 62 6c 6b 25 3a 66  6c 61 67 25 3d 66 6c 61  |,,blk%:flag%=fla|
00002360  67 25 84 31 0d 0a 5a 11  e7 20 66 6c 61 67 25 80  |g%.1..Z.. flag%.|
00002370  26 38 30 20 8c 0d 0a 64  60 20 e7 20 66 6c 61 67  |&80 ...d` . flag|
00002380  25 80 26 34 30 20 21 62  6c 6b 25 3d 76 69 65 77  |%.&40 !blk%=view|
00002390  5f 77 25 3a c8 99 22 57  69 6d 70 5f 47 65 74 57  |_w%:.."Wimp_GetW|
000023a0  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 62 6c 6b  |indowState",,blk|
000023b0  25 3a 62 6c 6b 25 21 32  34 3d 30 3a c8 99 22 57  |%:blk%!24=0:.."W|
000023c0  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
000023d0  2c 62 6c 6b 25 0d 0a 6e  32 20 c8 99 22 57 69 6d  |,blk%..n2 .."Wim|
000023e0  70 5f 46 6f 72 63 65 52  65 64 72 61 77 22 2c 76  |p_ForceRedraw",v|
000023f0  69 65 77 5f 77 25 2c 30  2c 2d 77 5f 65 78 74 25  |iew_w%,0,-w_ext%|
00002400  2c 31 31 35 32 2c 30 0d  0a 78 15 20 66 6c 61 67  |,1152,0..x. flag|
00002410  25 3d 66 6c 61 67 25 80  ac 26 43 30 0d 0a 82 05  |%=flag%..&C0....|
00002420  cd 0d 0a 8c 62 e7 20 ac  66 6c 61 67 25 80 34 20  |....b. .flag%.4 |
00002430  21 62 6c 6b 25 3d 74 6f  6f 6c 5f 77 25 3a c8 99  |!blk%=tool_w%:..|
00002440  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
00002450  74 61 74 65 22 2c 2c 62  6c 6b 25 3a c8 99 22 57  |tate",,blk%:.."W|
00002460  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
00002470  2c 62 6c 6b 25 3a 66 6c  61 67 25 3d 66 6c 61 67  |,blk%:flag%=flag|
00002480  25 84 34 0d 0a 96 05 e1  0d 0a a0 04 0d 0a aa 0f  |%.4.............|
00002490  dd f2 63 6c 6f 73 65 5f  61 6c 6c 0d 0a b4 15 66  |..close_all....f|
000024a0  6c 61 67 25 3d 66 6c 61  67 25 80 ac 25 31 30 31  |lag%=flag%..%101|
000024b0  0d 0a be 33 62 6c 6b 25  21 26 41 30 3d 74 6f 6f  |...3blk%!&A0=too|
000024c0  6c 5f 77 25 3a c8 99 22  57 69 6d 70 5f 43 6c 6f  |l_w%:.."Wimp_Clo|
000024d0  73 65 57 69 6e 64 6f 77  22 2c 2c 62 6c 6b 25 2b  |seWindow",,blk%+|
000024e0  26 41 30 0d 0a c8 33 62  6c 6b 25 21 26 41 30 3d  |&A0...3blk%!&A0=|
000024f0  76 69 65 77 5f 77 25 3a  c8 99 22 57 69 6d 70 5f  |view_w%:.."Wimp_|
00002500  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6c  |CloseWindow",,bl|
00002510  6b 25 2b 26 41 30 0d 0a  d2 10 dd f2 63 6c 6f 73  |k%+&A0......clos|
00002520  65 5f 6f 64 64 73 0d 0a  dc 33 62 6c 6b 25 21 26  |e_odds...3blk%!&|
00002530  41 30 3d 73 61 76 65 5f  77 25 3a c8 99 22 57 69  |A0=save_w%:.."Wi|
00002540  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
00002550  2c 62 6c 6b 25 2b 26 41  30 0d 0a e6 35 62 6c 6b  |,blk%+&A0...5blk|
00002560  25 21 26 41 30 3d 65 6e  64 72 65 63 5f 77 25 3a  |%!&A0=endrec_w%:|
00002570  c8 99 22 57 69 6d 70 5f  43 6c 6f 73 65 57 69 6e  |.."Wimp_CloseWin|
00002580  64 6f 77 22 2c 2c 62 6c  6b 25 2b 26 41 30 0d 0a  |dow",,blk%+&A0..|
00002590  f0 05 e1 0d 0a fa 04 0d  0b 04 10 dd f2 62 6c 61  |.............bla|
000025a0  6e 6b 5f 76 69 65 77 0d  0b 0e 12 66 6c 61 67 25  |nk_view....flag%|
000025b0  3d 66 6c 61 67 25 80 ac  38 0d 0b 18 2f 21 62 6c  |=flag%..8.../!bl|
000025c0  6b 25 3d 76 69 65 77 5f  77 25 3a c8 99 22 57 69  |k%=view_w%:.."Wi|
000025d0  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
000025e0  65 22 2c 2c 62 6c 6b 25  0d 0b 22 31 c8 99 22 57  |e",,blk%.."1.."W|
000025f0  69 6d 70 5f 46 6f 72 63  65 52 65 64 72 61 77 22  |imp_ForceRedraw"|
00002600  2c 76 69 65 77 5f 77 25  2c 30 2c 2d 77 5f 65 78  |,view_w%,0,-w_ex|
00002610  74 25 2c 31 31 35 32 2c  30 0d 0b 2c 05 e1 0d 0b  |t%,1152,0..,....|
00002620  36 04 0d 0b 40 15 dd f2  73 65 74 63 61 72 65 74  |6...@...setcaret|
00002630  28 77 25 2c 69 25 29 0d  0b 4a 32 21 62 6c 6b 25  |(w%,i%)..J2!blk%|
00002640  3d 77 25 3a 62 6c 6b 25  21 34 3d 69 25 3a c8 99  |=w%:blk%!4=i%:..|
00002650  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00002660  74 65 22 2c 2c 62 6c 6b  25 0d 0b 54 34 c8 99 22  |te",,blk%..T4.."|
00002670  57 69 6d 70 5f 53 65 74  43 61 72 65 74 50 6f 73  |Wimp_SetCaretPos|
00002680  69 74 69 6f 6e 22 2c 77  25 2c 69 25 2c 2c 2c 2d  |ition",w%,i%,,,-|
00002690  31 2c a9 24 28 62 6c 6b  25 21 32 38 29 0d 0b 5e  |1,.$(blk%!28)..^|
000026a0  05 e1 0d 0b 68 04 0d 0b  72 11 dd f2 72 65 64 72  |....h...r...redr|
000026b0  61 77 5f 68 65 6c 70 0d  0b 7c 25 c8 99 20 22 57  |aw_help..|%.. "W|
000026c0  69 6d 70 5f 52 65 64 72  61 77 57 69 6e 64 6f 77  |imp_RedrawWindow|
000026d0  22 2c 2c 62 6c 6b 25 20  b8 20 4d 25 0d 0b 86 09  |",,blk% . M%....|
000026e0  c8 95 20 4d 25 0d 0b 90  3b 20 58 25 3d 62 6c 6b  |.. M%...; X%=blk|
000026f0  25 21 34 2d 62 6c 6b 25  21 32 30 2b 31 36 3a 59  |%!4-blk%!20+16:Y|
00002700  25 3d 62 6c 6b 25 21 31  36 2d 62 6c 6b 25 21 32  |%=blk%!16-blk%!2|
00002710  34 2d 34 3a 49 25 3d 68  65 6c 70 74 65 78 74 25  |4-4:I%=helptext%|
00002720  0d 0b 9a 33 20 c8 95 3f  49 25 3c 32 35 35 3a ec  |...3 ..?I%<255:.|
00002730  20 58 25 2c 59 25 3a f1  24 49 25 3a 49 25 2b 3d  | X%,Y%:.$I%:I%+=|
00002740  28 a9 24 28 49 25 29 2b  31 29 3a 59 25 2d 3d 33  |(.$(I%)+1):Y%-=3|
00002750  32 3a ce 0d 0b a4 26 20  c8 99 20 22 57 69 6d 70  |2:....& .. "Wimp|
00002760  5f 47 65 74 52 65 63 74  61 6e 67 6c 65 22 2c 2c  |_GetRectangle",,|
00002770  62 6c 6b 25 20 b8 20 4d  25 0d 0b ae 05 ce 0d 0b  |blk% . M%.......|
00002780  b8 05 e1 0d 0b c2 04 0d  0b cc 11 dd f2 72 65 64  |.............red|
00002790  72 61 77 5f 76 69 65 77  0d 0b d6 14 66 6c 61 67  |raw_view....flag|
000027a0  25 3d 66 6c 61 67 25 80  ac 26 38 30 0d 0b e0 18  |%=flag%..&80....|
000027b0  c8 99 20 26 34 30 30 43  38 2c 2c 62 6c 6b 25 20  |.. &400C8,,blk% |
000027c0  b8 20 4d 25 0d 0b ea 2b  e7 ac 66 6c 61 67 25 80  |. M%...+..flag%.|
000027d0  31 36 3a c8 95 4d 25 3a  c8 99 26 34 30 30 43 38  |16:..M%:..&400C8|
000027e0  2c 2c 62 6c 6b 25 20 b8  20 4d 25 3a ce 3a e1 0d  |,,blk% . M%:.:..|
000027f0  0b f4 0e e7 20 66 6c 61  67 25 80 32 8c 0d 0b fe  |.... flag%.2....|
00002800  ba c8 95 4d 25 3a 53 25  3d 94 28 62 6c 6b 25 21  |...M%:S%=.(blk%!|
00002810  32 34 81 33 32 29 3a 45  25 3d 28 62 6c 6b 25 21  |24.32):E%=(blk%!|
00002820  31 36 2d 62 6c 6b 25 21  38 29 81 33 32 2b 53 25  |16-blk%!8).32+S%|
00002830  3a 58 25 3d 62 6c 6b 25  21 34 2d 62 6c 6b 25 21  |:X%=blk%!4-blk%!|
00002840  32 30 2b 31 36 3a 59 25  3d 62 6c 6b 25 21 31 36  |20+16:Y%=blk%!16|
00002850  2d 62 6c 6b 25 21 32 34  2d 34 3a 42 25 3d 73 63  |-blk%!24-4:B%=sc|
00002860  72 6e 62 75 66 66 25 2b  31 2b 28 53 25 2a 37 32  |rnbuff%+1+(S%*72|
00002870  29 3a 59 25 2d 3d 28 53  25 2a 33 32 29 3a e3 49  |):Y%-=(S%*32):.I|
00002880  25 3d 53 25 b8 45 25 3a  ec 58 25 2c 59 25 3a f1  |%=S%.E%:.X%,Y%:.|
00002890  24 42 25 3a 42 25 2b 3d  37 32 3a 59 25 2d 3d 33  |$B%:B%+=72:Y%-=3|
000028a0  32 3a ed 3a c8 99 26 34  30 30 43 38 2c 2c 62 6c  |2:.:..&400C8,,bl|
000028b0  6b 25 b8 4d 25 3a ce 0d  0c 08 05 cc 0d 0c 12 bd  |k%.M%:..........|
000028c0  c8 95 4d 25 3a 53 25 3d  94 28 62 6c 6b 25 21 32  |..M%:S%=.(blk%!2|
000028d0  34 81 33 32 29 3a 45 25  3d 28 62 6c 6b 25 21 31  |4.32):E%=(blk%!1|
000028e0  36 2d 62 6c 6b 25 21 38  29 81 33 32 2b 53 25 3a  |6-blk%!8).32+S%:|
000028f0  58 25 3d 62 6c 6b 25 21  34 2d 62 6c 6b 25 21 32  |X%=blk%!4-blk%!2|
00002900  30 2b 31 36 3a 59 25 3d  62 6c 6b 25 21 31 36 2d  |0+16:Y%=blk%!16-|
00002910  62 6c 6b 25 21 32 34 2d  34 3a 42 25 3d 73 63 72  |blk%!24-4:B%=scr|
00002920  6e 62 75 66 66 25 2b 31  31 35 33 2b 28 53 25 2a  |nbuff%+1153+(S%*|
00002930  37 32 29 3a 59 25 2d 3d  28 53 25 2a 33 32 29 3a  |72):Y%-=(S%*32):|
00002940  e3 49 25 3d 53 25 b8 45  25 3a ec 58 25 2c 59 25  |.I%=S%.E%:.X%,Y%|
00002950  3a f1 24 42 25 3a 42 25  2b 3d 37 32 3a 59 25 2d  |:.$B%:B%+=72:Y%-|
00002960  3d 33 32 3a ed 3a c8 99  26 34 30 30 43 38 2c 2c  |=32:.:..&400C8,,|
00002970  62 6c 6b 25 b8 4d 25 3a  ce 0d 0c 1c 05 cd 0d 0c  |blk%.M%:........|
00002980  26 05 e1 0d 0c 30 04 0d  0c 3a 33 20 20 20 20 25  |&....0...:3    %|
00002990  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
*
000029b0  25 25 25 25 25 25 25 25  25 25 0d 0c 44 33 20 20  |%%%%%%%%%%..D3  |
000029c0  20 20 52 65 61 64 20 61  6e 64 20 77 72 69 74 65  |  Read and write|
000029d0  20 69 6e 66 6f 20 66 72  6f 6d 2f 74 6f 20 6d 65  | info from/to me|
000029e0  6e 75 73 20 61 6e 64 20  69 63 6f 6e 73 0d 0c 4e  |nus and icons..N|
000029f0  33 20 20 20 20 25 25 25  25 25 25 25 25 25 25 25  |3    %%%%%%%%%%%|
00002a00  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
*
00002a20  0d 0c 58 04 0d 0c 62 11  dd f2 65 6e 64 5f 61 64  |..X...b...end_ad|
00002a30  64 72 65 73 73 0d 0c 6c  0f c8 8e 20 62 6c 6b 25  |dress..l... blk%|
00002a40  21 34 20 ca 0d 0c 76 25  20 c9 20 31 3a c8 99 20  |!4 ...v% . 1:.. |
00002a50  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00002a60  74 65 22 2c 2c 62 6c 6b  25 0d 0c 80 3f 20 20 20  |te",,blk%...?   |
00002a70  20 20 20 20 20 c8 99 20  22 4f 53 5f 52 65 61 64  |     .. "OS_Read|
00002a80  55 6e 73 69 67 6e 65 64  22 2c 31 36 2c 62 6c 6b  |Unsigned",16,blk|
00002a90  25 21 32 38 20 b8 20 2c  2c 41 25 3a 4c 25 3d 41  |%!28 . ,,A%:L%=A|
00002aa0  25 2d 73 74 61 72 74 25  0d 0c 8a 0f 20 20 20 20  |%-start%....    |
00002ab0  20 c8 8e 20 b9 20 ca 0d  0c 94 4a 20 20 20 20 20  | .. . ....J     |
00002ac0  20 c9 20 4c 25 3c 3d 30  3a 49 25 3d a4 61 6c 65  | . L%<=0:I%=.ale|
00002ad0  72 74 28 22 45 6e 64 20  41 64 64 72 65 73 73 20  |rt("End Address |
00002ae0  6d 75 73 74 20 62 65 20  67 72 65 61 74 65 72 20  |must be greater |
00002af0  74 68 61 6e 20 74 68 65  20 4d 61 72 6b 65 72 22  |than the Marker"|
00002b00  29 0d 0c 9e 4f 20 20 20  20 20 20 c9 20 41 25 3e  |)...O      . A%>|
00002b10  28 6d 61 78 5f 61 64 64  72 25 2b 73 65 63 5f 73  |(max_addr%+sec_s|
00002b20  69 7a 65 25 29 3a 49 25  3d a4 61 6c 65 72 74 28  |ize%):I%=.alert(|
00002b30  22 45 6e 64 20 41 64 64  72 65 73 73 20 61 66 74  |"End Address aft|
00002b40  65 72 20 65 6e 64 20 6f  66 20 64 69 73 6b 22 29  |er end of disk")|
00002b50  0d 0c a8 28 20 20 20 20  20 20 7f 3a 6c 65 6e 67  |...(      .:leng|
00002b60  74 68 25 3d 4c 25 3a f2  63 6c 6f 73 65 5f 6f 64  |th%=L%:.close_od|
00002b70  64 73 3a f2 6c 6f 61 64  0d 0c b2 0a 20 20 20 20  |ds:.load....    |
00002b80  20 cb 0d 0c bc 25 20 c9  20 32 3a c8 99 20 22 57  | ....% . 2:.. "W|
00002b90  69 6d 70 5f 47 65 74 49  63 6f 6e 53 74 61 74 65  |imp_GetIconState|
00002ba0  22 2c 2c 62 6c 6b 25 0d  0c c6 37 20 20 20 20 20  |",,blk%...7     |
00002bb0  20 20 20 c8 99 20 22 4f  53 5f 52 65 61 64 55 6e  |   .. "OS_ReadUn|
00002bc0  73 69 67 6e 65 64 22 2c  31 36 2c 62 6c 6b 25 21  |signed",16,blk%!|
00002bd0  32 38 20 b8 20 2c 2c 6c  65 6e 67 74 68 25 0d 0c  |28 . ,,length%..|
00002be0  d0 32 20 20 20 20 20 20  20 20 e7 20 6c 65 6e 67  |.2        . leng|
00002bf0  74 68 25 2b 73 74 61 72  74 25 3e 6d 61 78 5f 61  |th%+start%>max_a|
00002c00  64 64 72 25 2b 73 65 63  5f 73 69 7a 65 25 20 8c  |ddr%+sec_size% .|
00002c10  0d 0c da 3e 20 20 20 20  20 20 20 20 20 49 25 3d  |...>         I%=|
00002c20  a4 61 6c 65 72 74 28 22  4c 65 6e 67 74 68 20 67  |.alert("Length g|
00002c30  6f 65 73 20 70 61 73 74  20 74 68 65 20 65 6e 64  |oes past the end|
00002c40  20 6f 66 20 74 68 65 20  64 69 73 6b 22 29 0d 0c  | of the disk")..|
00002c50  e4 0d 20 20 20 20 20 20  20 20 cc 0d 0c ee 1e 20  |..        ..... |
00002c60  20 20 20 20 20 20 20 20  f2 63 6c 6f 73 65 5f 6f  |        .close_o|
00002c70  64 64 73 3a f2 6c 6f 61  64 0d 0c f8 0d 20 20 20  |dds:.load....   |
00002c80  20 20 20 20 20 cd 0d 0d  02 05 cb 0d 0d 0c 05 e1  |     ...........|
00002c90  0d 0d 16 04 0d 0d 20 10  dd f2 74 79 70 65 5f 69  |...... ...type_i|
00002ca0  63 6f 6e 73 0d 0d 2a 39  21 62 6c 6b 25 3d 64 65  |cons..*9!blk%=de|
00002cb0  66 69 6e 65 5f 77 25 3a  62 6c 6b 25 21 34 3d 31  |fine_w%:blk%!4=1|
00002cc0  3a c8 99 20 22 57 69 6d  70 5f 47 65 74 49 63 6f  |:.. "Wimp_GetIco|
00002cd0  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 0d 34  |nState",,blk%..4|
00002ce0  47 24 28 62 6c 6b 25 21  32 38 29 3d c3 28 63 79  |G$(blk%!28)=.(cy|
00002cf0  6c 73 25 29 3a 62 6c 6b  25 21 38 3d 30 3a 62 6c  |ls%):blk%!8=0:bl|
00002d00  6b 25 21 31 32 3d 30 3a  c8 99 20 22 57 69 6d 70  |k%!12=0:.. "Wimp|
00002d10  5f 53 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_SetIconState",,|
00002d20  62 6c 6b 25 0d 0d 3e 29  62 6c 6b 25 21 34 3d 32  |blk%..>)blk%!4=2|
00002d30  3a c8 99 20 22 57 69 6d  70 5f 47 65 74 49 63 6f  |:.. "Wimp_GetIco|
00002d40  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 0d 48  |nState",,blk%..H|
00002d50  48 24 28 62 6c 6b 25 21  32 38 29 3d c3 28 68 65  |H$(blk%!28)=.(he|
00002d60  61 64 73 25 29 3a 62 6c  6b 25 21 38 3d 30 3a 62  |ads%):blk%!8=0:b|
00002d70  6c 6b 25 21 31 32 3d 30  3a c8 99 20 22 57 69 6d  |lk%!12=0:.. "Wim|
00002d80  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00002d90  2c 62 6c 6b 25 0d 0d 52  29 62 6c 6b 25 21 34 3d  |,blk%..R)blk%!4=|
00002da0  33 3a c8 99 20 22 57 69  6d 70 5f 47 65 74 49 63  |3:.. "Wimp_GetIc|
00002db0  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 0d  |onState",,blk%..|
00002dc0  5c 4b 24 28 62 6c 6b 25  21 32 38 29 3d c3 28 73  |\K$(blk%!28)=.(s|
00002dd0  65 63 73 5f 74 72 6b 25  29 3a 62 6c 6b 25 21 38  |ecs_trk%):blk%!8|
00002de0  3d 30 3a 62 6c 6b 25 21  31 32 3d 30 3a c8 99 20  |=0:blk%!12=0:.. |
00002df0  22 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |"Wimp_SetIconSta|
00002e00  74 65 22 2c 2c 62 6c 6b  25 0d 0d 66 29 62 6c 6b  |te",,blk%..f)blk|
00002e10  25 21 34 3d 34 3a c8 99  20 22 57 69 6d 70 5f 47  |%!4=4:.. "Wimp_G|
00002e20  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
00002e30  6b 25 0d 0d 70 4b 24 28  62 6c 6b 25 21 32 38 29  |k%..pK$(blk%!28)|
00002e40  3d c3 28 73 65 63 5f 73  69 7a 65 25 29 3a 62 6c  |=.(sec_size%):bl|
00002e50  6b 25 21 38 3d 30 3a 62  6c 6b 25 21 31 32 3d 30  |k%!8=0:blk%!12=0|
00002e60  3a c8 99 20 22 57 69 6d  70 5f 53 65 74 49 63 6f  |:.. "Wimp_SetIco|
00002e70  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 0d 7a  |nState",,blk%..z|
00002e80  38 21 62 6c 6b 25 3d 74  6f 6f 6c 5f 77 25 3a 62  |8!blk%=tool_w%:b|
00002e90  6c 6b 25 21 34 3d 32 30  3a c8 99 20 22 57 69 6d  |lk%!4=20:.. "Wim|
00002ea0  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00002eb0  2c 62 6c 6b 25 0d 0d 84  44 24 28 62 6c 6b 25 21  |,blk%...D$(blk%!|
00002ec0  32 38 29 3d 74 79 70 65  24 3a 62 6c 6b 25 21 38  |28)=type$:blk%!8|
00002ed0  3d 30 3a 62 6c 6b 25 21  31 32 3d 30 3a c8 99 20  |=0:blk%!12=0:.. |
00002ee0  22 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |"Wimp_SetIconSta|
00002ef0  74 65 22 2c 2c 62 6c 6b  25 0d 0d 8e 05 e1 0d 0d  |te",,blk%.......|
00002f00  98 04 0d 0d a2 0f dd f2  74 68 73 5f 69 63 6f 6e  |........ths_icon|
00002f10  73 0d 0d ac 38 21 62 6c  6b 25 3d 74 6f 6f 6c 5f  |s...8!blk%=tool_|
00002f20  77 25 3a 62 6c 6b 25 21  34 3d 32 31 3a c8 99 20  |w%:blk%!4=21:.. |
00002f30  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00002f40  74 65 22 2c 2c 62 6c 6b  25 0d 0d b6 48 24 28 62  |te",,blk%...H$(b|
00002f50  6c 6b 25 21 32 38 29 3d  c3 28 74 72 61 63 6b 25  |lk%!28)=.(track%|
00002f60  29 3a 62 6c 6b 25 21 38  3d 30 3a 62 6c 6b 25 21  |):blk%!8=0:blk%!|
00002f70  31 32 3d 30 3a c8 99 20  22 57 69 6d 70 5f 53 65  |12=0:.. "Wimp_Se|
00002f80  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00002f90  25 0d 0d c0 2a 62 6c 6b  25 21 34 3d 32 32 3a c8  |%...*blk%!4=22:.|
00002fa0  99 20 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |. "Wimp_GetIconS|
00002fb0  74 61 74 65 22 2c 2c 62  6c 6b 25 0d 0d ca 47 24  |tate",,blk%...G$|
00002fc0  28 62 6c 6b 25 21 32 38  29 3d c3 28 68 65 61 64  |(blk%!28)=.(head|
00002fd0  25 29 3a 62 6c 6b 25 21  38 3d 30 3a 62 6c 6b 25  |%):blk%!8=0:blk%|
00002fe0  21 31 32 3d 30 3a c8 99  20 22 57 69 6d 70 5f 53  |!12=0:.. "Wimp_S|
00002ff0  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
00003000  6b 25 0d 0d d4 2a 62 6c  6b 25 21 34 3d 32 33 3a  |k%...*blk%!4=23:|
00003010  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
00003020  53 74 61 74 65 22 2c 2c  62 6c 6b 25 0d 0d de 49  |State",,blk%...I|
00003030  24 28 62 6c 6b 25 21 32  38 29 3d c3 28 73 65 63  |$(blk%!28)=.(sec|
00003040  74 6f 72 25 29 3a 62 6c  6b 25 21 38 3d 30 3a 62  |tor%):blk%!8=0:b|
00003050  6c 6b 25 21 31 32 3d 30  3a c8 99 20 22 57 69 6d  |lk%!12=0:.. "Wim|
00003060  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00003070  2c 62 6c 6b 25 0d 0d e8  0f dd f2 61 64 64 72 5f  |,blk%......addr_|
00003080  69 63 6f 6e 0d 0d f2 38  21 62 6c 6b 25 3d 74 6f  |icon...8!blk%=to|
00003090  6f 6c 5f 77 25 3a 62 6c  6b 25 21 34 3d 32 34 3a  |ol_w%:blk%!4=24:|
000030a0  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
000030b0  53 74 61 74 65 22 2c 2c  62 6c 6b 25 0d 0d fc 3b  |State",,blk%...;|
000030c0  24 28 62 6c 6b 25 21 32  38 29 3d c2 22 30 30 30  |$(blk%!28)=."000|
000030d0  30 30 30 22 2b c3 7e 28  61 64 64 72 65 73 73 25  |000"+.~(address%|
000030e0  29 2c 36 29 3a 62 6c 6b  25 21 38 3d 30 3a 62 6c  |),6):blk%!8=0:bl|
000030f0  6b 25 21 31 32 3d 30 0d  0e 06 20 c8 99 20 22 57  |k%!12=0... .. "W|
00003100  69 6d 70 5f 53 65 74 49  63 6f 6e 53 74 61 74 65  |imp_SetIconState|
00003110  22 2c 2c 62 6c 6b 25 0d  0e 10 05 e1 0d 0e 1a 04  |",,blk%.........|
00003120  0d 0e 24 12 dd f2 63 68  61 6e 67 65 5f 64 72 69  |..$...change_dri|
00003130  76 65 0d 0e 2e 14 44 25  3d 62 6c 6b 25 21 34 3a  |ve....D%=blk%!4:|
00003140  f2 72 65 73 65 74 0d 0e  38 0c e7 20 ac 20 44 25  |.reset..8.. . D%|
00003150  20 8c 0d 0e 42 29 20 e7  20 44 25 3c 66 70 25 20  | ...B) . D%<fp% |
00003160  64 72 69 76 65 25 3d 44  25 20 8b 20 64 72 69 76  |drive%=D% . driv|
00003170  65 25 3d 44 25 2d 66 70  25 2b 34 0d 0e 4c 1c 20  |e%=D%-fp%+4..L. |
00003180  f2 74 69 63 6b 5f 69 74  65 6d 28 64 72 69 76 65  |.tick_item(drive|
00003190  5f 6d 25 2c 44 25 29 0d  0e 56 39 20 21 62 6c 6b  |_m%,D%)..V9 !blk|
000031a0  25 3d 74 6f 6f 6c 5f 77  25 3a 62 6c 6b 25 21 34  |%=tool_w%:blk%!4|
000031b0  3d 31 39 3a c8 99 20 22  57 69 6d 70 5f 47 65 74  |=19:.. "Wimp_Get|
000031c0  49 63 6f 6e 53 74 61 74  65 22 2c 2c 62 6c 6b 25  |IconState",,blk%|
000031d0  0d 0e 60 49 20 62 6c 6b  25 21 38 3d 30 3a 62 6c  |..`I blk%!8=0:bl|
000031e0  6b 25 21 31 32 3d 30 3a  24 28 62 6c 6b 25 21 32  |k%!12=0:$(blk%!2|
000031f0  38 29 3d c3 28 64 72 69  76 65 25 29 3a c8 99 20  |8)=.(drive%):.. |
00003200  22 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |"Wimp_SetIconSta|
00003210  74 65 22 2c 2c 62 6c 6b  25 0d 0e 6a 05 cd 0d 0e  |te",,blk%..j....|
00003220  74 0f f2 74 79 70 65 5f  69 63 6f 6e 73 0d 0e 7e  |t..type_icons..~|
00003230  05 e1 0d 0e 88 04 0d 0e  92 10 dd f2 67 65 74 5f  |............get_|
00003240  66 6f 72 6d 61 74 0d 0e  9c 10 e7 20 62 6c 6b 25  |format..... blk%|
00003250  21 34 3d 30 20 e1 0d 0e  a6 14 54 25 3d 62 6c 6b  |!4=0 .....T%=blk|
00003260  25 21 34 3a f2 72 65 73  65 74 0d 0e b0 0b c8 8e  |%!4:.reset......|
00003270  20 54 25 20 ca 0d 0e ba  2f 20 c9 20 31 3a e7 20  | T% ..../ . 1:. |
00003280  64 72 69 76 65 25 3c 34  20 f2 69 64 65 6e 74 5f  |drive%<4 .ident_|
00003290  66 6c 6f 70 70 79 20 8b  20 f2 69 64 65 6e 74 5f  |floppy . .ident_|
000032a0  68 61 72 64 0d 0e c4 4c  20 c9 20 33 3a 74 79 70  |hard...L . 3:typ|
000032b0  65 25 3d 32 3a 63 79 6c  73 25 3d 38 30 3a 68 65  |e%=2:cyls%=80:he|
000032c0  61 64 73 25 3d 32 3a 73  65 63 73 5f 74 72 6b 25  |ads%=2:secs_trk%|
000032d0  3d 35 3a 73 65 63 5f 73  69 7a 65 25 3d 26 34 30  |=5:sec_size%=&40|
000032e0  30 3a 74 79 70 65 24 3d  22 4e 6f 72 6d 61 6c 22  |0:type$="Normal"|
000032f0  0d 0e ce 4d 20 c9 20 34  3a 74 79 70 65 25 3d 33  |...M . 4:type%=3|
00003300  3a 63 79 6c 73 25 3d 38  30 3a 68 65 61 64 73 25  |:cyls%=80:heads%|
00003310  3d 32 3a 73 65 63 73 5f  74 72 6b 25 3d 31 30 3a  |=2:secs_trk%=10:|
00003320  73 65 63 5f 73 69 7a 65  25 3d 26 32 30 30 3a 74  |sec_size%=&200:t|
00003330  79 70 65 24 3d 22 4d 53  2d 44 6f 73 22 0d 0e d8  |ype$="MS-Dos"...|
00003340  1a 20 c9 20 35 3a e7 20  a4 76 61 6c 69 64 61 74  |. . 5:. .validat|
00003350  65 5f 74 68 73 20 8c 0d  0e e2 24 20 20 20 20 20  |e_ths ....$     |
00003360  20 20 20 20 74 79 70 65  25 3d 34 3a 74 79 70 65  |    type%=4:type|
00003370  24 3d 22 53 70 65 63 69  61 6c 22 0d 0e ec 0d 20  |$="Special".... |
00003380  20 20 20 20 20 20 20 cc  0d 0e f6 1e 20 20 20 20  |       .....    |
00003390  20 20 20 20 20 74 79 70  65 25 3d 2d 31 3a 74 79  |     type%=-1:ty|
000033a0  70 65 24 3d 22 22 0d 0f  00 3a 20 20 20 20 20 20  |pe$=""...:      |
000033b0  20 20 20 21 62 6c 6b 25  3d 64 65 66 69 6e 65 5f  |   !blk%=define_|
000033c0  77 25 3a c8 99 22 57 69  6d 70 5f 47 65 74 57 69  |w%:.."Wimp_GetWi|
000033d0  6e 64 6f 77 53 74 61 74  65 22 2c 2c 62 6c 6b 25  |ndowState",,blk%|
000033e0  0d 0f 0a 31 20 20 20 20  20 20 20 20 20 62 6c 6b  |...1         blk|
000033f0  25 21 32 38 3d 2d 31 3a  c8 99 22 57 69 6d 70 5f  |%!28=-1:.."Wimp_|
00003400  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 62 6c 6b  |OpenWindow",,blk|
00003410  25 0d 0f 14 23 20 20 20  20 20 20 20 20 20 f2 73  |%...#         .s|
00003420  65 74 63 61 72 65 74 28  64 65 66 69 6e 65 5f 77  |etcaret(define_w|
00003430  25 2c 31 29 0d 0f 1e 0d  20 20 20 20 20 20 20 20  |%,1)....        |
00003440  cd 0d 0f 28 4b 20 c9 20  36 3a 74 79 70 65 25 3d  |...(K . 6:type%=|
00003450  35 3a 63 79 6c 73 25 3d  38 30 3a 68 65 61 64 73  |5:cyls%=80:heads|
00003460  25 3d 32 3a 73 65 63 73  5f 74 72 6b 25 3d 31 36  |%=2:secs_trk%=16|
00003470  3a 73 65 63 5f 73 69 7a  65 25 3d 26 31 30 30 3a  |:sec_size%=&100:|
00003480  74 79 70 65 24 3d 22 36  34 30 4b 22 0d 0f 32 4f  |type$="640K"..2O|
00003490  20 c9 20 37 3a 74 79 70  65 25 3d 36 3a 63 79 6c  | . 7:type%=6:cyl|
000034a0  73 25 3d 38 30 3a 68 65  61 64 73 25 3d 32 3a 73  |s%=80:heads%=2:s|
000034b0  65 63 73 5f 74 72 6b 25  3d 31 36 3a 73 65 63 5f  |ecs_trk%=16:sec_|
000034c0  73 69 7a 65 25 3d 26 31  30 30 3a 74 79 70 65 24  |size%=&100:type$|
000034d0  3d 22 44 46 53 20 33 32  30 4b 22 0d 0f 3c 4f 20  |="DFS 320K"..<O |
000034e0  c9 20 38 3a 74 79 70 65  25 3d 37 3a 63 79 6c 73  |. 8:type%=7:cyls|
000034f0  25 3d 38 30 3a 68 65 61  64 73 25 3d 32 3a 73 65  |%=80:heads%=2:se|
00003500  63 73 5f 74 72 6b 25 3d  31 38 3a 73 65 63 5f 73  |cs_trk%=18:sec_s|
00003510  69 7a 65 25 3d 26 31 30  30 3a 74 79 70 65 24 3d  |ize%=&100:type$=|
00003520  22 44 46 53 20 33 36 30  4b 22 0d 0f 46 05 cb 0d  |"DFS 360K"..F...|
00003530  0f 50 1d f2 74 69 63 6b  5f 69 74 65 6d 28 74 79  |.P..tick_item(ty|
00003540  70 65 5f 6d 25 2c 74 79  70 65 25 29 0d 0f 5a 2d  |pe_m%,type%)..Z-|
00003550  e7 20 74 79 70 65 25 3e  3d 30 20 f2 74 79 70 65  |. type%>=0 .type|
00003560  5f 69 63 6f 6e 73 3a 6d  61 78 5f 61 64 64 72 25  |_icons:max_addr%|
00003570  3d a4 6d 61 78 61 64 64  72 0d 0f 64 2e 63 68 75  |=.maxaddr..d.chu|
00003580  6e 6b 25 3d 73 65 63 5f  73 69 7a 65 25 3a e7 20  |nk%=sec_size%:. |
00003590  63 68 75 6e 6b 25 3e 26  34 30 30 20 63 68 75 6e  |chunk%>&400 chun|
000035a0  6b 25 3d 26 34 30 30 0d  0f 6e 0f f2 73 65 74 5f  |k%=&400..n..set_|
000035b0  72 65 63 6f 72 64 0d 0f  78 05 e1 0d 0f 82 04 0d  |record..x.......|
000035c0  0f 8c 12 dd a4 76 61 6c  69 64 61 74 65 5f 74 68  |.....validate_th|
000035d0  73 0d 0f 96 08 4a 25 3d  b9 0d 0f a0 39 21 62 6c  |s....J%=....9!bl|
000035e0  6b 25 3d 64 65 66 69 6e  65 5f 77 25 3a 62 6c 6b  |k%=define_w%:blk|
000035f0  25 21 34 3d 31 3a c8 99  20 22 57 69 6d 70 5f 47  |%!4=1:.. "Wimp_G|
00003600  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
00003610  6b 25 0d 0f aa 15 63 79  6c 73 25 3d bb 24 28 62  |k%....cyls%=.$(b|
00003620  6c 6b 25 21 32 38 29 0d  0f b4 39 e7 20 63 79 6c  |lk%!28)...9. cyl|
00003630  73 25 3c 34 30 20 49 25  3d a4 61 6c 65 72 74 28  |s%<40 I%=.alert(|
00003640  22 49 6e 76 61 6c 69 64  20 6e 75 6d 62 65 72 20  |"Invalid number |
00003650  6f 66 20 74 72 61 63 6b  73 22 29 3a 4a 25 3d a3  |of tracks"):J%=.|
00003660  0d 0f be 3c 62 6c 6b 25  21 34 3d 32 3a c8 99 20  |...<blk%!4=2:.. |
00003670  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00003680  74 65 22 2c 2c 62 6c 6b  25 3a 68 65 61 64 73 25  |te",,blk%:heads%|
00003690  3d bb 24 28 62 6c 6b 25  21 32 38 29 0d 0f c8 33  |=.$(blk%!28)...3|
000036a0  e7 20 68 65 61 64 73 25  3d 30 20 49 25 3d a4 61  |. heads%=0 I%=.a|
000036b0  6c 65 72 74 28 22 43 61  6e 27 74 20 68 61 76 65  |lert("Can't have|
000036c0  20 30 20 68 65 61 64 73  22 29 3a 4a 25 3d a3 0d  | 0 heads"):J%=..|
000036d0  0f d2 3f 62 6c 6b 25 21  34 3d 33 3a c8 99 20 22  |..?blk%!4=3:.. "|
000036e0  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
000036f0  65 22 2c 2c 62 6c 6b 25  3a 73 65 63 73 5f 74 72  |e",,blk%:secs_tr|
00003700  6b 25 3d bb 24 28 62 6c  6b 25 21 32 38 29 0d 0f  |k%=.$(blk%!28)..|
00003710  dc 3d e7 20 73 65 63 73  5f 74 72 6b 25 3c 34 20  |.=. secs_trk%<4 |
00003720  49 25 3d a4 61 6c 65 72  74 28 22 49 6e 76 61 6c  |I%=.alert("Inval|
00003730  69 64 20 6e 75 6d 62 65  72 20 6f 66 20 73 65 63  |id number of sec|
00003740  74 6f 72 73 22 29 3a 4a  25 3d a3 0d 0f e6 3f 62  |tors"):J%=....?b|
00003750  6c 6b 25 21 34 3d 34 3a  c8 99 20 22 57 69 6d 70  |lk%!4=4:.. "Wimp|
00003760  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
00003770  62 6c 6b 25 3a 73 65 63  5f 73 69 7a 65 25 3d bb  |blk%:sec_size%=.|
00003780  24 28 62 6c 6b 25 21 32  38 29 0d 0f f0 1c 73 65  |$(blk%!28)....se|
00003790  63 5f 73 69 7a 65 25 3d  73 65 63 5f 73 69 7a 65  |c_size%=sec_size|
000037a0  25 80 ac 26 46 46 0d 0f  fa 33 e7 20 73 65 63 5f  |%..&FF...3. sec_|
000037b0  73 69 7a 65 25 3d 30 20  49 25 3d a4 61 6c 65 72  |size%=0 I%=.aler|
000037c0  74 28 22 42 61 64 20 73  65 63 74 6f 72 20 73 69  |t("Bad sector si|
000037d0  7a 65 22 29 3a 4a 25 3d  a3 0d 10 04 07 3d 4a 25  |ze"):J%=.....=J%|
000037e0  0d 10 0e 04 0d 10 18 10  dd f2 69 64 65 6e 74 5f  |..........ident_|
000037f0  68 61 72 64 0d 10 22 23  f2 73 65 74 5f 72 65 63  |hard.."#.set_rec|
00003800  6f 72 64 3a 3f 64 72 65  63 25 3d 38 3a 64 72 65  |ord:?drec%=8:dre|
00003810  63 25 3f 31 3d 33 32 0d  10 2c 4f c8 99 20 22 58  |c%?1=32..,O.. "X|
00003820  41 44 46 53 5f 44 69 73  63 4f 70 22 2c 2c 28 64  |ADFS_DiscOp",,(d|
00003830  72 65 63 25 3c 3c 36 29  84 20 31 2c 26 43 30 30  |rec%<<6). 1,&C00|
00003840  20 84 28 64 72 69 76 65  25 3c 3c 32 39 29 2c 76  | .(drive%<<29),v|
00003850  69 65 77 62 75 66 66 25  2c 26 32 30 30 20 b8 65  |iewbuff%,&200 .e|
00003860  72 72 25 3b 46 25 0d 10  36 15 e7 20 46 25 80 31  |rr%;F%..6.. F%.1|
00003870  20 f2 78 5f 65 72 72 6f  72 3a e1 0d 10 40 1c 74  | .x_error:...@.t|
00003880  79 70 65 24 3d 22 48 61  72 64 44 69 73 63 22 3a  |ype$="HardDisc":|
00003890  74 79 70 65 25 3d 34 0d  10 4a 20 73 65 63 5f 73  |type%=4..J sec_s|
000038a0  69 7a 65 25 3d 32 5e 28  76 69 65 77 62 75 66 66  |ize%=2^(viewbuff|
000038b0  25 3f 26 31 43 30 29 0d  10 54 1c 73 65 63 73 5f  |%?&1C0)..T.secs_|
000038c0  74 72 6b 25 3d 76 69 65  77 62 75 66 66 25 3f 26  |trk%=viewbuff%?&|
000038d0  31 43 31 0d 10 5e 19 68  65 61 64 73 25 3d 76 69  |1C1..^.heads%=vi|
000038e0  65 77 62 75 66 66 25 3f  26 31 43 32 0d 10 68 37  |ewbuff%?&1C2..h7|
000038f0  63 79 6c 73 25 3d 28 76  69 65 77 62 75 66 66 25  |cyls%=(viewbuff%|
00003900  21 26 31 44 30 29 81 28  68 65 61 64 73 25 2a 73  |!&1D0).(heads%*s|
00003910  65 63 5f 73 69 7a 65 25  2a 73 65 63 73 5f 74 72  |ec_size%*secs_tr|
00003920  6b 25 29 0d 10 72 05 e1  0d 10 7c 04 0d 10 86 12  |k%)..r....|.....|
00003930  dd f2 69 64 65 6e 74 5f  66 6c 6f 70 70 79 0d 10  |..ident_floppy..|
00003940  90 0f f2 73 65 74 5f 72  65 63 6f 72 64 0d 10 9a  |...set_record...|
00003950  4f c8 99 20 22 58 41 44  46 53 5f 44 69 73 63 4f  |O.. "XADFS_DiscO|
00003960  70 22 2c 2c 28 64 72 65  63 25 3c 3c 36 29 84 20  |p",,(drec%<<6). |
00003970  31 2c 26 34 30 30 20 84  28 64 72 69 76 65 25 3c  |1,&400 .(drive%<|
00003980  3c 32 39 29 2c 76 69 65  77 62 75 66 66 25 2c 26  |<29),viewbuff%,&|
00003990  32 30 30 20 b8 65 72 72  25 3b 46 25 0d 10 a4 19  |200 .err%;F%....|
000039a0  e7 20 28 46 25 80 31 29  3d 31 20 f2 78 5f 65 72  |. (F%.1)=1 .x_er|
000039b0  72 6f 72 3a e1 0d 10 ae  0a c8 8e 20 b9 20 ca 0d  |ror:....... . ..|
000039c0  10 b8 19 20 c9 20 76 69  65 77 62 75 66 66 25 21  |... . viewbuff%!|
000039d0  32 35 37 3d 68 67 25 3a  0d 10 c2 4b 20 20 20 20  |257=hg%:...K    |
000039e0  20 20 74 79 70 65 25 3d  35 3a 74 79 70 65 24 3d  |  type%=5:type$=|
000039f0  22 36 34 30 4b 22 3a 73  65 63 5f 73 69 7a 65 25  |"640K":sec_size%|
00003a00  3d 32 35 36 3a 73 65 63  73 5f 74 72 6b 25 3d 31  |=256:secs_trk%=1|
00003a10  36 3a 68 65 61 64 73 25  3d 32 3a 63 79 6c 73 25  |6:heads%=2:cyls%|
00003a20  3d 38 30 0d 10 cc 17 20  c9 20 76 69 65 77 62 75  |=80.... . viewbu|
00003a30  66 66 25 21 31 3d 68 67  25 3a 0d 10 d6 4d 20 20  |ff%!1=hg%:...M  |
00003a40  20 20 20 20 74 79 70 65  25 3d 32 3a 74 79 70 65  |    type%=2:type|
00003a50  24 3d 22 4e 6f 72 6d 61  6c 22 3a 73 65 63 5f 73  |$="Normal":sec_s|
00003a60  69 7a 65 25 3d 26 34 30  30 3a 73 65 63 73 5f 74  |ize%=&400:secs_t|
00003a70  72 6b 25 3d 35 3a 68 65  61 64 73 25 3d 32 3a 63  |rk%=5:heads%=2:c|
00003a80  79 6c 73 25 3d 38 30 0d  10 e0 2c 20 c9 20 28 76  |yls%=80..., . (v|
00003a90  69 65 77 62 75 66 66 25  21 32 31 20 80 26 46 46  |iewbuff%!21 .&FF|
00003aa0  46 46 46 46 29 3d 26 43  38 30 3a 74 79 70 65 25  |FFFF)=&C80:type%|
00003ab0  3d 32 3a 0d 10 ea 45 20  20 20 20 20 20 74 79 70  |=2:...E      typ|
00003ac0  65 24 3d 22 4e 6f 72 6d  61 6c 22 3a 73 65 63 5f  |e$="Normal":sec_|
00003ad0  73 69 7a 65 25 3d 26 34  30 30 3a 73 65 63 73 5f  |size%=&400:secs_|
00003ae0  74 72 6b 25 3d 35 3a 68  65 61 64 73 25 3d 32 3a  |trk%=5:heads%=2:|
00003af0  63 79 6c 73 25 3d 38 30  0d 10 f4 2d 20 c9 20 28  |cyls%=80...- . (|
00003b00  76 69 65 77 62 75 66 66  25 21 32 31 20 80 26 46  |viewbuff%!21 .&F|
00003b10  46 46 46 46 46 29 3d 26  31 39 30 30 3a 74 79 70  |FFFFF)=&1900:typ|
00003b20  65 25 3d 31 3a 0d 10 fe  47 20 20 20 20 20 20 74  |e%=1:...G      t|
00003b30  79 70 65 24 3d 22 48 69  20 44 65 6e 73 22 3a 73  |ype$="Hi Dens":s|
00003b40  65 63 5f 73 69 7a 65 25  3d 26 34 30 30 3a 73 65  |ec_size%=&400:se|
00003b50  63 73 5f 74 72 6b 25 3d  31 30 3a 68 65 61 64 73  |cs_trk%=10:heads|
00003b60  25 3d 32 3a 63 79 6c 73  25 3d 38 30 0d 11 08 3b  |%=2:cyls%=80...;|
00003b70  20 c9 20 3f 76 69 65 77  62 75 66 66 25 3d 26 45  | . ?viewbuff%=&E|
00003b80  39 20 84 20 28 3f 76 69  65 77 62 75 66 66 25 3d  |9 . (?viewbuff%=|
00003b90  26 45 42 20 80 20 76 69  65 77 62 75 66 66 25 3f  |&EB . viewbuff%?|
00003ba0  32 3d 26 39 30 29 3a 0d  11 12 4e 20 20 20 20 20  |2=&90):...N     |
00003bb0  20 74 79 70 65 25 3d 33  3a 74 79 70 65 24 3d 22  | type%=3:type$="|
00003bc0  4d 53 2d 44 6f 73 22 3a  73 65 63 5f 73 69 7a 65  |MS-Dos":sec_size|
00003bd0  25 3d 26 32 30 30 3a 73  65 63 73 5f 74 72 6b 25  |%=&200:secs_trk%|
00003be0  3d 31 30 3a 68 65 61 64  73 25 3d 32 3a 63 79 6c  |=10:heads%=2:cyl|
00003bf0  73 25 3d 38 30 0d 11 1c  2e 20 c9 20 28 76 69 65  |s%=80.... . (vie|
00003c00  77 62 75 66 66 25 3f 36  80 31 35 29 2a 26 31 30  |wbuff%?6.15)*&10|
00003c10  30 2b 76 69 65 77 62 75  66 66 25 3f 37 3d 26 35  |0+viewbuff%?7=&5|
00003c20  30 30 3a 0d 11 26 4f 20  20 20 20 20 20 74 79 70  |00:..&O      typ|
00003c30  65 25 3d 36 3a 74 79 70  65 24 3d 22 44 46 53 20  |e%=6:type$="DFS |
00003c40  33 32 30 4b 22 3a 73 65  63 5f 73 69 7a 65 25 3d  |320K":sec_size%=|
00003c50  32 35 36 3a 73 65 63 73  5f 74 72 6b 25 3d 31 36  |256:secs_trk%=16|
00003c60  3a 68 65 61 64 73 25 3d  32 3a 63 79 6c 73 25 3d  |:heads%=2:cyls%=|
00003c70  38 30 0d 11 30 2e 20 c9  20 28 76 69 65 77 62 75  |80..0. . (viewbu|
00003c80  66 66 25 3f 36 80 31 35  29 2a 26 31 30 30 2b 76  |ff%?6.15)*&100+v|
00003c90  69 65 77 62 75 66 66 25  3f 37 3d 26 35 41 30 3a  |iewbuff%?7=&5A0:|
00003ca0  0d 11 3a 4f 20 20 20 20  20 20 74 79 70 65 25 3d  |..:O      type%=|
00003cb0  37 3a 74 79 70 65 24 3d  22 44 46 53 20 33 36 30  |7:type$="DFS 360|
00003cc0  4b 22 3a 73 65 63 5f 73  69 7a 65 25 3d 32 35 36  |K":sec_size%=256|
00003cd0  3a 73 65 63 73 5f 74 72  6b 25 3d 31 38 3a 68 65  |:secs_trk%=18:he|
00003ce0  61 64 73 25 3d 32 3a 63  79 6c 73 25 3d 38 30 0d  |ads%=2:cyls%=80.|
00003cf0  11 44 30 20 7f 3a 49 25  3d a4 61 6c 65 72 74 28  |.D0 .:I%=.alert(|
00003d00  22 55 6e 61 62 6c 65 20  74 6f 20 69 64 65 6e 74  |"Unable to ident|
00003d10  69 66 79 20 64 69 73 63  20 74 79 70 65 22 29 0d  |ify disc type").|
00003d20  11 4e 05 cb 0d 11 58 05  e1 0d 11 62 04 0d 11 6c  |.N....X....b...l|
00003d30  10 dd f2 73 65 74 5f 72  65 63 6f 72 64 0d 11 76  |...set_record..v|
00003d40  23 e3 20 49 25 3d 64 72  65 63 25 b8 64 72 65 63  |#. I%=drec%.drec|
00003d50  25 2b 26 34 43 20 88 34  3a 21 49 25 3d 30 3a ed  |%+&4C .4:!I%=0:.|
00003d60  0d 11 80 26 64 72 65 63  25 21 36 34 3d 26 32 30  |...&drec%!64=&20|
00003d70  30 30 30 30 30 30 3a 64  72 65 63 25 3f 33 34 3d  |000000:drec%?34=|
00003d80  64 72 69 76 65 25 0d 11  8a 0e c8 8e 20 74 79 70  |drive%...... typ|
00003d90  65 25 20 ca 0d 11 94 41  20 c9 20 2d 31 3a 3f 64  |e% ....A . -1:?d|
00003da0  72 65 63 25 3d 31 30 3a  64 72 65 63 25 3f 31 3d  |rec%=10:drec%?1=|
00003db0  35 3a 64 72 65 63 25 3f  32 3d 32 3a 64 72 65 63  |5:drec%?2=2:drec|
00003dc0  25 3f 33 3d 32 3a 64 72  65 63 25 21 31 36 3d 26  |%?3=2:drec%!16=&|
00003dd0  43 38 30 30 30 0d 11 9e  40 20 c9 20 33 3a 3f 64  |C8000...@ . 3:?d|
00003de0  72 65 63 25 3d 39 3a 64  72 65 63 25 3f 31 3d 31  |rec%=9:drec%?1=1|
00003df0  30 3a 64 72 65 63 25 3f  32 3d 32 3a 64 72 65 63  |0:drec%?2=2:drec|
00003e00  25 3f 33 3d 32 3a 64 72  65 63 25 21 31 36 3d 26  |%?3=2:drec%!16=&|
00003e10  43 38 30 30 30 0d 11 a8  42 20 c9 20 35 2c 36 3a  |C8000...B . 5,6:|
00003e20  3f 64 72 65 63 25 3d 38  3a 64 72 65 63 25 3f 31  |?drec%=8:drec%?1|
00003e30  3d 31 36 3a 64 72 65 63  25 3f 32 3d 32 3a 64 72  |=16:drec%?2=2:dr|
00003e40  65 63 25 3f 33 3d 32 3a  64 72 65 63 25 21 31 36  |ec%?3=2:drec%!16|
00003e50  3d 26 41 30 30 30 30 0d  11 b2 40 20 c9 20 37 3a  |=&A0000...@ . 7:|
00003e60  3f 64 72 65 63 25 3d 38  3a 64 72 65 63 25 3f 31  |?drec%=8:drec%?1|
00003e70  3d 31 38 3a 64 72 65 63  25 3f 32 3d 32 3a 64 72  |=18:drec%?2=2:dr|
00003e80  65 63 25 3f 33 3d 32 3a  64 72 65 63 25 21 31 36  |ec%?3=2:drec%!16|
00003e90  3d 26 42 34 30 30 30 0d  11 bc 06 20 7f 0d 11 c6  |=&B4000.... ....|
00003ea0  38 20 20 20 20 20 20 20  20 20 49 25 3d 30 3a f5  |8         I%=0:.|
00003eb0  3a 49 25 2b 3d 31 3a fd  20 73 65 63 5f 73 69 7a  |:I%+=1:. sec_siz|
00003ec0  65 25 20 81 20 32 5e 49  25 3d 31 3a 3f 64 72 65  |e% . 2^I%=1:?dre|
00003ed0  63 25 3d 49 25 0d 11 d0  37 20 20 20 20 20 20 20  |c%=I%...7       |
00003ee0  20 20 64 72 65 63 25 3f  31 3d 73 65 63 73 5f 74  |  drec%?1=secs_t|
00003ef0  72 6b 25 3a 64 72 65 63  25 3f 32 3d 68 65 61 64  |rk%:drec%?2=head|
00003f00  73 25 3a 64 72 65 63 25  3f 33 3d 32 0d 11 da 3c  |s%:drec%?3=2...<|
00003f10  20 20 20 20 20 20 20 20  20 6d 61 78 5f 61 64 64  |         max_add|
00003f20  72 25 3d a4 6d 61 78 61  64 64 72 3a 64 72 65 63  |r%=.maxaddr:drec|
00003f30  25 21 31 36 3d 6d 61 78  5f 61 64 64 72 25 2b 73  |%!16=max_addr%+s|
00003f40  65 63 5f 73 69 7a 65 25  0d 11 e4 05 cb 0d 11 ee  |ec_size%........|
00003f50  05 e1 0d 11 f8 04 0d 12  02 14 20 20 20 20 25 25  |..........    %%|
00003f60  25 25 25 25 25 25 25 25  25 25 0d 12 0c 14 20 20  |%%%%%%%%%%....  |
00003f70  20 20 43 61 6c 63 75 6c  61 74 69 6f 6e 73 0d 12  |  Calculations..|
00003f80  16 14 20 20 20 20 25 25  25 25 25 25 25 25 25 25  |..    %%%%%%%%%%|
00003f90  25 25 0d 12 20 04 0d 12  2a 0d dd a4 6d 61 78 61  |%%.. ...*...maxa|
00003fa0  64 64 72 0d 12 34 3d e7  20 74 79 70 65 25 3d 33  |ddr..4=. type%=3|
00003fb0  3a 3d 63 79 6c 73 25 2a  68 65 61 64 73 25 2a 73  |:=cyls%*heads%*s|
00003fc0  65 63 73 5f 74 72 6b 25  2a 73 65 63 5f 73 69 7a  |ecs_trk%*sec_siz|
00003fd0  65 25 2d 28 32 2a 73 65  63 5f 73 69 7a 65 25 29  |e%-(2*sec_size%)|
00003fe0  0d 12 3e 2f 3d 63 79 6c  73 25 2a 68 65 61 64 73  |..>/=cyls%*heads|
00003ff0  25 2a 73 65 63 73 5f 74  72 6b 25 2a 73 65 63 5f  |%*secs_trk%*sec_|
00004000  73 69 7a 65 25 2d 73 65  63 5f 73 69 7a 65 25 0d  |size%-sec_size%.|
00004010  12 48 04 0d 12 52 10 dd  a4 77 6b 73 70 63 28 73  |.H...R...wkspc(s|
00004020  7a 25 29 0d 12 5c 26 c8  99 22 57 69 6d 70 5f 53  |z%)..\&.."Wimp_S|
00004030  6c 6f 74 53 69 7a 65 22  2c 6d 65 6d 25 2b 73 7a  |lotSize",mem%+sz|
00004040  25 2c 2d 31 20 b8 20 65  25 0d 12 66 1b e7 20 65  |%,-1 . e%..f.. e|
00004050  25 3c 28 6d 65 6d 25 2b  73 7a 25 29 3a 3d a3 3a  |%<(mem%+sz%):=.:|
00004060  8b 3a 3d b9 0d 12 70 04  0d 12 7a 0b dd a4 77 5f  |.:=...p...z...w_|
00004070  65 78 74 0d 12 84 18 e7  20 ac 66 6c 61 67 25 80  |ext..... .flag%.|
00004080  32 3a 3d 63 68 75 6e 6b  25 2a 32 0d 12 8e 22 e7  |2:=chunk%*2...".|
00004090  20 63 68 75 6e 6b 25 3e  26 34 30 30 3a 3d 63 68  | chunk%>&400:=ch|
000040a0  75 6e 6b 25 81 32 3a 8b  3a 3d 35 31 32 0d 12 98  |unk%.2:.:=512...|
000040b0  04 0d 12 a2 0f dd a4 63  61 6c 63 5f 61 64 64 72  |.......calc_addr|
000040c0  0d 12 ac 41 e7 20 74 79  70 65 25 3e 34 3a 3d 28  |...A. type%>4:=(|
000040d0  28 68 65 61 64 25 2a 63  79 6c 73 25 2b 74 72 61  |(head%*cyls%+tra|
000040e0  63 6b 25 29 2a 73 65 63  73 5f 74 72 6b 25 2b 73  |ck%)*secs_trk%+s|
000040f0  65 63 74 6f 72 25 29 2a  73 65 63 5f 73 69 7a 65  |ector%)*sec_size|
00004100  25 0d 12 b6 3a 3d 28 28  28 74 72 61 63 6b 25 2a  |%...:=(((track%*|
00004110  68 65 61 64 73 25 2b 68  65 61 64 25 29 2a 73 65  |heads%+head%)*se|
00004120  63 73 5f 74 72 6b 25 29  2b 73 65 63 74 6f 72 25  |cs_trk%)+sector%|
00004130  29 2a 73 65 63 5f 73 69  7a 65 25 0d 12 c0 04 0d  |)*sec_size%.....|
00004140  12 ca 0e dd f2 63 61 6c  63 5f 74 68 73 0d 12 d4  |.....calc_ths...|
00004150  44 e7 20 61 64 64 72 65  73 73 25 3e 6d 61 78 5f  |D. address%>max_|
00004160  61 64 64 72 25 20 61 64  64 72 65 73 73 25 3d 30  |addr% address%=0|
00004170  20 8b e7 20 61 64 64 72  65 73 73 25 3c 30 20 61  | .. address%<0 a|
00004180  64 64 72 65 73 73 25 3d  6d 61 78 5f 61 64 64 72  |ddress%=max_addr|
00004190  25 0d 12 de 31 53 25 3d  61 64 64 72 65 73 73 25  |%...1S%=address%|
000041a0  20 81 20 73 65 63 5f 73  69 7a 65 25 3a 61 64 64  | . sec_size%:add|
000041b0  72 65 73 73 25 3d 53 25  2a 73 65 63 5f 73 69 7a  |ress%=S%*sec_siz|
000041c0  65 25 0d 12 e8 0f e7 20  74 79 70 65 25 3e 34 20  |e%..... type%>4 |
000041d0  8c 0d 12 f2 31 20 73 65  63 74 6f 72 25 3d 53 25  |....1 sector%=S%|
000041e0  20 83 20 73 65 63 73 5f  74 72 6b 25 3a 74 72 61  | . secs_trk%:tra|
000041f0  63 6b 25 3d 53 25 20 81  20 73 65 63 73 5f 74 72  |ck%=S% . secs_tr|
00004200  6b 25 0d 12 fc 2f 20 68  65 61 64 25 3d 74 72 61  |k%.../ head%=tra|
00004210  63 6b 25 20 81 20 63 79  6c 73 25 3a 74 72 61 63  |ck% . cyls%:trac|
00004220  6b 25 3d 74 72 61 63 6b  25 20 83 20 63 79 6c 73  |k%=track% . cyls|
00004230  25 0d 13 06 05 cc 0d 13  10 31 20 73 65 63 74 6f  |%........1 secto|
00004240  72 25 3d 53 25 20 83 20  73 65 63 73 5f 74 72 6b  |r%=S% . secs_trk|
00004250  25 3a 74 72 61 63 6b 25  3d 53 25 20 81 20 73 65  |%:track%=S% . se|
00004260  63 73 5f 74 72 6b 25 0d  13 1a 31 20 68 65 61 64  |cs_trk%...1 head|
00004270  25 3d 74 72 61 63 6b 25  20 83 20 68 65 61 64 73  |%=track% . heads|
00004280  25 3a 74 72 61 63 6b 25  3d 74 72 61 63 6b 25 20  |%:track%=track% |
00004290  81 20 68 65 61 64 73 25  0d 13 24 05 cd 0d 13 2e  |. heads%..$.....|
000042a0  39 e7 20 74 79 70 65 25  3d 33 20 e7 20 73 65 63  |9. type%=3 . sec|
000042b0  74 6f 72 25 3d 39 20 61  64 64 72 65 73 73 25 2b  |tor%=9 address%+|
000042c0  3d 73 65 63 5f 73 69 7a  65 25 3a f2 63 61 6c 63  |=sec_size%:.calc|
000042d0  5f 74 68 73 3a e1 0d 13  38 05 e1 0d 13 42 04 0d  |_ths:...8....B..|
000042e0  13 4c 20 20 20 20 20 25  25 25 25 25 25 25 25 25  |.L     %%%%%%%%%|
000042f0  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 0d  |%%%%%%%%%%%%%%%.|
00004300  13 56 20 20 20 20 20 42  61 73 69 63 20 70 72 6f  |.V     Basic pro|
00004310  67 72 61 6d 20 73 74 72  75 63 74 75 72 65 73 0d  |gram structures.|
00004320  13 60 20 20 20 20 20 25  25 25 25 25 25 25 25 25  |.`     %%%%%%%%%|
00004330  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 0d  |%%%%%%%%%%%%%%%.|
00004340  13 6a 04 0d 13 74 16 dd  f2 74 69 63 6b 5f 69 74  |.j...t...tick_it|
00004350  65 6d 28 6d 25 2c 69 25  29 0d 13 7e 0b 49 25 3d  |em(m%,i%)..~.I%=|
00004360  6d 25 2b 34 0d 13 88 23  f5 3a 49 25 2b 3d 32 34  |m%+4...#.:I%+=24|
00004370  3a 21 49 25 3d 21 49 25  80 20 ac 20 31 3a fd 20  |:!I%=!I%. . 1:. |
00004380  21 49 25 80 26 38 30 0d  13 92 25 e7 20 ac 20 69  |!I%.&80...%. . i|
00004390  25 20 49 25 3d 6d 25 2b  32 38 2b 28 69 25 2a 32  |% I%=m%+28+(i%*2|
000043a0  34 29 3a 21 49 25 3d 21  49 25 84 31 0d 13 9c 05  |4):!I%=!I%.1....|
000043b0  e1 0d 13 a6 04 0d 13 b0  2f dd a4 6d 65 6e 75 5f  |......../..menu_|
000043c0  69 74 65 6d 20 28 69 74  65 6d 6e 61 6d 65 24 2c  |item (itemname$,|
000043d0  6d 65 6e 75 66 6c 61 67  73 25 2c 73 75 62 6d 65  |menuflags%,subme|
000043e0  6e 75 25 29 0d 13 ba 42  6d 25 21 30 3d 6d 65 6e  |nu%)...Bm%!0=men|
000043f0  75 66 6c 61 67 73 25 3a  6d 25 21 34 3d 73 75 62  |uflags%:m%!4=sub|
00004400  6d 65 6e 75 25 3a 6d 25  21 38 3d 26 37 30 30 30  |menu%:m%!8=&7000|
00004410  30 30 31 3a 24 28 6d 25  2b 31 32 29 3d 69 74 65  |001:$(m%+12)=ite|
00004420  6d 6e 61 6d 65 24 0d 13  c4 0a 3d 6d 25 2b 32 34  |mname$....=m%+24|
00004430  0d 13 ce 04 0d 13 d8 25  dd a4 6d 65 6e 75 20 28  |.......%..menu (|
00004440  61 25 2c 6d 65 6e 75 74  69 74 6c 65 24 2c 6d 65  |a%,menutitle$,me|
00004450  6e 75 77 69 64 74 68 25  29 0d 13 e2 41 24 61 25  |nuwidth%)...A$a%|
00004460  3d 6d 65 6e 75 74 69 74  6c 65 24 3a 61 25 21 31  |=menutitle$:a%!1|
00004470  32 3d 26 37 30 32 30 37  3a 61 25 21 31 36 3d 6d  |2=&70207:a%!16=m|
00004480  65 6e 75 77 69 64 74 68  25 3a 61 25 21 32 30 3d  |enuwidth%:a%!20=|
00004490  34 30 3a 61 25 21 32 34  3d 30 0d 13 ec 0c 6d 25  |40:a%!24=0....m%|
000044a0  3d 61 25 2b 32 38 0d 13  f6 07 3d 61 25 0d 14 00  |=a%+28....=a%...|
000044b0  04 0d 14 0a 12 dd f2 72  65 70 6f 72 74 5f 65 72  |.......report_er|
000044c0  72 6f 72 0d 14 14 17 c8  99 22 48 6f 75 72 67 6c  |ror......"Hourgl|
000044d0  61 73 73 5f 53 6d 61 73  68 22 0d 14 1e 2c 21 62  |ass_Smash"...,!b|
000044e0  6c 6b 25 3d 9f 3a 24 28  62 6c 6b 25 2b 34 29 3d  |lk%=.:$(blk%+4)=|
000044f0  f6 24 2b 22 20 61 74 20  6c 69 6e 65 20 22 2b c3  |.$+" at line "+.|
00004500  28 9e 29 2b bd 30 0d 14  28 27 c8 99 20 22 57 69  |(.)+.0..('.. "Wi|
00004510  6d 70 5f 52 65 70 6f 72  74 45 72 72 6f 72 22 2c  |mp_ReportError",|
00004520  62 6c 6b 25 2c 31 2c 74  69 74 6c 65 25 0d 14 32  |blk%,1,title%..2|
00004530  0c e7 20 9f 3e 35 32 20  e1 0d 14 3c 09 dd f2 64  |.. .>52 ...<...d|
00004540  69 65 0d 14 46 07 ee 85  87 0d 14 50 3e c8 99 20  |ie..F......P>.. |
00004550  22 58 4f 53 5f 52 65 61  64 56 61 72 56 61 6c 22  |"XOS_ReadVarVal"|
00004560  2c 22 71 66 72 73 61 76  65 24 70 61 74 68 22 2c  |,"qfrsave$path",|
00004570  76 69 65 77 62 75 66 66  25 2c 2d 31 2c 30 2c 30  |viewbuff%,-1,0,0|
00004580  20 b8 20 2c 2c 46 25 0d  14 5a 22 e7 20 46 25 3c  | . ,,F%..Z". F%<|
00004590  30 3a ff 20 22 2a 75 6e  73 65 74 20 71 66 72 73  |0:. "*unset qfrs|
000045a0  61 76 65 24 70 61 74 68  22 0d 14 64 27 c8 99 20  |ave$path"..d'.. |
000045b0  22 57 69 6d 70 5f 43 6c  6f 73 65 44 6f 77 6e 22  |"Wimp_CloseDown"|
000045c0  2c 68 61 6e 64 25 2c 26  34 42 35 33 34 31 35 34  |,hand%,&4B534154|
000045d0  0d 14 6e 05 e0 0d 14 78  04 0d 14 82 0f dd a4 61  |..n....x.......a|
000045e0  6c 65 72 74 28 61 24 29  0d 14 8c 20 62 6c 6b 25  |lert(a$)... blk%|
000045f0  21 26 38 30 3d 30 3a 24  28 62 6c 6b 25 2b 26 38  |!&80=0:$(blk%+&8|
00004600  34 29 3d 61 24 2b bd 30  0d 14 96 31 c8 99 22 57  |4)=a$+.0...1.."W|
00004610  69 6d 70 5f 52 65 70 6f  72 74 45 72 72 6f 72 22  |imp_ReportError"|
00004620  2c 62 6c 6b 25 2b 26 38  30 2c 31 37 2c 74 69 74  |,blk%+&80,17,tit|
00004630  6c 65 25 20 b8 20 2c 49  25 0d 14 a0 07 3d 49 25  |le% . ,I%....=I%|
00004640  0d 14 aa 04 0d 14 b4 0d  dd f2 78 5f 65 72 72 6f  |..........x_erro|
00004650  72 0d 14 be 27 c8 99 22  57 69 6d 70 5f 52 65 70  |r...'.."Wimp_Rep|
00004660  6f 72 74 45 72 72 6f 72  22 2c 65 72 72 25 2c 31  |ortError",err%,1|
00004670  37 2c 74 69 74 6c 65 25  0d 14 c8 05 e1 0d 14 d2  |7,title%........|
00004680  04 0d 14 dc 1f 20 20 20  20 25 25 25 25 25 25 25  |.....    %%%%%%%|
00004690  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
000046a0  0d 14 e6 1f 20 20 20 20  49 6e 69 74 69 61 6c 69  |....    Initiali|
000046b0  73 61 74 69 6f 6e 20 72  6f 75 74 69 6e 65 73 0d  |sation routines.|
000046c0  14 f0 1f 20 20 20 20 25  25 25 25 25 25 25 25 25  |...    %%%%%%%%%|
000046d0  25 25 25 25 25 25 25 25  25 25 25 25 25 25 0d 14  |%%%%%%%%%%%%%%..|
000046e0  fa 04 0d 15 04 11 dd f2  63 72 65 61 74 65 5f 6d  |........create_m|
000046f0  65 6e 75 0d 15 0e 2d 74  79 70 65 5f 6d 25 3d a4  |enu...-type_m%=.|
00004700  6d 65 6e 75 20 28 6d 65  6e 75 62 75 66 66 25 2c  |menu (menubuff%,|
00004710  22 44 69 73 63 20 54 79  70 65 22 2c 31 36 38 29  |"Disc Type",168)|
00004720  0d 15 18 28 6d 25 3d a4  6d 65 6e 75 5f 69 74 65  |...(m%=.menu_ite|
00004730  6d 20 28 22 46 6f 72 6d  61 74 22 2c 32 2c 64 65  |m ("Format",2,de|
00004740  66 69 6e 65 5f 77 25 29  0d 15 22 23 6d 25 3d a4  |fine_w%).."#m%=.|
00004750  6d 65 6e 75 5f 69 74 65  6d 20 28 22 52 65 61 64  |menu_item ("Read|
00004760  20 64 69 73 63 22 2c 30  2c 30 29 0d 15 2c 20 6d  | disc",0,0).., m|
00004770  25 3d a4 6d 65 6e 75 5f  69 74 65 6d 20 28 22 4e  |%=.menu_item ("N|
00004780  6f 72 6d 61 6c 22 2c 30  2c 30 29 0d 15 36 20 6d  |ormal",0,0)..6 m|
00004790  25 3d a4 6d 65 6e 75 5f  69 74 65 6d 20 28 22 4d  |%=.menu_item ("M|
000047a0  53 2d 44 6f 73 22 2c 30  2c 30 29 0d 15 40 24 6d  |S-Dos",0,0)..@$m|
000047b0  25 3d a4 6d 65 6e 75 5f  69 74 65 6d 20 28 22 55  |%=.menu_item ("U|
000047c0  73 65 72 20 53 70 65 63  2e 22 2c 30 2c 30 29 0d  |ser Spec.",0,0).|
000047d0  15 4a 1e 6d 25 3d a4 6d  65 6e 75 5f 69 74 65 6d  |.J.m%=.menu_item|
000047e0  20 28 22 36 34 30 4b 22  2c 30 2c 30 29 0d 15 54  | ("640K",0,0)..T|
000047f0  22 6d 25 3d a4 6d 65 6e  75 5f 69 74 65 6d 20 28  |"m%=.menu_item (|
00004800  22 44 46 53 20 33 32 30  6b 22 2c 30 2c 30 29 0d  |"DFS 320k",0,0).|
00004810  15 5e 24 6d 25 3d a4 6d  65 6e 75 5f 69 74 65 6d  |.^$m%=.menu_item|
00004820  20 28 22 44 46 53 20 33  36 30 6b 22 2c 26 38 30  | ("DFS 360k",&80|
00004830  2c 30 29 0d 15 68 24 64  72 69 76 65 5f 6d 25 3d  |,0)..h$drive_m%=|
00004840  a4 6d 65 6e 75 20 28 6d  25 2c 22 46 6c 6f 70 70  |.menu (m%,"Flopp|
00004850  79 22 2c 31 36 38 29 0d  15 72 3c e3 20 49 25 3d  |y",168)..r<. I%=|
00004860  31 b8 66 70 25 3a 61 24  3d 22 46 6c 6f 70 70 79  |1.fp%:a$="Floppy|
00004870  20 22 2b c3 28 49 25 2d  31 29 3a 6d 25 3d a4 6d  | "+.(I%-1):m%=.m|
00004880  65 6e 75 5f 69 74 65 6d  20 28 61 24 2c 30 2c 30  |enu_item (a$,0,0|
00004890  29 3a ed 0d 15 7c 56 e7  20 68 64 25 3e 30 20 6d  |):...|V. hd%>0 m|
000048a0  25 21 2d 32 34 3d 6d 25  21 2d 32 34 84 32 3a e3  |%!-24=m%!-24.2:.|
000048b0  20 49 25 3d 31 b8 68 64  25 3a 61 24 3d 22 48 61  | I%=1.hd%:a$="Ha|
000048c0  72 64 44 69 73 63 20 22  2b c3 28 49 25 2b 33 29  |rdDisc "+.(I%+3)|
000048d0  3a 6d 25 3d a4 6d 65 6e  75 5f 69 74 65 6d 20 28  |:m%=.menu_item (|
000048e0  61 24 2c 30 2c 30 29 3a  ed 0d 15 86 17 6d 25 21  |a$,0,0):.....m%!|
000048f0  2d 32 34 3d 6d 25 21 2d  32 34 20 84 20 26 38 30  |-24=m%!-24 . &80|
00004900  0d 15 90 21 6d 65 6e 75  25 3d a4 6d 65 6e 75 20  |...!menu%=.menu |
00004910  28 6d 25 2c 22 51 2e 46  2e 52 2e 22 2c 31 36 30  |(m%,"Q.F.R.",160|
00004920  29 0d 15 9a 29 6d 25 3d  a4 6d 65 6e 75 5f 69 74  |)...)m%=.menu_it|
00004930  65 6d 20 28 22 44 69 73  63 20 74 79 70 65 22 2c  |em ("Disc type",|
00004940  30 2c 74 79 70 65 5f 6d  25 29 0d 15 a4 26 6d 25  |0,type_m%)...&m%|
00004950  3d a4 6d 65 6e 75 5f 69  74 65 6d 20 28 22 44 72  |=.menu_item ("Dr|
00004960  69 76 65 22 2c 30 2c 64  72 69 76 65 5f 6d 25 29  |ive",0,drive_m%)|
00004970  0d 15 ae 22 6d 25 3d a4  6d 65 6e 75 5f 69 74 65  |..."m%=.menu_ite|
00004980  6d 28 22 48 65 6c 70 20  74 65 78 74 22 2c 30 2c  |m("Help text",0,|
00004990  30 29 0d 15 b8 24 e7 20  ac 20 68 65 6c 70 5f 4f  |0)...$. . help_O|
000049a0  4b 25 20 6d 25 21 2d 31  36 3d 6d 25 21 2d 31 36  |K% m%!-16=m%!-16|
000049b0  84 31 3c 3c 32 32 0d 15  c2 24 6d 25 3d a4 6d 65  |.1<<22...$m%=.me|
000049c0  6e 75 5f 69 74 65 6d 20  28 22 49 6e 66 6f 22 2c  |nu_item ("Info",|
000049d0  32 2c 69 6e 66 6f 5f 77  25 29 0d 15 cc 20 6d 25  |2,info_w%)... m%|
000049e0  3d a4 6d 65 6e 75 5f 69  74 65 6d 20 28 22 51 75  |=.menu_item ("Qu|
000049f0  69 74 22 2c 26 38 30 2c  30 29 0d 15 d6 05 e1 0d  |it",&80,0)......|
00004a00  15 e0 04 0d 15 ea 0b dd  f2 72 65 73 65 74 0d 15  |.........reset..|
00004a10  f4 0e f2 63 6c 6f 73 65  5f 61 6c 6c 0d 15 fe 29  |...close_all...)|
00004a20  74 79 70 65 25 3d 2d 31  3a 74 79 70 65 24 3d 22  |type%=-1:type$="|
00004a30  22 3a 66 6c 61 67 25 3d  66 6c 61 67 25 80 ac 25  |":flag%=flag%..%|
00004a40  31 31 31 30 31 0d 16 08  29 74 72 61 63 6b 25 3d  |11101...)track%=|
00004a50  30 3a 68 65 61 64 25 3d  30 3a 73 65 63 74 6f 72  |0:head%=0:sector|
00004a60  25 3d 30 3a 61 64 64 72  65 73 73 25 3d 30 0d 16  |%=0:address%=0..|
00004a70  12 28 f2 74 68 73 5f 69  63 6f 6e 73 3a f2 74 69  |.(.ths_icons:.ti|
00004a80  63 6b 5f 69 74 65 6d 28  74 79 70 65 5f 6d 25 2c  |ck_item(type_m%,|
00004a90  74 79 70 65 25 29 0d 16  1c 17 6d 61 72 6b 31 25  |type%)....mark1%|
00004aa0  3d 2d 31 3a 6d 61 72 6b  32 25 3d 2d 31 0d 16 26  |=-1:mark2%=-1..&|
00004ab0  37 21 62 6c 6b 25 3d 74  6f 6f 6c 5f 77 25 3a 62  |7!blk%=tool_w%:b|
00004ac0  6c 6b 25 21 34 3d 32 35  3a c8 99 22 57 69 6d 70  |lk%!4=25:.."Wimp|
00004ad0  5f 47 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_GetIconState",,|
00004ae0  62 6c 6b 25 0d 16 30 36  62 6c 6b 25 21 38 3d 30  |blk%..06blk%!8=0|
00004af0  3a 62 6c 6b 25 21 31 32  3d 31 3c 3c 32 31 3a c8  |:blk%!12=1<<21:.|
00004b00  99 22 57 69 6d 70 5f 53  65 74 49 63 6f 6e 53 74  |."Wimp_SetIconSt|
00004b10  61 74 65 22 2c 2c 62 6c  6b 25 0d 16 3a 37 21 62  |ate",,blk%..:7!b|
00004b20  6c 6b 25 3d 74 6f 6f 6c  5f 77 25 3a 62 6c 6b 25  |lk%=tool_w%:blk%|
00004b30  21 34 3d 32 36 3a c8 99  22 57 69 6d 70 5f 47 65  |!4=26:.."Wimp_Ge|
00004b40  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00004b50  25 0d 16 44 36 62 6c 6b  25 21 38 3d 30 3a 62 6c  |%..D6blk%!8=0:bl|
00004b60  6b 25 21 31 32 3d 31 3c  3c 32 31 3a c8 99 22 57  |k%!12=1<<21:.."W|
00004b70  69 6d 70 5f 53 65 74 49  63 6f 6e 53 74 61 74 65  |imp_SetIconState|
00004b80  22 2c 2c 62 6c 6b 25 0d  16 4e 05 e1 0d 16 58 04  |",,blk%..N....X.|
00004b90  0d 16 62 14 dd f2 73 65  74 75 70 5f 68 65 6c 70  |..b...setup_help|
00004ba0  74 65 78 74 0d 16 6c 13  48 25 3d 30 3a 68 65 6c  |text..l.H%=0:hel|
00004bb0  70 5f 4f 4b 25 3d b9 0d  16 76 21 e3 20 49 25 3d  |p_OK%=...v!. I%=|
00004bc0  68 65 6c 70 74 65 78 74  25 20 b8 20 68 65 6c 70  |helptext% . help|
00004bd0  74 65 78 74 25 2b 4c 25  0d 16 80 1a 20 e7 20 3f  |text%+L%.... . ?|
00004be0  49 25 3c 33 32 20 3f 49  25 3d 31 33 3a 48 25 2b  |I%<32 ?I%=13:H%+|
00004bf0  3d 31 0d 16 8a 05 ed 0d  16 94 4a e7 20 68 65 6c  |=1........J. hel|
00004c00  70 74 65 78 74 25 3f 28  4c 25 2d 31 29 3c 3e 31  |ptext%?(L%-1)<>1|
00004c10  33 3a 68 65 6c 70 74 65  78 74 25 3f 4c 25 3d 31  |3:helptext%?L%=1|
00004c20  33 3a 68 65 6c 70 74 65  78 74 25 3f 28 4c 25 2b  |3:helptext%?(L%+|
00004c30  31 29 3d 31 33 3a 4c 25  2b 3d 32 3a 48 25 2b 3d  |1)=13:L%+=2:H%+=|
00004c40  32 0d 16 9e 14 68 65 6c  70 74 65 78 74 25 3f 4c  |2....helptext%?L|
00004c50  25 3d 32 35 35 0d 16 a8  2f 21 62 6c 6b 25 3d 30  |%=255.../!blk%=0|
00004c60  3a 62 6c 6b 25 21 34 3d  34 36 30 3a 62 6c 6b 25  |:blk%!4=460:blk%|
00004c70  21 38 3d 31 32 38 30 3a  62 6c 6b 25 21 31 32 3d  |!8=1280:blk%!12=|
00004c80  31 30 30 34 0d 16 b2 3d  62 6c 6b 25 3f 33 32 3d  |1004...=blk%?32=|
00004c90  30 3a 62 6c 6b 25 3f 33  33 3d 38 3a 62 6c 6b 25  |0:blk%?33=8:blk%|
00004ca0  3f 33 34 3d 68 65 6c 70  5f 66 67 6e 64 25 3a 62  |?34=help_fgnd%:b|
00004cb0  6c 6b 25 3f 33 35 3d 68  65 6c 70 5f 62 67 6e 64  |lk%?35=help_bgnd|
00004cc0  25 0d 16 bc 21 62 6c 6b  25 21 34 34 3d 2d 28 48  |%...!blk%!44=-(H|
00004cd0  25 2a 33 32 29 3a 62 6c  6b 25 21 34 38 3d 31 32  |%*32):blk%!48=12|
00004ce0  34 38 0d 16 c6 2a c8 99  20 22 57 69 6d 70 5f 43  |48...*.. "Wimp_C|
00004cf0  72 65 61 74 65 57 69 6e  64 6f 77 22 2c 2c 62 6c  |reateWindow",,bl|
00004d00  6b 25 20 b8 20 68 65 6c  70 5f 77 25 0d 16 d0 05  |k% . help_w%....|
00004d10  e1 0d 16 da 04 0d 16 e4  10 dd f2 69 6e 69 74 69  |...........initi|
00004d20  61 6c 69 73 65 0d 16 ee  35 c8 99 20 22 57 69 6d  |alise...5.. "Wim|
00004d30  70 5f 49 6e 69 74 69 61  6c 69 73 65 22 2c 32 30  |p_Initialise",20|
00004d40  30 2c 26 34 42 35 33 34  31 35 34 2c 22 51 46 52  |0,&4B534154,"QFR|
00004d50  22 20 b8 20 2c 68 61 6e  64 25 0d 16 f8 23 c8 99  |" . ,hand%...#..|
00004d60  20 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  | "Wimp_SlotSize"|
00004d70  2c 2d 31 2c 2d 31 20 b8  20 6d 65 6d 25 0d 17 02  |,-1,-1 . mem%...|
00004d80  26 66 69 6c 65 62 75 66  66 25 3d 6d 65 6d 25 2b  |&filebuff%=mem%+|
00004d90  26 38 30 30 30 3a 69 6e  64 69 72 73 7a 25 3d 26  |&8000:indirsz%=&|
00004da0  33 34 30 0d 17 0c 15 ee  20 85 20 f2 72 65 70 6f  |340..... . .repo|
00004db0  72 74 5f 65 72 72 6f 72  0d 17 16 47 de 20 69 6e  |rt_error...G. in|
00004dc0  64 69 72 25 20 69 6e 64  69 72 73 7a 25 2c 20 62  |dir% indirsz%, b|
00004dd0  6c 6b 25 20 26 31 30 30  2c 20 6d 65 6e 75 62 75  |lk% &100, menubu|
00004de0  66 66 25 20 26 32 38 30  2c 20 74 69 74 6c 65 25  |ff% &280, title%|
00004df0  20 26 32 30 2c 20 64 72  65 63 25 20 26 35 30 0d  | &20, drec% &50.|
00004e00  17 20 31 de 20 63 6f 64  65 25 20 26 31 32 30 2c  |. 1. code% &120,|
00004e10  20 76 69 65 77 62 75 66  66 25 20 26 34 30 30 2c  | viewbuff% &400,|
00004e20  20 73 63 72 6e 62 75 66  66 25 20 26 31 37 30 30  | scrnbuff% &1700|
00004e30  0d 17 2a 0d f2 61 73 73  65 6d 62 6c 65 0d 17 34  |..*..assemble..4|
00004e40  3b 24 74 69 74 6c 65 25  3d 22 48 75 67 6f 22 3a  |;$title%="Hugo":|
00004e50  68 67 25 3d 21 74 69 74  6c 65 25 3a 24 74 69 74  |hg%=!title%:$tit|
00004e60  6c 65 25 3d 22 51 75 69  63 6b 20 46 69 6c 65 20  |le%="Quick File |
00004e70  52 65 63 6f 76 65 72 22  0d 17 3e 54 e7 20 a4 77  |Recover"..>T. .w|
00004e80  6b 73 70 63 28 26 32 30  30 30 29 3d a3 20 49 25  |kspc(&2000)=. I%|
00004e90  3d a4 61 6c 65 72 74 28  22 55 6e 61 62 6c 65 20  |=.alert("Unable |
00004ea0  74 6f 20 63 6c 61 69 6d  20 73 75 66 66 69 63 69  |to claim suffici|
00004eb0  65 6e 74 20 77 6f 72 6b  73 70 61 63 65 20 74 6f  |ent workspace to|
00004ec0  20 72 75 6e 21 22 29 3a  f2 64 69 65 0d 17 48 14  | run!"):.die..H.|
00004ed0  c8 99 22 48 6f 75 72 67  6c 61 73 73 5f 4f 6e 22  |.."Hourglass_On"|
00004ee0  0d 17 52 32 c8 99 20 22  57 69 6d 70 5f 4f 70 65  |..R2.. "Wimp_Ope|
00004ef0  6e 54 65 6d 70 6c 61 74  65 22 2c 2c 22 3c 4f 62  |nTemplate",,"<Ob|
00004f00  65 79 24 44 69 72 3e 2e  54 65 6d 70 6c 61 74 65  |ey$Dir>.Template|
00004f10  73 22 0d 17 5c 4f c8 99  20 22 57 69 6d 70 5f 4c  |s"..\O.. "Wimp_L|
00004f20  6f 61 64 54 65 6d 70 6c  61 74 65 22 2c 2c 66 69  |oadTemplate",,fi|
00004f30  6c 65 62 75 66 66 25 2c  69 6e 64 69 72 25 2c 69  |lebuff%,indir%,i|
00004f40  6e 64 69 72 25 2b 69 6e  64 69 72 73 7a 25 2c 2d  |ndir%+indirsz%,-|
00004f50  31 2c 22 69 6e 66 6f 22  2c 30 20 b8 20 2c 2c 52  |1,"info",0 . ,,R|
00004f60  25 0d 17 66 2f c8 99 20  22 57 69 6d 70 5f 43 72  |%..f/.. "Wimp_Cr|
00004f70  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 66 69 6c  |eateWindow",,fil|
00004f80  65 62 75 66 66 25 20 b8  20 69 6e 66 6f 5f 77 25  |ebuff% . info_w%|
00004f90  0d 17 70 4d c8 99 20 22  57 69 6d 70 5f 4c 6f 61  |..pM.. "Wimp_Loa|
00004fa0  64 54 65 6d 70 6c 61 74  65 22 2c 2c 66 69 6c 65  |dTemplate",,file|
00004fb0  62 75 66 66 25 2c 52 25  2c 69 6e 64 69 72 25 2b  |buff%,R%,indir%+|
00004fc0  69 6e 64 69 72 73 7a 25  2c 2d 31 2c 22 64 65 66  |indirsz%,-1,"def|
00004fd0  69 6e 65 22 2c 30 20 b8  20 2c 2c 52 25 0d 17 7a  |ine",0 . ,,R%..z|
00004fe0  31 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  |1.. "Wimp_Create|
00004ff0  57 69 6e 64 6f 77 22 2c  2c 66 69 6c 65 62 75 66  |Window",,filebuf|
00005000  66 25 20 b8 20 64 65 66  69 6e 65 5f 77 25 0d 17  |f% . define_w%..|
00005010  84 4d c8 99 20 22 57 69  6d 70 5f 4c 6f 61 64 54  |.M.. "Wimp_LoadT|
00005020  65 6d 70 6c 61 74 65 22  2c 2c 66 69 6c 65 62 75  |emplate",,filebu|
00005030  66 66 25 2c 52 25 2c 69  6e 64 69 72 25 2b 69 6e  |ff%,R%,indir%+in|
00005040  64 69 72 73 7a 25 2c 2d  31 2c 22 65 6e 64 72 65  |dirsz%,-1,"endre|
00005050  63 22 2c 30 20 b8 20 2c  2c 52 25 0d 17 8e 31 c8  |c",0 . ,,R%...1.|
00005060  99 20 22 57 69 6d 70 5f  43 72 65 61 74 65 57 69  |. "Wimp_CreateWi|
00005070  6e 64 6f 77 22 2c 2c 66  69 6c 65 62 75 66 66 25  |ndow",,filebuff%|
00005080  20 b8 20 65 6e 64 72 65  63 5f 77 25 0d 17 98 4b  | . endrec_w%...K|
00005090  c8 99 20 22 57 69 6d 70  5f 4c 6f 61 64 54 65 6d  |.. "Wimp_LoadTem|
000050a0  70 6c 61 74 65 22 2c 2c  66 69 6c 65 62 75 66 66  |plate",,filebuff|
000050b0  25 2c 52 25 2c 69 6e 64  69 72 25 2b 69 6e 64 69  |%,R%,indir%+indi|
000050c0  72 73 7a 25 2c 2d 31 2c  22 74 6f 6f 6c 22 2c 30  |rsz%,-1,"tool",0|
000050d0  20 b8 20 2c 2c 52 25 0d  17 a2 2f c8 99 20 22 57  | . ,,R%.../.. "W|
000050e0  69 6d 70 5f 43 72 65 61  74 65 57 69 6e 64 6f 77  |imp_CreateWindow|
000050f0  22 2c 2c 66 69 6c 65 62  75 66 66 25 20 b8 20 74  |",,filebuff% . t|
00005100  6f 6f 6c 5f 77 25 0d 17  ac 4b c8 99 20 22 57 69  |ool_w%...K.. "Wi|
00005110  6d 70 5f 4c 6f 61 64 54  65 6d 70 6c 61 74 65 22  |mp_LoadTemplate"|
00005120  2c 2c 66 69 6c 65 62 75  66 66 25 2c 52 25 2c 69  |,,filebuff%,R%,i|
00005130  6e 64 69 72 25 2b 69 6e  64 69 72 73 7a 25 2c 2d  |ndir%+indirsz%,-|
00005140  31 2c 22 73 61 76 65 22  2c 30 20 b8 20 2c 2c 52  |1,"save",0 . ,,R|
00005150  25 0d 17 b6 2f c8 99 20  22 57 69 6d 70 5f 43 72  |%.../.. "Wimp_Cr|
00005160  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 66 69 6c  |eateWindow",,fil|
00005170  65 62 75 66 66 25 20 b8  20 73 61 76 65 5f 77 25  |ebuff% . save_w%|
00005180  0d 17 c0 1b c8 99 20 22  57 69 6d 70 5f 43 6c 6f  |...... "Wimp_Clo|
00005190  73 65 54 65 6d 70 6c 61  74 65 22 0d 17 ca 4b 21  |seTemplate"...K!|
000051a0  62 6c 6b 25 3d 69 6e 66  6f 5f 77 25 3a 62 6c 6b  |blk%=info_w%:blk|
000051b0  25 21 34 3d 30 3a c8 99  20 22 57 69 6d 70 5f 47  |%!4=0:.. "Wimp_G|
000051c0  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
000051d0  6b 25 3a 24 28 62 6c 6b  25 21 32 38 29 3d 76 65  |k%:$(blk%!28)=ve|
000051e0  72 73 69 6f 6e 24 0d 17  d4 1f e3 20 49 25 3d 62  |rsion$..... I%=b|
000051f0  6c 6b 25 b8 62 6c 6b 25  2b 38 34 88 34 3a 21 49  |lk%.blk%+84.4:!I|
00005200  25 3d 30 3a ed 0d 17 de  0e 77 5f 65 78 74 25 3d  |%=0:.....w_ext%=|
00005210  35 31 32 0d 17 e8 39 21  62 6c 6b 25 3d 36 34 3a  |512...9!blk%=64:|
00005220  62 6c 6b 25 21 34 3d 34  36 30 3a 62 6c 6b 25 21  |blk%!4=460:blk%!|
00005230  38 3d 36 34 2b 31 31 35  32 3a 62 6c 6b 25 21 31  |8=64+1152:blk%!1|
00005240  32 3d 34 36 30 2b 77 5f  65 78 74 25 0d 17 f2 40  |2=460+w_ext%...@|
00005250  62 6c 6b 25 21 32 34 3d  2d 31 3a 62 6c 6b 25 21  |blk%!24=-1:blk%!|
00005260  32 38 3d 26 46 46 30 30  30 30 30 46 3a 62 6c 6b  |28=&FF00000F:blk|
00005270  25 21 33 32 3d 26 31 30  37 30 32 30 37 3a 62 6c  |%!32=&1070207:bl|
00005280  6b 25 21 33 36 3d 26 43  30 31 30 33 0d 17 fc 38  |k%!36=&C0103...8|
00005290  62 6c 6b 25 21 34 34 3d  2d 35 31 32 3a 62 6c 6b  |blk%!44=-512:blk|
000052a0  25 21 34 38 3d 31 31 35  32 3a 62 6c 6b 25 21 35  |%!48=1152:blk%!5|
000052b0  36 3d 26 31 33 44 3a 62  6c 6b 25 21 36 30 3d 33  |6=&13D:blk%!60=3|
000052c0  3c 3c 31 32 0d 18 06 12  62 6c 6b 25 21 37 32 3d  |<<12....blk%!72=|
000052d0  74 69 74 6c 65 25 0d 18  10 2a c8 99 20 22 57 69  |title%...*.. "Wi|
000052e0  6d 70 5f 43 72 65 61 74  65 57 69 6e 64 6f 77 22  |mp_CreateWindow"|
000052f0  2c 2c 62 6c 6b 25 20 b8  20 76 69 65 77 5f 77 25  |,,blk% . view_w%|
00005300  0d 18 1a 0e 68 65 6c 70  5f 4f 4b 25 3d a3 0d 18  |....help_OK%=...|
00005310  24 33 c8 99 22 4f 53 5f  46 69 6c 65 22 2c 31 37  |$3.."OS_File",17|
00005320  2c 22 3c 4f 62 65 79 24  44 69 72 3e 2e 48 65 6c  |,"<Obey$Dir>.Hel|
00005330  70 54 65 78 74 22 20 b8  20 44 25 2c 2c 2c 2c 4c  |pText" . D%,,,,L|
00005340  25 0d 18 2e 0c e7 20 44  25 3d 31 20 8c 0d 18 38  |%..... D%=1 ...8|
00005350  17 20 de 20 68 65 6c 70  74 65 78 74 25 20 4c 25  |. . helptext% L%|
00005360  2b 26 32 30 0d 18 42 41  20 c8 99 20 22 58 4f 53  |+&20..BA .. "XOS|
00005370  5f 46 69 6c 65 22 2c 31  36 2c 22 3c 4f 62 65 79  |_File",16,"<Obey|
00005380  24 44 69 72 3e 2e 48 65  6c 70 54 65 78 74 22 2c  |$Dir>.HelpText",|
00005390  68 65 6c 70 74 65 78 74  25 2c 30 20 b8 20 65 72  |helptext%,0 . er|
000053a0  72 25 3b 46 25 0d 18 4c  26 20 e7 20 46 25 80 31  |r%;F%..L& . F%.1|
000053b0  20 f2 78 5f 65 72 72 6f  72 20 8b 20 f2 73 65 74  | .x_error . .set|
000053c0  75 70 5f 68 65 6c 70 74  65 78 74 0d 18 56 05 cc  |up_helptext..V..|
000053d0  0d 18 60 4a 20 49 25 3d  a4 61 6c 65 72 74 28 22  |..`J I%=.alert("|
000053e0  48 65 6c 70 20 54 65 78  74 20 6e 6f 74 20 66 6f  |Help Text not fo|
000053f0  75 6e 64 20 73 6f 20 6e  6f 20 69 6e 73 74 72 75  |und so no instru|
00005400  63 74 69 6f 6e 73 20 77  69 6c 6c 20 62 65 20 61  |ctions will be a|
00005410  76 61 69 6c 61 62 6c 65  22 29 0d 18 6a 05 cd 0d  |vailable")..j...|
00005420  18 74 1f c8 99 20 22 41  44 46 53 5f 44 72 69 76  |.t... "ADFS_Driv|
00005430  65 73 22 20 b8 20 2c 66  70 25 2c 68 64 25 0d 18  |es" . ,fp%,hd%..|
00005440  7e 30 63 79 6c 73 25 3d  38 30 3a 68 65 61 64 73  |~0cyls%=80:heads|
00005450  25 3d 32 3a 73 65 63 73  5f 74 72 6b 25 3d 35 3a  |%=2:secs_trk%=5:|
00005460  73 65 63 5f 73 69 7a 65  25 3d 26 34 30 30 0d 18  |sec_size%=&400..|
00005470  88 28 64 72 69 76 65 25  3d 30 3a 6d 68 25 3d 33  |.(drive%=0:mh%=3|
00005480  35 34 3a 66 6c 61 67 25  3d 32 3a 63 68 75 6e 6b  |54:flag%=2:chunk|
00005490  25 3d 26 34 30 30 0d 18  92 17 6d 61 73 6b 25 3d  |%=&400....mask%=|
000054a0  25 31 31 30 30 30 30 31  31 30 30 30 31 0d 18 9c  |%110000110001...|
000054b0  35 f2 68 65 6c 70 5f 73  74 72 69 6e 67 73 3a f2  |5.help_strings:.|
000054c0  63 72 65 61 74 65 5f 6d  65 6e 75 3a f2 74 69 63  |create_menu:.tic|
000054d0  6b 5f 69 74 65 6d 28 64  72 69 76 65 5f 6d 25 2c  |k_item(drive_m%,|
000054e0  30 29 0d 18 a6 23 f2 72  65 73 65 74 3a f2 74 79  |0)...#.reset:.ty|
000054f0  70 65 5f 69 63 6f 6e 73  3a 49 25 3d a4 77 6b 73  |pe_icons:I%=.wks|
00005500  70 63 28 30 29 0d 18 b0  2a 62 6c 6b 25 21 30 3d  |pc(0)...*blk%!0=|
00005510  2d 31 3a 62 6c 6b 25 21  34 3d 30 3a 62 6c 6b 25  |-1:blk%!4=0:blk%|
00005520  21 38 3d 30 3a 62 6c 6b  25 21 31 32 3d 35 36 0d  |!8=0:blk%!12=56.|
00005530  18 ba 2e 62 6c 6b 25 21  31 36 3d 39 36 3a 62 6c  |...blk%!16=96:bl|
00005540  6b 25 21 32 30 3d 26 32  30 30 32 3a 24 28 62 6c  |k%!20=&2002:$(bl|
00005550  6b 25 2b 32 34 29 3d 22  21 51 46 52 22 0d 18 c4  |k%+24)="!QFR"...|
00005560  26 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  |&.. "Wimp_Create|
00005570  49 63 6f 6e 22 2c 2c 62  6c 6b 25 20 b8 20 69 63  |Icon",,blk% . ic|
00005580  6f 6e 25 0d 18 ce 47 70  61 74 68 24 3d 22 22 3a  |on%...Gpath$="":|
00005590  c8 99 20 22 58 4f 53 5f  52 65 61 64 56 61 72 56  |.. "XOS_ReadVarV|
000055a0  61 6c 22 2c 22 71 66 72  73 61 76 65 24 70 61 74  |al","qfrsave$pat|
000055b0  68 22 2c 76 69 65 77 62  75 66 66 25 2c 2d 31 2c  |h",viewbuff%,-1,|
000055c0  30 2c 30 20 b8 20 2c 2c  46 25 0d 18 d8 0d e7 20  |0,0 . ,,F%..... |
000055d0  46 25 20 3c 30 20 8c 0d  18 e2 41 20 c8 99 20 22  |F% <0 ....A .. "|
000055e0  4f 53 5f 52 65 61 64 56  61 72 56 61 6c 22 2c 22  |OS_ReadVarVal","|
000055f0  71 66 72 73 61 76 65 24  70 61 74 68 22 2c 76 69  |qfrsave$path",vi|
00005600  65 77 62 75 66 66 25 2c  26 33 46 2c 30 2c 30 20  |ewbuff%,&3F,0,0 |
00005610  b8 20 2c 2c 6c 65 6e 25  0d 18 ec 27 20 76 69 65  |. ,,len%...' vie|
00005620  77 62 75 66 66 25 3f 6c  65 6e 25 3d 31 33 3a 70  |wbuff%?len%=13:p|
00005630  61 74 68 24 3d 24 76 69  65 77 62 75 66 66 25 0d  |ath$=$viewbuff%.|
00005640  18 f6 1f 20 e7 20 c2 70  61 74 68 24 29 20 3c 3e  |... . .path$) <>|
00005650  22 2e 22 20 70 61 74 68  24 2b 3d 22 2e 22 0d 19  |"." path$+="."..|
00005660  00 05 cd 0d 19 0a 15 c8  99 22 48 6f 75 72 67 6c  |........."Hourgl|
00005670  61 73 73 5f 4f 66 66 22  0d 19 14 05 e1 0d 19 1e  |ass_Off"........|
00005680  04 0d 19 28 21 20 20 20  20 25 25 25 25 25 25 25  |...(!    %%%%%%%|
00005690  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
000056a0  25 25 0d 19 32 21 20 20  20 20 49 6e 74 65 72 61  |%%..2!    Intera|
000056b0  63 74 69 76 65 20 48 65  6c 70 20 72 6f 75 74 69  |ctive Help routi|
000056c0  6e 65 73 0d 19 3c 21 20  20 20 20 25 25 25 25 25  |nes..<!    %%%%%|
000056d0  25 25 25 25 25 25 25 25  25 25 25 25 25 25 25 25  |%%%%%%%%%%%%%%%%|
000056e0  25 25 25 25 0d 19 46 04  0d 19 50 12 dd f2 68 65  |%%%%..F...P...he|
000056f0  6c 70 5f 73 74 72 69 6e  67 73 0d 19 5a 61 63 6b  |lp_strings..Zack|
00005700  31 24 3d 22 43 6c 69 63  6b 20 77 69 74 68 20 53  |1$="Click with S|
00005710  45 4c 45 43 54 20 74 6f  20 6c 6f 61 64 20 61 6e  |ELECT to load an|
00005720  64 20 76 69 65 77 20 74  68 65 20 6e 65 77 20 73  |d view the new s|
00005730  65 63 74 6f 72 20 6f 72  20 41 44 4a 55 53 54 20  |ector or ADJUST |
00005740  74 6f 20 6a 75 73 74 20  63 68 61 6e 67 65 20 74  |to just change t|
00005750  68 65 20 61 64 64 72 65  73 73 22 0d 19 64 2f 63  |he address"..d/c|
00005760  6b 32 24 3d 22 43 6c 69  63 6b 20 68 65 72 65 20  |k2$="Click here |
00005770  74 6f 20 22 3a 74 73 24  3d 22 54 68 69 73 20 73  |to ":ts$="This s|
00005780  68 6f 77 73 20 74 68 65  20 22 0d 19 6e 3c 67 74  |hows the "..n<gt|
00005790  24 3d 22 7c 4d 49 66 20  79 6f 75 20 70 72 65 73  |$="|MIf you pres|
000057a0  73 20 52 45 54 55 52 4e  20 79 6f 75 20 77 69 6c  |s RETURN you wil|
000057b0  6c 20 67 6f 20 74 6f 20  74 68 65 20 6e 65 78 74  |l go to the next|
000057c0  20 69 74 65 6d 22 0d 19  78 05 e1 0d 19 82 04 0d  | item"..x.......|
000057d0  19 8c 0a dd f2 68 65 6c  70 0d 19 96 2a 24 28 62  |.....help...*$(b|
000057e0  6c 6b 25 2b 32 30 29 3d  a4 66 69 6e 64 5f 68 65  |lk%+20)=.find_he|
000057f0  6c 70 28 62 6c 6b 25 21  33 32 2c 62 6c 6b 25 21  |lp(blk%!32,blk%!|
00005800  33 36 29 0d 19 a0 1f 62  6c 6b 25 21 31 36 3d 26  |36)....blk%!16=&|
00005810  35 30 33 3a 62 6c 6b 25  21 31 32 3d 62 6c 6b 25  |503:blk%!12=blk%|
00005820  21 38 0d 19 aa 1d 21 62  6c 6b 25 3d 28 a9 24 28  |!8....!blk%=(.$(|
00005830  62 6c 6b 25 2b 32 30 29  2b 32 35 29 80 ac 33 0d  |blk%+20)+25)..3.|
00005840  19 b4 27 c8 99 22 57 69  6d 70 5f 53 65 6e 64 4d  |..'.."Wimp_SendM|
00005850  65 73 73 61 67 65 22 2c  31 37 2c 62 6c 6b 25 2c  |essage",17,blk%,|
00005860  62 6c 6b 25 21 34 0d 19  be 05 e1 0d 19 c8 04 0d  |blk%!4..........|
00005870  19 d2 16 dd a4 66 69 6e  64 5f 68 65 6c 70 28 77  |.....find_help(w|
00005880  25 2c 69 25 29 0d 19 dc  0b c8 8e 20 77 25 20 ca  |%,i%)...... w% .|
00005890  0d 19 e6 0e c9 20 74 6f  6f 6c 5f 77 25 3a 0d 19  |..... tool_w%:..|
000058a0  f0 0c 20 c8 8e 20 69 25  20 ca 0d 19 fa 38 20 20  |.. .. i% ....8  |
000058b0  c9 20 31 37 3a 3d 63 6b  32 24 2b 22 64 69 73 70  |. 17:=ck2$+"disp|
000058c0  6c 61 79 20 73 65 63 74  6f 72 73 20 69 6e 20 48  |lay sectors in H|
000058d0  65 78 61 64 65 63 69 6d  61 6c 20 66 6f 72 6d 61  |exadecimal forma|
000058e0  74 22 0d 1a 04 31 20 20  c9 20 31 38 3a 3d 63 6b  |t"...1  . 18:=ck|
000058f0  32 24 2b 22 64 69 73 70  6c 61 79 20 73 65 63 74  |2$+"display sect|
00005900  6f 72 73 20 69 6e 20 54  65 78 74 20 66 6f 72 6d  |ors in Text form|
00005910  61 74 22 0d 1a 0e 1f 20  20 c9 20 31 39 3a 3d 74  |at"....  . 19:=t|
00005920  73 24 2b 22 63 75 72 72  65 6e 74 20 44 72 69 76  |s$+"current Driv|
00005930  65 22 0d 1a 18 2d 20 20  c9 20 32 30 3a 3d 74 73  |e"...-  . 20:=ts|
00005940  24 2b 22 74 79 70 65 20  6f 66 20 64 69 73 6b 20  |$+"type of disk |
00005950  62 65 69 6e 67 20 65 78  61 6d 69 6e 65 64 22 0d  |being examined".|
00005960  1a 22 1f 20 20 c9 20 32  31 3a 3d 74 73 24 2b 22  |.".  . 21:=ts$+"|
00005970  63 75 72 72 65 6e 74 20  54 72 61 63 6b 22 0d 1a  |current Track"..|
00005980  2c 1e 20 20 c9 20 32 32  3a 3d 74 73 24 2b 22 63  |,.  . 22:=ts$+"c|
00005990  75 72 72 65 6e 74 20 48  65 61 64 22 0d 1a 36 20  |urrent Head"..6 |
000059a0  20 20 c9 20 32 33 3a 3d  74 73 24 2b 22 63 75 72  |  . 23:=ts$+"cur|
000059b0  72 65 6e 74 20 53 65 63  74 6f 72 22 0d 1a 40 50  |rent Sector"..@P|
000059c0  20 20 c9 20 32 34 3a 3d  22 54 68 69 73 20 69 73  |  . 24:="This is|
000059d0  20 74 68 65 20 63 75 72  72 65 6e 74 20 44 69 73  | the current Dis|
000059e0  6b 20 41 64 64 72 65 73  73 7c 4d 59 6f 75 20 63  |k Address|MYou c|
000059f0  61 6e 20 65 6e 74 65 72  20 61 20 6e 65 77 20 41  |an enter a new A|
00005a00  64 64 72 65 73 73 20 68  65 72 65 22 0d 1a 4a 42  |ddress here"..JB|
00005a10  20 20 c9 20 32 35 2c 32  36 3a 3d 22 43 6c 69 63  |  . 25,26:="Clic|
00005a20  6b 20 6f 6e 20 65 69 74  68 65 72 20 6f 66 20 74  |k on either of t|
00005a30  68 65 73 65 20 74 6f 20  53 65 74 20 6f 72 20 55  |hese to Set or U|
00005a40  6e 73 65 74 20 61 20 4d  61 72 6b 65 72 22 0d 1a  |nset a Marker"..|
00005a50  54 4f 20 20 c9 20 32 37  3a 3d 63 6b 32 24 2b 22  |TO  . 27:=ck2$+"|
00005a60  6c 6f 61 64 20 61 20 6e  65 77 20 73 65 63 74 6f  |load a new secto|
00005a70  72 20 6f 72 20 72 65 2d  6f 70 65 6e 20 74 68 65  |r or re-open the|
00005a80  20 6d 61 69 6e 20 77 69  6e 64 6f 77 20 69 66 20  | main window if |
00005a90  69 74 20 69 73 20 63 6c  6f 73 65 64 22 0d 1a 5e  |it is closed"..^|
00005aa0  30 20 20 c9 20 32 38 3a  3d 63 6b 32 24 2b 22 73  |0  . 28:=ck2$+"s|
00005ab0  74 65 70 20 66 6f 72 77  61 72 64 20 6f 6e 65 20  |tep forward one |
00005ac0  54 72 61 63 6b 7c 4d 22  2b 63 6b 31 24 0d 1a 68  |Track|M"+ck1$..h|
00005ad0  32 20 20 c9 20 32 39 3a  3d 63 6b 32 24 2b 22 73  |2  . 29:=ck2$+"s|
00005ae0  74 65 70 20 62 61 63 6b  77 61 72 64 73 20 6f 6e  |tep backwards on|
00005af0  65 20 54 72 61 63 6b 7c  4d 22 2b 63 6b 31 24 0d  |e Track|M"+ck1$.|
00005b00  1a 72 2f 20 20 c9 20 33  30 3a 3d 63 6b 32 24 2b  |.r/  . 30:=ck2$+|
00005b10  22 6d 6f 76 65 20 74 6f  20 74 68 65 20 6e 65 78  |"move to the nex|
00005b20  74 20 48 65 61 64 7c 4d  22 2b 63 6b 31 24 0d 1a  |t Head|M"+ck1$..|
00005b30  7c 33 20 20 c9 20 33 31  3a 3d 63 6b 32 24 2b 22  ||3  . 31:=ck2$+"|
00005b40  6d 6f 76 65 20 74 6f 20  74 68 65 20 70 72 65 76  |move to the prev|
00005b50  69 6f 75 73 20 48 65 61  64 7c 4d 22 2b 63 6b 31  |ious Head|M"+ck1|
00005b60  24 0d 1a 86 31 20 20 c9  20 33 32 3a 3d 63 6b 32  |$...1  . 32:=ck2|
00005b70  24 2b 22 73 74 65 70 20  66 6f 72 77 61 72 64 20  |$+"step forward |
00005b80  6f 6e 65 20 53 65 63 74  6f 72 7c 4d 22 2b 63 6b  |one Sector|M"+ck|
00005b90  31 24 0d 1a 90 33 20 20  c9 20 33 33 3a 3d 63 6b  |1$...3  . 33:=ck|
00005ba0  32 24 2b 22 73 74 65 70  20 62 61 63 6b 77 61 72  |2$+"step backwar|
00005bb0  64 73 20 6f 6e 65 20 53  65 63 74 6f 72 7c 4d 22  |ds one Sector|M"|
00005bc0  2b 63 6b 31 24 0d 1a 9a  54 20 20 c9 20 33 34 3a  |+ck1$...T  . 34:|
00005bd0  3d 22 57 68 65 6e 20 79  6f 75 20 68 61 76 65 20  |="When you have |
00005be0  66 6f 75 6e 64 20 61 6e  64 20 6d 61 72 6b 65 64  |found and marked|
00005bf0  20 74 68 65 20 64 61 74  61 20 79 6f 75 20 77 61  | the data you wa|
00005c00  6e 74 20 74 6f 20 72 65  63 6f 76 65 72 20 63 6c  |nt to recover cl|
00005c10  69 63 6b 20 68 65 72 65  22 0d 1a a4 06 20 cb 0d  |ick here".... ..|
00005c20  1a ae 0f c9 20 65 6e 64  72 65 63 5f 77 25 0d 1a  |.... endrec_w%..|
00005c30  b8 0c 20 c8 8e 20 69 25  20 ca 0d 1a c2 57 20 20  |.. .. i% ....W  |
00005c40  c9 20 31 3a 3d 63 6b 32  24 2b 22 65 6e 74 65 72  |. 1:=ck2$+"enter|
00005c50  20 61 6e 20 41 62 73 6f  6c 75 74 65 20 44 69 73  | an Absolute Dis|
00005c60  6b 20 41 64 64 72 65 73  73 7c 4d 54 68 65 6e 20  |k Address|MThen |
00005c70  70 72 65 73 73 20 52 45  54 55 52 4e 20 74 6f 20  |press RETURN to |
00005c80  72 65 63 6f 76 65 72 20  74 68 65 20 64 61 74 61  |recover the data|
00005c90  22 0d 1a cc 60 20 20 c9  20 32 3a 3d 63 6b 32 24  |"...`  . 2:=ck2$|
00005ca0  2b 22 65 6e 74 65 72 20  74 68 65 20 6c 65 6e 67  |+"enter the leng|
00005cb0  74 68 20 6f 66 20 74 68  65 20 64 61 74 61 20 79  |th of the data y|
00005cc0  6f 75 20 77 61 6e 74 20  74 6f 20 72 65 63 6f 76  |ou want to recov|
00005cd0  65 72 7c 4d 54 68 65 6e  20 70 72 65 73 73 20 52  |er|MThen press R|
00005ce0  45 54 55 52 4e 20 74 6f  20 73 61 76 65 20 69 74  |ETURN to save it|
00005cf0  22 0d 1a d6 06 20 cb 0d  1a e0 0f c9 20 64 65 66  |".... ...... def|
00005d00  69 6e 65 5f 77 25 0d 1a  ea 0c 20 c8 8e 20 69 25  |ine_w%.... .. i%|
00005d10  20 ca 0d 1a f4 30 20 20  c9 20 31 3a 3d 22 45 6e  | ....0  . 1:="En|
00005d20  74 65 72 20 74 68 65 20  6e 75 6d 62 65 72 20 6f  |ter the number o|
00005d30  66 20 54 72 61 63 6b 73  20 68 65 72 65 22 2b 67  |f Tracks here"+g|
00005d40  74 24 0d 1a fe 2f 20 20  c9 20 32 3a 3d 22 45 6e  |t$.../  . 2:="En|
00005d50  74 65 72 20 74 68 65 20  6e 75 6d 62 65 72 20 6f  |ter the number o|
00005d60  66 20 48 65 61 64 73 20  68 65 72 65 22 2b 67 74  |f Heads here"+gt|
00005d70  24 0d 1b 08 3b 20 20 c9  20 33 3a 3d 22 45 6e 74  |$...;  . 3:="Ent|
00005d80  65 72 20 74 68 65 20 6e  75 6d 62 65 72 20 6f 66  |er the number of|
00005d90  20 53 65 63 74 6f 72 73  20 70 65 72 20 54 72 61  | Sectors per Tra|
00005da0  63 6b 20 68 65 72 65 22  2b 67 74 24 0d 1b 12 5d  |ck here"+gt$...]|
00005db0  20 20 c9 20 34 3a 3d 22  45 6e 74 65 72 20 74 68  |  . 4:="Enter th|
00005dc0  65 20 53 65 63 74 6f 72  20 53 69 7a 65 20 68 65  |e Sector Size he|
00005dd0  72 65 7c 4d 49 66 20 79  6f 75 20 70 72 65 73 73  |re|MIf you press|
00005de0  20 52 45 54 55 52 4e 20  74 68 69 73 20 77 69 6c  | RETURN this wil|
00005df0  6c 20 62 65 63 6f 6d 65  20 74 68 65 20 44 69 73  |l become the Dis|
00005e00  6b 20 46 6f 72 6d 61 74  22 0d 1b 1c 06 20 cb 0d  |k Format".... ..|
00005e10  1b 26 0d c9 20 73 61 76  65 5f 77 25 0d 1b 30 0c  |.&.. save_w%..0.|
00005e20  20 c8 8e 20 69 25 20 ca  0d 1b 3a 47 20 20 c9 20  | .. i% ...:G  . |
00005e30  30 3a 3d 22 44 72 61 67  20 74 68 69 73 20 74 6f  |0:="Drag this to|
00005e40  20 61 20 44 69 72 65 63  74 6f 72 79 20 56 69 65  | a Directory Vie|
00005e50  77 65 72 20 74 6f 20 73  61 76 65 20 74 68 65 20  |wer to save the |
00005e60  72 65 63 6f 76 65 72 65  64 20 64 61 74 61 22 0d  |recovered data".|
00005e70  1b 44 35 20 20 c9 20 31  3a 3d 22 45 6e 74 65 72  |.D5  . 1:="Enter|
00005e80  20 61 20 6e 61 6d 65 20  66 6f 72 20 74 68 65 20  | a name for the |
00005e90  72 65 63 6f 76 65 72 65  64 20 66 69 6c 65 20 68  |recovered file h|
00005ea0  65 72 65 22 0d 1b 4e 6a  20 20 c9 20 32 3a 3d 22  |ere"..Nj  . 2:="|
00005eb0  4f 6e 6c 79 20 75 73 65  20 74 68 69 73 20 69 66  |Only use this if|
00005ec0  20 79 6f 75 20 68 61 76  65 20 73 65 74 20 61 20  | you have set a |
00005ed0  53 61 76 65 20 50 61 74  68 20 76 61 72 69 61 62  |Save Path variab|
00005ee0  6c 65 20 6f 72 20 65 6e  74 65 72 65 64 20 61 20  |le or entered a |
00005ef0  66 75 6c 6c 20 64 72 69  76 65 2f 64 69 72 65 63  |full drive/direc|
00005f00  74 6f 72 79 2f 66 69 6c  65 6e 61 6d 65 22 0d 1b  |tory/filename"..|
00005f10  58 06 20 cb 0d 1b 62 c2  c9 20 2d 32 3a e7 20 69  |X. ...b.. -2:. i|
00005f20  25 3d 69 63 6f 6e 25 3a  3d 22 54 68 69 73 20 69  |%=icon%:="This i|
00005f30  73 20 74 68 65 20 51 75  69 63 6b 20 46 69 6c 65  |s the Quick File|
00005f40  20 52 65 63 6f 76 65 72  20 69 63 6f 6e 7c 4d 43  | Recover icon|MC|
00005f50  6c 69 63 6b 20 77 69 74  68 20 4d 45 4e 55 20 74  |lick with MENU t|
00005f60  6f 20 64 69 73 70 6c 61  79 20 74 68 65 20 6d 65  |o display the me|
00005f70  6e 75 73 7c 4d 43 6c 69  63 6b 20 77 69 74 68 20  |nus|MClick with |
00005f80  53 45 4c 45 43 54 20 61  66 74 65 72 20 79 6f 75  |SELECT after you|
00005f90  20 68 61 76 65 20 73 65  6c 65 63 74 65 64 20 74  | have selected t|
00005fa0  68 65 20 44 72 69 76 65  20 61 6e 64 20 44 69 73  |he Drive and Dis|
00005fb0  6b 20 46 6f 72 6d 61 74  20 74 6f 20 64 69 73 70  |k Format to disp|
00005fc0  6c 61 79 20 74 68 65 20  64 69 73 6b 20 63 6f 6e  |lay the disk con|
00005fd0  74 65 6e 74 73 22 0d 1b  6c 05 cb 0d 1b 76 07 3d  |tents"..l....v.=|
00005fe0  22 22 0d 1b 80 04 0d 1b  8a 0e dd f2 61 73 73 65  |""..........asse|
00005ff0  6d 62 6c 65 0d 1b 94 10  e3 20 50 41 53 53 3d 30  |mble..... PASS=0|
00006000  b8 32 88 32 0d 1b 9e 0c  50 25 3d 63 6f 64 65 25  |.2.2....P%=code%|
00006010  0d 1b a8 0c 5b 4f 50 54  50 41 53 53 0d 1b b2 0e  |....[OPTPASS....|
00006020  6d 6f 76 20 72 31 30 2c  72 32 0d 1b bc 31 61 64  |mov r10,r2...1ad|
00006030  72 20 72 31 32 2c 64 61  74 61 3a 6c 64 72 20 72  |r r12,data:ldr r|
00006040  33 2c 5b 72 31 32 2c 23  30 5d 3a 61 64 64 20 72  |3,[r12,#0]:add r|
00006050  34 2c 72 33 2c 23 26 31  36 34 30 0d 1b c6 11 6d  |4,r3,#&1640....m|
00006060  6f 76 20 72 31 2c 23 26  30 44 32 30 0d 1b d0 2c  |ov r1,#&0D20...,|
00006070  2e 6c 6f 6f 70 20 73 74  72 20 72 31 2c 5b 72 33  |.loop str r1,[r3|
00006080  5d 2c 23 37 32 3a 63 6d  70 20 72 33 2c 72 34 3a  |],#72:cmp r3,r4:|
00006090  62 6c 74 20 6c 6f 6f 70  0d 1b da 1a 74 73 74 20  |blt loop....tst |
000060a0  72 35 2c 23 38 3a 6d 6f  76 65 71 20 70 63 2c 72  |r5,#8:moveq pc,r|
000060b0  31 34 0d 1b e4 31 6c 64  72 20 72 36 2c 5b 72 31  |14...1ldr r6,[r1|
000060c0  32 2c 23 30 5d 3a 6c 64  72 20 72 37 2c 5b 72 31  |2,#0]:ldr r7,[r1|
000060d0  32 2c 23 34 5d 3a 61 64  64 20 72 38 2c 72 31 30  |2,#4]:add r8,r10|
000060e0  2c 72 37 0d 1b ee 43 2e  6c 6f 6f 70 32 20 6c 64  |,r7...C.loop2 ld|
000060f0  72 20 72 30 2c 5b 72 31  32 2c 23 34 5d 3a 73 75  |r r0,[r12,#4]:su|
00006100  62 20 72 30 2c 72 37 2c  72 30 3a 6d 6f 76 20 72  |b r0,r7,r0:mov r|
00006110  31 2c 72 36 3a 6d 6f 76  20 72 32 2c 23 38 3a 73  |1,r6:mov r2,#8:s|
00006120  77 69 20 26 44 32 0d 1b  f8 2f 6d 6f 76 20 72 30  |wi &D2.../mov r0|
00006130  2c 23 26 32 30 3a 73 74  72 62 20 72 30 2c 5b 72  |,#&20:strb r0,[r|
00006140  36 2c 23 34 5d 3a 73 74  72 62 20 72 30 2c 5b 72  |6,#4]:strb r0,[r|
00006150  36 2c 23 35 5d 0d 1c 02  1b 61 64 64 20 72 36 2c  |6,#5]....add r6,|
00006160  72 36 2c 23 36 3a 6d 6f  76 20 72 39 2c 23 36 33  |r6,#6:mov r9,#63|
00006170  0d 1c 0c 1a 2e 6c 6f 6f  70 33 20 6c 64 72 62 20  |.....loop3 ldrb |
00006180  72 30 2c 5b 72 37 5d 2c  23 31 0d 1c 16 29 63 6d  |r0,[r7],#1...)cm|
00006190  70 20 72 30 2c 23 31 32  37 3a 63 6d 70 6e 65 20  |p r0,#127:cmpne |
000061a0  72 30 2c 23 33 31 3a 6d  6f 76 6c 65 20 72 30 2c  |r0,#31:movle r0,|
000061b0  23 34 36 0d 1c 20 2b 73  74 72 62 20 72 30 2c 5b  |#46.. +strb r0,[|
000061c0  72 36 5d 2c 23 31 3a 73  75 62 73 20 72 39 2c 72  |r6],#1:subs r9,r|
000061d0  39 2c 23 31 3a 62 70 6c  20 6c 6f 6f 70 33 0d 1c  |9,#1:bpl loop3..|
000061e0  2a 32 6d 6f 76 20 72 30  2c 23 31 33 3a 73 74 72  |*2mov r0,#13:str|
000061f0  62 20 72 30 2c 5b 72 36  5d 2c 23 32 3a 63 6d 70  |b r0,[r6],#2:cmp|
00006200  20 72 37 2c 72 38 3a 62  6c 74 20 6c 6f 6f 70 32  | r7,r8:blt loop2|
00006210  0d 1c 34 41 6c 64 72 20  72 36 2c 5b 72 31 32 2c  |..4Aldr r6,[r12,|
00006220  23 30 5d 3a 61 64 64 20  72 36 2c 72 36 2c 23 26  |#0]:add r6,r6,#&|
00006230  34 38 30 3a 6c 64 72 20  72 37 2c 5b 72 31 32 2c  |480:ldr r7,[r12,|
00006240  23 34 5d 3a 61 64 64 20  72 38 2c 72 31 30 2c 72  |#4]:add r8,r10,r|
00006250  37 0d 1c 3e 43 2e 6c 6f  6f 70 34 20 6c 64 72 20  |7..>C.loop4 ldr |
00006260  72 30 2c 5b 72 31 32 2c  23 34 5d 3a 73 75 62 20  |r0,[r12,#4]:sub |
00006270  72 30 2c 72 37 2c 72 30  3a 6d 6f 76 20 72 31 2c  |r0,r7,r0:mov r1,|
00006280  72 36 3a 6d 6f 76 20 72  32 2c 23 38 3a 73 77 69  |r6:mov r2,#8:swi|
00006290  20 26 44 32 0d 1c 48 2f  6d 6f 76 20 72 30 2c 23  | &D2..H/mov r0,#|
000062a0  26 32 30 3a 73 74 72 62  20 72 30 2c 5b 72 36 2c  |&20:strb r0,[r6,|
000062b0  23 34 5d 3a 73 74 72 62  20 72 30 2c 5b 72 36 2c  |#4]:strb r0,[r6,|
000062c0  23 35 5d 0d 1c 52 1a 61  64 64 20 72 36 2c 72 36  |#5]..R.add r6,r6|
000062d0  2c 23 36 3a 6d 6f 76 20  72 39 2c 23 30 0d 1c 5c  |,#6:mov r9,#0..\|
000062e0  36 2e 6c 6f 6f 70 35 20  6c 64 72 62 20 72 30 2c  |6.loop5 ldrb r0,|
000062f0  5b 72 37 2c 72 39 5d 3a  6d 6f 76 20 72 31 2c 72  |[r7,r9]:mov r1,r|
00006300  36 3a 6d 6f 76 20 72 32  2c 23 34 3a 73 77 69 20  |6:mov r2,#4:swi |
00006310  26 44 31 0d 1c 66 4d 6d  6f 76 20 72 30 2c 23 33  |&D1..fMmov r0,#3|
00006320  32 3a 73 74 72 62 20 72  30 2c 5b 72 36 2c 23 32  |2:strb r0,[r6,#2|
00006330  5d 3a 61 64 64 20 72 36  2c 72 36 2c 23 33 3a 61  |]:add r6,r6,#3:a|
00006340  64 64 20 72 39 2c 72 39  2c 23 31 3a 63 6d 70 20  |dd r9,r9,#1:cmp |
00006350  72 39 2c 23 31 36 3a 62  6c 74 20 6c 6f 6f 70 35  |r9,#16:blt loop5|
00006360  0d 1c 70 13 73 74 72 62  20 72 30 2c 5b 72 36 5d  |..p.strb r0,[r6]|
00006370  2c 23 31 0d 1c 7a 1a 2e  6c 6f 6f 70 36 20 6c 64  |,#1..z..loop6 ld|
00006380  72 62 20 72 30 2c 5b 72  37 5d 2c 23 31 0d 1c 84  |rb r0,[r7],#1...|
00006390  29 63 6d 70 20 72 30 2c  23 31 32 37 3a 63 6d 70  |)cmp r0,#127:cmp|
000063a0  6e 65 20 72 30 2c 23 33  31 3a 6d 6f 76 6c 65 20  |ne r0,#31:movle |
000063b0  72 30 2c 23 34 36 0d 1c  8e 2b 73 74 72 62 20 72  |r0,#46...+strb r|
000063c0  30 2c 5b 72 36 5d 2c 23  31 3a 73 75 62 73 20 72  |0,[r6],#1:subs r|
000063d0  39 2c 72 39 2c 23 31 3a  62 6e 65 20 6c 6f 6f 70  |9,r9,#1:bne loop|
000063e0  36 0d 1c 98 32 6d 6f 76  20 72 30 2c 23 31 33 3a  |6...2mov r0,#13:|
000063f0  73 74 72 62 20 72 30 2c  5b 72 36 5d 2c 23 31 3a  |strb r0,[r6],#1:|
00006400  63 6d 70 20 72 37 2c 72  38 3a 62 6c 74 20 6c 6f  |cmp r7,r8:blt lo|
00006410  6f 70 34 0d 1c a2 0e 6d  6f 76 20 70 63 2c 72 31  |op4....mov pc,r1|
00006420  34 0d 1c ac 27 2e 64 61  74 61 20 65 71 75 64 20  |4...'.data equd |
00006430  73 63 72 6e 62 75 66 66  25 3a 65 71 75 64 20 76  |scrnbuff%:equd v|
00006440  69 65 77 62 75 66 66 25  0d 1c b6 05 5d 0d 1c c0  |iewbuff%....]...|
00006450  05 ed 0d 1c ca 05 e1 0d  ff                       |.........|
00006459