	IF1				;AN000;
	    %OUT    COMPONENT=TREE, MODULE=TREEQU.INC...;AN000;
	ENDIF				;AN000;
;		  $SALUT (4,19,24,36)	;					;AN000;
;		    DOS FUNCTION CALLS, USING INT 21H

SELECT_DISK	  EQU  0EH	   ;AN000;SETS DEFAULT DRIVE
				   ; DL=DRIVE NUMBER (0=A,1=B)
				   ;OUTPUT: AL=NUMBER OF DRIVES (MIN 5) ???

CHDIR		  EQU  3BH	   ;AN000;CHANGE CURRENT DIRECTORY
				   ;DS:DX = POINTER TO ASCIIZ STRING

CURRDISK	  EQU  19H	   ;AN000;GET CURRENT DEFAULT DRIVE
				   ;OUTPUT: AL = CURRENT DRIVE
				   ;  0=A,1=B,ETC.

SET_DTA 	  EQU  1AH	   ;AN000;SET DISK TRANSFER ADDRESS
				   ; DS:DX = DISK TRANSFER ADDRESS

SET_VECTOR	  EQU  25H	   ;AN000;SET INTERRUPT VECTOR
				   ;DS:DX = VECTOR TO INT HANDLER
				   ;AL = INTERRUPT NUMBER

DOS_VERSION	  EQU  30H	   ;AN000;DETERMINE VERSION OF DOS
				   ;OUTPUT: AL=MAJOR, AH=MINOR VERSION NUMBER
				   ;	    BX AND CX SET TO ZER

GET_VECTOR	  EQU  35H	   ;AN000;GET INTERRUPT VECTOR
				   ;AL = INTRRUPT NUMBER
				   ;OUTPUT: ES:BX = CONTENTS OF VECTOR

WRITE		  EQU  40H	   ;AN000;WRITE TO A FILE OR DEVICE
				   ;BX = FILE HANDLE
				   ;DS:DX = ADDRESS OF DATA TO WRITE
				   ;CX = NUMBER OF BYTES TO WRITE

IOCTL		  EQU  44H	   ;AN001;I/O CONTROL FOR DEVICES
				   ;DS:DX = DATA OR BUFFER
				   ;CX = NUMBER OF BYTES TO READ OR WRITE
				   ;BX = FILE HANDLE, OR,
				   ;BL = DRIVE NUMBER (0=DEFAULT,1=A,...)
				   ;AL = FUNCTION VALUE
				   ;OUTPUT: AX=NO. BYTES TRANSFERRED
				   ; OR ERROR CODE IS CY SET

BLOCK_GENERIC	  EQU  0DH	   ;AN001;AL=SUBFUNCTION, FOR "IOCTL" ABOVE
				   ;BH=0, RES
				   ;BL=DRIVE NUM
				   ;CX=0843h=SET MEDIA ID
				   ;CX=0863h GET MEDIA ID			;AN001;
				   ;DS:DX=BUFFER (see A_MEDIA_ID_INFO STRUC)
				   ;CARRY SET ON ERROR (OLD STYLE BOOT RECORD)

GET_CUR_DIR	  EQU  47H	   ;AN000;GET CURRENT DIRECTORY
				   ;DS:SI = POINTER TO 64 BYTE USER AREA
				   ;DL = DRIVE NUM (0=DEF, 1=A, ETC)
				   ;OUTPUT: DS:SI POINTS TO FULL PATH NAME

RET_CD_EXIT	  EQU  4CH	   ;AN000;EXIT TO DOS, PASSING RETURN CODE
				   ;AL=RETURN CODE

FINDFIRST	  EQU  4EH	   ;AN000;FIND FIRST MATCHING FILE
				   ;DS:DX = POINT TO ASCIIZ OF FILENAME
				   ;CX = ATTRIBUTE USED IN SEARCH
				   ;OUTPUT: CURRENT DTA WILL HAVE:
				   ;   21 BYTES - RESERVED
				   ;   1  BYTE	- ATTRIBUTE
				   ;   2  BYTES - FILE'S TIME
				   ;   2  BYTES - FILE'S DATE
				   ;   2  BYTES - LOW WORD OF FILE SIZE
				   ;   2  BYTES - HIGH WORD OF FILE SIZE
				   ;   13 BYTES - NAME.EXT +0 OF FOUND FILE
