So you want to learn assembly? Core War

(pico) #1

Learning assembly takes a while, and it is a bit hard to jump straight into a modern processor and start coding… So, if you do not have any experience with the bare metal, it is good to start with a pretty simple assembly. And the simplest assembly I can recall is called RedCode

Despite of being a fun game, it is a nice way to start with low level programming. The machine does not have registers or stack, just memory and some flags. The number of instructions is small (around 16, depending on the version you try) and only a couple of memory addressing modes are allowed. There are some kind of threading also.

Take a look to the wiki page (specially the part about the use of genetic algorithms to generate code :slight_smile:)

And here is the simplest RedCode program you can write… The IMP

MOV 0, 1

Moves content of current memory cell (by default addressing is relative to the instruction pointer), into the next memory cell. When the IP is increased the same code is executed again and again…

Let me know when you are done with RedCode and we can move into the next level!

Happy Hacking!



Fwiw, I also heard TIS-100 is also a pretty solid game to pick up on assembly. Currently 6 bucks on steam iirc.


(random-man) #3

Ooooh this looks fun. Thanks for sharing!

1 Like

(pico) #4

Very interesting.

Looks pretty similar to RedCode (the assembly I mean), so I would say that, from a learning point of view, it would be pretty similar. I like more the concept of having to programs fighting for resources in a computer that solving puzzle approach… But that is a completely person matter.

Thanks for sharing.


(The C# Dude) #5

Very cool stuff! I share one tutorial which seems to be updated here:

1 Like


Sorry for digging up such old topic but I would like to say that this project is awesome. I had the chance to develop it at the uni a long time ago and it’s a good way to challenge your skill in C and ASM. I will try to put my hand on it and share my work with you guys.


1 Like

(pico) #7

It was exactly the same for me… that was my first real C program ever!!!. It would be awesome if you share it… mine I think is definitely lost and I’m scary to look again to that code :joy:

1 Like


ahaha same for me ! But it will be funny xD

1 Like


I didn’t find my code base yet, however here is the subject if someone want to develop it :stuck_out_tongue:

1 Like

(pico) #10

Cool… I used the papers from Scientific America from the 80s. May still be a good reading :slight_smile:


(system) closed #11

This topic was automatically closed after 30 days. New replies are no longer allowed.