Starting from:

$25

Assignment-3 Nested loops

Computer Architecture I
Assignment-3

Question-1: Nested loops
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).
b) Write an ARM assembly code to produce the same output given above. (name your
file as nestedloop.s)
Sample Run:
Question-2: Guess Number Game
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).
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.
Sample run:
How to submit
Please submit your work as a single zip file including the following files
• nestedloop.c
• nestedloop.s
• game.c
• game.s
CS 351 Computer Architecture I

More products