|
|
Documentation Standards - Macros
Macros, like procedures, should have a fairly complete comment block before each macro. The format should be similar to procedures. The difference will be the parameter list. If you want o break out what each parameter is, do so. The following example incorporates the parameters into the brief description of what the macro does. As with procedures, try to pick a format that relays this information and then be consistant. On a side note, you should group your macro files so that common macros are in one file. Suggested names for your files would be IO.MAC, INT.MAC, FILEIO.MAC, etc. An example of INT.MAC is shown below (with the actual macro code missing).
TITLE INT.MAC
;=======================================================================
; setInt (Number, Offset, Segment) -- Sets an interrupt vector (number)
; to the code located at segment:offset
; PreCond -- None.
; PostCond -- Nothing (no registers modified)
;=======================================================================
setInt MACRO Number, Offset, Segment
ENDM
;=======================================================================
; getInt (Number, Offset, Segment) -- Gets an interrupt vector (number)
; and returns the location of the code at segment:offset
; PreCond -- None.
; PostCond -- Nothing (no registers modified)
;=======================================================================
getInt MACRO Number, Offset, Segment
ENDM
Last Modified: January 26, 1999
-
Barry E. Mapen
|