Hacker News new | ask | show | jobs
by pmontra 2004 days ago
> Corewars proved itself really, really hard. Learning the assembly commands and how they edited the A and B values of each memory cell, understanding how the processes were executed and how data was stored was incredibly challenging for students to wrap their heads around.

This surprised me. I wrote a Corewars system in compiled Basic for the Sinclair QL when the game became popular. Writing it was not particularly difficult and the toy machine code was very simple. Maybe it was the context: we were used to look at bits and assembly instructions, we're not anymore.

2 comments

> This surprised me.

When I read the intro, I was like „They want to teach beginners with Corewars? That‘s brave...“

I really like the idea of Corewars (and programmning games in general), but I never managed to get into it because the whole concept of assembly language was too foreign for me. I would have had to invest too much time up front, just understanding the basics.

I loved Robocode, but then that uses Java ;-)

I understand the feeling. However you can play some puzzle games that are much more difficult than the assembly of MARS. Furthermore any simple machine language traslates pretty well into a basic version of C: add, sub, pointer operations, bitwise operations, compare a value with zero and possibly move the program counter to a memory location, copy memory from RAM to a register (think of it as a predefined veritable). Everything is an int, maybe a float. All very low level.
s/veritable/variable, phone autocorrect (._.) and I forgot copy from register to RAM. Basically it's all we need.
Have you tried Human Resource Machine?
Maybe. I don't remember there being 30 instructions either though. We need A RISC Core Wars. (Although he did mention a reduced set of commands still took 1.5 hours of hand-holding....)
A RISC ISA would render a lot of tricks useless as they depend on memory-to-memory copies.