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

Programing Assignment

The document outlines a series of programming assignments for assembly language, focusing on various tasks such as adding numbers, calculating dot products, and string manipulation. Each task specifies memory addresses for data storage and requires the use of assembler directives. The assignments are designed for students in the Electronics and Communication Engineering department at Siddaganga Institute of Technology.

Uploaded by

nsdarshan1161
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Programing Assignment

The document outlines a series of programming assignments for assembly language, focusing on various tasks such as adding numbers, calculating dot products, and string manipulation. Each task specifies memory addresses for data storage and requires the use of assembler directives. The assignments are designed for students in the Electronics and Communication Engineering department at Siddaganga Institute of Technology.

Uploaded by

nsdarshan1161
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Siddaganga Institute of Technology, Tumakuru – 572 103

(An Autonomous Institution affiliated to Visvesvaraya Technological University, Belagavi)


Department of Electronics and Communication Engineering
Activity-based Learning – Programming Assignment

Subject: CO&A Class: III Semester ‘A’

1. Develop an assembly language program for adding n number of words. Demonstrate the role
of Assembler Directives in this example. Assume data block starts from address DATA.
LENGTH indicates address where length of the data block is stored. Also store the sum from
location SUM.
2 Develop an assembly language program for adding n number of words. Assume data block
starts from address DATA, LENGTH indicates address where length of the data block is
stored. Store sum from location SUM.
3 Assume that the list of scores of n students are stored as shown in the following figure.
Develop a program to add Test 1 marks, Test 2 marks and Test 3 marks of all students and
store them in address SUM1, SUM2 and SUM3 respectively.

4 Develop a program for addition of n numbers using the concept of parameters passing
through registers. Assume N is the address of n, 32-bit data words, NUM1 is the address of
first data word. Consider N and NUM1 as parameters to be passed from calling program to
called program.
5 Let A and B be two vectors of length n. Their dot product is defined as

Develop a program to find the dot product.


6 Assume that there is a string of ASCII-encoded characters stored in memory starting at
address STRING. The string ends with the Carriage Return (CR) character. Write a RISC-
style program to determine the length of the string and store it in location LENGTH.
7 We want to find the smallest number in a list of 32-bit positive integers. The word at address
1000 is to hold the value of the smallest number after it has been found. The next word
contains the number of entries, n, in the list. The following n words contain the numbers in
the list. The program is to start at address 400. Write a RISC-style program to find the
smallest number and include the assembler directives needed to organize the program and
data as specified. While the program has to be able to handle lists of different lengths, include
in your code a small list of sample data comprising seven integers
8 Assume that the ASCII codes are present at memory byte locations LOC and LOC+1.
Develop a program to convert them to PACKED BCD code and store in memory location
RSLT
9 Develop assembly language code for the following assuming 32-bit memory: Initialize stack
pointer at location 44. Store data 22, 33 onto the stack. Indicate the stack pointer address after
storing these data.

You might also like