ATTR_NORMAL	  EQU  00H	   ;AN000;NON-SYS, NON-HIDDEN, NON-LABEL FILES
ATTR_DIR	  EQU  10H	   ;AN000;DIRECTORY FILES ATTRIBUTE
ATTR_VOLID	  EQU  08H	   ;AN000;VOLUME LABEL

FINDNEXT	  EQU  4FH	   ;AN000;FIND NEXT MATCHING FILE
				   ;DTA = INFO LEFT FROM FIND FIRST/NEXT

EXTERROR	  EQU  59H	   ;AN000;EXTENDED ERROR
				   ;BX = 0 (LEVEL NUMBER)
				   ;OUTPUT: AX=EXTENDED ERROR, BH=ERROR CLASS
				   ;BL=SUGGESTED ACTION, CH=LOCUS
				   ;DX,SI,DI,ES,CL,DS DESTROYED

DBCS_ENV	  EQU  63H	   ;AN012;GET DBCS SUPPORT
GET_DBCS_ENV	  EQU  0	   ;AN012;SUBFUNCTION, GET POINTER TO DBCS VECTOR

GSET_MEDIA_ID	  EQU  69H	   ;AN010;GET or SET MEDIA ID
				   ;BL=DRIVE NUMBER (0=DEFAULT, 1=A,...)
				   ;BH=0 (RESERVED)
GET_ID		  EQU  0	   ;AN010;AL=0 GET MEDIA ID
SET_ID		  EQU  1	   ;AN010;AL=1 SET MEDIA ID
				   ;DS:DX=@BUFFER (SEE A_MEDIA_ID_INFO STRUC)
;		END OF INT 21H DOS FUNCTIONS

;		MULTIPLEXOR (INT 2FH) FUNCTIONS:				;AN000;
APPEND_CHECK	  EQU  0B700H	   ;AN006;SEE IF APPEND IS INSTALLED
				   ;OUTPUT-AL=0FFH IF INSTALLED
APPEND_VERSION	  EQU  0B702H	   ;AN006;ASK IF DOS VERSION OF APPEND
DOS_APPEND_VER	  EQU  -1	   ;AN006;OUTPUT-AX=-1 IF DOS VERSION OF APPEND

GET_APPEND	  EQU  0B706H	   ;AN000;READ /X STATUS OF APPEND WITH INT 2FH
				   ;OUTPUT-BX= (SEE "APPEND_FLAGS" FOR DEFINITION)

SET_APPEND	  EQU  0B707H	   ;AN000;SET /X TO APPEND WITH INT 2FH
				   ;INPUT-BX= (SEE "APPEND_FLAGS" FOR DEFINITION)

		  HEADER <LOCAL EQUATES>					;AN000;
;		LOCAL EQUATES

BACK_SLASH	  EQU  "\"         ;AN000;PATH DELIMITER
SLASH		  EQU  "/"         ;AN000;SWITCH INDICATOR
NOPATH		  EQU  1	   ;AN000;LENGTH OF EMPTY PATH, INCL NUL DELIMITER
ZERO		  EQU  0	   ;AN000;CLEARS REG, COMPARAND FOR ZERO VALUE
DEFDRIVE	  EQU  0	   ;AN000;IN GET_CUR_DIR, DL=0 MEANS DOS DEFAULT DR
DRIVEA		  EQU  "A"         ;AN000;CORRESPONDS TO DRIVE 00H NUMERICALLY
PERIOD		  EQU  "."         ;AN000;FILENAME EXTENSION DELIMITER
BLANK		  EQU  " "         ;AN000;SPACE CHAR
FULL_SEG_SIZE	  EQU  -1	   ;AN000;SCAN COUNT TO LOOK THRU ENTIRE SEG
VEC_CTLBREAK	  EQU  23H	   ;AN000;NUMBER OF THE VECTOR POINTING TO CTL-BREAK
VEC_CRITERR	  EQU  24H	   ;AN000;NUM. OF VECTOR OF CRITICAL ERROR HANDLER
MIN_STACK	  EQU  512	   ;AN000;MINIMUM REQUIRED STACK SIZE
MAX_PATH	  EQU  64	   ;AN000;MAX LENGTH PERMITTED FOR ANY PATH
		  PUBLIC MAX_PATH  ;AN000;LET THE OTHERS IN ON THIS
