
        IF1
                %OUT INCLUDING DISKCOMP.EQU...
        ELSE
;               %OUT INCLUDING DISKCOMP.EQU...
        ENDIF

;---------------------------------------------------------------------------;
;                                EQUATES                                    ;
;---------------------------------------------------------------------------;

;                          *** CONSTANTS ***

ZERO            EQU     0
ONE             EQU     1
TWO             EQU     2
THREE           EQU     3
FOUR            EQU     4
TYPE_4          EQU     4
FIVE            EQU     5
SIX             EQU     6
SEVEN           EQU     7
EIGHT           EQU     8
NINE            EQU     9
TEN             EQU     0AH
ON              EQU     1
OFF             EQU     0
TRUE            EQU     01
FALSE           EQU     00
GOOD            EQU     0
BAD             EQU     1
FIRST           EQU     1
SECOND          EQU     2
HARD_ERROR      EQU     02
SOFT_ERROR      EQU     01
NO_ERROR        EQU     0
;DOS_LEVEL       EQU     0314H   ;DOS VERSION 3.20
BLANK           EQU     20H     ;BLANK IN ASCII (32 DEC)
CLEAR_SEGMENT   EQU     0E0H    ;USED TO CLEAR SEGMENT BITS (ROUND UP
                                ;TO NEXT SECTOR)
