1
; Standard macro set for NASM -*- nasm -*-
3
; Note that although some user-level forms of directives are defined
4
; here, not all of them are: the user-level form of a format-specific
5
; directive should be defined in the module for that directive.
7
; These two need to be defined, though the actual definitions will
8
; be constantly updated during preprocessing.
12
%define __SECT__ [section .text] ; it ought to be defined, even if as nothing
14
%imacro section 1+.nolist
15
%define __SECT__ [section %1]
18
%imacro segment 1+.nolist
19
%define __SECT__ [segment %1]
23
%imacro absolute 1+.nolist
24
%define __SECT__ [absolute %1]
28
%imacro struc 1.nolist
30
%define %$strucname %1
32
%$strucname: ; allow definition of `.member' to work sanely
34
%imacro endstruc 0.nolist
40
%imacro istruc 1.nolist
42
%define %$strucname %1
45
%imacro at 1-2+.nolist
46
times %1-($-%$strucstart) db 0
50
times %{$strucname}_size-($-%$strucstart) db 0
54
%imacro align 1-2+.nolist nop
58
times ($$-$) & ((%1)-1) %2
61
%imacro alignb 1-2+.nolist resb 1
62
times ($$-$) & ((%1)-1) %2
65
%imacro extern 1-*.nolist
72
%imacro bits 1+.nolist
76
%imacro use16 0.nolist
79
%imacro use32 0.nolist
82
%imacro use64 0.nolist
86
%imacro global 1-*.nolist
93
%imacro common 1-*.nolist
100
%imacro cpu 1+.nolist
104
%imacro default 1+.nolist
108
; NASM compatibility shim
109
%define __OUTPUT_FORMAT__ __YASM_OBJFMT__