Menu

#3 pmars assembler bug

open
nobody
None
5
2002-10-09
2002-10-09
Anonymous
No

I have a redcode source file that does not
assemble correctly with pmars
0.9.2. The problem is with a line that reads:

fnd2:  mov.i  qbomb, >fnd-(gap*rep)/2+1

Pmars 0.9.2 assembles it as if the second
operand were:

>fnd-((gap*rep)/2+1)

which is not at all the same thing.

Discussion

  • Pavel Šavara

    Pavel Šavara - 2007-01-06

    Logged In: YES
    user_id=1569256
    Originator: NO

    Simplified version
    ;problem of operators precedence
    mov 0, 0-2/2+11 ; this statement produce (-12)
    mov 0, 0-(2/2+11) ; same as this (-12)
    mov 0, 0+(-2/2)+11 ; but should produce this (10)

     
  • Björn Günzel

    Björn Günzel - 2009-05-10

    I've uploaded a tentative patch for this in the patches section.

     

Log in to post a comment.

MongoDB Logo MongoDB