1 ; Standard macro set for NASM -*- nasm -*-
3 ; Macros to make NASM ignore some TASM directives before the first include
13 ; This is a magic token which indicates the end of the TASM macros
16 ; Note that although some user-level forms of directives are defined
17 ; here, not all of them are: the user-level form of a format-specific
18 ; directive should be defined in the module for that directive.
20 ; These two need to be defined, though the actual definitions will
21 ; be constantly updated during preprocessing.
25 %define __SECT__ ; it ought to be defined, even if as nothing
27 %imacro section 1+.nolist
28 %define __SECT__ [section %1]
31 %imacro segment 1+.nolist
32 %define __SECT__ [segment %1]
36 %imacro absolute 1+.nolist
37 %define __SECT__ [absolute %1]
41 %imacro struc 1.nolist
43 %define %$strucname %1
45 %$strucname: ; allow definition of `.member' to work sanely
47 %imacro endstruc 0.nolist
53 %imacro istruc 1.nolist
55 %define %$strucname %1
58 %imacro at 1-2+.nolist
59 times %1-($-%$strucstart) db 0
63 times %{$strucname}_size-($-%$strucstart) db 0
67 %imacro align 1-2+.nolist nop
68 times ($$-$) & ((%1)-1) %2
70 %imacro alignb 1-2+.nolist resb 1
71 times ($$-$) & ((%1)-1) %2
74 %imacro extern 1-*.nolist
81 %imacro bits 1+.nolist
85 %imacro use16 0.nolist
88 %imacro use32 0.nolist
92 %imacro global 1-*.nolist
99 %imacro common 1-*.nolist
106 %imacro cpu 1+.nolist