185k views
5 votes
Q1. (a) sixteen byte of data are stored in memory location starting at 8050H to 805FH. Write

a program to transfer the entire block of data bytes to new memory locations starting at
8070H
Data byte
37
57
E3
BS
A2
SA
8B
10
F2
7F
A7
19
82
DA
C2
98
Hint. Start with showing data transfer, flow chart, and then machine
writing.
(b). write instruction to store the contents of register B into the memory location 8085H
using the opcodes, MOV, STAX and STA. the register B holds 32H

1 Answer

0 votes

Answer:

Data Transfer:

Flow Chart:

START

LOAD A with 8050H

LOAD B with 8085H

MOV C,A // Move the starting address of data block to C

MOV D,B // Move the starting address of new memory location to D

MVI A,00 // Initialize A to 0

BACK:

MOV A,M // Move the data byte from memory location pointed by C to A

STAX D // Store the data byte from A to memory location pointed by D

INX C // Increment C to point to next data byte

INX D // Increment D to point to next memory location

MVI A,00 // Initialize A to 0

CMP C // Compare C with 805FH

JNZ BACK // If C is not equal to 805FH, repeat the loop

STOP

Store the contents of register B into the memory location 8085H:

MOV A,B // Move the contents of register B to A

STAX 8085H // Store the contents of A to memory location 8085H

OR

STA 8085H // Store the contents of B to memory location 8085H

User Leslie Alldridge
by
3.9k points