문제

I am trying to use AAD instruction in NASM 64-bit but it shows an error at compile time:

error: instruction not supported in 64-bit mode

Is there a way I can still use this instruction in 64-bit mode? Is there any other equivalent instruction I should be aware of?

도움이 되었습니까?

해결책

The AAD instruction is invalid in 64-bit mode, but its operation is described in Intel's Software Developer's Manual, so you can implement the same functionality yourself if you need it:

tempAL ← AL;
tempAH ← AH;
AL ← (tempAL + (tempAH ∗ imm8)) AND FFH;
(* imm8 is set to 0AH for the AAD mnemonic.*)
AH ← 0;

The SF, ZF, and PF flags are set according to the resulting binary value in the AL register; the OF, AF, and CF flags are undefined.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top