[Community puzzle] Micro Assembly

This topic is about the puzzle Micro Assembly.

Feel free to send your feedback or ask some help here!

This challenge made me realize I needed to brush up on how variables in my language could reference other variables. Thanks, weekly challenge!

3 Likes

Very nice puzzle. Did it in F#, it’s a great exercise to practice functional programming, because it lends itself very well to the functional approach (discriminated unions, records, immutable state, recursive “main loop”…)

2 Likes

Next step is to make it “golfed”.
I tried it on Python.

2 Likes

Very interesting puzzle!
I miss the goto statement in C when handling the JNE instruction. I am using java without this facility. Have to use more complicated ways to jump here and there in the flow.

2 Likes

Hi,
By now, I pass the MOV, ADD and SUB test. But with the validator I only pass the SUB ??

I first think that my functions where not efficient enough but I coded them the same way, especially ADD and SUB !

If someone has an idea ?

Thanks
Philippe

Fun stuff. Seems like I could do it in a far easier way but hey, it’s readable and works haha

2 Likes

This is an excellent exercise for anyone that is being taught programming, it teaches so many things and can lead as a segway into many different topics from building instruction sets to compiler optimizations… I’m really glad you created this, and to have worked on this!

1 Like