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

originality.

Habilidades: Montagem

Ver mais: use of pointers in data structure, stack program in data structure using c, stack of data structure, stack in data structure, stack data structure, set data structure, pointers in data structure, pointer in data structure, pointer data structure, pointer array in data structure, data structure stack, data structure set, data structure pointers, data structure operations, data structure note, data structure in array, data structure array, array in data structure using c, array in data structure, array data structure, mips ASSEMBLY, mips assembler, program using stack, mips assembly program, project data structure program

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

ID do Projeto: #5136536

Premiar a:

greenvector

A proposal has not yet been provided

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