I've read through 28 days 2 paragraph snippet on arrays and a few forum posts but I still don't fully understand them.
So from what I understand, to create an array just do something like this
Code:
But im not 100% on how to access this array. What I'm trying to do is store a map in an array, and then read through the array, printing some predertimined char for each number in the array (0=' ', 1='+', simple stuff).
But I have no clue how to access the array, I assume its something like
Code:
or something, but if someone could clear this up It'd be appreciated
So from what I understand, to create an array just do something like this
Code:
; Totaly random unused of data im using for an example
Array:
.db 7,0,0,0,0,0,0,0,0,9,0,0,0
.db 0,0,0,0,0,2,0,0,0,0,0,3,0
.db 0,0,0,0,0,2,6,0,0,0,0,0,6
.db 2,0,4,0,0,0,0,0,0,8,0,0,0
.db 4,0,0,0,1,1,2,8,0,0,0,0,0
But im not 100% on how to access this array. What I'm trying to do is store a map in an array, and then read through the array, printing some predertimined char for each number in the array (0=' ', 1='+', simple stuff).
But I have no clue how to access the array, I assume its something like
Code:
LD HL,(Array)+2
or something, but if someone could clear this up It'd be appreciated