home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MS DOS Archives 1
/
MS-DOS_Archives_Volume_One_Walnut_Creek.iso
/
msdos
/
at
/
atperf.arc
/
MASM.INC
< prev
next >
Wrap
Text File
|
1988-02-22
|
778b
|
44 lines
.xcref REGSAVE,REGREST,INSTR_ALIGN
REGSAVE macro LIST ; Register save macro
irp XX,<LIST>
push XX
endm
endm ; REGSAVE
REGREST macro LIST ; Register restore macro
irp XX,<LIST>
pop XX
endm
endm ; REGREST
INSTR_ALIGN macro ; Instruction alignment
nop
nop
nop
endm ; INSTR_ALIGN
ALIGN macro NAME,PREF
local L1
; Align instructions on dword boundary
test LCL_FLAG,@LCL_&NAME ; Already relocated?
jnz L1 ; Yes
mov ax,PREF&D-PREF&L ; Get length of alignment area
push ax ; Pass as argument #1
lea ax,PREF&L ; Get starting address
push ax ; Pass as argument #2
call DD_ALIGN ; Align the instructions
or LCL_FLAG,@LCL_&NAME ; Mark as relocated
L1:
endm