(tests) WIP - Create a rough, partial sketch for an implementation of Conway's Game of Life

This commit is contained in:
n loewen 2023-08-28 15:31:57 -04:00
parent bf589411e7
commit 2d210303e6
1 changed files with 37 additions and 0 deletions

37
test-programs/life.asm Normal file
View File

@ -0,0 +1,37 @@
;; Conway's Game of Life
; n loewen & Elizabeth Pankratz
; 2023-08-23 -
; Flag numbers for easier reference
#Carry 0
#Zero 1
#live_colour $FF
#dead_colour $00
#top_left $00
#top_right $04
#bot_left $14
#bot_right $18
#px_ptr $00
#live_neighbours_ptr $FF
; start of code
* $1D
@loop
LDA (#px_ptr)
; do something...
; increment pixel pointer
LDA (#px_ptr)
STA #px_ptr
JMP @loop
@check_for_tl_corner
LDA (#px_ptr)
; choose a memory location to stash result. 0=false, 1=true
HOP