News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Operand in AAM and AAD

Started by Garrett, March 03, 2010, 10:40:45 PM

Previous topic - Next topic

Garrett

I was just playing around with AAM and AAD and I found that it' s not possible to use an operand to convert a binary value to a any base BCD value.

So if I like to convert 0x1F to a octal BCD value, I would use the code below:


mov al, 01Fh
aam 08h


But MASM 10 doesn't seem to like the aam 08h instruction, it gives a integer error.
If I open the assembled (AAM without operand) file with OllyDbg and patch the AAM 0xA (88 0A) to AAM 0x8 (88 08), the CPU calculates the 0x1F to octal 37 correctly.

What's the reason that MASM doesn't understand the AAM / AAD with operrand?

P.S: The reason I'm playing around with this, is that I'm trying to shorten the intel instruction set reference (with SSE1-4) to a few handy papers, ordered by the purpose of the instruction. Sometimes I test the behavior of the instructions if the intel reference is unclear.

If someone has improvements to theĀ  or wants to join me, I would be happy.

jj2007

This works:
mov al, 01Fh
db 0d4h, 08h ; aka aam 8

drizz

The truth cannot be learned ... it can only be recognized.