Re: A86:ldir
[Prev][Next][Index][Thread]
Re: A86:ldir
with ldir, the count is in bc, not b.
so
ld b,12
should be
ld bc,12
In a message dated 2/13/99 2:17:03 AM Eastern Standard Time,
chicane@reninet.com writes:
>
> Does anyone know of any side effects to ldir?
>
> I replaced this code:
>
> Label1:
> ld hl,SomeAddress
> ld de,_OP1
> ld b,12
> Label2:
> ld a,(hl)
> ld (de),a
> inc hl
> inc de
> djnz Label2
> ret
>
> With this:
> Label1:
> ld hl,SomeAddress
> ld de,_OP1
> ld b,12
> ldir
> ret
> When i change it, the new program crashes my calc, but the old one didnt.
> Why is this? They are virtualy the same thing right? Thx to anyone who can
> help.