Marie Processor

Ratch

Joined Mar 20, 2007
1,070
mnunez021,

Does anyone know how to write an assembly language program in the MARIE processor that will find the maximum value contained in a array of 8 integers?
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.

Ratch
 

Ratch

Joined Mar 20, 2007
1,070
mnunez021,

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.

Ratch
 

beenthere

Joined Apr 20, 2004
15,819
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?
 

thatoneguy

Joined Feb 19, 2009
6,359
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.
 

beenthere

Joined Apr 20, 2004
15,819
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.
 
Top