A82: Reeeeeeeeeeeally strange TASM problem


[Prev][Next][Index][Thread]

A82: Reeeeeeeeeeeally strange TASM problem




for some reason, when I try to compile this macro:

#DEFINE fixpt(sign,iPart,fPart) #IF sign=0
#DEFCONT  \ iPart*256+(fPart/390625)
#DEFCONT  \ #ELSE
#DEFCONT  \ %11111111^iPart*256+(1+(fPart/390625))
#DEFCONT  \ #ENDIF

using this:

	ld hl, fixpt(0,3,99609375)

it gives me these errors:

first pass:
fixpt.asm line 0501: Imbalanced conditional.
Second pass:
fixpt.asm line 0096: Unknown token: (#)
fixpt.asm line 0096: Unknown token.    
fixpt.asm line 0096: Label not found: (IF0)
fixpt.asm line 0096: unrecognized directive.
(3*256+(99609375/390625))

but when I compile it with this macro:

#DEFINE fixpt(sign,iPart,fPart) iPart*256+(fPart/390625)

it works fine (of course it ignores the sign, but that's not the point)
according to tasm.doc, this should work fine (the ^ is binary XOR)
and what's with the "imbalanced conditional" error?  I've never seen it before
(it refers to the .end at the end of the file)
Oh yeah, line 96 is the "ld hl, ..." line
Someone PLEASE tell me what gives

~Adamman