> > Hi,
> >
> > I have a (small) coding question, probably not so difficult. But I'm
still
> > learning.
> > I have the following subroutine:
> >
> > ld hl,(table)   ; load table into hl
> > inc hl          ; increase table
> > inc hl          ; increase table
> >
> > ld a,(hl)               ; put value in a
> > sla a           ; *2
> > sla a           ; *2
> > sla a           ; *2
> > dec hl          ; decrease table
> > The question is how do I put the value in a back in the table. I can't
do ld
> > (hl),a. That doesn't work....

It's easy. In the first line, you load the CONTENTS of address "table" into
HL, while you need to load the address itself into HL. Remove the ( and ) in
the first line, and it should work!!!


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
 email me: [EMAIL PROTECTED] or ICQ: 10196372
      visit my homepage at http://grauw.blehq.org/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED]
and put "unsubscribe msx [EMAIL PROTECTED]" (without the quotes) in
the body (not the subject) of the message.
Problems? contact [EMAIL PROTECTED]
More information on MSX can be found in the following places:
 The MSX faq: http://www.faq.msxnet.org/
 The MSX newsgroup: comp.sys.msx
 The MSX IRC channel: #MSX on Undernet
****

Reply via email to