******************************************************************************* * dos.library.I Written by Readysoft. * Copyright 1992,1993,1994 RS. All rights reserved. 1992.02.23.-1994.05.18. * v1.0. ******************************************************************************* ******************************************************************************* * Macros ******************************************************************************* ;------------------------------------------------------------------------------ ; DosName Macro ;------------------------------------------------------------------------------ DOS.NAM MACRO DC.B 'dos.library',0 EVEN ENDM ******************************************************************************* * Constant Definitions ******************************************************************************* ;------------------------------------------------------------------------------ ; DeviceIdentifier Definitions ;------------------------------------------------------------------------------ dos_id_NIL EQU 0 dos_id_RAD EQU 1 dos_id_DF0 EQU 2 ;------------------------------------------------------------------------------ ; DiskInfoSector Structure (DIS) ;------------------------------------------------------------------------------ RSRESET dos_is_Label RS.B 28 Disk Label dos_is_Free RS.L 1 # of free bytes dos_is_NU RS.B 234 not used area dos_is_Map RS.B 246 Allocation Map dos_is_SizeOf RS.B 0 ;------------------------------------------------------------------------------ ; DirectoryEntry Structure ;------------------------------------------------------------------------------ RSRESET dos_de_FileName RS.B 28 FileName dos_de_Header RS.L 1 ptr to FHS dos_de_SizeOf RS.B 0 ;------------------------------------------------------------------------------ ; DirectorySector Structure (DIR) ;------------------------------------------------------------------------------ RSRESET dos_di_First RS.B 16*dos_de_SizeOf 16 entries / Sector dos_di_SizeOf RS.B 0 ;------------------------------------------------------------------------------ ; FileHeaderSector Structure (FHS) ;------------------------------------------------------------------------------ RSRESET dos_fh_FileName RS.B 28 FileName dos_fh_Length RS.L 1 dos_fh_NU RS.B 234 not used area dos_fh_Map RS.B 246 Allocation Map dos_fh_SizeOf RS.B 0 ;------------------------------------------------------------------------------ ; Error Codes ;------------------------------------------------------------------------------ dos_er_OK EQU $00000000 all right dos_er_Init EQU $00850000 unable to init dos_er_Device EQU $00850001 unknown device dos_er_DiskFull EQU $00850002 disk full dos_er_DirFull EQU $00850003 directory full dos_er_UnDef EQU $8085ffff undefined error ******************************************************************************* * Varibles ******************************************************************************* RSRESET dos_DISBuffer RS.B 512 DiskInfoSector buffer dos_FHSBuffer RS.B 512 FileHeaderSector buffer dos_DIRBuffer RS.B 512 DirectorySector buffer dos_DataBuffer RS.B 512 DataSector buffer dos_DirCacheDF0 RS.L 1 ptr to DF0 DirCache dos_DirStatDF0 RS.B 1 status of DF0 DirCache dos_NU RS.B 1 not used dos_VolName RS.L 1 dos_UnitNum RS.L 1 dos_Verify RS.L 1 dos_Address RS.L 1 dos_Length RS.L 1 dos_FileName RS.L 1 dos_FHS RS.L 1 dos_SizeOf RS.B 0 ******************************************************************************* * Routine Offsets ******************************************************************************* RSRESET RS.B -6 dos_Init RS.B -6 dos_Interrupt2 RS.B -6 dos_Format RS.B -6 dos_DiskInfo RS.B -6 dos_Load RS.B -6 dos_Save RS.B -6 dos_Read RS.B -6 dos_Write RS.B -6 dos_Delete RS.B -6 dos_FileInfo RS.B -6