import fileio
    //
    // Useful ProDOS values
    //
    // MACHID is defined in cmdsys.plh
    // Which slot has a ROM
    const SLTBYT = $BF99
    // Prefix active
    const PFIXPTR = $BF9A
    // Memory alocate bitmap
    const MEMTABL = $BF58
    //
    // SOS/ProDOS error codes
    //
    const FILE_ERR_OK            = $00
    const FILE_ERR_BAD_CALL_NUM  = $01
    const FILE_ERR_BAD_PARAM_CNT = $04
    const FILE_ERR_INT_TBL_FULL  = $25
    const FILE_ERR_IO            = $27
    //
    // File entry struc
    //
    struc t_fileentry
        byte store_namelen
        byte entry_name[15]
        byte entry_type
        word entry_keyptr
        word entry_blocks
        word entry_EOFL
        byte entry_EOFH
        word entry_create[2]
        byte entry_version
        byte entry_minver
        byte entry_access
        word entry_aux
        word entry_mod[2]
        word entry_headptr
    end
    //
    // File info struc
    //
    struc t_fileinfo
        byte file_access
        byte file_type
        word aux_type
        byte storage_type
        word blocks_used
        word mod_date
        word mod_time
        word create_date
        word create_time
    end
    //
    // File functions
    //
    struc t_fileio
        word getpfx
        word setpfx
        word getfileinfo
        word setfileinfo
        word geteof
        word seteof
        word iobufalloc
        word open
        word close
        word read
        word write
        word create
        word destroy
        word rename
        word newline
        word online
        word readblock
        word writeblock
    end
    //
    // Globally accessible error code
    //
    byte perr
end
