0
Mov Ah,02
Mov dl,43
Int 21
Mov dl,0C

In line two,the character 43 is in memory or resigter before load into DL register? The adress of character 43 will load into MAR and MBR before perform the operation ?,

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82
Dasiy
  • 1
  • 2

1 Answers1

2

The number 43 in mov dl, 43 is an immediate. It is encoded into the instruction. That is, the machine code for mov dl, 43 consists of the opcode byte for mov dl, imm followed by a byte giving the value to be loaded, in this case 43.

All instructions are fetched from memory in order to be executed, so in that sense the number 43 is in memory. But usually when we say "in memory", we mean in data memory, like

foo: db 43
...
mov dl, [foo]

In particular, the value 43 does not have an address in any useful sense. (Technically the byte 43 in the machine code exists at some address in memory, but that address does not get used explicitly.)

I do not know what you mean by MAR or MBR.

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82
  • MAR (Memory Address Register) and MBR (Memory Buffer Register) are implementation details of some toy / teaching CPUs. e.g. [Does any computer resemble the model taught in UK secondary education?](https://retrocomputing.stackexchange.com/q/24795) on retrocomputing. You might or might not find something in a real 8086 you could apply those names to, but certainly not in a modern x86 with split L1i/d caches and multiple load / store ports. [x86 registers: MBR/MDR and instruction registers](https://stackoverflow.com/q/51522368) – Peter Cordes Oct 17 '22 at 06:28