totalspectrum / spin2cpp

Tool to convert Parallax Propeller Spin code to PASM, C++ or C
Other
46 stars 17 forks source link

P2: Can't assemble branches with long immediates #444

Closed Wuerfel21 closed 6 months ago

Wuerfel21 commented 6 months ago
DAT
              org
              tjnz pa,##.label
              long 0[400]
.label        jmp #$

I'm fairly sure this should work.

Also, I think I saw a really stupid workaround for this issue somewhere in assemble_ir.c

totalspectrum commented 6 months ago

This should be fixed now. One quirk of this instruction encoding is that PNut, at least, only encodes 18 bits for the signed offset in the AUGD + tjnz, rather than the full 32 bits that are available. I've made flexspin do the same.