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

Microprocessor Programming & Interfacing: Tutorial 3

The document contains questions about microprocessor programming and interfacing. It asks the reader to: 1. Write an ALP to copy 10 bytes from one memory location to another in reverse order in 3 sentences or less. 2. Write a program to count the number of occurrences of an element in an array and store the result in a given location. 3. Write an ALP to separate an interleaved string stored in memory into two equal strings. 4. Write the contents of the data segment that would result from the given data declarations for an 8086 processor. 5. [No summary provided as there is no question 5.] 6. Write an ALP to find the

Uploaded by

Pri
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)
52 views

Microprocessor Programming & Interfacing: Tutorial 3

The document contains questions about microprocessor programming and interfacing. It asks the reader to: 1. Write an ALP to copy 10 bytes from one memory location to another in reverse order in 3 sentences or less. 2. Write a program to count the number of occurrences of an element in an array and store the result in a given location. 3. Write an ALP to separate an interleaved string stored in memory into two equal strings. 4. Write the contents of the data segment that would result from the given data declarations for an 8086 processor. 5. [No summary provided as there is no question 5.] 6. Write an ALP to find the

Uploaded by

Pri
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/ 6

MICROPROCESSOR

PROGRAMMING &
INTERFACING
Tutorial 3

Module 4
Q1.

• Write an ALP that will copy a set of 10 bytes from


memory location loc1 to memory location loc2 in
the reverse order.
Q2.

• An array of data is stored in data segment starting


at ARRAY1.
• The number of elements in the array is stored in
location COUNT1.
• Write a program to count the number of
occurrences of the element in CODE1 in the
ARRAY1 and store this result in location RESULT1.
Q3.

• An interleaved string is stored from displacement ‘istr1’.


• The size of the interleaved string is stored in location ‘cnt1’.
• Write an ALP that will separate the interleaved string into
two strings
• If the interleaved string is “hmeilclroo” it should be
separated as two strings “hello” and “micro”.
• You can assume that the strings to be separated will be of
equal size. [note – there is no need to use string instructions
for this]
Q4. FOR AN 8086 PROCESSOR
.Model Tiny
• Write the contents of memory in data
. DATA segment that result from data declarations
DAT1 DB 45H, 54H, 46H • You may use ‘A’ to represent ASCII byte
ALIGN 2 for the character A.
P1 EQU 97H • If the contents cannot be determined put
DAT2 DW 23F8H, 2435H a ‘X’ in the box.
DAT3 DB ’INTER’ • All values except for ASCII values must
DAT4 DB 6 DUP (122) be in hexadecimal
DAT5 DB 3 DUP (?)
DAT6 DW 33H
DAT7 DB 0FH
.CODE
.STARTUP DS:0118H
.EXIT DS:0120H
END
DS:0128H
Q6.

• An array of data is stored in data segment starting from


ARRAY1.
• The number of elements in the array is stored in location
COUNT1.
• Size of data is 16-bit
• Write an ALP to find the minimum number and the
displacement at which it is stored.
• The number must be stored in memory location MIN and the
address of the number in memory location MINADDR.

You might also like