I am unclear how branches are assembled: I find branches assembled with 2 bytes, but also many with 4 Bytes, although 2 bytes would be possible.
And I could not find any flag to influence this behavior ("optimize" or "always use smallest instruction length" or the like) so I had to force a 2 bytes assembly by putting "Bcc.S" in lots of cases.
Can you please give some hints how the decisions is taken whether or not a branch will be assembled wit 2 of 4 bytes?
Bcc.S to force short branch.
Bcc.L to force long branch.
If no size designation is specified, the assembler will automatically optimize backward branches but not forward branches.
Oh thanks - this criteria (backwards vs. forward) did not come to my mind. Would such an "optimizing flag" be an item for the wishlist?
Adding optimization of forward branches would require major modifications to the assembler. You may add it to the wish list but it is not something that I will have time to implement. Perhaps someone else will take up the challenge.
Thanks, interesting; anyway, it was meant to be more a feedback than a requirement.
Next time some awk-script will do the remaining job, if the code size really justifies it.