tags:

views:

214

answers:

2
+1  Q: 

Is IMUL AX valid?

Hi all,

I spent last hour googling, trying to find out if IMUL AX is valid command in 80x86 assembler. Sorry for not trying out, I just don't have tools at PC I'm currently using.

All I need is just a quick answer yes/no. Thanks!

jpou

Update: Tried and verified today. Works as expected.

-R
AX=0002  BX=0000  CX=20CD  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=0B02  ES=9FFF  SS=0B02  CS=0B02  IP=0102   NV UP EI PL NZ NA PO NC
0B02:0102 F7E0          MUL     A

-X
-T
AX=0004  BX=0000  CX=20CD  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=0B02  ES=9FFF  SS=0B02  CS=0B02  IP=0104   NV UP EI PL NZ NA PO NC
0B02:0104 FE7405        PUSH    [SI+05]                     DS:0005=9A
+4  A: 

It should be valid:

IMUL—Signed Multiply

IMUL r/m16
DX:AX ← AX ∗ r/m word.

Taken from here, “Volume 2A: Instruction Set Reference, A-M“.

Bastien Léonard
+4  A: 

Sorry for not trying out, I just don't have tools at PC I'm currently using.

From the command-line:

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>debug
-a
17CC:0100 imul ax
17CC:0102
-u
17CC:0100 F7E8          IMUL    AX
17CC:0102 0000          ADD     [BX+SI],AL
-q

Using the debug command it can be verified that "imul ax" will assemble (and is therefore a valid command in 80x86 assembler).

ChrisW
Maybe he/she doesn't use Windows, but it's always funny to run debug in 2009. Is it still present in Vista and 7, by the way?
Bastien Léonard
justas@Zaibukas:~$Sorry, I don't, it's vanilla instalation of ubuntu9.04.
jpou
I'm running Vista.
ChrisW