News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Macro parameter issue

Started by Vortex, April 04, 2025, 06:51:44 PM

Previous topic - Next topic

Vortex

Hello,

Poasm Version 12.00.1 and Masm can assemble the code below without any issues :

.386
.model flat,stdcall
option casemap:none

enum MACRO p1,p2,p3,p4

p1 EQU 0
p2 EQU 1
p3 EQU 2

   IFNB p4

     p4 EQU 3

   ENDIF

ENDM

.code

start:

   enum false,true,other

   mov eax,other

   ret

END start

Poasm V13.00.1 should accept that there is a missing parameter ( the 4th one ) but it displays the following error message :

error: Invalid use of 'EQU'.
Code it... That's all...

Pelle

The "IFNB p4" construct is weird in general, and POASM will in this case see "IFNB<nl>" which trough other changes in seen as "true" (i.e. not blank rather than blank). I will fix it...
/Pelle