0 Members and 1 Guest are viewing this topic.
ld hl,(var1) ld de, (var2) ld a, h rla sbc a,a add hl, de ld b, a ld a, (var1+2) adc a, b ld (var1+2), a
ld hl,(var1) ld de, (var2) add hl,de sbc a,a ld b,a ld a,(var1+2) sub b ld (var1+2),a
Thanks, but it still doesn't fully work. (It gets the same results, actually.
ld (tx2), hl
ld hl,(var1) ld de, (var2) add hl,de ld (var1),hl ld a,(var1+2) adc a,0 ld (var1+2),a
ld hl,(var1) ld de, (var2) ld a, d rla sbc a, a ld b, a add hl, de ld (var1), hl ld a, (var1+2) adc a, b ld (var1+2), a
Results from calculator-----------------------------00 19 00 00 00 00 19 0000 19 00 01 8C 00 1A 8C00 19 FF 01 80 00 1B 7F00 1A 8C 01 8C 00 1C 1800 49 00 FE 80 01 47 8000 49 00 00 00 00 49 0000 47 80 FE 80 01 46 0000 49 00 2F 00 00 78 00 Results from routine----------------------------- In 1 In2 Out00 19 00 00 00 00 19 0000 19 00 8C 01 8C 1A 00FF 19 00 80 01 7F 1B 008C 1A 00 8C 01 18 1C 0000 49 00 80 FE 40 47 00 <- Wrong?00 49 00 00 00 00 49 0080 47 00 80 FE 00 46 00 <- Wrong?00 49 00 00 2F 00 49 00 <- Wrong?