Macro factors out sine code, just like sine data, since it's used 5 times

This commit is contained in:
Rangi
2018-02-03 21:11:55 -05:00
parent 271aa20b73
commit 73ea7c6326
9 changed files with 127 additions and 411 deletions

View File

@@ -111,7 +111,15 @@ menu_coords: MACRO
ENDM
sine_wave: MACRO
bcd: MACRO
rept _NARG
dn ((\1) % 100) / 10, (\1) % 10
shift
endr
ENDM
sine_table: MACRO
; \1 samples of sin(x) from x=0 to x<32768 (pi radians)
x = 0
rept \1
@@ -119,11 +127,3 @@ rept \1
x = x + DIV(32768, \1) ; a circle has 65536 "degrees"
endr
ENDM
bcd: MACRO
rept _NARG
dn ((\1) % 100) / 10, (\1) % 10
shift
endr
ENDM