MARIE: Simulating a fake architecture for... funsies?

MARIE: Simulating a fake architecture for... funsies?

M.A.R.I.E.

Have you heard of MARIE before? Probably not.

It stands for Machine Architecture that is Really Intuitive and Easy, and you can read more about it here if you're so inclined. Essentially, it was designed for Academia, for teaching students like myself about computer architectures and how they function.

I'm currently in a Computer Systems Architecture course at Northern Illinois University where we're looking at the MARIE architecture as an example to learn about all the nuts and bolts of good old-fashioned computing (and modern computing, too, but we're not that smart yet!)

Well, just doing stuff by hand on pencil and paper or in an Excel spreadsheet wasn't doing it for me, so I decided to try my hand at writing a simulator/emulator for the architecture. So here's my masterpiece:

Register Dump of MARIE Simulator

Fast forward five days, and I'm writing an assembler for it too. What the heck?

This is such a fun project, and somewhat challenging, though MARIE only has 13 opcodes. My next steps are to make the simulator more robust, and to finish the assembler: but would you believe it, after only a few hours my simple two-pass assembler actually worked!

You can check it out on GitHub and see just how average my Sim code looks, and how godawful the code for the assembler looks at the moment. If you're really fancy-schmancy and you want to try programming for the MARIE architecture you could use my assembly language, but I'd highly recommend checking out Marie.JS as it is way more complete and full-featured.

But what is the moral of this story? Well, I had never written anything like this before, but I read up a bit on how a simulator should work, and got something working in no time! Don't be afraid to try something that you may think is over your head conceptually: you might just learn something!