(tests) WIP - Create a rough, partial sketch for an implementation of Conway's Game of Life
This commit is contained in:
parent
bf589411e7
commit
2d210303e6
|
|
@ -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
|
||||
Loading…
Reference in New Issue