View Single Post
Old 26 February 2018, 16:57   #18
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,191
Quote:
Originally Posted by pipper View Post
What I don't understand: why bitwise negating a 16bit number does not result in a 16bit number - is this a bug in vasm maybe?
The expression evaluation routine doesn't know anything about the instruction and it always works with the CPU's native target-address-type, which is 32 bits for M68k (would be 16 bits for 6502, for example).

So equates are always stored as 32 bit values. And eval_expression() always returns $ffff7fff for ~$8000. Then the AND.W instruction checks its immediate operand, which doesn't match its current operation size...

Yes, I think all assemblers work that way. Otherwise I have to fix it.
phx is offline  
 
Page generated in 0.04000 seconds with 11 queries