SECTOR8         EQU     8       ;
SECTOR9         EQU     9       ;
SECTOR14        EQU     14      ;
SECTOR15        EQU     15      ;
DRV_48TPI       EQU     0       ;48 TPI DRIVE
DRV_96TPI       EQU     1       ;96 TPI DRIVE
DRV_720         EQU     2       ;3.5", 720 KB DRIVE (FOR CASHEW OR P14)
DRV_OTHER       EQU     7       ;Other, could be 3.5" 1.44M drive       ;C02
FixedDisk       EQU     5       ;Drive type for a fixed disk            ;C05
NRLFUNC         EQU     5F02H   ;GET NETWORK-REDIRECTION-LIST FUNTION
NRLMAX          EQU     1CH     ;(MAXIMUM # OF NAMES ON NRL) - 1
DOS20           EQU     2       ;DOS VERSION 2.0
                PUBLIC  FINE    ;                                               ;AN000;
FINE            EQU     -1      ;"FINE AND DANDY", USED FOR RETURN CODE
                                ;(-1 WAS USED TO AVOID CONFUSION WITH ERROR
                                ;OFFSET WHICH CAN BE ZERO)
LOCAL_DRV       EQU     -1      ;DEVICE NOT DIRECTED
REMOTE_DRV      EQU     1000H   ;REMOTE DRIVE TEST BITS
NO_OPTION       EQU     -1      ;NO OPTION "/1" SPECIFIED
OPTION_1        EQU     1       ;OPTION "/1" SPECIFIED
REMOVABLE       EQU     0000H   ;REMOVABLE FILE
INVAL_PARM      EQU     -9      ;INVALID PARAMETER ENTERED

PAGE
;                   *** PROGRAM SEGMENT PREFIX ***

FCB1_DRV_ID     EQU     5CH     ;DRIVE NUMBER ADDR IN FILE CONTROL BLOCK 1
FCB1_FILENM     EQU     5DH     ;FILE NAME ADDR IN FILE CONTROL BLOCK 1
FCB2_DRV_ID     EQU     6CH     ;DRIVE NUMBER ADDR IN FILE CONTROL BLOCK 2
FCB2_FILENM     EQU     6DH     ;FILE NAME ADDR IN FILE CONTROL BLOCK 2
BEGIN_UNFORM_AREA  EQU  80H     ;BEGINNING @ OF THE UNFORMATTED AREA
END_UNFORM_AREA EQU     100H    ;ENDING @ OF THE UNFORMATTED AREA


;                       *** DOS FUNCTONS ***

RET_CD_EXIT     EQU     4CH     ;EXIT TO DOS, PASSING RETURN CODE               ;AN000;
PUT_CHAR        EQU     02H     ;DOS DISPLAY OUTPUT FUNCTION
PRINT_FUNC      EQU     09H     ;DOS PRINT STRING FUNCTION
REDIRECTED_FUNC EQU     09H     ;IOCTL SUB FUNCTION ****** TO BE CHECKED ****
KB_INPUT_FUNC   EQU     0C01H   ;DOS KEYBOARD INPUT (CLEARS INPUT BUFF FIRST)
CURRENTDRV_FUNC EQU     19H     ;GET CURRENT DRIVE FUNCTION CALL
;DOSVER_FUNC     EQU     30H     ;DOS VERSION FUNCTION CALL
IOCTL_FUNC      EQU     44H     ;IOCTL FUNCTION CALL
DRIVE_CHECK     EQU     4408H   ;DOS CHECK FOR REMOVABLE DRIVE IOCTL CALL
STD_ERROR       EQU     0002H   ;STANDARD ERROR FILE HANDLE
WRITE_FILE      EQU     40H     ;WRITE TO FILE OR DEVICE FUNCTION CALL
GET_ASSIGN_MODE EQU     5F00H   ;SET ASSIGN MODE COMMAND
SET_ASSIGN_MODE EQU     5F01H   ;SET ASSIGN MODE COMMAND
SERVER          EQU     2AH     ;NETWORK SERVER INTERUPT
SHARED          EQU     03H     ;DEVICE SHARED CHECK
GET_EXT_CNTRY_INFO EQU  65H     ;GET EXTENDED COUNTRY INFO                      ;AN000;
YESNO_CHECK     EQU     23H     ;REQUEST (Y/N) CHECK OF GET_EXT_CNTRY_INFO      ;AN000;
YES             EQU     1       ;(Y/N) RESPONSE IS "YES"                        ;AN000;
BAD_YESNO       EQU     2       ;(Y/N) RESPONSE IS NEITHER "Y" NOR "N"          ;AN000;

;IOCTL DISKETTE I/O FUNCTIONS
GENERIC_IOCTL_CODE EQU  0DH     ;GENERIC IOCTL REQUEST
MAJOR_CODE      EQU     08H     ;GENERIC IOCTL MAJOR CODE
READ_FUNC       EQU     61H     ;IOCTL DISKETTE RAED FUNCITON
WRITE_FUNC      EQU     41H     ;IOCTL DISKETTE WRITE FUNCTION
VERIFY_FUNC     EQU     62H     ;IOCTL DISKETTE VERIFY FUNCTION
FORMAT_FUNC     EQU     42H     ;IOCTL DISKETTE FORMAT FUNCITON
GETDEVPARM      EQU     60H     ;IOCTL GET DEVICE PARAMETER
SETDEVPARM      EQU     40H     ;IOCTL SET DEVICE PARAMETER
SET_LOG_DRIVE   EQU     0FH     ;SET LOGICAL DRIVE                              ;AN000;
GSET_MEDIA_ID   EQU     69H     ;GET/SET MEDIA ID                               ;AN008;
GET_ID          EQU     0       ;AL=0, GET MEDIA ID                             ;AN008;
SET_ID          EQU     1       ;AL=1, SET MEDIA ID                             ;AN008;
;
COMPARE_FUNC    EQU     59H     ;JUST USED TO IDENTIFY FOR ERROR MESSAGE
;
;specialFunctions
GET_SP_FUNC_DEF  EQU     00000000B               ;GET DEVICE PARM. DEFAULT BPB
GET_SP_FUNC_MED  EQU     00000001B               ;GET DEVICE PARM. media bpb
SET_SP_FUNC_DEF  EQU     00000100B               ;SET DEFAULT DEVICE PARM
SET_SP_FUNC_DOS  EQU     00000100B               ;SET DEVICE PARM BEFORE RETURN TO DOS
R_W_SP_FUNC      EQU     00000000B               ;READ, WRITE

;              *** BIOS DISKETTE I/O ERROR CODES ***

;NOT_READY       EQU     80H     ;DISKETTE I/O NOT READY ERROR
;CHANG_LINE      EQU     06H     ;CHANGE LINE ERROR
;BAD_CONTROLLER  EQU     20H     ;BAD DISKETTE/DISK CONTOROLLER
;WRITE_PROTECT   EQU     03H     ;DISKETTE I/O WRITE PROTECT ERROR
;BAD_ADDR_MARK   EQU     02H     ;DISKETTE I/O BAD ADDRESS MARK ERROR
;REC_NOT_FOUND   EQU     04H     ;DISETTTE I/O RECORD NOT FOUND ERROR
;BAD_CRC         EQU     10H     ;DISKETTE I/O BAD CRC ERROR
;HARD_WR_ERROR   EQU     03H     ;DISKETTE WRITE HARD ERROR COUNT
;HARD_FMT_ERROR  EQU     02H     ;DISKETTE FORMAT HARD ERROR COUNT
;SINGLE_SIDE_COPY EQU    00H     ;WHEN READING TRACK 0 SIDE 1 IF HARD ERROR
                                ;OCCURS, WE WILL ASSUME IT WILL BE SINGLE
                                ;SIDED COPY AND AL WILL BE SET TO 0, SO THAT
                                ;BUFFER_PTR WILL NOT BE ADVANCED AND
                                ;IF THE TRACK HAPPENS TO FALL INTO DMA BOUNDRY
                                ;IT WILL SKIP THE SECOND PART OF READ_TRACK

;                   *** COPY STATUS BYTE ***

FATAL           EQU     01H     ;FATAL COPY ERROR, ABORT
OK              EQU     00H     ;OK, PROCEED

;                   *** MESSAGES SUBLIST DESCRIPTOR ***

SUBLIST           STRUC                                                         ;AN000;
SUB_SIZE          DB    ?      ;SUBLIST SIZE (POINTER TO NEXT SUBLIST)         ;AN000;
SUB_RES           DB    ?       ;RESERVED                                       ;AN000;
                                ;NEXT FIELD IS TO BE USED AS A DOUBLE WORD      ;AN000;
SUB_VALUE         DW    ?       ;TIME, DATE, OR PTR TO DATA ITEM                ;AN000;
SUB_VALUE_SEG     DW    ?       ;SEG ID OF PTR                                  ;AN000;
                                ;(ABOVE FIELD MUST BE FILLED AT EXECUTION TIME  ;AN000;
                                ; IF THIS IS A .COM FILE)                       ;AN000;
SUB_ID            DB    ?       ;N OF %N                                        ;AN000;
SUB_FLAGS         DB    ?       ;DATA TYPE FLAGS                                ;AN000;
SUB_MAX_WIDTH     DB    ?       ;MAXIMUM FIELD WIDTH (0=UNLIMITED)              ;AN000;
SUB_MIN_WIDTH     DB    ?       ;MINIMUM FIELD WIDTH                            ;AN000;
SUB_PAD_CHAR      DB    ?       ;CHARACTER FOR PAD FIELD                        ;AN000;
                                ; CAN BE " ", "0" OR ",".                       ;AN000;
                                ; "," CAUSES INSERTION OF THE ACTIVE            ;AN000;
                                ; THOUSANDS SEPARATOR BETWEEN EVERY 3 DIGITS.   ;AN000;
SUBLIST           ENDS                                                          ;AN000;

  ;BUFFER AREA FOR COMMUNICATION WITH GET/SET MEDIA ID FUNCTION CALL:
;(deleted ;AN011;) A_MEDIA_ID_INFO struc
;(deleted ;AN011;) MI_level        dw      0               ;info level
;(deleted ;AN011;) MI_Serial       dd      0               ;Serial #
;(deleted ;AN011;) MI_Label        db      11 dup (' ')    ;Volume Label
;(deleted ;AN011;) MI_System       db       8 dup (' ')    ;File System type
;(deleted ;AN011;) A_MEDIA_ID_INFO ends
                INCLUDE BOOTFORM.INC    ;GET DESCRIPTION OF BOOT RECORD
VOL_SERIAL      EQU     EXT_BOOT_SERIAL ;LOCATION IN BOOT RECORD OF VOLSER NUM  ;AN000;
