NASM Forum > Programming with NASM

2.04rc1 and 2.04rc2 - conditional jumps probl

(1/1)

nobody:
Hi,

The opcodes of conditional jump and call instructions have changed between those version. My question is: why? I couldn't find any answer for that question. The problem is that my bootsector code (16bit Real Mode), which runs perfectly when compiled with 2.04rc1. I've found out with ndisasm that opcodes differ.

Below I present sample output showing differences (on the left column: 2.04; on the right column: 2.04rc1):

0F82F8FF    jc word 0x15    |    72FA    jc 0x15
0F85E9FF    jnz word 0x4b    |    75ED    jnz 0x49

Why those opcodes differ? Why those from 2.04 lead to crash?


Regards,
aidecoe

Frank Kotler:
Short answer: "bug". Actually, just a change in the default behavior - it "shouldn't" crash. (but if it does, it does).

Adding the "-O" switch "should" fix it, but your best bet is to dump that and get the latest version. 2.06rc1 has just been released - available at:

http://www.nasm.us

I'll have it up here... later today... or tomorrow... (remind me if I don't!).

Sorry you had a problem, and thanks for the feedback!

Best,
Frank

nobody:
"The opcodes of conditional jump and call instructions have changed between those version."

Correction: just conditional jumps -- not calls.

Thanks for solution. -O2 workaround makes code correct and my boot program runs fine.

I don't fully understand your answer. In 2.06rc1 the bug was fixed or not? I've just tested it and 2.06rc1 still has this problem.


Regards,
aidecoe

H. Peter Anvin:
Looks like the change to make the short forms the default again (0.98-style) didn't actually work when one hard-codes offsets.  aidecoe: could you post a bug report with your code?

Navigation

[0] Message Index

Go to full version