[ASM] Use macros instead of defines

Defines can cause problems, like previously with the end define, which caused a jump to label ".end" to be interpreted as a jump to ".", which is the current address, resulting in an infinite loop.
Remove obsolete CODESEG
This commit is contained in:
Timo Kreuzer 2025-01-23 12:45:45 +02:00
parent 07ce196d8e
commit bab23a250b

View file

@ -319,7 +319,6 @@ ENDM
.macro align x .macro align x
.align x .align x
.endm .endm
#define ALIGN align
/* MASM compatible REPEAT, additional ENDR */ /* MASM compatible REPEAT, additional ENDR */
#define REPEAT .rept #define REPEAT .rept
@ -353,8 +352,8 @@ ENDM
.endm .endm
/* MASM needs an END tag */ /* MASM needs an END tag */
#define END .macro END
#define end .endm
.macro .MODEL model .macro .MODEL model
.endm .endm
@ -362,7 +361,6 @@ ENDM
.macro .code .macro .code
.text .text
.endm .endm
#define CODESEG .code
.macro .const .macro .const
.section .rdata .section .rdata