; variables common to all three utilites. MCT struc ;; Master Control Table, 10 bytes per entry ;; structure for table that describes all the parms ;; there is one entry for each possible parameter ;; on the command line. ;; each alias gets its own entry. ;; each DRIVE: letter even gets its own entry. ;; BP and TheBase will point to the current ;; entry in the table. ;; Generated by the ACCEPT macro ExtNameAddr dw ? ;; pointer to counted string ;; command name e.g. RAM EXT EXTENDED AuxInput dw ? ;; e.g. implied power level of the cpu desired ;; only 16 bits. ;; also encodes driver letter A:=1 B:=2 etc. ;; usually just 1 meaning simple presence desired Flags db ? ;; flags telling which suffixes allowed ;; also encodes info about where LevelWanted ;; comes from, i.e. is this an Implied, Capacity or ;; version type parameter. Defaults db ? ;; flags telling which suffixes to assume ;; if none given. Bang allows one of them. ;; generally will be ! or +! TestAddr dw ? ;; Address of routine to test for presence ;; It returns the level of presence in DX:AX ;; e.g. 1=present 0=absent. ;; or amount of free RAM etc. ;; for most parms (non colon type), DX can ;; be ignored. ;; Capacity-type routines must compute DX:AX. ;; Routine can trash any register except ;; SS:SP CS:IP DispAddr dw ? ;; Address of routine to display current state ;; It expects level of presence in DX:AX ;; e.g. 1=present 0=absent. ;; or amount of free RAM etc. ;; for most parms (non colon type), DX can ;; be ignored. ;; Capacity-type routines must computer DX:AX. ;; Routine can trash any register except ;; SS:SP CS:IP MCT ends ;============================================================== ; V A R I A B L E S data segment WantLevel dd 0 ; level we want for a feature ; for simple cases 0=not present 1=present ; for CPU - is a measure of power. ; for DOS - is a measure of version ; for RAM - is capacity in bytes. ; for TIME - is hours:minutes, mins past midnight GotLevel dd 0 ; Level we HAVE for a feature, according to ; the test ; It is usually carried about in ; in DX:AX. TheCapacity dd 0 ; desired capacity parsed from /RAM:400K TheVersion dw 0 ; desired version parsed from /DOS3.1 = 310 PreviousSuccess db 0 ; -1 means at least one previous group of tests ; separated by OR succeeded ; 0 no previous OR-type group of tests has yet ; succeeded. Success db 0 ; -1 means doing fine in this group of tests ; 0 means a test failed OkMask db 0 ; bit mask that says if level allowed to ; be too small, just right or too big. ; calculated from any explicit suffixes ; or from a computed default. ; Bit on, means allow that "Goldilocks" condition TheBase dw 0 ; Points to entry in current Master Control Table ; From there we can get everything ComAddr dw 0 ; when a single parm is broken in 3 parts ; address of start of first part e.g. ; RAM in RAM:400K+ ; com = command ComLen dw 0 ; length of first part e.g. 3 length of RAM CapAddr dw 0 ; address of second part of parm: e.g. 400K ; cap = capacity CapLen dw 0 ; length of second part of parm e.g. 4 SufAddr dw 0 ; third part of parm e.g. + ; suf = suffix SufLen dw 0 ; length of third part e.g. 1 AlpAddr dw 0 ; in /MSDOS3.1+ address of string MSDOS ; alp = alphabetic AlpLen dw 0 ; in /MSDOS3.1+ len of string MSDOS i.e. 5 VerAddr dw 0 ; in /MSDOS3.1+ address of string 3.1 ; ver = version VerLen dw 0 ; in /MSDOS3.1+ len of string 3.1 i.e. 3 ; of course the puns are intentional. CommaSep db ' ' ; character for thousands separations. ; usually a comma, sometimes decimal point DeciSep db ' ' ; decimal point. Country specific. ; usually a decimal point, sometimes comma. DeciSep2 db ' ' ; alternate decimal point. ; sometimes a comma, when comma treated as decmial. data ends