0% found this document useful (0 votes)
21 views8 pages

Microprocessor Assembly Language Tasks

This document contains 5 questions regarding assembly language programming for different processors. Question 1 asks to write an ALP to transfer data between two arrays. Question 2 asks to write a program to count numerals, capital letters, small letters in 50 memory locations. Question 3 asks to write a program to count the number of 1's in a 32-bit data location. Question 4 asks to write an 80486 ALP with a subroutine to count even/odd positive and negative numbers in a location. Question 5 provides initial register values for an 80386 processor and asks to determine the register values after a program is executed.

Uploaded by

Divyam Arora
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)
21 views8 pages

Microprocessor Assembly Language Tasks

This document contains 5 questions regarding assembly language programming for different processors. Question 1 asks to write an ALP to transfer data between two arrays. Question 2 asks to write a program to count numerals, capital letters, small letters in 50 memory locations. Question 3 asks to write a program to count the number of 1's in a 32-bit data location. Question 4 asks to write an 80486 ALP with a subroutine to count even/odd positive and negative numbers in a location. Question 5 provides initial register values for an 80386 processor and asks to determine the register values after a program is executed.

Uploaded by

Divyam Arora
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

Tut 5

Module 4 Lectures 10-20

Question 1
Write an ALP that will transfer data from ARRAY1
to ARRAY2. The number of elements in the array is
10. The array is a word array. The starting address of
ARRAY2 = starting address of ARRAY1 + 10d

Question 2
Write a program that examines the contents of 50
memory locations that has ASCII characters and
counts the number of Numerals, Capital alphabets,
Small Alphabets and stores them in memory
locations labelled NUMS, CAPS1, SMA1.

Question 3
Write a program that will count the number of 1s in
a 32-bit stored in location dat1 and store the resultant
count in location res1.

Question 4
Write an 80486 ALP with a subroutine sub1 that will
count number of odd positive, odd negative, even positive
and even negative 16-bit numbers. The data that is to be
analysed is stored in memory location in1 and results will
be stored in locations oddpos, oddneg,
evenpos,evenneg respectively. The total count of data
available is in location cnt1 and cannot exceed 100. The
subroutine should do the categorization and counting
while the main program only passes the number as a
parameter using SI as the pointer.

Question 5
For an 80386 processor

Question 5
Initial values
AX= 2222H ,BX=3333H,CX=5555H
,DX=4444H ,SP=2000H, BP=3000H,
SI=FFFFH, DI=0100H,Flag=0102
After execution of the program given ,
determine the contents of
AX, BX, CX, DX, SP, BP ,SI, DI & Flag
register

PUSH AX
PUSH BX
PUSHF
PUSHA
PUSH 2040H
POPA
POP BX
POPF
POP [DI]

Solution -5

DI -2040H
SI-0100H
BP-FFFFH
AX-5555H
BX-2222H
CX-4444H
DX-3333H
SP-1FFEH
Flag register-0102H

You might also like