In a message dated 17/01/03 12:43:45 GMT Standard Time, [EMAIL PROTECTED] writes:



I agree that an assembler *should* evaluate expressions properly, but some
don't I'm afraid. QMAC seems to do it, but GWASL (ie the light version)
can't assemble the original code for the lea instruction. I can't remember
if the original GST non-macro assembler did it correctly or not.



I never intended in either GWASL or GWASS to go to the trouble of evaluating expressions except in a "simple" way. That is in both assemblers evaluation is done from left to right ignoring implied brackets (parentheses) so

      3+4*8 becomes
      3+4 -> 7
      7*8 -> 56

Other assemblers no doubt will produce the answer

      3 + (4*8) = 3 + 32 = 35

I had to go through several instructions in Turbo'c codegen altering the order of the expressions so that GWASS wouild get the right answer.

I apologise if people find it troublesome. (Again it is probably another case of RTFM if things appear to go wrong.)

George  

Reply via email to