[A83] Re: HL = A * 12 (fast)


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

[A83] Re: HL = A * 12 (fast)






Tijl Coosemans wrote:

> I got ye beaten ;P Who does better?

Well, if you don't mind wasting memory...

Let 'mul12table' be a 256-byte aligned table containing x * 12 for x = 0..63

    ld    h, mul12table >> 8
    add    a, a
    ld    l, a
    ld    a, (hl)
    inc    l
    ld    h, (hl)
    ld    l, a




Follow-Ups: References: