已解决! 转到解答。
Dear CrazyCat,
If the notation is not accepted then the compiler should generate errors not incorrect code! It does generate correct code for other case e.g. bra *+0.
This really isn't an answer What does the assembler think '*' means in this context?
I have used the alternative (as shown in the original posting) but would still like an explanation.
I believe the compiler may be calculating the offset for the wrong HC08 variant but that's a guess.
bye
I have noticed some further inconsistencies on this issue -
__asm bra * does cause an error message, whereas
__asm bra *+0 does not cause any message, and produces the correct result, as previously noted.
I have not exhaustively tested, but I might presume that any of the conditional branch instructions would give the correct result.
__asm brset 0,PTA,*+3 // Set/clear CF
does produce the erroneous assembly result brset 0,0x00,*+4, so is consistent with the previous observation. Another relative branch instruction CBEQ produces a similar erroneous result.
__asm jmp *+6 produces the erroneous assembly result jmp 0x06, again with no warning or error message.
Since the debugger extensively uses this notation within its assembly window, it does seem somewhat inconsistent to say that the notation is not supported within HLI code.
Regards,
Mac
Hello
I would recommend you to submit a service request for that.
Click here to submit a service request.
Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.
Attach the generated .zip file to the SR.
CrasyCat