Re: A86: Adding numbers


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

Re: A86: Adding numbers




The problem is in the statement '.db $27,$10.'  If
you're going to use .db for a two byte number (and
there is no point in ever doing so), you have to
switch the bytes...

 .dw 10000 = .dw $2710 = .db $10,$27

Just use .dw 10000

--- Brent Schneider <brent@calc.org> wrote:
> 
> 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!
> 
> 
> 

__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com


Follow-Ups: