Home » Personal collection » Acorn hard disk » apps » Econet » !DFS/!RunImage

!DFS/!RunImage

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

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

Tape/disk: Home » Personal collection » Acorn hard disk » apps » Econet
Filename: !DFS/!RunImage
Read OK:
File size: 267F bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > <DFS$Dir>.!RunImage
   20REM
   30REM   ArcDFS desktop filer.
   40REM
   50REM LEN Richard Averill, 1989.
   60
   70vers$="0.99"
   80copyright$="ArcDFS desktop filer. (C) Richard A Averill, 1989."
   90
  100DIM display%(7)
  110PROCfind_partition
  120PROCphysicals
  130
  140SYS "Wimp_Initialise",200,&4B534154,"DFS Filer" TO task_handle%
  150PROCwimp
  160
  170end_program%=FALSE
  180DIM poll_block% 1024, err_block% 256, message_block% 256, command_block% 256
  190
  200ON ERROR PROCinform_error
  210
  220oldpath$=""
  230
  240WHILE end_program%=FALSE
  250SYS "Wimp_Poll",0,poll_block% TO poll_reason%
  260CASE poll_reason% OF
  270WHEN 6 : PROCbutton_change(poll_block%)
  280WHEN 9 : PROCmenu_select(poll_block%)
  290WHEN 17,18 : PROCmessage(poll_block%)
  300ENDCASE
  310ENDWHILE
  320
  330SYS "Wimp_CloseDown",200,task_handle%
  340
  350END
  360
  370DEF PROCinform_error
  380junk%=FNreporterror(ERR,REPORT$,1)
  390PROCclosecommandwindow(-1)
  400ENDPROC
  410
  420DEF FNreporterror(err%,err$,flags%)
  430err_block%!0=err%:$(err_block%+4)=err$+CHR$(0)
  440SYS "Wimp_ReportError",err_block%,flags%,"DFS Filer" TO ,selc%
  450=selc%
  460
  470DEF PROCmessage(block%)
  480message%=block%!16
  490CASE message% OF
  500WHEN 0 : end_program%=TRUE
  510WHEN 1 : PROCdatasaveack(block%)
  520WHEN 3 : PROCdataloadack(block%)
  530ENDCASE
  540ENDPROC
  550
  560DEF PROCdatasaveack(block%)
  570handle%=block%!20
  580icon%=block%!24
  590IF handle%=-2 THEN
  600path$=FNgetpath(block%,icon%)
  610block%!16=2
  620PROCputpath(block%,path$)
  630oldpath$=prefix$+path$
  640ENDIF
  650ENDPROC
  660
  670DEF PROCdataloadack(block%)
  680handle%=block%!20
  690icon%=block%!24
  700path$=FNgetpath(block%,icon%)
  710
  720IF path$<>oldpath$ THEN
  730path2$=prefix$+FNleaf(path$)
  740REM copy files
  750PROCcommand_name("Copy "+path$+" "+path2$,"fileswitch:Copy "+path$+" "+path2$+" ~V")
  760REMSYS "XOS_FSControl",26,path$,path2$,%001000010 TO errptr%;flags%
  770ENDIF
  780
  790block%!12=block%!8
  800block%!16=4
  810othertask%=block%!4
  820SYS "Wimp_SendMessage",17,block%,othertask%
  830ENDIF
  840oldpath$=""
  850ENDPROC
  860
  870DEF FNleaf(path$)
  880WHILE INSTR(path$,".")>0
  890pos%=INSTR(path$,".")
  900len%=LEN(path$)
  910path$=RIGHT$(path$,len%-pos%)
  920ENDWHILE
  930=path$
  940
  950DEF PROCdfs_command(command$)
  960PROCcommand_name(command$,"dfs:"+command$)
  970ENDPROC
  980
  990DEF PROCcommand(command$)
 1000PROCcommand_name(command$,command$)
 1010ENDPROC
 1020
 1030DEF PROCcommand_name(title$,command$)
 1040LOCAL flags%,selc%
 1050PROCopencommandwindow(title$)
 1060SYS "XOS_CLI",command$ TO errptr%;flags%
 1070IF (flags% AND %1)>0 AND !errptr%<>17 THEN
 1080selc%=FNreporterror(!errptr%,FNmakestring(errptr%+4),%1)
 1090PROCclosecommandwindow(-1)
 1100ELSE
 1110PROCclosecommandwindow(0)
 1120ENDIF
 1130ENDPROC
 1140
 1150DEF PROCopencommandwindow(text$)
 1160$command_block%=text$+CHR$(0)
 1170SYS "Wimp_CommandWindow",command_block%
 1180ENDPROC
 1190
 1200DEF PROCclosecommandwindow(closetype%)
 1210SYS "Wimp_CommandWindow",closetype%
 1220ENDPROC
 1230
 1240DEF FNgetpath(block%,icon%)
 1250LOCAL drive%,path$
 1260drive%=FNgetdrivefromicon(icon%)
 1270path$=FNmakestring(block%+44)
 1280prefix$="dfs::"+STR$(drive%)+".$."
 1290=path$
 1300
 1310DEF PROCputpath(block%,path$)
 1320path$=prefix$+path$
 1330$(block%+44)=path$+CHR$(0)
 1340blocklen%=(((44+LEN(path$))+1+4) DIV 4)*4
 1350block%!12=block%!8
 1360block%!0=blocklen%
 1370othertask%=block%!4
 1380SYS "Wimp_SendMessage",17,block%,othertask%
 1390ENDPROC
 1400
 1410DEF PROCopendir(dir$)
 1420PROCfiler_dirop(dir$,&401)
 1430PROCfiler_dirop(dir$,&400)
 1440ENDPROC
 1450
 1460DEF PROCclosedir(dir$)
 1470PROCfiler_dirop(dir$,&401)
 1480ENDPROC
 1490
 1500DEF PROCfiler_dirop(dir$,op%)
 1510msg_len%=((28+LEN(dir$)+1+4)DIV 4)*4
 1520$(message_block%)=STRING$(msg_len%,CHR$(0))
 1530!message_block%=msg_len%
 1540message_block%!16=op%
 1550message_block%!20=17
 1560$(message_block%+28)=dir$+CHR$(0)
 1570SYS "Wimp_SendMessage",17,message_block%,0
 1580ENDPROC
 1590
 1600DEF PROCwimp
 1610DIM drive_icon%(7), icon_block% 32+4, icon_spritename% 32, icon_indirect% 1024, open%(7),info_block% 3072
 1620open%()=FALSE
 1630drive_icon%()=-66
 1640DIM menu_block% 3072, answer% 256, title_ptr% 32
 1650ind_ptr%=icon_indirect%
 1660$title_ptr%=""
 1670
 1680icon_block%!0=-2
 1690icon_block%!4=0
 1700icon_block%!8=-16
 1710icon_block%!12=100
 1720icon_block%!16=60
 1730icon_block%!20=%100001011 OR (7<<24) OR (1<<28) OR (3<<12)
 1740icon_block%!24=0
 1750icon_block%!28=icon_spritename%
 1760icon_block%!32=3
 1770$icon_spritename%="sfloppy5.25,floppy5.25"+CHR$(0)
 1780
 1790FOR drive%=7 TO 0 STEP -1
 1800IF display%(drive%)=TRUE THEN
 1810drive$=":"+STR$(drive%)
 1820IF drive%=partition_drive% THEN drive$+="v"
 1830$ind_ptr%=drive$+CHR$(0)
 1840icon_block%!24=ind_ptr%
 1850SYS "Wimp_CreateIcon",,icon_block% TO icon%
 1860drive_icon%(drive%)=icon%
 1870ind_ptr%+=16
 1880ENDIF
 1890NEXT
 1900
 1910SYS "Wimp_OpenTemplate",,"<DFS$Dir>.Templates"
 1920SYS "Wimp_LoadTemplate",,info_block%,info_block%+1536,info_block%+3072,-1,"Info",0 TO ,,,,,,n_t%
 1930SYS "Wimp_CloseTemplate"
 1940
 1950SYS "Wimp_CreateWindow",,info_block% TO info_handle%
 1960
 1970PROCsetup_menu(menu_block%,"DFS:",160)
 1980PROCmenu_tentry(menu_block%+2560,"Misc")
 1990PROCmenu_tentry(-1,"Dismount")
 2000PROCmenu_tentry(menu_block%+1536,"Format")
 2010PROCmenu_tentry(menu_block%+1024,"Backup")
 2020PROCmenu_tentry(-1,"Verify")
 2030PROCmenu_tentry(-1,"Free")
 2040PROCmenu_close
 2050
 2060PROCsetup_menu(menu_block%+512,"Disc title",176)
 2070PROCmenu_entryW(&04,-1,%100010001 OR (15<<12) OR (7<<24),title_ptr%,-1,13)
 2080PROCmenu_close
 2090
 2100PROCsetup_menu(menu_block%+1024,"Destn.",80)
 2110FOR drive%=0 TO 7
 2120PROCmenu_centry(-1,STR$(drive%))
 2130NEXT
 2140PROCmenu_close
 2150
 2160PROCsetup_menu(menu_block%+1536,"Tracks",80)
 2170PROCmenu_centry(menu_block%+2048,"40")
 2180PROCmenu_centry(menu_block%+2048,"80")
 2190PROCmenu_close
 2200
 2210PROCsetup_menu(menu_block%+2048,"Disc type",160)
 2220PROCmenu_tentry(-1,"Acorn")
 2230PROCmenu_tentry(-1,"Solidisk")
 2240PROCmenu_tentry(-1,"Watford")
 2250PROCmenu_close
 2260
 2270PROCsetup_menu(menu_block%+2560,"Misc",160)
 2280PROCmenu_tentry(info_handle%,"Info")
 2290PROCmenu_tentry(menu_block%+512,"Name disc")
 2300PROCmenu_tentry(-1,"Protect")
 2310PROCmenu_tentry(-1,"Unprotect")
 2320PROCmenu_tentry(-1,"Swap cats")
 2330PROCmenu_tentry(-1,"Quit")
 2340PROCmenu_close
 2350
 2360menu_currdrive%=-1
 2370ENDPROC
 2380
 2390DEF PROCsetup_menu(block%,title$,width%)
 2400$block%=title$
 2410block%?12=7
 2420block%?13=2
 2430block%?14=7
 2440block%?15=0
 2450block%!16=width%
 2460block%!20=44
 2470block%!24=0
 2480menu_ptr%=block%+28
 2490ENDPROC
 2500
 2510DEF PROCmenu_entry(menu_flags%,sub_ptr%,icon_flags%,entry$)
 2520menu_ptr%!0=menu_flags%
 2530menu_ptr%!4=sub_ptr%
 2540menu_ptr%!8=icon_flags%
 2550$(menu_ptr%+12)=LEFT$(entry$,11)
 2560menu_ptr%+=24
 2570ENDPROC
 2580
 2590DEF PROCmenu_entryW(menu_flags%,sub_ptr%,icon_flags%,entry0%,entry1%,entry2%)
 2600menu_ptr%!0=menu_flags%
 2610menu_ptr%!4=sub_ptr%
 2620menu_ptr%!8=icon_flags%
 2630menu_ptr%!12=entry0%
 2640menu_ptr%!16=entry1%
 2650menu_ptr%!20=entry2%
 2660menu_ptr%+=24
 2670ENDPROC
 2680
 2690DEF PROCmenu_tentry(sub_ptr%,entry$)
 2700PROCmenu_entry(0,sub_ptr%,%10001 OR (7<<24),entry$)
 2710ENDPROC
 2720
 2730DEF PROCmenu_centry(sub_ptr%,entry$)
 2740PROCmenu_entry(0,sub_ptr%,%11001 OR (7<<24),entry$)
 2750ENDPROC
 2760
 2770DEF PROCmenu_close
 2780menu_ptr%-=24
 2790!menu_ptr%=(!menu_ptr%) OR &80
 2800ENDPROC
 2810
 2820DEF PROCphysicals
 2830SYS "ADFS_Drives" TO ,nfloppies%
 2840IF nfloppies%>0 THEN
 2850FOR drive%=0 TO nfloppies%-1
 2860PROCdisplay(drive%)
 2870NEXT
 2880ENDIF
 2890ENDPROC
 2900
 2910DEF PROCdisplay(physical%)
 2920CASE physical% OF
 2930WHEN 0 : display%(0)=TRUE:display%(2)=TRUE
 2940WHEN 1 : display%(1)=TRUE:display%(3)=TRUE
 2950WHEN 2 : display%(4)=TRUE:display%(6)=TRUE
 2960WHEN 3 : display%(5)=TRUE:display%(7)=TRUE
 2970ENDCASE
 2980ENDPROC
 2990
 3000DEF PROCbutton_change(block%)
 3010LOCAL icon%, handle%, button%, m_x%, m_y%
 3020handle%=block%!12
 3030icon%=block%!16
 3040button%=block%!8
 3050m_x%=block%!0
 3060m_y%=block%!4
 3070IF handle%=-2 AND icon%>=0 THEN
 3080drive%=FNgetdrivefromicon(icon%)
 3090IF drive%>=0 THEN
 3100path$="dfs::"+STR$(drive%)+".$"
 3110IF (button% AND %101)>0 THEN
 3120PROCopendir(path$)
 3130ELSE
 3140PROCdrive_menu(drive%,m_x%,m_y%)
 3150ENDIF
 3160ENDIF
 3170ENDIF
 3180ENDPROC
 3190
 3200DEF FNgetdrivefromicon(icon%)
 3210LOCAL drive_found%
 3220drive_found%=-1
 3230FOR drive%=0 TO 7
 3240IF drive_icon%(drive%)=icon% THEN drive_found%=drive%:drive%=7
 3250NEXT
 3260=drive_found%
 3270
 3280DEF PROCdrive_menu(drive%,m_x%,m_y%)
 3290menu_currdrive%=drive%
 3300$menu_block%="DFS::"+STR$(drive%)
 3310$title_ptr%=""
 3320SYS "Wimp_CreateMenu",,menu_block%,m_x%-64,192+168
 3330ENDPROC
 3340
 3350DEF PROCmenu_select(block%)
 3360LOCAL answer$, drive%
 3370SYS "Wimp_DecodeMenu",,menu_block%,block%,answer% TO ,,,answer$
 3380drive%=menu_currdrive%
 3390drive$=STR$(drive%)
 3400prefix$="dfs:"
 3410path$=prefix$+":"+drive$+".$"
 3420CASE answer$ OF
 3430WHEN "Verify" : PROCdfs_command("Verify "+drive$)
 3440WHEN "Free" : PROCdfs_command("Free "+drive$)
 3450WHEN "Dismount" : PROCclosedir(path$)
 3460WHEN "Backup" : PROCdfs_command("Backup "+drive$+" "+drive$)
 3470WHEN "Misc.Details" : PROCdfs_command("Details "+drive$)
 3480WHEN "Misc.Protect" : PROCdfs_command("Protect "+drive$)
 3490WHEN "Misc.Unprotect" : PROCdfs_command("ProtectOff "+drive$)
 3500WHEN "Misc.Swap cats" : PROCdfs_command("Swap "+drive$)
 3510WHEN "Misc.Quit" : end_program%=TRUE
 3520ENDCASE
 3530IF FNin(answer$,"Misc.Name disc") THEN OSCLI("dfs:Drive "+drive$):PROCdfs_command("Title "+$title_ptr%)
 3540IF FNin(answer$,"Backup.") THEN PROCdfs_command("Backup "+drive$+" "+RIGHT$(answer$))
 3550IF answer$="Format" THEN answer$="Format.80"
 3560IF answer$="Format.40" OR answer$="Format.80" THEN PROCdfs_command("Form "+RIGHT$(answer$,2)+" "+drive$)
 3570IF FNin(answer$,"Format.40.") OR FNin(answer$,"Format.80.") THEN
 3580tracks$=MID$(answer$,8,2)
 3590form_command$=RIGHT$(answer$,LEN(answer$)-10)
 3600CASE form_command$ OF
 3610WHEN "Solidisk" : OSCLI("dfs:Enable D"):OSCLI(""):PROCdfs_command("F"+tracks$+" "+drive$):OSCLI("dfs:Enable S"):OSCLI("")
 3620WHEN "Watford" : PROCdfs_command("Form"+tracks$+" "+drive$)
 3630OTHERWISE
 3640PROCdfs_command("Form "+tracks$+" "+drive$)
 3650ENDCASE
 3660ENDIF
 3670menu_currdrive%=-1
 3680ENDPROC
 3690
 3700DEF FNin(main$,sub$)
 3710LOCAL result%
 3720IF LEFT$(main$,LEN(sub$))=sub$ THEN result%=TRUE ELSE result%=FALSE
 3730=result%
 3740
 3750DEF FNmakestring(ptr%)
 3760LOCAL str$
 3770str$=""
 3780WHILE ?ptr%>31
 3790str$+=CHR$(?ptr%)
 3800ptr%+=1
 3810ENDWHILE
 3820=str$
 3830
 3840REM   Checks for the presence of a DFS partition.
 3850REM   NB The partition should be named 'drive#', where # is the drive the
 3860REM   partition will be accessed as.
 3870 
 3880DEF PROCfind_partition
 3890LOCAL next%,partition_drivename%,nread%
 3900DIM partition_block% 256
 3910next%=0
 3920REPEAT
 3930SYS "OS_GBPB",10,"<DFS$Dir>",partition_block%,1,next%,256,"drive#" TO ,,,nread%,next%
 3940UNTIL nread%=1 OR next%<0
 3950
 3960IF nread%=1 AND partition_block%!16=1 THEN
 3970partition_drive%=(partition_block%?25)-ASC("0")
 3980partition_drivename%=partition_drive%
 3990IF partition_drive%<0 OR partition_drive%>7 THEN partition_drive%=4
 4000SYS 5,"dfs:Partition "+STR$(partition_drive%)+" <DFS$Dir>.drive"+STR$(partition_drivename%)
 4010display%(partition_drivename%)=TRUE
 4020ELSE
 4030partition_drive%=-1
 4040ENDIF
 4050ENDPROC