LEVEL_LIMIT	  EQU  MAX_PATH/2  ;AN000;MAX PATH IS 64 CHAR;
				   ; REQUIRES MIN OF 2 CHAR PER PATH
DASH_NUM	  EQU  3	   ;AN000;NUMBER OF DASHES BETWEEN ELBO AND
				   ; SUBDIRECTORY NAME
FN_SIZE 	  EQU  12	   ;AN000;NUMBER CHARS IN FILENAME,PERIOD,EXTENSION
FLN_INDENT	  EQU  0	   ;AN000;NUMBER OF BLANKS TO INDENT FILENAME
				   ; UNDER SUBDIRECTORY AFTER THE "DASH_NUM"
NIBBLE		  EQU  4	   ;AN000;NUMBER BITS IN HALF A BYTE
LEVEL_0 	  EQU  0	   ;AN000;FOR EXTENDED ERROR
ABORT		  EQU  2	   ;AN000;"ABORT" FROM CRITICAL ERROR HANDLER

;		EXTENDED ERROR NUMBERS
NO_MORE_FILES	  EQU  18	   ;AN000;"NO MORE FILES"
INSUF_MEM	  EQU  8	   ;AN000;"INSUFFICIENT MEMORY"
INVDRSPEC	  EQU  15	   ;AN000;"INVALID DRIVE SPECIFICATION"
; =  =	=  =  =  =  =  =  =  =	=  =
;		SYSTEM MESSAGE HANDLER
GRAPHIC_MSGNUM	  EQU  7	   ;AN002;NUMBER OF MESSAGE DEFINING GRAPHIC CHARS

;		SUBSET OF "SYSMSG.INC":
MSG_SER_CLASS	  EQU  0	   ;AN000;MSG CLASS FOR MESSAGE HANDLER MSGS
EXT_ERR_CLASS	  EQU  1	   ;AN000;MSG CLASS FOR EXTENDED ERROR MSGS
PARSE_ERR_CLASS   EQU  2	   ;AN000;MSG CLASS FOR PARSE ERROR MSGS
UTILITY_MSG_CLASS EQU  0FFH	   ;AN000;MSG CLASS FOR UTILTITY DEFINED MSGS

;	     PRE-ASSIGNED FILE HANDLES:
STDIN		  EQU  0	   ;AN000;STANDARD INPUT
STDOUT		  EQU  1	   ;AN000;STANDARD OUTPUT
STDERR		  EQU  2	   ;AN000;STANDART ERROR

NUL		  EQU  0	   ;AN000;DELIMITER TO ANY ASCIIZ STRING
CR		  EQU  0DH	   ;AN000;CARRIAGE RETURN
LF		  EQU  0AH	   ;AN000;LINE FEED
; =  =	=  =  =  =  =  =  =  =	=  =
;		ERRORLEVEL RETURN CODES, PASSED BACK TO DOS ON EXIT
EXOK		  EQU  0	   ;AN000;NORMAL COMPLETION
EXERR		  EQU  1	   ;AN000;I/O ERROR,
				   ; LOAD MESSAGE FAILURE
				   ; BAD PARMS:
				   ; INVALID DRIVE
				   ; INVALID PATH
EXABORT 	  EQU  1	   ;AN000;CRITICAL ERROR HANDLER ABORTED
EXVER		  EQU  2	   ;AN000;BAD DOS VERSION
EXCTL		  EQU  3	   ;AN000;CONTROL BREAK

; =  =	=  =  =  =  =  =  =  =	=  =
		  HEADER <STRUC OF CONTROL BLOCKS>				;AN000;
;		CONTROL BLOCKS

FRAME		  STRUC 	   ;AN000;DYNAMIC VARIABLES ALLOCATED TO THE STACK
FRAM_DTA_RES	  DB   21 DUP(?)   ;AN000;RESERVED FOR FIND NEXT CALLS

