Computer Architecture I Assignment-3 Solution

$30.00

Category:

Description

Question-1: Nested loops

  1. a) Write a C program which produces the following output. You are supposed to use

nested-for loop structure (name your file as nestedloop.c).

  1. b) Write an ARM assembly code to produce the same output given above. (name your

file as nestedloop.s)

Sample Run:

Image missing

Question-2: Guess Number Game

  1. a) Write a C program to get the user to guess the number that the program has

randomly picked (name your file as game.c).

  1. b) Write assembly code performing the same program. (name your file as game.s). It is important to note that, in your assembly code, you are supposed to use stack for storing data and/or passing parameters. Use stack in at least two different store or load operations. 

How to submit

Please submit your work as a single zip file including the following files

  • nestedloop.c
  • nestedloop.s
  • game.c
  • game.s

Please also use the following file format while naming the zip file:

LastNameFirstnameX_Y.zip where LastNameFirstname is your last name with the first letter in capital, followed by your first name with the first letter in capital; the X is the course code; the Y is the assignment #. (ex: SerceFatmaCS351_3.zip)

 

 

 

 


error: Content is protected !!