Discussion in 'Homework Help' started by mnunez021, Mar 14, 2009.
does anyone know how t?
You already posted this exact same question Here
What is a MARIE processor?
What are you trying to do? Do you need to code in the MARIE assembly language? What CPU (processor) do you plan to run it on? I can help you if you want to code with the free MASM assembler that executes Windows programs on the Windows Intel (Wintel) system. We need more information.
all it really is, is an assembly language program that will find a maximum value contained in an array of 8 integers
That is all fine and good, but you still have not answer my questions. Until you do, I cannot help you.
MARIE is apparently a virtual processor with a restricted set of instructions. It is already about as simple as it can get, as it is for concept training.
To the OP - does the processor have status flags? Can it compare the contents of a register with the contents of a memory location? Can it make a register to register compare?
Have you got any idea how to create a program in the editor? This is your assignment, so it's a good idea if you participate. Can you be specific about what has you stumped?
How deep is the stack level?
What is the sizeof(int)?
Does the processor support indirect addressing?
I'll assume overflow, zero, and carry flags are present.
I'll also assume there are comparison instructions, but what happens when the comparison is true vs false? Skip instruction, or a further jump?
Without basic information like the above, as others have already stated, it is impossible to write a program, as the mnemonics aren't even known, nor what types of operands they can work with.
All assembly is not the same, this is why high level languages such as C were developed, so a program could be built for a specific CPU instruction set, without the program author memorizing the CPU instructions and quirks for every processor in existence.
here is the explanation of what is required
That tells us something about your assignment, but nothing about your attempts. Plus there is nothing about the instruction set, flag register, stack, or memory.
I could crank out a descending sort in 6502 or Z80 assembler, but it might not be the same.