0 Members and 1 Guest are viewing this topic.
;we will subtract big num 1 from big num 2 ld hl, (bigNum2) ;hl = $0201 ld de, (bigNum1) ;DE = $0605 or a ;this time we don't want the carry flag sbc hl, de ld (result), hl ;DE was bigger than HL, so the carry flag is set ld hl, (bigNum2+2) ld de, (bigNum1+2) sbc hl, de ;since the last operation carried, (remember 2nd grade math) ld (result+2), hl ;we had to subtract an extra 1 from this resultbigNum1: .db 5, 6, 2, 3bigNum2: .db 1, 2, 8, 9result: .db 0, 0, 0, 0