OTIR strange behavior, does not allow to modify HL

By DarkSchneider

Paladin (879)

DarkSchneider's picture

16-09-2019, 12:20

Well, I want to make a copy in a row from different sources, if I do this:

set HL, DE, C values
ld b, SIZE
otir
add hl, de <- THIS ONE IS IGNORED, EVEN IF I DO LD HL, 0
ld b, SIZE
otir

But if I do:

set HL, DE, C values
ld b, SIZE - 1 <- NOTICE DIFFERENCE
otir
outi
add hl, de <- NOW IT WORKS!
ld b, SIZE - 1
otir
outi

WHAT!? Any ideas? It is like if using OTIR makes it to ignore any HL modification.

Login or register to post comments

By DarkSchneider

Paladin (879)

DarkSchneider's picture

16-09-2019, 12:30

OK I think is a false alert and is the assembler trolling me. Changed some others assignments using direct values instead computed ones (like VALUE1 - VALUE2) and is that computed values what is failing I think.