0% found this document useful (0 votes)
55 views

Contents of The Accumulator Are Copied Into The Memory Location Specified by The Contents of The Operand

The document contains assembly language code that initializes registers, loads values into memory locations through incrementing register pairs, adds memory values to the accumulator, and conditionally jumps or halts based on register values. It initializes the HL register pair, copies values to B and C registers, loads a value into A and increments it with each pass of a loop that stores it to memory. A second loop increments the register pair, loads those memory values and adds them to the accumulator, incrementing another register if no carry and looping while that register is not zero. The final values are stored to memory and execution halts.

Uploaded by

ug201311025
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Contents of The Accumulator Are Copied Into The Memory Location Specified by The Contents of The Operand

The document contains assembly language code that initializes registers, loads values into memory locations through incrementing register pairs, adds memory values to the accumulator, and conditionally jumps or halts based on register values. It initializes the HL register pair, copies values to B and C registers, loads a value into A and increments it with each pass of a loop that stores it to memory. A second loop increments the register pair, loads those memory values and adds them to the accumulator, incrementing another register if no carry and looping while that register is not zero. The final values are stored to memory and execution halts.

Uploaded by

ug201311025
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

8000 21 00 089

LXI H,8900h ; Initialize the HL register pair

8003 44

MOV B,H ; Move the H register content in to B register

8004 4D

MOV C,L ; Move the L register content in to C register

8005 3E 65

MVI A,65h ; Move immediate 65H to the accumulator

8007 16 0A

MVI D,0Ah ; Move immediate 0AH to D register

8009 02

LOOP:

STAX B ; Contents of the accumulator are copied into the


memory location specified by the contents of the
operand

800A 03

INX B ; Increment B,C register pair

800B 3C

INR A ; Increment the A register

800C 15

DCR D ; Decrement the D register

800D C2 09 80

JNZ LOOP ; If non zero, Jump to 8009h

8010 16 00

MVI D,00h ; Move immediate 0AH to D register

8012 3E 00

MVI A,00h ; Move immediate 00H to the accumulator

8014 44

MOV B,H ; Move the H register content in to B register

8015 4D

MOV C,L ; Move the L register content in to C register

8016 1E 0A

MVI E,0Ah ; Move immediate 0AH to E register

8018 0A

LDAX B ; Load accumulator from address in B,C register pair

8019 03

LOOP2: INX B ; Increment B,C register pair

801A 60

MOV H,B ; Move the B register content in to H register

801B 69

MOV L,C ; Move the C register content in to L register

801C 86

ADD M ; Add memory to the accumulator

801D D2 21 80

JNC SKIP ; If carry is reset, Jump to 8021h

8020 14

INR D ; Increment the D register

8021 1D

SKIP:

DCR E ; Decrement the E register

8022 C2 19 80

JNZ LOOP2 ; If non zero, Jump to 8019h

8025 32 A0 89

STA 89A0h ; Stores accumulator direct with 16-bit address

8028 7A

MOV A,D ; Move the D register content in to accumulator

8029 32 A1 89

STA 89A1h ; Stores accumulator direct with 16-bit address

802C 76

HLT; Halt execution

You might also like