Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Computer Science Fundamentals (Computer Science 1026)

Rating
-
Sold
-
Pages
2
Uploaded on
04-07-2024
Written in
2023/2024

Assignment 3-Winter 2024 Assignment 3 for Arc Course Computer Science Fundamentals (Computer Science 1026) 189 documents University

Institution
Course

Content preview

12/06/2024, 00:54 Assignment 3-Winter 2024




COMP-2660 – Assignment #3
DUE DATE is: Wednesday, March 13, 2024. To be submitted via BrightSpace by 11:59P
M.

WARNINGS: You must only use instructions and directives discussed from Lecture 1 to
Lecture 8 (ie, Chapt_06).

This is a group assignment of no more than 4 students in a group. However, submit
individually as usual but making sure you include as a comment the last-name, first-name
and student-number of each member in the group. What I mean: all member of the group
should submit the work as if it was done individually. Simply, I do not know how to
correctly set the group submission feature on Blackboard.

Programming Exercise-1 (40 points): [call it Ass3.asm]

For this question, you should (1) first separately write the Programs 1, 2, and 3 below, in
order to make sure that they execute correctly, and then (2) put them all together
appropriately into one single main program [this single main program is Program 4, below,
which will be name Ass3.asm and is what you should submit].

Of course, you do not need to do what I wrote above; you can directly start implementing
the Program 4 below.

1. (10 points) Write a program ArrayToStack which copies (ie, pushes) the N
elements of an array, Vector, onto the runtime stack. Vector is an array of
unsigned double-word integers.

2. (10 points) Write a program StackToArray which copies back to Vector the
last N double-word elements pushed onto the stack (by some piece of code such as
ArrayToStack). StackToArray should not reverse Vector (that is, the
elements should return to their initial positions as before the execution of
ArrayToStack).

3. (10 points) Write a program StackReverse which uses the runtime stack to
reverse an array Vector of N unsigned double-word integers.

4. (10 points) To test these three programs, your main program should display the
following interaction with you (things in reds are your inputs). Fix the maximum
size of the array to be N = 20; thus, your runtime stack will never overflow ☺.

➢ What do you want to do now? > 0

➢ What is the size N of Vector? > 13
➢ What are the 13 values in Vector? > 1 2 3 4 5 6 7 8 9 10 11 12 13





about:blank 1/2

Written for

Course

Document information

Uploaded on
July 4, 2024
Number of pages
2
Written in
2023/2024
Type
Class notes
Professor(s)
University professor
Contains
All classes

Subjects

$9.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
smymusic5

Get to know the seller

Seller avatar
smymusic5 Financial Engineering II (E4707)
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
11
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions