mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
macros: add st() macro to the masm macro package
A very easy way to improve portability. Guarded with %ifndef just in case... Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
@@ -67,6 +67,8 @@ It is the production version of NASM since 2025.
|
||||
implemented conditional directive, and tries to match it with a
|
||||
corresponding \c{%endif}. See \k{if_caveat}.
|
||||
|
||||
\b The \c{masm} macro package now defines a macro for x87 register syntax.
|
||||
|
||||
|
||||
\H{cl-2.xx} NASM 2 Series
|
||||
|
||||
|
@@ -178,6 +178,9 @@ after \c{PROC} other than \c{FAR} is ignored.
|
||||
\b In 64-bit mode relative addressing is the default (\c{DEFAULT REL},
|
||||
see \k{default-rel}).
|
||||
|
||||
\b A macro is defined to allow the syntax \c{st(0)} instead of
|
||||
\c{st0}, and so on.
|
||||
|
||||
In addition, NASM now natively supports, regardless of whether this
|
||||
package is used or not:
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
;; --------------------------------------------------------------------------
|
||||
;;
|
||||
;; Copyright 2019 The NASM Authors - All Rights Reserved
|
||||
;; Copyright 2019-2025 The NASM Authors - All Rights Reserved
|
||||
;; See the file AUTHORS included with the NASM distribution for
|
||||
;; the specific copyright holders.
|
||||
;;
|
||||
@@ -69,6 +69,10 @@ USE: masm
|
||||
%undef ret
|
||||
%endmacro
|
||||
|
||||
%ifndef st
|
||||
%idefine st(x) st %+ x
|
||||
%endif
|
||||
|
||||
%idefine ptr __?masm_ptr?__
|
||||
%idefine flat __?masm_flat?__ ; is %idefine really correct here?
|
||||
%idefine offset
|
||||
|
Reference in New Issue
Block a user