� > <DFS$Dir>.!RunImage
�
�   ArcDFS desktop filer.
(�
2� � Richard Averill, 1989.
<
Fvers$="0.99"
PCcopyright$="ArcDFS desktop filer. (C) Richard A Averill, 1989."
Z
d� display%(7)
n�find_partition
x�physicals
�
�Aș "Wimp_Initialise",200,&4B534154,"DFS Filer" � task_handle%
�	�wimp
�
�end_program%=�
�N� poll_block% 1024, err_block% 256, message_block% 256, command_block% 256
�
�� � �inform_error
�
�oldpath$=""
�
�ȕ end_program%=�
�/ș "Wimp_Poll",0,poll_block% � poll_reason%
Ȏ poll_reason% �
%� 6 : �button_change(poll_block%)
#� 9 : �menu_select(poll_block%)
"#� 17,18 : �message(poll_block%)
,�
6�
@
J(ș "Wimp_CloseDown",200,task_handle%
T
^�
h
r� �inform_error
|junk%=�reporterror(�,�$,1)
��closecommandwindow(-1)
��
�
�$� �reporterror(err%,err$,flags%)
�/err_block%!0=err%:$(err_block%+4)=err$+�(0)
�@ș "Wimp_ReportError",err_block%,flags%,"DFS Filer" � ,selc%
�
=selc%
�
�� �message(block%)
�message%=block%!16
�Ȏ message% �
�� 0 : end_program%=�
�� 1 : �datasaveack(block%)
� 3 : �dataloadack(block%)
�
�
&
0� �datasaveack(block%)
:handle%=block%!20
Dicon%=block%!24
N� handle%=-2 �
X path$=�getpath(block%,icon%)
bblock%!16=2
l�putpath(block%,path$)
voldpath$=prefix$+path$
��
��
�
�� �dataloadack(block%)
�handle%=block%!20
�icon%=block%!24
� path$=�getpath(block%,icon%)
�
�� path$<>oldpath$ �
�path2$=prefix$+�leaf(path$)
�� copy files
�U�command_name("Copy "+path$+" "+path2$,"fileswitch:Copy "+path$+" "+path2$+" ~V")
�E�SYS "XOS_FSControl",26,path$,path2$,%001000010 TO errptr%;flags%
�

block%!12=block%!8
 block%!16=4
*othertask%=block%!4
4.ș "Wimp_SendMessage",17,block%,othertask%
>�
Holdpath$=""
R�
\
f� �leaf(path$)
pȕ �path$,".")>0
zpos%=�path$,".")
�len%=�(path$)
�path$=�path$,len%-pos%)
��
�
=path$
�
�� �dfs_command(command$)
�+�command_name(command$,"dfs:"+command$)
��
�
�� �command(command$)
�$�command_name(command$,command$)
��
�
$� �command_name(title$,command$)
� flags%,selc%
�opencommandwindow(title$)
$*ș "XOS_CLI",command$ � errptr%;flags%
.&� (flags% � %1)>0 � !errptr%<>17 �
8:selc%=�reporterror(!errptr%,�makestring(errptr%+4),%1)
B�closecommandwindow(-1)
L�
V�closecommandwindow(0)
`�
j�
t
~� �opencommandwindow(text$)
�$command_block%=text$+�(0)
�*ș "Wimp_CommandWindow",command_block%
��
�
�%� �closecommandwindow(closetype%)
�&ș "Wimp_CommandWindow",closetype%
��
�
�� �getpath(block%,icon%)
�� drive%,path$
�#drive%=�getdrivefromicon(icon%)
� path$=�makestring(block%+44)
#prefix$="dfs::"+�(drive%)+".$."


=path$

� �putpath(block%,path$)
(path$=prefix$+path$
2$(block%+44)=path$+�(0)
<)blocklen%=(((44+�(path$))+1+4) � 4)*4
Fblock%!12=block%!8
Pblock%!0=blocklen%
Zothertask%=block%!4
d.ș "Wimp_SendMessage",17,block%,othertask%
n�
x
�� �opendir(dir$)
��filer_dirop(dir$,&401)
��filer_dirop(dir$,&400)
��
�
�� �closedir(dir$)
��filer_dirop(dir$,&401)
��
�
�� �filer_dirop(dir$,op%)
�$msg_len%=((28+�(dir$)+1+4)� 4)*4
�%$(message_block%)=�msg_len%,�(0))
�!message_block%=msg_len%
message_block%!16=op%
message_block%!20=17
"$(message_block%+28)=dir$+�(0)
"-ș "Wimp_SendMessage",17,message_block%,0
,�
6
@� �wimp
Jk� drive_icon%(7), icon_block% 32+4, icon_spritename% 32, icon_indirect% 1024, open%(7),info_block% 3072
T
open%()=�
^drive_icon%()=-66
h2� menu_block% 3072, answer% 256, title_ptr% 32
rind_ptr%=icon_indirect%
|$title_ptr%=""
�
�icon_block%!0=-2
�icon_block%!4=0
�icon_block%!8=-16
�icon_block%!12=100
�icon_block%!16=60
�;icon_block%!20=%100001011 � (7<<24) � (1<<28) � (3<<12)
�icon_block%!24=0
�#icon_block%!28=icon_spritename%
�icon_block%!32=3
�3$icon_spritename%="sfloppy5.25,floppy5.25"+�(0)
�
�� drive%=7 � 0 � -1
� display%(drive%)=� �
drive$=":"+�(drive%)
+� drive%=partition_drive% � drive$+="v"
&$ind_ptr%=drive$+�(0)
0icon_block%!24=ind_ptr%
:-ș "Wimp_CreateIcon",,icon_block% � icon%
Ddrive_icon%(drive%)=icon%
Nind_ptr%+=16
X�
b�
l
v1ș "Wimp_OpenTemplate",,"<DFS$Dir>.Templates"
�bș "Wimp_LoadTemplate",,info_block%,info_block%+1536,info_block%+3072,-1,"Info",0 � ,,,,,,n_t%
�ș "Wimp_CloseTemplate"
�
�6ș "Wimp_CreateWindow",,info_block% � info_handle%
�
�'�setup_menu(menu_block%,"DFS:",160)
�)�menu_tentry(menu_block%+2560,"Misc")
��menu_tentry(-1,"Dismount")
�+�menu_tentry(menu_block%+1536,"Format")
�+�menu_tentry(menu_block%+1024,"Backup")
��menu_tentry(-1,"Verify")
��menu_tentry(-1,"Free")
��menu_close

1�setup_menu(menu_block%+512,"Disc title",176)
I�menu_entryW(&04,-1,%100010001 � (15<<12) � (7<<24),title_ptr%,-1,13)
 �menu_close
*
4-�setup_menu(menu_block%+1024,"Destn.",80)
>� drive%=0 � 7
H�menu_centry(-1,�(drive%))
R�
\�menu_close
f
p-�setup_menu(menu_block%+1536,"Tracks",80)
z'�menu_centry(menu_block%+2048,"40")
�'�menu_centry(menu_block%+2048,"80")
��menu_close
�
�1�setup_menu(menu_block%+2048,"Disc type",160)
��menu_tentry(-1,"Acorn")
��menu_tentry(-1,"Solidisk")
��menu_tentry(-1,"Watford")
��menu_close
�
�,�setup_menu(menu_block%+2560,"Misc",160)
�%�menu_tentry(info_handle%,"Info")
�-�menu_tentry(menu_block%+512,"Name disc")
��menu_tentry(-1,"Protect")
	 �menu_tentry(-1,"Unprotect")
	 �menu_tentry(-1,"Swap cats")
	�menu_tentry(-1,"Quit")
	$�menu_close
	.
	8menu_currdrive%=-1
	B�
	L
	V'� �setup_menu(block%,title$,width%)
	`$block%=title$
	jblock%?12=7
	tblock%?13=2
	~block%?14=7
	�block%?15=0
	�block%!16=width%
	�block%!20=44
	�block%!24=0
	�menu_ptr%=block%+28
	��
	�
	�:� �menu_entry(menu_flags%,sub_ptr%,icon_flags%,entry$)
	�menu_ptr%!0=menu_flags%
	�menu_ptr%!4=sub_ptr%
	�menu_ptr%!8=icon_flags%
	�$(menu_ptr%+12)=�entry$,11)
menu_ptr%+=24

�

L� �menu_entryW(menu_flags%,sub_ptr%,icon_flags%,entry0%,entry1%,entry2%)
(menu_ptr%!0=menu_flags%
2menu_ptr%!4=sub_ptr%
<menu_ptr%!8=icon_flags%
Fmenu_ptr%!12=entry0%
Pmenu_ptr%!16=entry1%
Zmenu_ptr%!20=entry2%
dmenu_ptr%+=24
n�
x
�#� �menu_tentry(sub_ptr%,entry$)
�3�menu_entry(0,sub_ptr%,%10001 � (7<<24),entry$)
��
�
�#� �menu_centry(sub_ptr%,entry$)
�3�menu_entry(0,sub_ptr%,%11001 � (7<<24),entry$)
��
�
�� �menu_close
�menu_ptr%-=24
�!!menu_ptr%=(!menu_ptr%) � &80
��
�
� �physicals
"ș "ADFS_Drives" � ,nfloppies%
� nfloppies%>0 �
"� drive%=0 � nfloppies%-1
,�display(drive%)
6�
@�
J�
T
^� �display(physical%)
hȎ physical% �
r%� 0 : display%(0)=�:display%(2)=�
|%� 1 : display%(1)=�:display%(3)=�
�%� 2 : display%(4)=�:display%(6)=�
�%� 3 : display%(5)=�:display%(7)=�
��
��
�
�� �button_change(block%)
�)� icon%, handle%, button%, m_x%, m_y%
�handle%=block%!12
�icon%=block%!16
�button%=block%!8
�m_x%=block%!0
�m_y%=block%!4
�� handle%=-2 � icon%>=0 �
#drive%=�getdrivefromicon(icon%)
� drive%>=0 �
 path$="dfs::"+�(drive%)+".$"
&� (button% � %101)>0 �
0�opendir(path$)
:�
D!�drive_menu(drive%,m_x%,m_y%)
N�
X�
b�
l�
v
�� �getdrivefromicon(icon%)
�� drive_found%
�drive_found%=-1
�� drive%=0 � 7
�>� drive_icon%(drive%)=icon% � drive_found%=drive%:drive%=7
��
�=drive_found%
�
�#� �drive_menu(drive%,m_x%,m_y%)
�menu_currdrive%=drive%
�"$menu_block%="DFS::"+�(drive%)
�$title_ptr%=""
�5ș "Wimp_CreateMenu",,menu_block%,m_x%-64,192+168

