This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# This is ported from: | |
# https://www.omnimaga.org/asm-language/sine-approximation-(z80)/ | |
# (Xeda112358 a.k.a. Zeda a.k.a. ZedaZ80) | |
# | |
from math import sin | |
def sineb(x): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int16_to_float80: | |
; DE points to where the output float is copied | |
; HL is the signed int | |
ld bc,0x8014 | |
add hl,hl | |
rr b | |
jp p,uint16_to_float+3 | |
xor a | |
sub l | |
ld l,a |