A86:ldir


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

A86:ldir




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.