.386S1strucf1dw ?
S1ends_TEXTSEGMENT'CODE';--- Masm 6 and above swaps in all cases: ecx becomes base, ebx becomes indexmovax,[ebx+ecx]
movax,[ebx][ecx]
movax,[ebx].S1.f1[ecx]
assumeebx:ptrS1movax,[ebx].f1[ecx] ;jwasm 2.07 swaps, jwasm 2.08 won't_TEXTENDSend
As noted in the comment, Masm 6 and above swaps base and index registers ( if no scaling factor is involved and first register isn't ESP/RSP).
Jwasm v2.07 and below did also swap, but just in one very rarely used case - and this was a bug that has been fixed in v2.08.
I won't make jwasm copy Masm's behavior as default. The documentation clearly states that the first ( counting from left to right ) register in an expression is to become the base.
However, jwasm -Zg option has been extended in v2.08 and will swap like Masm does.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Masm 6 and above, there's an odd behavior:
As noted in the comment, Masm 6 and above swaps base and index registers ( if no scaling factor is involved and first register isn't ESP/RSP).
Jwasm v2.07 and below did also swap, but just in one very rarely used case - and this was a bug that has been fixed in v2.08.
I won't make jwasm copy Masm's behavior as default. The documentation clearly states that the first ( counting from left to right ) register in an expression is to become the base.
However, jwasm -Zg option has been extended in v2.08 and will swap like Masm does.