Re: A85: Matix
[Prev][Next][Index][Thread]
Re: A85: Matix
I tried that and then put lh (hl),a and it didn't work andgave me a bad
checksum! Here is how I'm calling my matrix, if this matters, and I
have the number I want stored in A! but nothing is working! Does
anyone know why or ahve they run across this?
John
Ess Andreas wrote:
>
> B = x coordinate
> C = y coordinate
> DE = addr of your matrix-like gameboard
>
> ld H, 0
> ld L, C
> add HL, HL
> add HL, HL
> add HL, HL ;you have an 8x8 matrix, right?
> ld C, B
> ld B, 0
> add HL, BC
> add HL, DE
>
> Now you can perform ld A, (HL), ld (HL), A etc. etc.
> Andreas
Follow-Ups:
References: