A86: Prime


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

A86: Prime




The code below always produces 0 into a (by way od _divHLbyA.).  This should 
not be the case, so does anyone know why it is doing this?

    ld b,46

LOOP_START:
    ld a,b
    call Initial_Check
    ld a,(A)
    ld l,a
    ld h,0
    ld a,(I)
    call _divHLbyA
    cp 0
    jp COMPOSITE
    jr Initial_Check_2

Initial_Check:
    ld hl,ntilde
    ld e,a
    ld d,0
    add hl,de
    ld a,(hl)
    ld (I),a
    ret


Glen
tutorial1.cjb.net


Follow-Ups: