Closed abe-k closed 9 years ago
Sorry for not replying earlier.. I didn't see this message until today. I'm looking into it and hope to have it fixed by tomorrow night. Thanks for letting me know.
An interesting corner case to keep in mind, that some of the obvious approaches will fail on, is
.stm8
.org 0x00
mov 0x103 - test, 0x103 - test
test: .ds8 1
If mov
is three bytes long, then test = 0x03
, so 0x103 - test = 0x100
, so mov
needs to be five bytes long, which makes test = 0x05
and so 0x103 - test = 0xFE
, but this doesn't allow reducing mov
back to three bytes or you get an infinite loop.
Should be fixed. I tested your second case too and it seems to work. All the old automated tests pass.
I was adding automated tests that catch this issue on 68000... I need to add the same automated tests for STM8 so all forms of the instructions are tested and this doesn't happen again.
Thanks for being patient. Let me know if you find anything else.
If a
mov
instruction needs to use the long addressing mode, its length will change, but this mistakenly does not update label addresses. For example,produces the listing
when it should produce
since the
mov
instruction is now 5 bytes long.