Computer Science, asked by bharat98866, 5 hours ago

from 1000H. Store count in Register E.
c) Write an Assembly Language Program to copy 10 consecutive
bytes from memory 2025 H to memory location BCBC H
onwards.​

Answers

Answered by suniti22
0

"The program in assembly language to add all the byte values and store in consecutive memory locations is as follows:

LDA 8500 // Some memory location say 8500

// Load the accumulator with the address of memory viz 8500    

MOV D, A

// Move the accumulator value to the register D

MVI E, 99

// Load the E register with the counter 100 - 1

LXI B, 8500 + 1 // Next memory location from where we have done LDA - 8501

// Load immediate B C with the memory location

LDAX B

// Load Accumulator indirect A=[BC]

ADD D

// Add the content of the Accumulator to the Register D

MOV D, A

// Move the value in D to the Accumulator or register A

INX B

// Increment BC register pairs

DCR E

// Decrement the counter register

LDAX B

JNZ 9000

// Jump on no zero

STA 9000 // Suitable memory location

// Store the output into a memory location    

HLT

//End of the program"

Similar questions