1
$\begingroup$

I'm a beginner learning about Assembly language and I was doing questions where I have to identify different addressing mode in 8086 processor.

One such instruction is: mov ah,09h

Here the source operand has immediate address mode and destination operand has Register address mode. In many tutorials online they have just mentioned that the instruction has only Immediate addressing mode, I don't understand why these tutorials do not mentioned about the destination addressing mode. Shouldn't the answer be both immediate and register addressing mode for the given instruction.

I know it is a very simple question but every other explanation on the internet is making me more confused. I would really like to know if my reasoning is correct.

$\endgroup$
2
$\begingroup$

Well, x86 hasn't the simplest instruction format... And similar addressing modes can be named differently for different CPUs.

In most CPUs (particularly RISCs and simple 8bits CPUs), there is only zero or one memory operation for data, so each instruction can be binned in one addressing mode or another.

For CISC CPUs it can be a bit more complex, for example x86 supports writing an immediate value to memory without going through a register.

Intel manuals don't really name the addressing mode for each instruction, because it's too complex, there are instead acronyms to describe operands such as imm8,imm16,r/m8,r/m16...

So your "MOV AH,0x09h" is probably "immediate" addressing, Intel describes it as "MOV r8,imm8" : 8bit register as destination to 8bit immediate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.