Menu

#3703 sdas8051 program counter issue

open
nobody
None
other
5
2024-01-27
2024-01-27
No

I’ve run into what I think might be a bug in sdas8051 as distributed with cdcc 4.3.0. The following test code:

       .AREA   CODE1 (ABS)
       .ORG    0x0000
       JZ      0x0000
       JB      0x00,0x0000
       ACALL   0x0000
       .ORG    0x8000
L1:
       LJMP    L1

...produces:

$ sdas8051 -l -o test.s
test.s:7: Error: <p> phase error: label location changing between passes 2 and 3
?ASxxxx-Warning in line 8 of test.s
           large constant 0xff808000 truncated to 16 bits
removing test.rel

...and the issue can also be seen in the .lst:

                                        1         .AREA   CODE1 (ABS)
        000000                          2         .ORG    0x0000
        000000 60 00            [24]    3         JZ      0x0000
        000002 20 00 00         [24]    4         JB      0x00,0x0000
        000005 00 00            [12]    5         ACALL   0x0000
      FF808000                          6         .ORG    0x8000
p     FF808000                          7 L1:
      FF808000 02 80 00         [24]    8         LJMP    L1

Discussion


Log in to post a comment.

MongoDB Logo MongoDB