Indirizzamento di memoria diretto

Memory direct addressing

VAL1 EQU 37H      ;DECIMAL VALUE = 55

VAL2 EQU 2CH      ;DECIMAL VALUE = 44

LOC1 EQU 0C350H

LOC2 EQU 0C351H

LOC3 EQU 0C352H

        ORG 0000h

        JP   0100h

        ORG 0100h

PROG :      LD A,VAL1     ;load the VAL1 (37h) in the accumulator A

           LD (LOC1),A    ;load the value in the accumulator A in the address of LOC1 (C350H)

           LD A,VAL2      ;load the VAL2 (2CH) in the accumulator A

           LD (LOC2),A    ;load the value in the accumulator A in the address of LOC2 (C351H)

           LD A,VAL2      ;load the VAL2 (2CH) in the accumulator A

           LD (LOC3), A   ;load the value in the accumulator A in the address of LOC3 (C352H)

HALT

Lascia un commento