Frage

I have the following MOV instruction:

mov [SI], DX

SI = 3333h
DX = A3A3h
IP = 104h

Everything is clear, the A3A3h value is saved under the 3333h adress.

However I found some strange explanation of this specific mov instruction:

[30030 + 3333]tj[33363] = A3A3

Ignoring the strange tj thing - what is the 30030 part here, and where did it came from?

War es hilfreich?

Lösung

I'm not sure what the "tj" is about but here's an explanation of the move:

MOV [SI],DX

This moves the contents of DX into the memory location whose address is in SI off of the DS (data segment) register. So the:

[30030 + 3333]tj[33363] = A3A3

I believe is giving an example but, unfortunately, you're not showing what any of the segment registers are set to, particularly DS. So my guess is the DS is 3003. So the address would be calculated as (DS << 4) + SI, or 30030 + 3333. After the "tj" they just added this up to give a final address of 33363.

Andere Tipps

My X86 knowledge is somewhat rusty but if I remember it correctly the 30030 part is most likely coming from the data segment register (DS) which is 3003 in this case. The final address is computed as Segment * 16 + index register in this case DS and SI.

If I remember rightly, and its a very long time ago, 8086 addressing was made up of two parts - a 16bit address and another 16-bit address offset by 4 bits to give a page address. These two parts were combined to give a 20-bit address into physical memory. The 8086 is long dead, but its instruction set lives on for compatibility.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top