;Assembler header file for CDFS
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:01:37 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 22 June 1995

        [       :LNOT: :DEF: CDFS_Hdr
        GBLS    CDFS_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_FileCore
        GBLS    Get_FileCore
        ]
        [       :LNOT: :DEF: FileCore_Hdr
Get_FileCore                    SETS    "GET oslib/FileCore.Hdr"
        |
Get_FileCore                    SETS    ""
        ]
        $Get_FileCore

;Symbols for constants
CDFS_TruncationFromRight        *       &0
CDFS_TruncationFromLeft         *       &1
CDFS_TruncationNone             *       &2
CDFS_TruncationDefault          *       &FFFFFFFF

;Symbols for structure offsets and sizes
                                ^       0
                                #       Int
CDFS_TruncationType             *       @


;Symbols for SWI's and SWI reason codes
XCDFS_ConvertDriveToDevice      *       &61E80
CDFS_ConvertDriveToDevice       *       &41E80
   ;Entry
   ;  R0 = log_no (Int)
   ;Exit
   ;  R1 = phys_no (Int)

XCDFS_SetBufferSize             *       &61E81
CDFS_SetBufferSize              *       &41E81
   ;Entry
   ;  R0 = buffer_size_exp (Int)

XCDFS_GetBufferSize             *       &61E82
CDFS_GetBufferSize              *       &41E82
   ;Exit
   ;  R0 = buffer_size_exp (Int)

XCDFS_SetNumberOfDrives         *       &61E83
CDFS_SetNumberOfDrives          *       &41E83
   ;Entry
   ;  R0 = drive_count (Int)

XCDFS_GetNumberOfDrives         *       &61E84
CDFS_GetNumberOfDrives          *       &41E84
   ;Exit
   ;  R0 = drive_count (Int)

XCDFS_GiveFileType              *       &61E85
CDFS_GiveFileType               *       &41E85
   ;Entry
   ;  R0 -> file_name (String)
   ;Exit
   ;  R1 = file_type (Bits)

XCDFS_DescribeDisc              *       &61E86
CDFS_DescribeDisc               *       &41E86
   ;Entry
   ;  R0 = log_no (Int)
   ;  R1 = disc (pointer to FileCore_Disc)

XCDFS_WhereIsFile               *       &61E87
CDFS_WhereIsFile                *       &41E87
   ;Entry
   ;  R0 -> file_name (String)
   ;Exit
   ;  R1 = block_no (Int)
   ;  R2 = size (Int)

XCDFS_Truncation                *       &61E88
CDFS_Truncation                 *       &41E88

CDFSTruncation_Read             *       &0
   ;Entry
   ;  R0 = &0
   ;Exit
   ;  R1 = type (CDFS_TruncationType)

CDFSTruncation_Write            *       &1
   ;Entry
   ;  R0 = &1
   ;  R1 = type (CDFS_TruncationType)

        ]
        END
