Re: A86: Adding Numbers


[Prev][Next][Index][Thread]

Re: A86: Adding Numbers




Well first, just a comment about ease... Instead of .db $27,$10 you
could do .dw 10000 and it would be much more readable. The same goes for
in the program: ld de,10 is more readable than ld de,$A.  Anyway, it
looks like it should work, I'm rather curious as to why it doesn't work.
Send me more source (individually, not to the list) and I'll try to see
why it doesn't work...

---- Original Message ----
I have a question:
I am making a program, and I have 10000 stored in money:
money:
.db $27,$10
then, in my program, I want to add 10 to it. This is what I did:
ld hl,(money)
ld de,$A
add hl,de
ld (money),hl

But, it doesn't work. I've tried many things. Am I doing something
wrong?
Thanks!