Category : Assembly Language Source Code
Archive   : DRIVEKIT.ZIP
Filename : DD_MAC.MAC

 
Output of file : DD_MAC.MAC contained in archive : DRIVEKIT.ZIP

;
; Initialize 8 Constants for Character Device Name to ' '
;
IN_NAME MACRO
X = 0
REPT 8
X = X+1
CHARSP %X
ENDM
ENDM
;
; Assign each letter of Character Device Name
; to a Constant
;
MKNAME MACRO NLIST
X = 0
IRPC M,NLIST
X = X+1
CHAREQU %X,M
ENDM
ENDM
;
; Assign Constant the ASCII value of Z
;
CHAREQU MACRO Y,Z
N&Y = '&Z'
ENDM
;
; Assign Constant an ASCII value of ' '
;
CHARSP MACRO Y
N&Y = ' '
ENDM
;
; Convert ASCII Constants to String of DB's
;
DDNAME MACRO
X = 0
REPT 8
X = X+1
CHARDB %X
ENDM
ENDM
;
; Convert an ASCII Constant to a DB
;
CHARDB MACRO Y
DB N&Y
ENDM
;
; Define a Device Header Structure
;
DEVHDR MACRO NXTOFF,NXTSEG,ATTRIB,STRAT,INTRPT
DW NXTOFF
DW NXTSEG
DW ATTRIB
DW STRAT
DW INTRPT
DDNAME
ENDM
;
; DEF = TRUE if the function is implemented
; NAME = name of the function
; ENTRY = label of the function entry point
; or exit point if not implemented
;
FUNCTION MACRO DEF,NAME,ENTRY
;
_&NAME EQU DEF
IF _&NAME
IFNDEF ENTRY
EXTRN ENTRY:near
ENDIF
ENDIF
.&NAME EQU ENTRY
ENDM