home *** CD-ROM | disk | FTP | other *** search
-
- .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