Lucenzo97
Lucenzo97

Reputation: 225

8085 assembly instructions MOV, LDA and STA

I get the point of MOV, STA and LDA instructions, but what I don't understand is why are there three different instructions for two different processes?

So, what I can do with STA and LDA instructions can be done with MOV instruction too, right?

Upvotes: 12

Views: 20470

Answers (1)

Weather Vane
Weather Vane

Reputation: 34583

The instructions LDA and STA move data between memory and A. The instruction MOV either moves data between registers, or between a register and a memory location specified by HL.

LDA and STA are used when the address can be resolved at assembly/link time.

MOV is used when the memory address is computed at run time, and is placed in HL. For example, when you are iterating through an array.

You have discovered direct and indirect memory addressing.

Upvotes: 15

Related Questions