Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -2,17 +2,17 @@
; IN : a = n (n <= 13, otherwise overflows)
; OUT: a = FIB(n)
fib8: cp 2
ret c ; if n < 2 then done
fib8: cp 2
ret c ; if n < 2 then done
ld b,a
dec b ; b = n - 1
ld c,0 ; F0
ld a,1 ; F1
ld b,a
dec b ; b = n - 1
ld c,0 ; F0
ld a,1 ; F1
f8_l: ld d,a
add a,c
ld c,d
djnz f8_l
f8_l: ld d,a
add a,c
ld c,d
djnz f8_l
ret
ret

View file

@ -2,33 +2,33 @@
; IN : a = n (n <= 47, otherwise overflows)
; OUT: hlh'l' = FIB(n)
fib32: ld l,a ; lower bytes in the alt set
ld h,0
exx ; now in regular set
ld hl,0
cp 2
ret c ; if n < 2 then done
fib32: ld l,a ; lower bytes in the alt set
ld h,0
exx ; now in regular set
ld hl,0
cp 2
ret c ; if n < 2 then done
dec a ; loopcount = n - 1
ld bc,0
exx ; now in alt set
ld bc,0
ld hl,1
dec a ; loopcount = n - 1
ld bc,0
exx ; now in alt set
ld bc,0
ld hl,1
f32_l: ld d,h
ld e,l
add hl,bc
ld b,d
ld c,e
exx ; now in reg set
ld d,h
ld e,l
adc hl,bc
ld b,d
ld c,e
exx ; now in alt set
dec a
jr nz,f32_l
f32_l: ld d,h
ld e,l
add hl,bc
ld b,d
ld c,e
exx ; now in reg set
ld d,h
ld e,l
adc hl,bc
ld b,d
ld c,e
exx ; now in alt set
dec a
jr nz,f32_l
exx ; now in reg set
ret
exx ; now in reg set
ret