�



� �menu_select(block%)

 � answer$, drive%

*Aș "Wimp_DecodeMenu",,menu_block%,block%,answer% � ,,,answer$

4drive%=menu_currdrive%

>drive$=�(drive%)

Hprefix$="dfs:"

R!path$=prefix$+":"+drive$+".$"

\Ȏ answer$ �

f/� "Verify" : �dfs_command("Verify "+drive$)

p+� "Free" : �dfs_command("Free "+drive$)

z#� "Dismount" : �closedir(path$)

�:� "Backup" : �dfs_command("Backup "+drive$+" "+drive$)

�6� "Misc.Details" : �dfs_command("Details "+drive$)

�6� "Misc.Protect" : �dfs_command("Protect "+drive$)

�;� "Misc.Unprotect" : �dfs_command("ProtectOff "+drive$)

�5� "Misc.Swap cats" : �dfs_command("Swap "+drive$)

�"� "Misc.Quit" : end_program%=�

��

�_� �in(answer$,"Misc.Name disc") � �("dfs:Drive "+drive$):�dfs_command("Title "+$title_ptr%)

�K� �in(answer$,"Backup.") � �dfs_command("Backup "+drive$+" "+�answer$))

�,� answer$="Format" � answer$="Format.80"

�^� answer$="Format.40" � answer$="Format.80" � �dfs_command("Form "+�answer$,2)+" "+drive$)

�=� �in(answer$,"Format.40.") � �in(answer$,"Format.80.") �

