Macro factors out sine code, just like sine data, since it's used 5 times
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user