Em Andamento

Mars Assembler Program

creating a stack data structure that can hold 10 items at most (one word per

item), operations on the stack (push, pop, display, etc), and a main loop. Conceptually, a stack is

implemented in an array of memory locations, and all necessary information about the stack (i.e.

the “pointers” for the address of the top, bottom of the stack, the current size of the stack, etc)

should be defined correspondingly.

• Stack Structure:

Your stack should have the size of 10, and initialized with 9 items on the stack. Each item is a

number, and the 9 values are from your UIN – the first digit at the bottom of the stack.

Your own stack space should be defined in the .data part of your program. You need to include the

following line in your code to use as your stack, if your UIN = 654321098:

Stackarray: .word 0, 8, 9, 0, 1, 2, 3, 4, 5, 6

Your stack (content initialized as above) should be considered of having 9 items on it: the current

top is the 2nd item (8), and the bottom is the last item (6). This means your “stack pointer” (using

either a register or a variable in data memory, marking the address of the current top of the stack)

should be pointing at the 2nd item at the beginning of the program, and of course you will also need

some other pointers (marking the topmost, and bottom of the stack) so that you know whether

there is an overflow or underflow. This also defines the direction to push and pop.

• Special Note:

1. Your stack (defined by Stackarray in your .data section and helped with a lot of variables you’ll

need to set up) is a separate entity from the MIPS runtime stack (with $sp as stack pointer).

Please remember that you can use the MIPS runtime stack to support nested procedure /

method calls, but not as the “your own stack”, which is the target of this project. In other words,

set up something else as stack pointer for your own stack, defined as Stackarray, and don’t use

$sp as the stack pointer for your stack.

2. You can consult with your friends for ideas to implement the project, but make sure to write

your own code. You are responsible to make sure your code is unique enough. If your code

looks “similar enough” to somebody else’s code, both will be deducted points for lack of


Habilidades: Montagem

Ver mais: use pointers data structure, stack data structure, set data structure, pointers data structure, pointer data structure, pointer array data structure, data structure stack, data structure set, data structure pointers, data structure operations, data structure note, data structure array, array data structure using, array data structure, program using stack, project data structure program, program somebody, mips array, top stack, program structure project, mips mars, implement mips code, program using pointer, digit part number, data structure program project

Acerca do Empregador:
( 16 comentários ) Chicago, United States

ID do Projeto: #5136536

Premiar a:


A proposal has not yet been provided

$40 USD em 3 dias
(10 Avaliações)