FRAM_CHAR	  DB   ?	   ;AN000;CONTAINS ONE OF THESE:
;      "GRAF_ELBO"  - THIS IS THE LAST SUBDIRECTORY
;      "GRAF_TEE"   - THERE IS ANOTHER SUBDIRECTORY AFTER THIS ONE
;      "GRAF_BLANK" - NO MORE SUBDIRECTORIES

FRAM_CURR_PATH	  DB   MAX_PATH+2 DUP(?) ;AN000;CURRENT PATH TO THIS LEVEL OF SUBDIR

FRAM_BP 	  DW   ?	   ;AN000;SAVES CALLER'S BP REG
FRAM_RET	  DW   ?	   ;AN000;RETURN ADDRESS
FRAME		  ENDS		   ;AN000;

WA_SIZE 	  EQU  FRAM_BP - FRAM_DTA_RES ;AN000;SIZE OF STACK WORKAREA
; =  =	=  =  =  =  =  =  =  =	=  =
;THIS MESSAGE DESCRIPTOR CONTROL BLOCK IS GENERATED, ONE PER MESSAGE,
;TO DEFINE THE SEVERAL PARAMETERS THAT ARE EXPECTED TO BE PASSED IN
;CERTAIN REGISTERS WHEN THE SYSDISPMSG FUNCTION IS TO BE INVOKED.

MSG_DESC	  STRUC 	   ;AN000;
MSG_NUM 	  DW   ?	   ;AN000;MESSAGE NUMBER (TO AX)
MSG_HANDLE	  DW   ?	   ;AN000;HANDLE OF OUTPUT DEVICE (TO BX)
MSG_SUBLIST	  DW   ?	   ;AN000;POINTER TO SUBLIST (TO SI)
MSG_COUNT	  DW   ?	   ;AN000;SUBSTITUTION COUNT (TO CX)
MSG_CLASS	  DW   ?	   ;AN000;MESSAGE CLASS (IN HIGH BYTE, TO DH)
				   ; LOW BYTE HAS 0 (FUNCTION "NO INPUT", TO DL)
MSG_DESC	  ENDS								;AN000;
; =  =	=  =  =  =  =  =  =  =	=  =
SUBLIST 	  STRUC 	   ;AN000;
SUB_SIZE	  DB   ?	   ;AN000;SUBLIST SIZE (POINTER TO NEXT SUBLIST)
SUB_RES 	  DB   ?	   ;AN000;RESERVED
				   ;NEXT FIELD IS TO BE USED AS A DOUBLE WORD
SUB_VALUE	  DW   ?	   ;AN000;TIME, DATE, OR PTR TO DATA ITEM
SUB_VALUE_SEG	  DW   ?	   ;AN000;SEG ID OF PTR
				   ;(ABOVE FIELD MUST BE FILLED AT EXECUTION TIME
				   ; IF THIS IS A .COM FILE)
SUB_ID		  DB   ?	   ;AN000;N OF %N
SUB_FLAGS	  DB   ?	   ;AN000;DATA TYPE FLAGS
SUB_MAX_WIDTH	  DB   ?	   ;AN000;MAXIMUM FIELD WIDTH (0=UNLIMITED)
SUB_MIN_WIDTH	  DB   ?	   ;AN000;MINIMUM FIELD WIDTH
SUB_PAD_CHAR	  DB   ?	   ;AN000;CHARACTER FOR PAD FIELD
SUBLIST 	  ENDS		   ;AN000;
; =  =	=  =  =  =  =  =  =  =	=  =
A_MEDIA_ID_INFO STRUC		   ;AN001;USED IN GET_MEDIA_ID IN BLOCK GENERIC IOCTL
MI_LEVEL	  DW   0	   ;AN001;INFO LEVEL
MI_SERIAL	  DD   0	   ;AN001;SERIAL #
MI_LABEL	  DB   11 DUP (' ') ;AN001;VOLUME LABEL
MI_SYSTEM	  DB   8 DUP (' ') ;AN001;FILE SYSTEM TYPE
A_MEDIA_ID_INFO ENDS		   ;AN001;
; =  =	=  =  =  =  =  =  =  =	=  =

;END OF TREEQU.INC
