[A83] Re: data
[Prev][Next][Index][Thread]
[A83] Re: data
here is a little example
Mainloop:
..... code .....
cp k2nd
call z,changecell
jp mainloop
changecell:
ld hl,(postochange) ;curpos can be an x and y value
ld a,4 ;a is whatever you want to change the cell to
call writedata
jp mainloop
writedata:
push af
ld de,data
ld a,(spot)
add a,e
ld e,a
pop af
ld (de),a
ret
This will change the current cell to 4. This can be very useful for a
tilemapping prog like minesweeper or battleship, as you could save a spot as
a hit, flag, etc.
-Cole South