summaryrefslogtreecommitdiff
path: root/standard.mac
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:26 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:26 +0000
commit6768eb71d8debde65562619c938b997aea1bd9f9 (patch)
tree93fc4f4a6d66891ace9494b737aa4b2c1bed37ef /standard.mac
parentd7ed89eac9580f280fe0017b22c8e38ca75ed8e3 (diff)
downloadnasm-6768eb71d8debde65562619c938b997aea1bd9f9.tar.gz
nasm-6768eb71d8debde65562619c938b997aea1bd9f9.tar.bz2
nasm-6768eb71d8debde65562619c938b997aea1bd9f9.zip
NASM 0.95
Diffstat (limited to 'standard.mac')
-rw-r--r--standard.mac77
1 files changed, 77 insertions, 0 deletions
diff --git a/standard.mac b/standard.mac
new file mode 100644
index 0000000..5653ba6
--- /dev/null
+++ b/standard.mac
@@ -0,0 +1,77 @@
+; Standard macro set for NASM 0.95
+
+%define __NASM_MAJOR__ 0
+%define __NASM_MINOR__ 95
+
+%define __SECT__ ; it ought to be defined, even if as nothing
+
+%imacro section 1+.nolist
+%define __SECT__ [section %1]
+ __SECT__
+%endmacro
+%imacro segment 1+.nolist
+%define __SECT__ [segment %1]
+ __SECT__
+%endmacro
+
+%imacro absolute 1+.nolist
+%define __SECT__ [absolute %1]
+ __SECT__
+%endmacro
+
+%imacro struc 1.nolist
+%push struc
+%define %$strucname %1
+[absolute 0]
+%endmacro
+%imacro endstruc 0.nolist
+%{$strucname}_size:
+%pop
+__SECT__
+%endmacro
+
+%imacro istruc 1.nolist
+%push istruc
+%define %$strucname %1
+%$strucstart:
+%endmacro
+%imacro at 1-2+.nolist
+ times %1-($-%$strucstart) db 0
+ %2
+%endmacro
+%imacro iend 0.nolist
+ times %{$strucname}_size-($-%$strucstart) db 0
+%pop
+%endmacro
+
+%imacro extern 1+.nolist
+[extern %1]
+%endmacro
+
+%imacro bits 1+.nolist
+[bits %1]
+%endmacro
+
+%imacro global 1+.nolist
+[global %1]
+%endmacro
+
+%imacro common 1+.nolist
+[common %1]
+%endmacro
+
+%imacro org 1+.nolist
+[org %1]
+%endmacro
+
+%imacro group 1+.nolist
+[group %1]
+%endmacro
+
+%imacro uppercase 1+.nolist
+[uppercase %1]
+%endmacro
+
+%imacro library 1+.nolist
+[library %1]
+%endmacro