Game of LIFE disassembly

3 posts / 0 new
Last post
Last seen: 5 months 22 hours ago
Joined: Dec 10 2021 - 12:26
Posts: 33
Game of LIFE disassembly


if you enjoy 6502 machine code, I've dissassembled and commented LIFE (Conway's Game of for the the Apple-1).

The binary is 440 bytes, the disassembly is 388 source code lines, fully commented. You can open it here on my github page:

It took me several iterations before I could figure out it all, naming all variables, isolating subroutines and fully understand what they do. A lot of work, but also lot of fun!

The only thing I could not grasp in full is the random number generator (GETRAND routine at line 330): it seems to be a sort of LFSR but not like the ones I've seen so far. If you have any clue, please write down in the comments.

mmphosis's picture
Last seen: 1 week 6 days ago
Joined: Aug 18 2005 - 16:26
Posts: 433
Game of LIFE for Apple II

I enjoy 6502 machine code. I've written very rudimentary and sometimes very crude random number generators, but I haven't much of a clue on the use of this sort of linear feedback shift register. Obviously, the idea is to generate pseudo-random numbers.

I made modifications to make the program work on the Apple II.

Having little to no luck posting multi-line code on this forum, I've posted the code over here:





Last seen: 3 min 51 sec ago
Joined: Jun 29 2018 - 16:55
Posts: 579
That's really neat, thank you

That's really neat, thank you for sharing.


On the other forum at least if you make a .txt file and put it in a .zip file it will let you attach that to a post. 

Log in or register to post comments