#set our_FileSystem_number	= 199
#set our_SWI_chunk		= &5A440
#set out_Error_block		= &1C700	;256 error chunk
#set Sector_Aligned		= 1<<9	; FileCore descriptor block bit flag
#set New_Style_Errors		= 1<<10	; FileCore descriptor block bit flag
#set DefectList_Op		= 1<<4	; FileCore R1 bit indicating a defect list
#set ScatterList_Op		= 1<<5	; FileCore R1 bit marking a scatter list
#set Background_Op		= 1<<8	; FileCore R1 bit marking a background transfer
#set Scatter_List_End		= 65536	; used to check for scatter list wrapping

#set HD_error_Write_fault	= &07
#set HD_error_Not_ready		= &08
#set HD_error_Sector_missing	= &16
#set HD_error_Bad_parameters	= &A1
#set HD_error_Disc_error	= &C7
#set HD_error_Disc_not_found	= &D4
#set HD_error_Disc_not_present	= &D5


.FS_Create_Block
;     +----------- Mount floppies as Fixed discs (RO 5+)
;     |+---------- New style errors (RO 5+)
;     ||+--------- Sector aligned addressing (RO 3.6+)
;     |||+-------- MiscOp 7 supported (RO 3.6+)
;     ||||+------- HD support power-eject
;     |||||+------ Floppy support power-eject
;     ||||||+----- HD support poll change
;     |||||||+---- HD support mount like floppies (ie fill in Sector size,
;     ||||||||      heads, sector per track and density
;     ||||||||+--- Use only scratch space when a temporary buffer is needed
;     |||||||||+-- Reserved
;     ||||||||||+- Floppy need FIQ
;     |||||||||||+ HD need FIQ
;     109876543210
 DCW %000000000000		;HD support power-eject
 DCB 0				;padding
 DCB our_FileSystem_number	;Filing system number
 DCD HDFFS_Name			;Filing system title
 DCD HDFFS_BootText		;Boot text
 DCD Entry_DiscOp		;DiscOp entry
 DCD Entry_MiscOp		;Misc entry

.HDFFS_Full_Title	DCB "FileCore%HDFFS", 0
.HDFFS_BootText		DCB "FileCore "

.HDFFS_Title
.HDFFS_Name
.HDFFS_SWI_Names
 DCB "HDFFS", 0
 DCB "DiscOp", 0
 DCB "MiscOp", 0
 DCB "Drives", 0
 DCB "FreeSpace", 0
 DCB "DescribeDisc", 0
 DCB "SectorDiscOp", 0
 DCB "IDEDeviceInfo", 0
 DCB "ControllerType", 0
 DCB "Remount", 0
 DCB "DiscOp64", 0
 DCB 0

.check_FileCore_SectorDiscOp
 DCB "FileCore_SectorDiscOp", 0
.check_FileCore_DiscOp64
 DCB "FileCore_DiscOp64", 0

.WIMP_Task_Title	DCB "HDFFS Filer", 0
.Drive_Path		DCB "HDFFS::"
 .FS_Path		DCB 1,".$", 0
.WIMP_Template_File	DCB "Resources:Resources.HDFFS.Templates", 0
.IconSprites		DCB "SetEval HDFFS$OS 350", 0
.IconSprites2		DCB "RMEnsure UtilityModule 3.50 SetEval HDFFS$OS 311", 0
.IconSprites3		DCB "IF HDFFS$OS>=350 THEN IconSprites Resources:Resources.HDFFS.!Sprites22 ELSE IconSprites Resources:Resources.HDFFS.!Sprites", 0
.Set_filetype		DCB "Set File$Type_FCD HardDisc", 0
.Set_alias		DCB "Set Alias$@RunType_FCD HDFOpen %*0", 0
.WIMP_Icon_Validation	DCB "S"
 .WIMP_Icon_Name	DCB "hard"
 .MiscOp_media_type	DCB "disc", 0
.ShowFree		DCB "ShowFree -FS HDFFS ", 1, 0
.Dismount_text		DCB "-HDFFS-Dismount "
.HDF_image		DCB "DH Fmiga",0,"e"
 ALIGN
.WIMP_Icon_Block_init
 DCD     -6		;Icon bar position
 DCD     0		;Minimum x of icon
 DCD     -16		;Minimum y of icon
 DCD     96		;Maximum x of icon
; DCD     20		;Maximum y of icon
 DCD     &1700310B	;Icon flags
 DCD     0		;pointer to text
; DCD     0		;pointer to validation string
 DCD     0		;length of text

.WIMP_Messages_Accepted
 DCD WIMP_Message_FilerOpenDir
 DCD 0

.address_fixlist
 INCBIN "<Tmp$Dir>.Menus"
 ALIGN

.HDFFS_Commands
 DCB "HDFFS", 0
 ALIGN
 DCD Entry_HDFFS		;entry
 DCD 0				;Information word
 DCD HDFFS_Command_Syntax	;syntax message
 DCD HDFFS_Command_Help		;help text

 DCB "HDFMount", 0
 ALIGN
 DCD Entry_Mount		;entry
 DCD &00020001			;Information word
 DCD Mount_Command_Syntax	;syntax message
 DCD Mount_Command_Help		;help text

 DCB "HDFOpen", 0
 ALIGN
 DCD Entry_MountOpen		;entry
 DCD &00020001			;Information word
 DCD MountOpen_Command_Syntax	;syntax message
 DCD MountOpen_Command_Help	;help text

 DCB "HDFEject", 0
 ALIGN
 DCD Entry_Eject		;entry
 DCD &00010001			;Information word
 DCD Eject_Command_Syntax	;syntax message
 DCD Eject_Command_Help		;help text

.our_Desktop_HDFFSFiler
 DCB "Desktop_HDFFSFiler", 0
 ALIGN
 DCD Desktop_HDFFSFiler		;entry
 DCD &00000000			;Information word
 DCD 0				;syntax message
 DCD 0				;help text

 DCB 0


.HDFFS_Command_Help	DCB "*", 27, 0, " selects ", 27, 0, " as the current file system", 13
.HDFFS_Command_Syntax	DCB 27, 1, 0

.Mount_Command_Help	DCB "*", 27, 0, " mount an HDF file to HDFFS::|<0-7>", 13
.Mount_Command_Syntax	DCB 27, 1, " [drive 0-7] |<filename>", 0

.MountOpen_Command_Help		DCB "*", 27, 0, " mount an HDF file to HDFFS::|<0-7> and opens a Filer window", 13
.MountOpen_Command_Syntax	DCB 27, 1, " [drive 0-7] |<filename>", 0

.Eject_Command_Help	DCB "*", 27, 0, " dismount drive and close the HDF file", 13
.Eject_Command_Syntax	DCB 27, 1, " |<0-7>", 0

 ALIGN
.WIMP_Task		DCB "TASK"