�tracks$=�answer$,8,2)
)form_command$=�answer$,�(answer$)-10)
Ȏ form_command$ �
g� "Solidisk" : �("dfs:Enable D"):�(""):�dfs_command("F"+tracks$+" "+drive$):�("dfs:Enable S"):�("")
$9� "Watford" : �dfs_command("Form"+tracks$+" "+drive$)
.
8,�dfs_command("Form "+tracks$+" "+drive$)
B�
L�
Vmenu_currdrive%=-1
`�
j
t� �in(main$,sub$)
~
� result%
�2� �main$,�(sub$))=sub$ � result%=� � result%=�
�=result%
�
�� �makestring(ptr%)
�
� str$
�str$=""
�ȕ ?ptr%>31
�str$+=�(?ptr%)
�ptr%+=1
��
�	=str$
�
3�   Checks for the presence of a DFS partition.

K�   NB The partition should be named 'drive#', where # is the drive the
&�   partition will be accessed as.
 
(� �find_partition
2'� next%,partition_drivename%,nread%
<� partition_block% 256
Fnext%=0
P�
ZWș "OS_GBPB",10,"<DFS$Dir>",partition_block%,1,next%,256,"drive#" � ,,,nread%,next%
d� nread%=1 � next%<0
n
x(� nread%=1 � partition_block%!16=1 �
�1partition_drive%=(partition_block%?25)-�("0")
�)partition_drivename%=partition_drive%
�B� partition_drive%<0 � partition_drive%>7 � partition_drive%=4
�Xș 5,"dfs:Partition "+�(partition_drive%)+" <DFS$Dir>.drive"+�(partition_drivename%)
�$display%(partition_drivename%)=�
��
�partition_drive%=-1
��
��
�
00000000  0d 00 0a 1b f4 20 3e 20  3c 44 46 53 24 44 69 72  |..... > <DFS$Dir|
00000010  3e 2e 21 52 75 6e 49 6d  61 67 65 0d 00 14 05 f4  |>.!RunImage.....|
00000020  0d 00 1e 1d f4 20 20 20  41 72 63 44 46 53 20 64  |.....   ArcDFS d|
00000030  65 73 6b 74 6f 70 20 66  69 6c 65 72 2e 0d 00 28  |esktop filer...(|
00000040  05 f4 0d 00 32 1e f4 20  a9 20 52 69 63 68 61 72  |....2.. . Richar|
00000050  64 20 41 76 65 72 69 6c  6c 2c 20 31 39 38 39 2e  |d Averill, 1989.|
00000060  0d 00 3c 04 0d 00 46 10  76 65 72 73 24 3d 22 30  |..<...F.vers$="0|
00000070  2e 39 39 22 0d 00 50 43  63 6f 70 79 72 69 67 68  |.99"..PCcopyrigh|
00000080  74 24 3d 22 41 72 63 44  46 53 20 64 65 73 6b 74  |t$="ArcDFS deskt|
00000090  6f 70 20 66 69 6c 65 72  2e 20 28 43 29 20 52 69  |op filer. (C) Ri|
000000a0  63 68 61 72 64 20 41 20  41 76 65 72 69 6c 6c 2c  |chard A Averill,|
000000b0  20 31 39 38 39 2e 22 0d  00 5a 04 0d 00 64 11 de  | 1989."..Z...d..|
000000c0  20 64 69 73 70 6c 61 79  25 28 37 29 0d 00 6e 13  | display%(7)..n.|
000000d0  f2 66 69 6e 64 5f 70 61  72 74 69 74 69 6f 6e 0d  |.find_partition.|
000000e0  00 78 0e f2 70 68 79 73  69 63 61 6c 73 0d 00 82  |.x..physicals...|
000000f0  04 0d 00 8c 41 c8 99 20  22 57 69 6d 70 5f 49 6e  |....A.. "Wimp_In|
00000100  69 74 69 61 6c 69 73 65  22 2c 32 30 30 2c 26 34  |itialise",200,&4|
00000110  42 35 33 34 31 35 34 2c  22 44 46 53 20 46 69 6c  |B534154,"DFS Fil|
00000120  65 72 22 20 b8 20 74 61  73 6b 5f 68 61 6e 64 6c  |er" . task_handl|
00000130  65 25 0d 00 96 09 f2 77  69 6d 70 0d 00 a0 04 0d  |e%.....wimp.....|
00000140  00 aa 12 65 6e 64 5f 70  72 6f 67 72 61 6d 25 3d  |...end_program%=|
00000150  a3 0d 00 b4 4e de 20 70  6f 6c 6c 5f 62 6c 6f 63  |....N. poll_bloc|
00000160  6b 25 20 31 30 32 34 2c  20 65 72 72 5f 62 6c 6f  |k% 1024, err_blo|
00000170  63 6b 25 20 32 35 36 2c  20 6d 65 73 73 61 67 65  |ck% 256, message|
00000180  5f 62 6c 6f 63 6b 25 20  32 35 36 2c 20 63 6f 6d  |_block% 256, com|
00000190  6d 61 6e 64 5f 62 6c 6f  63 6b 25 20 32 35 36 0d  |mand_block% 256.|
000001a0  00 be 04 0d 00 c8 15 ee  20 85 20 f2 69 6e 66 6f  |........ . .info|
000001b0  72 6d 5f 65 72 72 6f 72  0d 00 d2 04 0d 00 dc 0f  |rm_error........|
000001c0  6f 6c 64 70 61 74 68 24  3d 22 22 0d 00 e6 04 0d  |oldpath$="".....|
000001d0  00 f0 15 c8 95 20 65 6e  64 5f 70 72 6f 67 72 61  |..... end_progra|
000001e0  6d 25 3d a3 0d 00 fa 2f  c8 99 20 22 57 69 6d 70  |m%=..../.. "Wimp|
000001f0  5f 50 6f 6c 6c 22 2c 30  2c 70 6f 6c 6c 5f 62 6c  |_Poll",0,poll_bl|
00000200  6f 63 6b 25 20 b8 20 70  6f 6c 6c 5f 72 65 61 73  |ock% . poll_reas|
00000210  6f 6e 25 0d 01 04 15 c8  8e 20 70 6f 6c 6c 5f 72  |on%...... poll_r|
00000220  65 61 73 6f 6e 25 20 ca  0d 01 0e 25 c9 20 36 20  |eason% ....%. 6 |
00000230  3a 20 f2 62 75 74 74 6f  6e 5f 63 68 61 6e 67 65  |: .button_change|
00000240  28 70 6f 6c 6c 5f 62 6c  6f 63 6b 25 29 0d 01 18  |(poll_block%)...|
00000250  23 c9 20 39 20 3a 20 f2  6d 65 6e 75 5f 73 65 6c  |#. 9 : .menu_sel|
00000260  65 63 74 28 70 6f 6c 6c  5f 62 6c 6f 63 6b 25 29  |ect(poll_block%)|
00000270  0d 01 22 23 c9 20 31 37  2c 31 38 20 3a 20 f2 6d  |.."#. 17,18 : .m|
00000280  65 73 73 61 67 65 28 70  6f 6c 6c 5f 62 6c 6f 63  |essage(poll_bloc|
00000290  6b 25 29 0d 01 2c 05 cb  0d 01 36 05 ce 0d 01 40  |k%)..,....6....@|
000002a0  04 0d 01 4a 28 c8 99 20  22 57 69 6d 70 5f 43 6c  |...J(.. "Wimp_Cl|
000002b0  6f 73 65 44 6f 77 6e 22  2c 32 30 30 2c 74 61 73  |oseDown",200,tas|
000002c0  6b 5f 68 61 6e 64 6c 65  25 0d 01 54 04 0d 01 5e  |k_handle%..T...^|
000002d0  05 e0 0d 01 68 04 0d 01  72 13 dd 20 f2 69 6e 66  |....h...r.. .inf|
000002e0  6f 72 6d 5f 65 72 72 6f  72 0d 01 7c 1e 6a 75 6e  |orm_error..|.jun|
000002f0  6b 25 3d a4 72 65 70 6f  72 74 65 72 72 6f 72 28  |k%=.reporterror(|
00000300  9f 2c f6 24 2c 31 29 0d  01 86 1b f2 63 6c 6f 73  |.,.$,1).....clos|
00000310  65 63 6f 6d 6d 61 6e 64  77 69 6e 64 6f 77 28 2d  |ecommandwindow(-|
00000320  31 29 0d 01 90 05 e1 0d  01 9a 04 0d 01 a4 24 dd  |1)............$.|
00000330  20 a4 72 65 70 6f 72 74  65 72 72 6f 72 28 65 72  | .reporterror(er|
00000340  72 25 2c 65 72 72 24 2c  66 6c 61 67 73 25 29 0d  |r%,err$,flags%).|
00000350  01 ae 2f 65 72 72 5f 62  6c 6f 63 6b 25 21 30 3d  |../err_block%!0=|
00000360  65 72 72 25 3a 24 28 65  72 72 5f 62 6c 6f 63 6b  |err%:$(err_block|
00000370  25 2b 34 29 3d 65 72 72  24 2b bd 28 30 29 0d 01  |%+4)=err$+.(0)..|
00000380  b8 40 c8 99 20 22 57 69  6d 70 5f 52 65 70 6f 72  |.@.. "Wimp_Repor|
00000390  74 45 72 72 6f 72 22 2c  65 72 72 5f 62 6c 6f 63  |tError",err_bloc|
000003a0  6b 25 2c 66 6c 61 67 73  25 2c 22 44 46 53 20 46  |k%,flags%,"DFS F|
000003b0  69 6c 65 72 22 20 b8 20  2c 73 65 6c 63 25 0d 01  |iler" . ,selc%..|
000003c0  c2 0a 3d 73 65 6c 63 25  0d 01 cc 04 0d 01 d6 16  |..=selc%........|
000003d0  dd 20 f2 6d 65 73 73 61  67 65 28 62 6c 6f 63 6b  |. .message(block|
000003e0  25 29 0d 01 e0 16 6d 65  73 73 61 67 65 25 3d 62  |%)....message%=b|
000003f0  6c 6f 63 6b 25 21 31 36  0d 01 ea 11 c8 8e 20 6d  |lock%!16...... m|
00000400  65 73 73 61 67 65 25 20  ca 0d 01 f4 18 c9 20 30  |essage% ...... 0|
00000410  20 3a 20 65 6e 64 5f 70  72 6f 67 72 61 6d 25 3d  | : end_program%=|
00000420  b9 0d 01 fe 1e c9 20 31  20 3a 20 f2 64 61 74 61  |...... 1 : .data|
00000430  73 61 76 65 61 63 6b 28  62 6c 6f 63 6b 25 29 0d  |saveack(block%).|
00000440  02 08 1e c9 20 33 20 3a  20 f2 64 61 74 61 6c 6f  |.... 3 : .datalo|
00000450  61 64 61 63 6b 28 62 6c  6f 63 6b 25 29 0d 02 12  |adack(block%)...|
00000460  05 cb 0d 02 1c 05 e1 0d  02 26 04 0d 02 30 1a dd  |.........&...0..|
00000470  20 f2 64 61 74 61 73 61  76 65 61 63 6b 28 62 6c  | .datasaveack(bl|
00000480  6f 63 6b 25 29 0d 02 3a  15 68 61 6e 64 6c 65 25  |ock%)..:.handle%|
00000490  3d 62 6c 6f 63 6b 25 21  32 30 0d 02 44 13 69 63  |=block%!20..D.ic|
000004a0  6f 6e 25 3d 62 6c 6f 63  6b 25 21 32 34 0d 02 4e  |on%=block%!24..N|
000004b0  12 e7 20 68 61 6e 64 6c  65 25 3d 2d 32 20 8c 0d  |.. handle%=-2 ..|
000004c0  02 58 20 70 61 74 68 24  3d a4 67 65 74 70 61 74  |.X path$=.getpat|
000004d0  68 28 62 6c 6f 63 6b 25  2c 69 63 6f 6e 25 29 0d  |h(block%,icon%).|
000004e0  02 62 0f 62 6c 6f 63 6b  25 21 31 36 3d 32 0d 02  |.b.block%!16=2..|
000004f0  6c 1a f2 70 75 74 70 61  74 68 28 62 6c 6f 63 6b  |l..putpath(block|
00000500  25 2c 70 61 74 68 24 29  0d 02 76 1a 6f 6c 64 70  |%,path$)..v.oldp|
00000510  61 74 68 24 3d 70 72 65  66 69 78 24 2b 70 61 74  |ath$=prefix$+pat|
00000520  68 24 0d 02 80 05 cd 0d  02 8a 05 e1 0d 02 94 04  |h$..............|
00000530  0d 02 9e 1a dd 20 f2 64  61 74 61 6c 6f 61 64 61  |..... .dataloada|
00000540  63 6b 28 62 6c 6f 63 6b  25 29 0d 02 a8 15 68 61  |ck(block%)....ha|
00000550  6e 64 6c 65 25 3d 62 6c  6f 63 6b 25 21 32 30 0d  |ndle%=block%!20.|
00000560  02 b2 13 69 63 6f 6e 25  3d 62 6c 6f 63 6b 25 21  |...icon%=block%!|
00000570  32 34 0d 02 bc 20 70 61  74 68 24 3d a4 67 65 74  |24... path$=.get|
00000580  70 61 74 68 28 62 6c 6f  63 6b 25 2c 69 63 6f 6e  |path(block%,icon|
00000590  25 29 0d 02 c6 04 0d 02  d0 17 e7 20 70 61 74 68  |%)......... path|
000005a0  24 3c 3e 6f 6c 64 70 61  74 68 24 20 8c 0d 02 da  |$<>oldpath$ ....|
000005b0  1f 70 61 74 68 32 24 3d  70 72 65 66 69 78 24 2b  |.path2$=prefix$+|
000005c0  a4 6c 65 61 66 28 70 61  74 68 24 29 0d 02 e4 10  |.leaf(path$)....|
000005d0  f4 20 63 6f 70 79 20 66  69 6c 65 73 0d 02 ee 55  |. copy files...U|
000005e0  f2 63 6f 6d 6d 61 6e 64  5f 6e 61 6d 65 28 22 43  |.command_name("C|
000005f0  6f 70 79 20 22 2b 70 61  74 68 24 2b 22 20 22 2b  |opy "+path$+" "+|
00000600  70 61 74 68 32 24 2c 22  66 69 6c 65 73 77 69 74  |path2$,"fileswit|
00000610  63 68 3a 43 6f 70 79 20  22 2b 70 61 74 68 24 2b  |ch:Copy "+path$+|
00000620  22 20 22 2b 70 61 74 68  32 24 2b 22 20 7e 56 22  |" "+path2$+" ~V"|
00000630  29 0d 02 f8 45 f4 53 59  53 20 22 58 4f 53 5f 46  |)...E.SYS "XOS_F|
00000640  53 43 6f 6e 74 72 6f 6c  22 2c 32 36 2c 70 61 74  |SControl",26,pat|
00000650  68 24 2c 70 61 74 68 32  24 2c 25 30 30 31 30 30  |h$,path2$,%00100|
00000660  30 30 31 30 20 54 4f 20  65 72 72 70 74 72 25 3b  |0010 TO errptr%;|
00000670  66 6c 61 67 73 25 0d 03  02 05 cd 0d 03 0c 04 0d  |flags%..........|
00000680  03 16 16 62 6c 6f 63 6b  25 21 31 32 3d 62 6c 6f  |...block%!12=blo|
00000690  63 6b 25 21 38 0d 03 20  0f 62 6c 6f 63 6b 25 21  |ck%!8.. .block%!|
000006a0  31 36 3d 34 0d 03 2a 17  6f 74 68 65 72 74 61 73  |16=4..*.othertas|
000006b0  6b 25 3d 62 6c 6f 63 6b  25 21 34 0d 03 34 2e c8  |k%=block%!4..4..|
000006c0  99 20 22 57 69 6d 70 5f  53 65 6e 64 4d 65 73 73  |. "Wimp_SendMess|
000006d0  61 67 65 22 2c 31 37 2c  62 6c 6f 63 6b 25 2c 6f  |age",17,block%,o|
000006e0  74 68 65 72 74 61 73 6b  25 0d 03 3e 05 cd 0d 03  |thertask%..>....|
000006f0  48 0f 6f 6c 64 70 61 74  68 24 3d 22 22 0d 03 52  |H.oldpath$=""..R|
00000700  05 e1 0d 03 5c 04 0d 03  66 12 dd 20 a4 6c 65 61  |....\...f.. .lea|
00000710  66 28 70 61 74 68 24 29  0d 03 70 14 c8 95 20 a7  |f(path$)..p... .|
00000720  70 61 74 68 24 2c 22 2e  22 29 3e 30 0d 03 7a 14  |path$,".")>0..z.|
00000730  70 6f 73 25 3d a7 70 61  74 68 24 2c 22 2e 22 29  |pos%=.path$,".")|
00000740  0d 03 84 11 6c 65 6e 25  3d a9 28 70 61 74 68 24  |....len%=.(path$|
00000750  29 0d 03 8e 1b 70 61 74  68 24 3d c2 70 61 74 68  |)....path$=.path|
00000760  24 2c 6c 65 6e 25 2d 70  6f 73 25 29 0d 03 98 05  |$,len%-pos%)....|
00000770  ce 0d 03 a2 0a 3d 70 61  74 68 24 0d 03 ac 04 0d  |.....=path$.....|
00000780  03 b6 1c dd 20 f2 64 66  73 5f 63 6f 6d 6d 61 6e  |.... .dfs_comman|
00000790  64 28 63 6f 6d 6d 61 6e  64 24 29 0d 03 c0 2b f2  |d(command$)...+.|
000007a0  63 6f 6d 6d 61 6e 64 5f  6e 61 6d 65 28 63 6f 6d  |command_name(com|
000007b0  6d 61 6e 64 24 2c 22 64  66 73 3a 22 2b 63 6f 6d  |mand$,"dfs:"+com|
000007c0  6d 61 6e 64 24 29 0d 03  ca 05 e1 0d 03 d4 04 0d  |mand$)..........|
000007d0  03 de 18 dd 20 f2 63 6f  6d 6d 61 6e 64 28 63 6f  |.... .command(co|
000007e0  6d 6d 61 6e 64 24 29 0d  03 e8 24 f2 63 6f 6d 6d  |mmand$)...$.comm|
000007f0  61 6e 64 5f 6e 61 6d 65  28 63 6f 6d 6d 61 6e 64  |and_name(command|
00000800  24 2c 63 6f 6d 6d 61 6e  64 24 29 0d 03 f2 05 e1  |$,command$).....|
00000810  0d 03 fc 04 0d 04 06 24  dd 20 f2 63 6f 6d 6d 61  |.......$. .comma|
00000820  6e 64 5f 6e 61 6d 65 28  74 69 74 6c 65 24 2c 63  |nd_name(title$,c|
00000830  6f 6d 6d 61 6e 64 24 29  0d 04 10 12 ea 20 66 6c  |ommand$)..... fl|
00000840  61 67 73 25 2c 73 65 6c  63 25 0d 04 1a 1e f2 6f  |ags%,selc%.....o|
00000850  70 65 6e 63 6f 6d 6d 61  6e 64 77 69 6e 64 6f 77  |pencommandwindow|
00000860  28 74 69 74 6c 65 24 29  0d 04 24 2a c8 99 20 22  |(title$)..$*.. "|
00000870  58 4f 53 5f 43 4c 49 22  2c 63 6f 6d 6d 61 6e 64  |XOS_CLI",command|
00000880  24 20 b8 20 65 72 72 70  74 72 25 3b 66 6c 61 67  |$ . errptr%;flag|
00000890  73 25 0d 04 2e 26 e7 20  28 66 6c 61 67 73 25 20  |s%...&. (flags% |
000008a0  80 20 25 31 29 3e 30 20  80 20 21 65 72 72 70 74  |. %1)>0 . !errpt|
000008b0  72 25 3c 3e 31 37 20 8c  0d 04 38 3a 73 65 6c 63  |r%<>17 ...8:selc|
000008c0  25 3d a4 72 65 70 6f 72  74 65 72 72 6f 72 28 21  |%=.reporterror(!|
000008d0  65 72 72 70 74 72 25 2c  a4 6d 61 6b 65 73 74 72  |errptr%,.makestr|
000008e0  69 6e 67 28 65 72 72 70  74 72 25 2b 34 29 2c 25  |ing(errptr%+4),%|
000008f0  31 29 0d 04 42 1b f2 63  6c 6f 73 65 63 6f 6d 6d  |1)..B..closecomm|
00000900  61 6e 64 77 69 6e 64 6f  77 28 2d 31 29 0d 04 4c  |andwindow(-1)..L|
00000910  05 cc 0d 04 56 1a f2 63  6c 6f 73 65 63 6f 6d 6d  |....V..closecomm|
00000920  61 6e 64 77 69 6e 64 6f  77 28 30 29 0d 04 60 05  |andwindow(0)..`.|
00000930  cd 0d 04 6a 05 e1 0d 04  74 04 0d 04 7e 1f dd 20  |...j....t...~.. |
00000940  f2 6f 70 65 6e 63 6f 6d  6d 61 6e 64 77 69 6e 64  |.opencommandwind|
00000950  6f 77 28 74 65 78 74 24  29 0d 04 88 1e 24 63 6f  |ow(text$)....$co|
00000960  6d 6d 61 6e 64 5f 62 6c  6f 63 6b 25 3d 74 65 78  |mmand_block%=tex|
00000970  74 24 2b bd 28 30 29 0d  04 92 2a c8 99 20 22 57  |t$+.(0)...*.. "W|
00000980  69 6d 70 5f 43 6f 6d 6d  61 6e 64 57 69 6e 64 6f  |imp_CommandWindo|
00000990  77 22 2c 63 6f 6d 6d 61  6e 64 5f 62 6c 6f 63 6b  |w",command_block|
000009a0  25 0d 04 9c 05 e1 0d 04  a6 04 0d 04 b0 25 dd 20  |%............%. |
000009b0  f2 63 6c 6f 73 65 63 6f  6d 6d 61 6e 64 77 69 6e  |.closecommandwin|
000009c0  64 6f 77 28 63 6c 6f 73  65 74 79 70 65 25 29 0d  |dow(closetype%).|
000009d0  04 ba 26 c8 99 20 22 57  69 6d 70 5f 43 6f 6d 6d  |..&.. "Wimp_Comm|
000009e0  61 6e 64 57 69 6e 64 6f  77 22 2c 63 6c 6f 73 65  |andWindow",close|
000009f0  74 79 70 65 25 0d 04 c4  05 e1 0d 04 ce 04 0d 04  |type%...........|
00000a00  d8 1c dd 20 a4 67 65 74  70 61 74 68 28 62 6c 6f  |... .getpath(blo|
00000a10  63 6b 25 2c 69 63 6f 6e  25 29 0d 04 e2 12 ea 20  |ck%,icon%)..... |
00000a20  64 72 69 76 65 25 2c 70  61 74 68 24 0d 04 ec 23  |drive%,path$...#|
00000a30  64 72 69 76 65 25 3d a4  67 65 74 64 72 69 76 65  |drive%=.getdrive|
00000a40  66 72 6f 6d 69 63 6f 6e  28 69 63 6f 6e 25 29 0d  |fromicon(icon%).|
00000a50  04 f6 20 70 61 74 68 24  3d a4 6d 61 6b 65 73 74  |.. path$=.makest|
00000a60  72 69 6e 67 28 62 6c 6f  63 6b 25 2b 34 34 29 0d  |ring(block%+44).|
00000a70  05 00 23 70 72 65 66 69  78 24 3d 22 64 66 73 3a  |..#prefix$="dfs:|
00000a80  3a 22 2b c3 28 64 72 69  76 65 25 29 2b 22 2e 24  |:"+.(drive%)+".$|
00000a90  2e 22 0d 05 0a 0a 3d 70  61 74 68 24 0d 05 14 04  |."....=path$....|
00000aa0  0d 05 1e 1c dd 20 f2 70  75 74 70 61 74 68 28 62  |..... .putpath(b|
00000ab0  6c 6f 63 6b 25 2c 70 61  74 68 24 29 0d 05 28 17  |lock%,path$)..(.|
00000ac0  70 61 74 68 24 3d 70 72  65 66 69 78 24 2b 70 61  |path$=prefix$+pa|
00000ad0  74 68 24 0d 05 32 1b 24  28 62 6c 6f 63 6b 25 2b  |th$..2.$(block%+|
00000ae0  34 34 29 3d 70 61 74 68  24 2b bd 28 30 29 0d 05  |44)=path$+.(0)..|
00000af0  3c 29 62 6c 6f 63 6b 6c  65 6e 25 3d 28 28 28 34  |<)blocklen%=(((4|
00000b00  34 2b a9 28 70 61 74 68  24 29 29 2b 31 2b 34 29  |4+.(path$))+1+4)|
00000b10  20 81 20 34 29 2a 34 0d  05 46 16 62 6c 6f 63 6b  | . 4)*4..F.block|
00000b20  25 21 31 32 3d 62 6c 6f  63 6b 25 21 38 0d 05 50  |%!12=block%!8..P|
00000b30  16 62 6c 6f 63 6b 25 21  30 3d 62 6c 6f 63 6b 6c  |.block%!0=blockl|
00000b40  65 6e 25 0d 05 5a 17 6f  74 68 65 72 74 61 73 6b  |en%..Z.othertask|
00000b50  25 3d 62 6c 6f 63 6b 25  21 34 0d 05 64 2e c8 99  |%=block%!4..d...|
00000b60  20 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  | "Wimp_SendMessa|
00000b70  67 65 22 2c 31 37 2c 62  6c 6f 63 6b 25 2c 6f 74  |ge",17,block%,ot|
00000b80  68 65 72 74 61 73 6b 25  0d 05 6e 05 e1 0d 05 78  |hertask%..n....x|
00000b90  04 0d 05 82 14 dd 20 f2  6f 70 65 6e 64 69 72 28  |...... .opendir(|
00000ba0  64 69 72 24 29 0d 05 8c  1b f2 66 69 6c 65 72 5f  |dir$).....filer_|
00000bb0  64 69 72 6f 70 28 64 69  72 24 2c 26 34 30 31 29  |dirop(dir$,&401)|
00000bc0  0d 05 96 1b f2 66 69 6c  65 72 5f 64 69 72 6f 70  |.....filer_dirop|
00000bd0  28 64 69 72 24 2c 26 34  30 30 29 0d 05 a0 05 e1  |(dir$,&400).....|
00000be0  0d 05 aa 04 0d 05 b4 15  dd 20 f2 63 6c 6f 73 65  |......... .close|
00000bf0  64 69 72 28 64 69 72 24  29 0d 05 be 1b f2 66 69  |dir(dir$).....fi|
00000c00  6c 65 72 5f 64 69 72 6f  70 28 64 69 72 24 2c 26  |ler_dirop(dir$,&|
00000c10  34 30 31 29 0d 05 c8 05  e1 0d 05 d2 04 0d 05 dc  |401)............|
00000c20  1c dd 20 f2 66 69 6c 65  72 5f 64 69 72 6f 70 28  |.. .filer_dirop(|
00000c30  64 69 72 24 2c 6f 70 25  29 0d 05 e6 24 6d 73 67  |dir$,op%)...$msg|
00000c40  5f 6c 65 6e 25 3d 28 28  32 38 2b a9 28 64 69 72  |_len%=((28+.(dir|
00000c50  24 29 2b 31 2b 34 29 81  20 34 29 2a 34 0d 05 f0  |$)+1+4). 4)*4...|
00000c60  25 24 28 6d 65 73 73 61  67 65 5f 62 6c 6f 63 6b  |%$(message_block|
00000c70  25 29 3d c4 6d 73 67 5f  6c 65 6e 25 2c bd 28 30  |%)=.msg_len%,.(0|
00000c80  29 29 0d 05 fa 1c 21 6d  65 73 73 61 67 65 5f 62  |))....!message_b|
00000c90  6c 6f 63 6b 25 3d 6d 73  67 5f 6c 65 6e 25 0d 06  |lock%=msg_len%..|
00000ca0  04 19 6d 65 73 73 61 67  65 5f 62 6c 6f 63 6b 25  |..message_block%|
00000cb0  21 31 36 3d 6f 70 25 0d  06 0e 18 6d 65 73 73 61  |!16=op%....messa|
00000cc0  67 65 5f 62 6c 6f 63 6b  25 21 32 30 3d 31 37 0d  |ge_block%!20=17.|
00000cd0  06 18 22 24 28 6d 65 73  73 61 67 65 5f 62 6c 6f  |.."$(message_blo|
00000ce0  63 6b 25 2b 32 38 29 3d  64 69 72 24 2b bd 28 30  |ck%+28)=dir$+.(0|
00000cf0  29 0d 06 22 2d c8 99 20  22 57 69 6d 70 5f 53 65  |).."-.. "Wimp_Se|
00000d00  6e 64 4d 65 73 73 61 67  65 22 2c 31 37 2c 6d 65  |ndMessage",17,me|
00000d10  73 73 61 67 65 5f 62 6c  6f 63 6b 25 2c 30 0d 06  |ssage_block%,0..|
00000d20  2c 05 e1 0d 06 36 04 0d  06 40 0b dd 20 f2 77 69  |,....6...@.. .wi|
00000d30  6d 70 0d 06 4a 6b de 20  64 72 69 76 65 5f 69 63  |mp..Jk. drive_ic|
00000d40  6f 6e 25 28 37 29 2c 20  69 63 6f 6e 5f 62 6c 6f  |on%(7), icon_blo|
00000d50  63 6b 25 20 33 32 2b 34  2c 20 69 63 6f 6e 5f 73  |ck% 32+4, icon_s|
00000d60  70 72 69 74 65 6e 61 6d  65 25 20 33 32 2c 20 69  |pritename% 32, i|
00000d70  63 6f 6e 5f 69 6e 64 69  72 65 63 74 25 20 31 30  |con_indirect% 10|
00000d80  32 34 2c 20 6f 70 65 6e  25 28 37 29 2c 69 6e 66  |24, open%(7),inf|
00000d90  6f 5f 62 6c 6f 63 6b 25  20 33 30 37 32 0d 06 54  |o_block% 3072..T|
00000da0  0d 6f 70 65 6e 25 28 29  3d a3 0d 06 5e 15 64 72  |.open%()=...^.dr|
00000db0  69 76 65 5f 69 63 6f 6e  25 28 29 3d 2d 36 36 0d  |ive_icon%()=-66.|
00000dc0  06 68 32 de 20 6d 65 6e  75 5f 62 6c 6f 63 6b 25  |.h2. menu_block%|
00000dd0  20 33 30 37 32 2c 20 61  6e 73 77 65 72 25 20 32  | 3072, answer% 2|
00000de0  35 36 2c 20 74 69 74 6c  65 5f 70 74 72 25 20 33  |56, title_ptr% 3|
00000df0  32 0d 06 72 1b 69 6e 64  5f 70 74 72 25 3d 69 63  |2..r.ind_ptr%=ic|
00000e00  6f 6e 5f 69 6e 64 69 72  65 63 74 25 0d 06 7c 12  |on_indirect%..|.|
00000e10  24 74 69 74 6c 65 5f 70  74 72 25 3d 22 22 0d 06  |$title_ptr%=""..|
00000e20  86 04 0d 06 90 14 69 63  6f 6e 5f 62 6c 6f 63 6b  |......icon_block|
00000e30  25 21 30 3d 2d 32 0d 06  9a 13 69 63 6f 6e 5f 62  |%!0=-2....icon_b|
00000e40  6c 6f 63 6b 25 21 34 3d  30 0d 06 a4 15 69 63 6f  |lock%!4=0....ico|
00000e50  6e 5f 62 6c 6f 63 6b 25  21 38 3d 2d 31 36 0d 06  |n_block%!8=-16..|
00000e60  ae 16 69 63 6f 6e 5f 62  6c 6f 63 6b 25 21 31 32  |..icon_block%!12|
00000e70  3d 31 30 30 0d 06 b8 15  69 63 6f 6e 5f 62 6c 6f  |=100....icon_blo|
00000e80  63 6b 25 21 31 36 3d 36  30 0d 06 c2 3b 69 63 6f  |ck%!16=60...;ico|
00000e90  6e 5f 62 6c 6f 63 6b 25  21 32 30 3d 25 31 30 30  |n_block%!20=%100|
00000ea0  30 30 31 30 31 31 20 84  20 28 37 3c 3c 32 34 29  |001011 . (7<<24)|
00000eb0  20 84 20 28 31 3c 3c 32  38 29 20 84 20 28 33 3c  | . (1<<28) . (3<|
00000ec0  3c 31 32 29 0d 06 cc 14  69 63 6f 6e 5f 62 6c 6f  |<12)....icon_blo|
00000ed0  63 6b 25 21 32 34 3d 30  0d 06 d6 23 69 63 6f 6e  |ck%!24=0...#icon|
00000ee0  5f 62 6c 6f 63 6b 25 21  32 38 3d 69 63 6f 6e 5f  |_block%!28=icon_|
00000ef0  73 70 72 69 74 65 6e 61  6d 65 25 0d 06 e0 14 69  |spritename%....i|
00000f00  63 6f 6e 5f 62 6c 6f 63  6b 25 21 33 32 3d 33 0d  |con_block%!32=3.|
00000f10  06 ea 33 24 69 63 6f 6e  5f 73 70 72 69 74 65 6e  |..3$icon_spriten|
00000f20  61 6d 65 25 3d 22 73 66  6c 6f 70 70 79 35 2e 32  |ame%="sfloppy5.2|
00000f30  35 2c 66 6c 6f 70 70 79  35 2e 32 35 22 2b bd 28  |5,floppy5.25"+.(|
00000f40  30 29 0d 06 f4 04 0d 06  fe 17 e3 20 64 72 69 76  |0)......... driv|
00000f50  65 25 3d 37 20 b8 20 30  20 88 20 2d 31 0d 07 08  |e%=7 . 0 . -1...|
00000f60  1a e7 20 64 69 73 70 6c  61 79 25 28 64 72 69 76  |.. display%(driv|
00000f70  65 25 29 3d b9 20 8c 0d  07 12 18 64 72 69 76 65  |e%)=. .....drive|
00000f80  24 3d 22 3a 22 2b c3 28  64 72 69 76 65 25 29 0d  |$=":"+.(drive%).|
00000f90  07 1c 2b e7 20 64 72 69  76 65 25 3d 70 61 72 74  |..+. drive%=part|
00000fa0  69 74 69 6f 6e 5f 64 72  69 76 65 25 20 8c 20 64  |ition_drive% . d|
00000fb0  72 69 76 65 24 2b 3d 22  76 22 0d 07 26 19 24 69  |rive$+="v"..&.$i|
00000fc0  6e 64 5f 70 74 72 25 3d  64 72 69 76 65 24 2b bd  |nd_ptr%=drive$+.|
00000fd0  28 30 29 0d 07 30 1b 69  63 6f 6e 5f 62 6c 6f 63  |(0)..0.icon_bloc|
00000fe0  6b 25 21 32 34 3d 69 6e  64 5f 70 74 72 25 0d 07  |k%!24=ind_ptr%..|
00000ff0  3a 2d c8 99 20 22 57 69  6d 70 5f 43 72 65 61 74  |:-.. "Wimp_Creat|
00001000  65 49 63 6f 6e 22 2c 2c  69 63 6f 6e 5f 62 6c 6f  |eIcon",,icon_blo|
00001010  63 6b 25 20 b8 20 69 63  6f 6e 25 0d 07 44 1d 64  |ck% . icon%..D.d|
00001020  72 69 76 65 5f 69 63 6f  6e 25 28 64 72 69 76 65  |rive_icon%(drive|
00001030  25 29 3d 69 63 6f 6e 25  0d 07 4e 10 69 6e 64 5f  |%)=icon%..N.ind_|
00001040  70 74 72 25 2b 3d 31 36  0d 07 58 05 cd 0d 07 62  |ptr%+=16..X....b|
00001050  05 ed 0d 07 6c 04 0d 07  76 31 c8 99 20 22 57 69  |....l...v1.. "Wi|
00001060  6d 70 5f 4f 70 65 6e 54  65 6d 70 6c 61 74 65 22  |mp_OpenTemplate"|
00001070  2c 2c 22 3c 44 46 53 24  44 69 72 3e 2e 54 65 6d  |,,"<DFS$Dir>.Tem|
00001080  70 6c 61 74 65 73 22 0d  07 80 62 c8 99 20 22 57  |plates"...b.. "W|
00001090  69 6d 70 5f 4c 6f 61 64  54 65 6d 70 6c 61 74 65  |imp_LoadTemplate|
000010a0  22 2c 2c 69 6e 66 6f 5f  62 6c 6f 63 6b 25 2c 69  |",,info_block%,i|
000010b0  6e 66 6f 5f 62 6c 6f 63  6b 25 2b 31 35 33 36 2c  |nfo_block%+1536,|
000010c0  69 6e 66 6f 5f 62 6c 6f  63 6b 25 2b 33 30 37 32  |info_block%+3072|
000010d0  2c 2d 31 2c 22 49 6e 66  6f 22 2c 30 20 b8 20 2c  |,-1,"Info",0 . ,|
000010e0  2c 2c 2c 2c 2c 6e 5f 74  25 0d 07 8a 1b c8 99 20  |,,,,,n_t%...... |
000010f0  22 57 69 6d 70 5f 43 6c  6f 73 65 54 65 6d 70 6c  |"Wimp_CloseTempl|
00001100  61 74 65 22 0d 07 94 04  0d 07 9e 36 c8 99 20 22  |ate".......6.. "|
00001110  57 69 6d 70 5f 43 72 65  61 74 65 57 69 6e 64 6f  |Wimp_CreateWindo|
00001120  77 22 2c 2c 69 6e 66 6f  5f 62 6c 6f 63 6b 25 20  |w",,info_block% |
00001130  b8 20 69 6e 66 6f 5f 68  61 6e 64 6c 65 25 0d 07  |. info_handle%..|
00001140  a8 04 0d 07 b2 27 f2 73  65 74 75 70 5f 6d 65 6e  |.....'.setup_men|
00001150  75 28 6d 65 6e 75 5f 62  6c 6f 63 6b 25 2c 22 44  |u(menu_block%,"D|
00001160  46 53 3a 22 2c 31 36 30  29 0d 07 bc 29 f2 6d 65  |FS:",160)...).me|
00001170  6e 75 5f 74 65 6e 74 72  79 28 6d 65 6e 75 5f 62  |nu_tentry(menu_b|
00001180  6c 6f 63 6b 25 2b 32 35  36 30 2c 22 4d 69 73 63  |lock%+2560,"Misc|
00001190  22 29 0d 07 c6 1f f2 6d  65 6e 75 5f 74 65 6e 74  |").....menu_tent|
000011a0  72 79 28 2d 31 2c 22 44  69 73 6d 6f 75 6e 74 22  |ry(-1,"Dismount"|
000011b0  29 0d 07 d0 2b f2 6d 65  6e 75 5f 74 65 6e 74 72  |)...+.menu_tentr|
000011c0  79 28 6d 65 6e 75 5f 62  6c 6f 63 6b 25 2b 31 35  |y(menu_block%+15|
000011d0  33 36 2c 22 46 6f 72 6d  61 74 22 29 0d 07 da 2b  |36,"Format")...+|
000011e0  f2 6d 65 6e 75 5f 74 65  6e 74 72 79 28 6d 65 6e  |.menu_tentry(men|
000011f0  75 5f 62 6c 6f 63 6b 25  2b 31 30 32 34 2c 22 42  |u_block%+1024,"B|
00001200  61 63 6b 75 70 22 29 0d  07 e4 1d f2 6d 65 6e 75  |ackup").....menu|
00001210  5f 74 65 6e 74 72 79 28  2d 31 2c 22 56 65 72 69  |_tentry(-1,"Veri|
00001220  66 79 22 29 0d 07 ee 1b  f2 6d 65 6e 75 5f 74 65  |fy").....menu_te|
00001230  6e 74 72 79 28 2d 31 2c  22 46 72 65 65 22 29 0d  |ntry(-1,"Free").|
00001240  07 f8 0f f2 6d 65 6e 75  5f 63 6c 6f 73 65 0d 08  |....menu_close..|
00001250  02 04 0d 08 0c 31 f2 73  65 74 75 70 5f 6d 65 6e  |.....1.setup_men|
00001260  75 28 6d 65 6e 75 5f 62  6c 6f 63 6b 25 2b 35 31  |u(menu_block%+51|
00001270  32 2c 22 44 69 73 63 20  74 69 74 6c 65 22 2c 31  |2,"Disc title",1|
00001280  37 36 29 0d 08 16 49 f2  6d 65 6e 75 5f 65 6e 74  |76)...I.menu_ent|
00001290  72 79 57 28 26 30 34 2c  2d 31 2c 25 31 30 30 30  |ryW(&04,-1,%1000|
000012a0  31 30 30 30 31 20 84 20  28 31 35 3c 3c 31 32 29  |10001 . (15<<12)|
000012b0  20 84 20 28 37 3c 3c 32  34 29 2c 74 69 74 6c 65  | . (7<<24),title|
000012c0  5f 70 74 72 25 2c 2d 31  2c 31 33 29 0d 08 20 0f  |_ptr%,-1,13).. .|
000012d0  f2 6d 65 6e 75 5f 63 6c  6f 73 65 0d 08 2a 04 0d  |.menu_close..*..|
000012e0  08 34 2d f2 73 65 74 75  70 5f 6d 65 6e 75 28 6d  |.4-.setup_menu(m|
000012f0  65 6e 75 5f 62 6c 6f 63  6b 25 2b 31 30 32 34 2c  |enu_block%+1024,|
00001300  22 44 65 73 74 6e 2e 22  2c 38 30 29 0d 08 3e 12  |"Destn.",80)..>.|
00001310  e3 20 64 72 69 76 65 25  3d 30 20 b8 20 37 0d 08  |. drive%=0 . 7..|
00001320  48 1e f2 6d 65 6e 75 5f  63 65 6e 74 72 79 28 2d  |H..menu_centry(-|
00001330  31 2c c3 28 64 72 69 76  65 25 29 29 0d 08 52 05  |1,.(drive%))..R.|
00001340  ed 0d 08 5c 0f f2 6d 65  6e 75 5f 63 6c 6f 73 65  |...\..menu_close|
00001350  0d 08 66 04 0d 08 70 2d  f2 73 65 74 75 70 5f 6d  |..f...p-.setup_m|
00001360  65 6e 75 28 6d 65 6e 75  5f 62 6c 6f 63 6b 25 2b  |enu(menu_block%+|
00001370  31 35 33 36 2c 22 54 72  61 63 6b 73 22 2c 38 30  |1536,"Tracks",80|
00001380  29 0d 08 7a 27 f2 6d 65  6e 75 5f 63 65 6e 74 72  |)..z'.menu_centr|
00001390  79 28 6d 65 6e 75 5f 62  6c 6f 63 6b 25 2b 32 30  |y(menu_block%+20|
000013a0  34 38 2c 22 34 30 22 29  0d 08 84 27 f2 6d 65 6e  |48,"40")...'.men|
000013b0  75 5f 63 65 6e 74 72 79  28 6d 65 6e 75 5f 62 6c  |u_centry(menu_bl|
000013c0  6f 63 6b 25 2b 32 30 34  38 2c 22 38 30 22 29 0d  |ock%+2048,"80").|
000013d0  08 8e 0f f2 6d 65 6e 75  5f 63 6c 6f 73 65 0d 08  |....menu_close..|
000013e0  98 04 0d 08 a2 31 f2 73  65 74 75 70 5f 6d 65 6e  |.....1.setup_men|
000013f0  75 28 6d 65 6e 75 5f 62  6c 6f 63 6b 25 2b 32 30  |u(menu_block%+20|
00001400  34 38 2c 22 44 69 73 63  20 74 79 70 65 22 2c 31  |48,"Disc type",1|
00001410  36 30 29 0d 08 ac 1c f2  6d 65 6e 75 5f 74 65 6e  |60).....menu_ten|
00001420  74 72 79 28 2d 31 2c 22  41 63 6f 72 6e 22 29 0d  |try(-1,"Acorn").|
00001430  08 b6 1f f2 6d 65 6e 75  5f 74 65 6e 74 72 79 28  |....menu_tentry(|
00001440  2d 31 2c 22 53 6f 6c 69  64 69 73 6b 22 29 0d 08  |-1,"Solidisk")..|
00001450  c0 1e f2 6d 65 6e 75 5f  74 65 6e 74 72 79 28 2d  |...menu_tentry(-|
00001460  31 2c 22 57 61 74 66 6f  72 64 22 29 0d 08 ca 0f  |1,"Watford")....|
00001470  f2 6d 65 6e 75 5f 63 6c  6f 73 65 0d 08 d4 04 0d  |.menu_close.....|
00001480  08 de 2c f2 73 65 74 75  70 5f 6d 65 6e 75 28 6d  |..,.setup_menu(m|
00001490  65 6e 75 5f 62 6c 6f 63  6b 25 2b 32 35 36 30 2c  |enu_block%+2560,|
000014a0  22 4d 69 73 63 22 2c 31  36 30 29 0d 08 e8 25 f2  |"Misc",160)...%.|
000014b0  6d 65 6e 75 5f 74 65 6e  74 72 79 28 69 6e 66 6f  |menu_tentry(info|
000014c0  5f 68 61 6e 64 6c 65 25  2c 22 49 6e 66 6f 22 29  |_handle%,"Info")|
000014d0  0d 08 f2 2d f2 6d 65 6e  75 5f 74 65 6e 74 72 79  |...-.menu_tentry|
000014e0  28 6d 65 6e 75 5f 62 6c  6f 63 6b 25 2b 35 31 32  |(menu_block%+512|
000014f0  2c 22 4e 61 6d 65 20 64  69 73 63 22 29 0d 08 fc  |,"Name disc")...|
00001500  1e f2 6d 65 6e 75 5f 74  65 6e 74 72 79 28 2d 31  |..menu_tentry(-1|
00001510  2c 22 50 72 6f 74 65 63  74 22 29 0d 09 06 20 f2  |,"Protect")... .|
00001520  6d 65 6e 75 5f 74 65 6e  74 72 79 28 2d 31 2c 22  |menu_tentry(-1,"|
00001530  55 6e 70 72 6f 74 65 63  74 22 29 0d 09 10 20 f2  |Unprotect")... .|
00001540  6d 65 6e 75 5f 74 65 6e  74 72 79 28 2d 31 2c 22  |menu_tentry(-1,"|
00001550  53 77 61 70 20 63 61 74  73 22 29 0d 09 1a 1b f2  |Swap cats").....|
00001560  6d 65 6e 75 5f 74 65 6e  74 72 79 28 2d 31 2c 22  |menu_tentry(-1,"|
00001570  51 75 69 74 22 29 0d 09  24 0f f2 6d 65 6e 75 5f  |Quit")..$..menu_|
00001580  63 6c 6f 73 65 0d 09 2e  04 0d 09 38 16 6d 65 6e  |close......8.men|
00001590  75 5f 63 75 72 72 64 72  69 76 65 25 3d 2d 31 0d  |u_currdrive%=-1.|
000015a0  09 42 05 e1 0d 09 4c 04  0d 09 56 27 dd 20 f2 73  |.B....L...V'. .s|
000015b0  65 74 75 70 5f 6d 65 6e  75 28 62 6c 6f 63 6b 25  |etup_menu(block%|
000015c0  2c 74 69 74 6c 65 24 2c  77 69 64 74 68 25 29 0d  |,title$,width%).|
000015d0  09 60 12 24 62 6c 6f 63  6b 25 3d 74 69 74 6c 65  |.`.$block%=title|
000015e0  24 0d 09 6a 0f 62 6c 6f  63 6b 25 3f 31 32 3d 37  |$..j.block%?12=7|
000015f0  0d 09 74 0f 62 6c 6f 63  6b 25 3f 31 33 3d 32 0d  |..t.block%?13=2.|
00001600  09 7e 0f 62 6c 6f 63 6b  25 3f 31 34 3d 37 0d 09  |.~.block%?14=7..|
00001610  88 0f 62 6c 6f 63 6b 25  3f 31 35 3d 30 0d 09 92  |..block%?15=0...|
00001620  14 62 6c 6f 63 6b 25 21  31 36 3d 77 69 64 74 68  |.block%!16=width|
00001630  25 0d 09 9c 10 62 6c 6f  63 6b 25 21 32 30 3d 34  |%....block%!20=4|
00001640  34 0d 09 a6 0f 62 6c 6f  63 6b 25 21 32 34 3d 30  |4....block%!24=0|
00001650  0d 09 b0 17 6d 65 6e 75  5f 70 74 72 25 3d 62 6c  |....menu_ptr%=bl|
00001660  6f 63 6b 25 2b 32 38 0d  09 ba 05 e1 0d 09 c4 04  |ock%+28.........|
00001670  0d 09 ce 3a dd 20 f2 6d  65 6e 75 5f 65 6e 74 72  |...:. .menu_entr|
00001680  79 28 6d 65 6e 75 5f 66  6c 61 67 73 25 2c 73 75  |y(menu_flags%,su|
00001690  62 5f 70 74 72 25 2c 69  63 6f 6e 5f 66 6c 61 67  |b_ptr%,icon_flag|
000016a0  73 25 2c 65 6e 74 72 79  24 29 0d 09 d8 1b 6d 65  |s%,entry$)....me|
000016b0  6e 75 5f 70 74 72 25 21  30 3d 6d 65 6e 75 5f 66  |nu_ptr%!0=menu_f|
000016c0  6c 61 67 73 25 0d 09 e2  18 6d 65 6e 75 5f 70 74  |lags%....menu_pt|
000016d0  72 25 21 34 3d 73 75 62  5f 70 74 72 25 0d 09 ec  |r%!4=sub_ptr%...|
000016e0  1b 6d 65 6e 75 5f 70 74  72 25 21 38 3d 69 63 6f  |.menu_ptr%!8=ico|
000016f0  6e 5f 66 6c 61 67 73 25  0d 09 f6 1f 24 28 6d 65  |n_flags%....$(me|
00001700  6e 75 5f 70 74 72 25 2b  31 32 29 3d c0 65 6e 74  |nu_ptr%+12)=.ent|
00001710  72 79 24 2c 31 31 29 0d  0a 00 11 6d 65 6e 75 5f  |ry$,11)....menu_|
00001720  70 74 72 25 2b 3d 32 34  0d 0a 0a 05 e1 0d 0a 14  |ptr%+=24........|
00001730  04 0d 0a 1e 4c dd 20 f2  6d 65 6e 75 5f 65 6e 74  |....L. .menu_ent|
00001740  72 79 57 28 6d 65 6e 75  5f 66 6c 61 67 73 25 2c  |ryW(menu_flags%,|
00001750  73 75 62 5f 70 74 72 25  2c 69 63 6f 6e 5f 66 6c  |sub_ptr%,icon_fl|
00001760  61 67 73 25 2c 65 6e 74  72 79 30 25 2c 65 6e 74  |ags%,entry0%,ent|
00001770  72 79 31 25 2c 65 6e 74  72 79 32 25 29 0d 0a 28  |ry1%,entry2%)..(|
00001780  1b 6d 65 6e 75 5f 70 74  72 25 21 30 3d 6d 65 6e  |.menu_ptr%!0=men|
00001790  75 5f 66 6c 61 67 73 25  0d 0a 32 18 6d 65 6e 75  |u_flags%..2.menu|
000017a0  5f 70 74 72 25 21 34 3d  73 75 62 5f 70 74 72 25  |_ptr%!4=sub_ptr%|
000017b0  0d 0a 3c 1b 6d 65 6e 75  5f 70 74 72 25 21 38 3d  |..<.menu_ptr%!8=|
000017c0  69 63 6f 6e 5f 66 6c 61  67 73 25 0d 0a 46 18 6d  |icon_flags%..F.m|
000017d0  65 6e 75 5f 70 74 72 25  21 31 32 3d 65 6e 74 72  |enu_ptr%!12=entr|
000017e0  79 30 25 0d 0a 50 18 6d  65 6e 75 5f 70 74 72 25  |y0%..P.menu_ptr%|
000017f0  21 31 36 3d 65 6e 74 72  79 31 25 0d 0a 5a 18 6d  |!16=entry1%..Z.m|
00001800  65 6e 75 5f 70 74 72 25  21 32 30 3d 65 6e 74 72  |enu_ptr%!20=entr|
00001810  79 32 25 0d 0a 64 11 6d  65 6e 75 5f 70 74 72 25  |y2%..d.menu_ptr%|
00001820  2b 3d 32 34 0d 0a 6e 05  e1 0d 0a 78 04 0d 0a 82  |+=24..n....x....|
00001830  23 dd 20 f2 6d 65 6e 75  5f 74 65 6e 74 72 79 28  |#. .menu_tentry(|
00001840  73 75 62 5f 70 74 72 25  2c 65 6e 74 72 79 24 29  |sub_ptr%,entry$)|
00001850  0d 0a 8c 33 f2 6d 65 6e  75 5f 65 6e 74 72 79 28  |...3.menu_entry(|
00001860  30 2c 73 75 62 5f 70 74  72 25 2c 25 31 30 30 30  |0,sub_ptr%,%1000|
00001870  31 20 84 20 28 37 3c 3c  32 34 29 2c 65 6e 74 72  |1 . (7<<24),entr|
00001880  79 24 29 0d 0a 96 05 e1  0d 0a a0 04 0d 0a aa 23  |y$)............#|
00001890  dd 20 f2 6d 65 6e 75 5f  63 65 6e 74 72 79 28 73  |. .menu_centry(s|
000018a0  75 62 5f 70 74 72 25 2c  65 6e 74 72 79 24 29 0d  |ub_ptr%,entry$).|
000018b0  0a b4 33 f2 6d 65 6e 75  5f 65 6e 74 72 79 28 30  |..3.menu_entry(0|
000018c0  2c 73 75 62 5f 70 74 72  25 2c 25 31 31 30 30 31  |,sub_ptr%,%11001|
000018d0  20 84 20 28 37 3c 3c 32  34 29 2c 65 6e 74 72 79  | . (7<<24),entry|
000018e0  24 29 0d 0a be 05 e1 0d  0a c8 04 0d 0a d2 11 dd  |$)..............|
000018f0  20 f2 6d 65 6e 75 5f 63  6c 6f 73 65 0d 0a dc 11  | .menu_close....|
00001900  6d 65 6e 75 5f 70 74 72  25 2d 3d 32 34 0d 0a e6  |menu_ptr%-=24...|
00001910  21 21 6d 65 6e 75 5f 70  74 72 25 3d 28 21 6d 65  |!!menu_ptr%=(!me|
00001920  6e 75 5f 70 74 72 25 29  20 84 20 26 38 30 0d 0a  |nu_ptr%) . &80..|
00001930  f0 05 e1 0d 0a fa 04 0d  0b 04 10 dd 20 f2 70 68  |............ .ph|
00001940  79 73 69 63 61 6c 73 0d  0b 0e 22 c8 99 20 22 41  |ysicals...".. "A|
00001950  44 46 53 5f 44 72 69 76  65 73 22 20 b8 20 2c 6e  |DFS_Drives" . ,n|
00001960  66 6c 6f 70 70 69 65 73  25 0d 0b 18 14 e7 20 6e  |floppies%..... n|
00001970  66 6c 6f 70 70 69 65 73  25 3e 30 20 8c 0d 0b 22  |floppies%>0 ..."|
00001980  1d e3 20 64 72 69 76 65  25 3d 30 20 b8 20 6e 66  |.. drive%=0 . nf|
00001990  6c 6f 70 70 69 65 73 25  2d 31 0d 0b 2c 14 f2 64  |loppies%-1..,..d|
000019a0  69 73 70 6c 61 79 28 64  72 69 76 65 25 29 0d 0b  |isplay(drive%)..|
000019b0  36 05 ed 0d 0b 40 05 cd  0d 0b 4a 05 e1 0d 0b 54  |6....@....J....T|
000019c0  04 0d 0b 5e 19 dd 20 f2  64 69 73 70 6c 61 79 28  |...^.. .display(|
000019d0  70 68 79 73 69 63 61 6c  25 29 0d 0b 68 12 c8 8e  |physical%)..h...|
000019e0  20 70 68 79 73 69 63 61  6c 25 20 ca 0d 0b 72 25  | physical% ...r%|
000019f0  c9 20 30 20 3a 20 64 69  73 70 6c 61 79 25 28 30  |. 0 : display%(0|
00001a00  29 3d b9 3a 64 69 73 70  6c 61 79 25 28 32 29 3d  |)=.:display%(2)=|
00001a10  b9 0d 0b 7c 25 c9 20 31  20 3a 20 64 69 73 70 6c  |...|%. 1 : displ|
00001a20  61 79 25 28 31 29 3d b9  3a 64 69 73 70 6c 61 79  |ay%(1)=.:display|
00001a30  25 28 33 29 3d b9 0d 0b  86 25 c9 20 32 20 3a 20  |%(3)=....%. 2 : |
00001a40  64 69 73 70 6c 61 79 25  28 34 29 3d b9 3a 64 69  |display%(4)=.:di|
00001a50  73 70 6c 61 79 25 28 36  29 3d b9 0d 0b 90 25 c9  |splay%(6)=....%.|
00001a60  20 33 20 3a 20 64 69 73  70 6c 61 79 25 28 35 29  | 3 : display%(5)|
00001a70  3d b9 3a 64 69 73 70 6c  61 79 25 28 37 29 3d b9  |=.:display%(7)=.|
00001a80  0d 0b 9a 05 cb 0d 0b a4  05 e1 0d 0b ae 04 0d 0b  |................|
00001a90  b8 1c dd 20 f2 62 75 74  74 6f 6e 5f 63 68 61 6e  |... .button_chan|
00001aa0  67 65 28 62 6c 6f 63 6b  25 29 0d 0b c2 29 ea 20  |ge(block%)...). |
00001ab0  69 63 6f 6e 25 2c 20 68  61 6e 64 6c 65 25 2c 20  |icon%, handle%, |
00001ac0  62 75 74 74 6f 6e 25 2c  20 6d 5f 78 25 2c 20 6d  |button%, m_x%, m|
00001ad0  5f 79 25 0d 0b cc 15 68  61 6e 64 6c 65 25 3d 62  |_y%....handle%=b|
00001ae0  6c 6f 63 6b 25 21 31 32  0d 0b d6 13 69 63 6f 6e  |lock%!12....icon|
00001af0  25 3d 62 6c 6f 63 6b 25  21 31 36 0d 0b e0 14 62  |%=block%!16....b|
00001b00  75 74 74 6f 6e 25 3d 62  6c 6f 63 6b 25 21 38 0d  |utton%=block%!8.|
00001b10  0b ea 11 6d 5f 78 25 3d  62 6c 6f 63 6b 25 21 30  |...m_x%=block%!0|
00001b20  0d 0b f4 11 6d 5f 79 25  3d 62 6c 6f 63 6b 25 21  |....m_y%=block%!|
00001b30  34 0d 0b fe 1d e7 20 68  61 6e 64 6c 65 25 3d 2d  |4..... handle%=-|
00001b40  32 20 80 20 69 63 6f 6e  25 3e 3d 30 20 8c 0d 0c  |2 . icon%>=0 ...|
00001b50  08 23 64 72 69 76 65 25  3d a4 67 65 74 64 72 69  |.#drive%=.getdri|
00001b60  76 65 66 72 6f 6d 69 63  6f 6e 28 69 63 6f 6e 25  |vefromicon(icon%|
00001b70  29 0d 0c 12 11 e7 20 64  72 69 76 65 25 3e 3d 30  |)..... drive%>=0|
00001b80  20 8c 0d 0c 1c 20 70 61  74 68 24 3d 22 64 66 73  | .... path$="dfs|
00001b90  3a 3a 22 2b c3 28 64 72  69 76 65 25 29 2b 22 2e  |::"+.(drive%)+".|
00001ba0  24 22 0d 0c 26 1a e7 20  28 62 75 74 74 6f 6e 25  |$"..&.. (button%|
00001bb0  20 80 20 25 31 30 31 29  3e 30 20 8c 0d 0c 30 13  | . %101)>0 ...0.|
00001bc0  f2 6f 70 65 6e 64 69 72  28 70 61 74 68 24 29 0d  |.opendir(path$).|
00001bd0  0c 3a 05 cc 0d 0c 44 21  f2 64 72 69 76 65 5f 6d  |.:....D!.drive_m|
00001be0  65 6e 75 28 64 72 69 76  65 25 2c 6d 5f 78 25 2c  |enu(drive%,m_x%,|
00001bf0  6d 5f 79 25 29 0d 0c 4e  05 cd 0d 0c 58 05 cd 0d  |m_y%)..N....X...|
00001c00  0c 62 05 cd 0d 0c 6c 05  e1 0d 0c 76 04 0d 0c 80  |.b....l....v....|
00001c10  1e dd 20 a4 67 65 74 64  72 69 76 65 66 72 6f 6d  |.. .getdrivefrom|
00001c20  69 63 6f 6e 28 69 63 6f  6e 25 29 0d 0c 8a 12 ea  |icon(icon%).....|
00001c30  20 64 72 69 76 65 5f 66  6f 75 6e 64 25 0d 0c 94  | drive_found%...|
00001c40  13 64 72 69 76 65 5f 66  6f 75 6e 64 25 3d 2d 31  |.drive_found%=-1|
00001c50  0d 0c 9e 12 e3 20 64 72  69 76 65 25 3d 30 20 b8  |..... drive%=0 .|
00001c60  20 37 0d 0c a8 3e e7 20  64 72 69 76 65 5f 69 63  | 7...>. drive_ic|
00001c70  6f 6e 25 28 64 72 69 76  65 25 29 3d 69 63 6f 6e  |on%(drive%)=icon|
00001c80  25 20 8c 20 64 72 69 76  65 5f 66 6f 75 6e 64 25  |% . drive_found%|
00001c90  3d 64 72 69 76 65 25 3a  64 72 69 76 65 25 3d 37  |=drive%:drive%=7|
00001ca0  0d 0c b2 05 ed 0d 0c bc  11 3d 64 72 69 76 65 5f  |.........=drive_|
00001cb0  66 6f 75 6e 64 25 0d 0c  c6 04 0d 0c d0 23 dd 20  |found%.......#. |
00001cc0  f2 64 72 69 76 65 5f 6d  65 6e 75 28 64 72 69 76  |.drive_menu(driv|
00001cd0  65 25 2c 6d 5f 78 25 2c  6d 5f 79 25 29 0d 0c da  |e%,m_x%,m_y%)...|
00001ce0  1a 6d 65 6e 75 5f 63 75  72 72 64 72 69 76 65 25  |.menu_currdrive%|
00001cf0  3d 64 72 69 76 65 25 0d  0c e4 22 24 6d 65 6e 75  |=drive%..."$menu|
00001d00  5f 62 6c 6f 63 6b 25 3d  22 44 46 53 3a 3a 22 2b  |_block%="DFS::"+|
00001d10  c3 28 64 72 69 76 65 25  29 0d 0c ee 12 24 74 69  |.(drive%)....$ti|
00001d20  74 6c 65 5f 70 74 72 25  3d 22 22 0d 0c f8 35 c8  |tle_ptr%=""...5.|
00001d30  99 20 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |. "Wimp_CreateMe|
00001d40  6e 75 22 2c 2c 6d 65 6e  75 5f 62 6c 6f 63 6b 25  |nu",,menu_block%|
00001d50  2c 6d 5f 78 25 2d 36 34  2c 31 39 32 2b 31 36 38  |,m_x%-64,192+168|
00001d60  0d 0d 02 05 e1 0d 0d 0c  04 0d 0d 16 1a dd 20 f2  |.............. .|
00001d70  6d 65 6e 75 5f 73 65 6c  65 63 74 28 62 6c 6f 63  |menu_select(bloc|
00001d80  6b 25 29 0d 0d 20 15 ea  20 61 6e 73 77 65 72 24  |k%).. .. answer$|
00001d90  2c 20 64 72 69 76 65 25  0d 0d 2a 41 c8 99 20 22  |, drive%..*A.. "|
00001da0  57 69 6d 70 5f 44 65 63  6f 64 65 4d 65 6e 75 22  |Wimp_DecodeMenu"|
00001db0  2c 2c 6d 65 6e 75 5f 62  6c 6f 63 6b 25 2c 62 6c  |,,menu_block%,bl|
00001dc0  6f 63 6b 25 2c 61 6e 73  77 65 72 25 20 b8 20 2c  |ock%,answer% . ,|
00001dd0  2c 2c 61 6e 73 77 65 72  24 0d 0d 34 1a 64 72 69  |,,answer$..4.dri|
00001de0  76 65 25 3d 6d 65 6e 75  5f 63 75 72 72 64 72 69  |ve%=menu_currdri|
00001df0  76 65 25 0d 0d 3e 14 64  72 69 76 65 24 3d c3 28  |ve%..>.drive$=.(|
00001e00  64 72 69 76 65 25 29 0d  0d 48 12 70 72 65 66 69  |drive%)..H.prefi|
00001e10  78 24 3d 22 64 66 73 3a  22 0d 0d 52 21 70 61 74  |x$="dfs:"..R!pat|
00001e20  68 24 3d 70 72 65 66 69  78 24 2b 22 3a 22 2b 64  |h$=prefix$+":"+d|
00001e30  72 69 76 65 24 2b 22 2e  24 22 0d 0d 5c 10 c8 8e  |rive$+".$"..\...|
00001e40  20 61 6e 73 77 65 72 24  20 ca 0d 0d 66 2f c9 20  | answer$ ...f/. |
00001e50  22 56 65 72 69 66 79 22  20 3a 20 f2 64 66 73 5f  |"Verify" : .dfs_|
00001e60  63 6f 6d 6d 61 6e 64 28  22 56 65 72 69 66 79 20  |command("Verify |
00001e70  22 2b 64 72 69 76 65 24  29 0d 0d 70 2b c9 20 22  |"+drive$)..p+. "|
00001e80  46 72 65 65 22 20 3a 20  f2 64 66 73 5f 63 6f 6d  |Free" : .dfs_com|
00001e90  6d 61 6e 64 28 22 46 72  65 65 20 22 2b 64 72 69  |mand("Free "+dri|
00001ea0  76 65 24 29 0d 0d 7a 23  c9 20 22 44 69 73 6d 6f  |ve$)..z#. "Dismo|
00001eb0  75 6e 74 22 20 3a 20 f2  63 6c 6f 73 65 64 69 72  |unt" : .closedir|
00001ec0  28 70 61 74 68 24 29 0d  0d 84 3a c9 20 22 42 61  |(path$)...:. "Ba|
00001ed0  63 6b 75 70 22 20 3a 20  f2 64 66 73 5f 63 6f 6d  |ckup" : .dfs_com|
00001ee0  6d 61 6e 64 28 22 42 61  63 6b 75 70 20 22 2b 64  |mand("Backup "+d|
00001ef0  72 69 76 65 24 2b 22 20  22 2b 64 72 69 76 65 24  |rive$+" "+drive$|
00001f00  29 0d 0d 8e 36 c9 20 22  4d 69 73 63 2e 44 65 74  |)...6. "Misc.Det|
00001f10  61 69 6c 73 22 20 3a 20  f2 64 66 73 5f 63 6f 6d  |ails" : .dfs_com|
00001f20  6d 61 6e 64 28 22 44 65  74 61 69 6c 73 20 22 2b  |mand("Details "+|
00001f30  64 72 69 76 65 24 29 0d  0d 98 36 c9 20 22 4d 69  |drive$)...6. "Mi|
00001f40  73 63 2e 50 72 6f 74 65  63 74 22 20 3a 20 f2 64  |sc.Protect" : .d|
00001f50  66 73 5f 63 6f 6d 6d 61  6e 64 28 22 50 72 6f 74  |fs_command("Prot|
00001f60  65 63 74 20 22 2b 64 72  69 76 65 24 29 0d 0d a2  |ect "+drive$)...|
00001f70  3b c9 20 22 4d 69 73 63  2e 55 6e 70 72 6f 74 65  |;. "Misc.Unprote|
00001f80  63 74 22 20 3a 20 f2 64  66 73 5f 63 6f 6d 6d 61  |ct" : .dfs_comma|
00001f90  6e 64 28 22 50 72 6f 74  65 63 74 4f 66 66 20 22  |nd("ProtectOff "|
00001fa0  2b 64 72 69 76 65 24 29  0d 0d ac 35 c9 20 22 4d  |+drive$)...5. "M|
00001fb0  69 73 63 2e 53 77 61 70  20 63 61 74 73 22 20 3a  |isc.Swap cats" :|
00001fc0  20 f2 64 66 73 5f 63 6f  6d 6d 61 6e 64 28 22 53  | .dfs_command("S|
00001fd0  77 61 70 20 22 2b 64 72  69 76 65 24 29 0d 0d b6  |wap "+drive$)...|
00001fe0  22 c9 20 22 4d 69 73 63  2e 51 75 69 74 22 20 3a  |". "Misc.Quit" :|
00001ff0  20 65 6e 64 5f 70 72 6f  67 72 61 6d 25 3d b9 0d  | end_program%=..|
00002000  0d c0 05 cb 0d 0d ca 5f  e7 20 a4 69 6e 28 61 6e  |......._. .in(an|
00002010  73 77 65 72 24 2c 22 4d  69 73 63 2e 4e 61 6d 65  |swer$,"Misc.Name|
00002020  20 64 69 73 63 22 29 20  8c 20 ff 28 22 64 66 73  | disc") . .("dfs|
00002030  3a 44 72 69 76 65 20 22  2b 64 72 69 76 65 24 29  |:Drive "+drive$)|
00002040  3a f2 64 66 73 5f 63 6f  6d 6d 61 6e 64 28 22 54  |:.dfs_command("T|
00002050  69 74 6c 65 20 22 2b 24  74 69 74 6c 65 5f 70 74  |itle "+$title_pt|
00002060  72 25 29 0d 0d d4 4b e7  20 a4 69 6e 28 61 6e 73  |r%)...K. .in(ans|
00002070  77 65 72 24 2c 22 42 61  63 6b 75 70 2e 22 29 20  |wer$,"Backup.") |
00002080  8c 20 f2 64 66 73 5f 63  6f 6d 6d 61 6e 64 28 22  |. .dfs_command("|
00002090  42 61 63 6b 75 70 20 22  2b 64 72 69 76 65 24 2b  |Backup "+drive$+|
000020a0  22 20 22 2b c2 61 6e 73  77 65 72 24 29 29 0d 0d  |" "+.answer$))..|
000020b0  de 2c e7 20 61 6e 73 77  65 72 24 3d 22 46 6f 72  |.,. answer$="For|
000020c0  6d 61 74 22 20 8c 20 61  6e 73 77 65 72 24 3d 22  |mat" . answer$="|
000020d0  46 6f 72 6d 61 74 2e 38  30 22 0d 0d e8 5e e7 20  |Format.80"...^. |
000020e0  61 6e 73 77 65 72 24 3d  22 46 6f 72 6d 61 74 2e  |answer$="Format.|
000020f0  34 30 22 20 84 20 61 6e  73 77 65 72 24 3d 22 46  |40" . answer$="F|
00002100  6f 72 6d 61 74 2e 38 30  22 20 8c 20 f2 64 66 73  |ormat.80" . .dfs|
00002110  5f 63 6f 6d 6d 61 6e 64  28 22 46 6f 72 6d 20 22  |_command("Form "|
00002120  2b c2 61 6e 73 77 65 72  24 2c 32 29 2b 22 20 22  |+.answer$,2)+" "|
00002130  2b 64 72 69 76 65 24 29  0d 0d f2 3d e7 20 a4 69  |+drive$)...=. .i|
00002140  6e 28 61 6e 73 77 65 72  24 2c 22 46 6f 72 6d 61  |n(answer$,"Forma|
00002150  74 2e 34 30 2e 22 29 20  84 20 a4 69 6e 28 61 6e  |t.40.") . .in(an|
00002160  73 77 65 72 24 2c 22 46  6f 72 6d 61 74 2e 38 30  |swer$,"Format.80|
00002170  2e 22 29 20 8c 0d 0d fc  19 74 72 61 63 6b 73 24  |.") .....tracks$|
00002180  3d c1 61 6e 73 77 65 72  24 2c 38 2c 32 29 0d 0e  |=.answer$,8,2)..|
00002190  06 29 66 6f 72 6d 5f 63  6f 6d 6d 61 6e 64 24 3d  |.)form_command$=|
000021a0  c2 61 6e 73 77 65 72 24  2c a9 28 61 6e 73 77 65  |.answer$,.(answe|
000021b0  72 24 29 2d 31 30 29 0d  0e 10 16 c8 8e 20 66 6f  |r$)-10)...... fo|
000021c0  72 6d 5f 63 6f 6d 6d 61  6e 64 24 20 ca 0d 0e 1a  |rm_command$ ....|
000021d0  67 c9 20 22 53 6f 6c 69  64 69 73 6b 22 20 3a 20  |g. "Solidisk" : |
000021e0  ff 28 22 64 66 73 3a 45  6e 61 62 6c 65 20 44 22  |.("dfs:Enable D"|
000021f0  29 3a ff 28 22 22 29 3a  f2 64 66 73 5f 63 6f 6d  |):.(""):.dfs_com|
00002200  6d 61 6e 64 28 22 46 22  2b 74 72 61 63 6b 73 24  |mand("F"+tracks$|
00002210  2b 22 20 22 2b 64 72 69  76 65 24 29 3a ff 28 22  |+" "+drive$):.("|
00002220  64 66 73 3a 45 6e 61 62  6c 65 20 53 22 29 3a ff  |dfs:Enable S"):.|
00002230  28 22 22 29 0d 0e 24 39  c9 20 22 57 61 74 66 6f  |("")..$9. "Watfo|
00002240  72 64 22 20 3a 20 f2 64  66 73 5f 63 6f 6d 6d 61  |rd" : .dfs_comma|
00002250  6e 64 28 22 46 6f 72 6d  22 2b 74 72 61 63 6b 73  |nd("Form"+tracks|
00002260  24 2b 22 20 22 2b 64 72  69 76 65 24 29 0d 0e 2e  |$+" "+drive$)...|
00002270  05 7f 0d 0e 38 2c f2 64  66 73 5f 63 6f 6d 6d 61  |....8,.dfs_comma|
00002280  6e 64 28 22 46 6f 72 6d  20 22 2b 74 72 61 63 6b  |nd("Form "+track|
00002290  73 24 2b 22 20 22 2b 64  72 69 76 65 24 29 0d 0e  |s$+" "+drive$)..|
000022a0  42 05 cb 0d 0e 4c 05 cd  0d 0e 56 16 6d 65 6e 75  |B....L....V.menu|
000022b0  5f 63 75 72 72 64 72 69  76 65 25 3d 2d 31 0d 0e  |_currdrive%=-1..|
000022c0  60 05 e1 0d 0e 6a 04 0d  0e 74 15 dd 20 a4 69 6e  |`....j...t.. .in|
000022d0  28 6d 61 69 6e 24 2c 73  75 62 24 29 0d 0e 7e 0d  |(main$,sub$)..~.|
000022e0  ea 20 72 65 73 75 6c 74  25 0d 0e 88 32 e7 20 c0  |. result%...2. .|
000022f0  6d 61 69 6e 24 2c a9 28  73 75 62 24 29 29 3d 73  |main$,.(sub$))=s|
00002300  75 62 24 20 8c 20 72 65  73 75 6c 74 25 3d b9 20  |ub$ . result%=. |
00002310  8b 20 72 65 73 75 6c 74  25 3d a3 0d 0e 92 0c 3d  |. result%=.....=|
00002320  72 65 73 75 6c 74 25 0d  0e 9c 04 0d 0e a6 17 dd  |result%.........|
00002330  20 a4 6d 61 6b 65 73 74  72 69 6e 67 28 70 74 72  | .makestring(ptr|
00002340  25 29 0d 0e b0 0a ea 20  73 74 72 24 0d 0e ba 0b  |%)..... str$....|
00002350  73 74 72 24 3d 22 22 0d  0e c4 0f c8 95 20 3f 70  |str$=""...... ?p|
00002360  74 72 25 3e 33 31 0d 0e  ce 12 73 74 72 24 2b 3d  |tr%>31....str$+=|
00002370  bd 28 3f 70 74 72 25 29  0d 0e d8 0b 70 74 72 25  |.(?ptr%)....ptr%|
00002380  2b 3d 31 0d 0e e2 05 ce  0d 0e ec 09 3d 73 74 72  |+=1.........=str|
00002390  24 0d 0e f6 04 0d 0f 00  33 f4 20 20 20 43 68 65  |$.......3.   Che|
000023a0  63 6b 73 20 66 6f 72 20  74 68 65 20 70 72 65 73  |cks for the pres|
000023b0  65 6e 63 65 20 6f 66 20  61 20 44 46 53 20 70 61  |ence of a DFS pa|
000023c0  72 74 69 74 69 6f 6e 2e  0d 0f 0a 4b f4 20 20 20  |rtition....K.   |
000023d0  4e 42 20 54 68 65 20 70  61 72 74 69 74 69 6f 6e  |NB The partition|
000023e0  20 73 68 6f 75 6c 64 20  62 65 20 6e 61 6d 65 64  | should be named|
000023f0  20 27 64 72 69 76 65 23  27 2c 20 77 68 65 72 65  | 'drive#', where|
00002400  20 23 20 69 73 20 74 68  65 20 64 72 69 76 65 20  | # is the drive |
00002410  74 68 65 0d 0f 14 26 f4  20 20 20 70 61 72 74 69  |the...&.   parti|
00002420  74 69 6f 6e 20 77 69 6c  6c 20 62 65 20 61 63 63  |tion will be acc|
00002430  65 73 73 65 64 20 61 73  2e 0d 0f 1e 05 20 0d 0f  |essed as..... ..|
00002440  28 15 dd 20 f2 66 69 6e  64 5f 70 61 72 74 69 74  |(.. .find_partit|
00002450  69 6f 6e 0d 0f 32 27 ea  20 6e 65 78 74 25 2c 70  |ion..2'. next%,p|
00002460  61 72 74 69 74 69 6f 6e  5f 64 72 69 76 65 6e 61  |artition_drivena|
00002470  6d 65 25 2c 6e 72 65 61  64 25 0d 0f 3c 1a de 20  |me%,nread%..<.. |
00002480  70 61 72 74 69 74 69 6f  6e 5f 62 6c 6f 63 6b 25  |partition_block%|
00002490  20 32 35 36 0d 0f 46 0b  6e 65 78 74 25 3d 30 0d  | 256..F.next%=0.|
000024a0  0f 50 05 f5 0d 0f 5a 57  c8 99 20 22 4f 53 5f 47  |.P....ZW.. "OS_G|
000024b0  42 50 42 22 2c 31 30 2c  22 3c 44 46 53 24 44 69  |BPB",10,"<DFS$Di|
000024c0  72 3e 22 2c 70 61 72 74  69 74 69 6f 6e 5f 62 6c  |r>",partition_bl|
000024d0  6f 63 6b 25 2c 31 2c 6e  65 78 74 25 2c 32 35 36  |ock%,1,next%,256|
000024e0  2c 22 64 72 69 76 65 23  22 20 b8 20 2c 2c 2c 6e  |,"drive#" . ,,,n|
000024f0  72 65 61 64 25 2c 6e 65  78 74 25 0d 0f 64 18 fd  |read%,next%..d..|
00002500  20 6e 72 65 61 64 25 3d  31 20 84 20 6e 65 78 74  | nread%=1 . next|
00002510  25 3c 30 0d 0f 6e 04 0d  0f 78 28 e7 20 6e 72 65  |%<0..n...x(. nre|
00002520  61 64 25 3d 31 20 80 20  70 61 72 74 69 74 69 6f  |ad%=1 . partitio|
00002530  6e 5f 62 6c 6f 63 6b 25  21 31 36 3d 31 20 8c 0d  |n_block%!16=1 ..|
00002540  0f 82 31 70 61 72 74 69  74 69 6f 6e 5f 64 72 69  |..1partition_dri|
00002550  76 65 25 3d 28 70 61 72  74 69 74 69 6f 6e 5f 62  |ve%=(partition_b|
00002560  6c 6f 63 6b 25 3f 32 35  29 2d 97 28 22 30 22 29  |lock%?25)-.("0")|
00002570  0d 0f 8c 29 70 61 72 74  69 74 69 6f 6e 5f 64 72  |...)partition_dr|
00002580  69 76 65 6e 61 6d 65 25  3d 70 61 72 74 69 74 69  |ivename%=partiti|
00002590  6f 6e 5f 64 72 69 76 65  25 0d 0f 96 42 e7 20 70  |on_drive%...B. p|
000025a0  61 72 74 69 74 69 6f 6e  5f 64 72 69 76 65 25 3c  |artition_drive%<|
000025b0  30 20 84 20 70 61 72 74  69 74 69 6f 6e 5f 64 72  |0 . partition_dr|
000025c0  69 76 65 25 3e 37 20 8c  20 70 61 72 74 69 74 69  |ive%>7 . partiti|
000025d0  6f 6e 5f 64 72 69 76 65  25 3d 34 0d 0f a0 58 c8  |on_drive%=4...X.|
000025e0  99 20 35 2c 22 64 66 73  3a 50 61 72 74 69 74 69  |. 5,"dfs:Partiti|
000025f0  6f 6e 20 22 2b c3 28 70  61 72 74 69 74 69 6f 6e  |on "+.(partition|
00002600  5f 64 72 69 76 65 25 29  2b 22 20 3c 44 46 53 24  |_drive%)+" <DFS$|
00002610  44 69 72 3e 2e 64 72 69  76 65 22 2b c3 28 70 61  |Dir>.drive"+.(pa|
00002620  72 74 69 74 69 6f 6e 5f  64 72 69 76 65 6e 61 6d  |rtition_drivenam|
00002630  65 25 29 0d 0f aa 24 64  69 73 70 6c 61 79 25 28  |e%)...$display%(|
00002640  70 61 72 74 69 74 69 6f  6e 5f 64 72 69 76 65 6e  |partition_driven|
00002650  61 6d 65 25 29 3d b9 0d  0f b4 05 cc 0d 0f be 17  |ame%)=..........|
00002660  70 61 72 74 69 74 69 6f  6e 5f 64 72 69 76 65 25  |partition_drive%|
00002670  3d 2d 31 0d 0f c8 05 cd  0d 0f d2 05 e1 0d ff     |=-1............|
0000267f