LMACROS.INC
Some macros to make assembler coding easy.
macro declaration
procdef macro pname,args
;
; Externally visible procedure with arguments definition
macro declaration
entrdef macro pname, args
;
; Externally visible entry point with arguments definition
macro declaration
internal macro pname
; Internal near procedure entry definition
macro declaration
intrdef macro pname
;
; Internal jump label definition
macro declaration
pret macro
;
; Procedure Return
; To be used on returning from externally visible procedures with/without
; Arguments or from internal procedures with no arguments
; Will restore bp if needed and any save_regs macro saved registers
macro declaration
pend macro pname
;
; Procedure end
macro declaration
ipend macro pname
;
; Internal procedure end
macro declaration
decll macro list
;
; This macro will process the argument list on a procedure call
macro declaration
decl macro aname, type
; This macro equates 'aname' to an argument on the stack and defines
; the referencing offset. This is the AZTEC version.
macro declaration
arg_offset macro sym_name , dt_size , cur_arg
; Since MASM (and TASM) don't expand a EQU symbol inside another
; EQU define we need to play games with another macro so we can force
; the expansion. This behavior appears to have been a "fix" that was added
; in MASM 5.0, the docs refer to prior versions doing an numeric expansion
; in text strings. If this is true MASM 4.? and lower should work fine with
; the Aztec version of this macro.
macro declaration
decl macro aname, type
; This macro equates 'aname' to an argument on the stack and defines
; the referencing offset. This is the MASM | TASM version and uses
; arg_offset to do its work.
macro declaration
ldptr macro dest, argname, seg
;
; This macro loads an arg pointer into DEST, with optional SEGment
macro declaration
retptrm macro src,seg
;
; Return a pointer
macro declaration
retptrr macro src,seg
; Return a data item
macro declaration
retnull macro
; Return NULL
macro declaration
pushds macro
; Save ds if long_ptr
macro declaration
popds macro
; Restore ds if long_ptr
macro declaration
finish macro
; Simple end codeseg
macro declaration
save_regs macro args
; Autosave registers in a procedure
macro declaration
save_a_reg macro a_reg
;
; Worker macro for save_regs, save one register and also error check
; for illegal saves and out of order register lists.
macro declaration
auto_restore_regs macro
; Autorestore registers while exiting a procedure
macro declaration
ASCIIZ macro var,raw_str
; Make a ASCIIZ string (C style - NULL terminated)
macro declaration
CLABEL macro var , size
; Generate a public C label for an assembler variable
macro declaration
CPUBLIC macro var , size , initial_value
; Allocate a public C variable
Table of Contents
Function Index
generated on 08 February 1998 - 14:43:55
© 1998 Tierra del Fuego Ltd.
|