1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-28 01:29:44 +00:00

Working a bit on sinus table generator. Tested resulting sinus - it is within +/-2 of a java-calculated sinus.

This commit is contained in:
jespergravgaard 2018-02-20 22:41:36 +01:00
parent db603554ac
commit 696d1a1f5f
8 changed files with 3675 additions and 5385 deletions

View File

@ -0,0 +1,4 @@
lda {z1}
sta {c1}
lda {z1}+1
sta {c1}+1

View File

@ -0,0 +1,6 @@
ldy #0
lda ({z2}),y
sta {z1}
iny
lda ({z2}),y
sta {z1}+1

View File

@ -0,0 +1,9 @@
ldy #0
sec
lda ({z2}),y
sbc ({z3}),y
sta {z1}
iny
lda ({z2}),y
sbc ({z3}),y
sta {z1}+1

View File

@ -9,17 +9,14 @@ import "multiply.kc"
import "print.kc"
void main() {
asm { sei }
word wavelength = 128;
signed word[128] sintab1;
sin16s_gen(sintab1, wavelength);
print_cls();
signed word[20] sintab;
sin16s_gen(sintab, 20);
asm { cli }
//for(byte i=0; i<20*2; i=i+2) {
// print_byte(i);
// print_str(" @");
// print_sword(sintab[i]);
// print_ln();
//}
for(signed word* st1 = sintab1; st1<sintab1+wavelength*2; st1 = st1+2 ) {
print_sword(*st1);
print_str(" @");
}
}
// PI*2 in u[4.12] format
@ -46,9 +43,6 @@ void sin16s_gen(signed word* sintab, word wavelength) {
// Iterate over the table
dword x = 0; // u[4.28]
// u[0.16] div6 = 1/6 ;
//divr16u(1, 6, 0);
//word div6 = divr16u(0, 6, rem16u);
// u[0.16] div6 = 1/6 ;
word div6 = $10000/6; //$2aab;
// u[0.16] div128 = 1/128 ;
word div128 = $10000/128; //$0200;
@ -68,7 +62,7 @@ void sin16s_gen(signed word* sintab, word wavelength) {
word x3 = mul_u4f12(x2, x1); // u[4.12]
word x4 = mul_u4f12(x3, x1); // u[4.12]
word x5 = mul_u4f12(x4, x1); // u[4.12]
word x3_6 = >mul16u(x3, div6);
word x3_6 = >mul16u(x3, div6); // u[4.12]
word x5_128 = >mul16u(x5, div128); // u[4.12]
word usinx = x1 - x3_6 + x5_128; // u[4.12]
signed word sinx = (signed word)usinx; // s[4.12]
@ -76,21 +70,7 @@ void sin16s_gen(signed word* sintab, word wavelength) {
sinx = -sinx;
}
*sintab = sinx;
sintab = sintab +2;
print_word(i);
print_str(" @");
print_dword(x);
print_str(" @");
print_word(x1);
print_str(" @");
print_word(x3_6);
print_str(" @");
print_word(x5_128);
print_str(" @");
print_sword(sinx);
print_ln();
sintab = sintab + 2;
x = x + step;
}

View File

@ -5,43 +5,175 @@
.const PI2_u4f12 = $6488
.const PI_u4f12 = $3244
.const PI_HALF_u4f12 = $1922
.label rem16u = 8
.label char_cursor = $12
.label line_cursor = $e
.label rem16u = 4
.label char_cursor = 6
jsr main
main: {
sei
jsr print_cls
.label wavelength = $80
.label st1 = 2
jsr sin16s_gen
cli
jsr print_cls
lda #<SCREEN
sta char_cursor
lda #>SCREEN
sta char_cursor+1
lda #<sintab1
sta st1
lda #>sintab1
sta st1+1
b1:
ldy #0
lda (st1),y
sta print_sword.w
iny
lda (st1),y
sta print_sword.w+1
jsr print_sword
jsr print_str
clc
lda st1
adc #<2
sta st1
lda st1+1
adc #>2
sta st1+1
cmp #>sintab1+wavelength*2
bcc b1
bne !+
lda st1
cmp #<sintab1+wavelength*2
bcc b1
!:
rts
str: .text " @"
sintab1: .fill $100, 0
}
print_str: {
.label str = 4
lda #<main.str
sta str
lda #>main.str
sta str+1
b1:
ldy #0
lda (str),y
cmp #'@'
bne b2
rts
b2:
ldy #0
lda (str),y
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
inc str
bne !+
inc str+1
!:
jmp b1
}
print_sword: {
.label w = 4
lda w+1
bpl b1
lda #'-'
jsr print_char
sec
lda w
eor #$ff
adc #0
sta w
lda w+1
eor #$ff
adc #0
sta w+1
b1:
jsr print_word
rts
}
print_word: {
lda print_sword.w+1
tax
jsr print_byte
lda print_sword.w
tax
jsr print_byte
rts
}
print_byte: {
txa
lsr
lsr
lsr
lsr
tay
lda hextab,y
jsr print_char
txa
and #$f
tay
lda hextab,y
jsr print_char
rts
hextab: .text "0123456789abcdef"
}
print_char: {
ldy #0
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
rts
}
print_cls: {
.label sc = 2
lda #<SCREEN
sta sc
lda #>SCREEN
sta sc+1
b1:
lda #' '
ldy #0
sta (sc),y
inc sc
bne !+
inc sc+1
!:
lda sc+1
cmp #>SCREEN+$3e8
bne b1
lda sc
cmp #<SCREEN+$3e8
bne b1
rts
sintab: .fill $28, 0
}
sin16s_gen: {
.const wavelength = $14
.const div6 = $10000/6
.const div128 = $10000/$80
.label _15 = $14
.label _17 = $14
.label _19 = $c
.label _15 = $10
.label _17 = $10
.label _19 = 6
.label stepi = $e
.label stepf = $c
.label step = $1c
.label x1 = $a
.label x2 = $10
.label x3 = $20
.label x4 = $10
.label x5 = $22
.label x3_6 = $20
.label x5_128 = $22
.label usinx = $c
.label sintab = 6
.label x = 2
.label i = 8
.label sinx = $c
lda #<wavelength
.label step = $18
.label x1 = 6
.label x2 = $e
.label x3 = $1c
.label x4 = $e
.label x5 = $1e
.label x3_6 = $1c
.label x5_128 = $c
.label usinx = 6
.label sintab = 2
.label x = 8
.label i = 4
.label sinx = 6
lda #<main.wavelength
sta divr16u.divisor
lda #>wavelength
lda #>main.wavelength
sta divr16u.divisor+1
lda #<PI2_u4f12
sta divr16u.dividend
@ -55,9 +187,9 @@ sin16s_gen: {
sta stepi
lda divr16u.return+1
sta stepi+1
lda #<wavelength
lda #<main.wavelength
sta divr16u.divisor
lda #>wavelength
lda #>main.wavelength
sta divr16u.divisor+1
lda #<0
sta divr16u.dividend
@ -71,20 +203,12 @@ sin16s_gen: {
sta step
lda stepf+1
sta step+1
lda #<SCREEN
sta line_cursor
lda #>SCREEN
sta line_cursor+1
lda #<SCREEN
sta char_cursor
lda #>SCREEN
sta char_cursor+1
lda #<0
sta i
sta i+1
lda #<main.sintab
lda #<main.sintab1
sta sintab
lda #>main.sintab
lda #>main.sintab1
sta sintab+1
lda #0
sta x
@ -177,11 +301,11 @@ sin16s_gen: {
sta x5_128
lda _17+3
sta x5_128+1
lda x1
lda _19
sec
sbc x3_6
sta _19
lda x1+1
lda _19+1
sbc x3_6+1
sta _19+1
lda usinx
@ -216,54 +340,6 @@ sin16s_gen: {
lda sintab+1
adc #>2
sta sintab+1
lda i
sta print_word.w
lda i+1
sta print_word.w+1
jsr print_word
lda #<str
sta print_str.str
lda #>str
sta print_str.str+1
jsr print_str
jsr print_dword
lda #<str1
sta print_str.str
lda #>str1
sta print_str.str+1
jsr print_str
lda x1
sta print_word.w
lda x1+1
sta print_word.w+1
jsr print_word
lda #<str2
sta print_str.str
lda #>str2
sta print_str.str+1
jsr print_str
lda x3_6
sta print_word.w
lda x3_6+1
sta print_word.w+1
jsr print_word
lda #<str3
sta print_str.str
lda #>str3
sta print_str.str+1
jsr print_str
lda x5_128
sta print_word.w
lda x5_128+1
sta print_word.w+1
jsr print_word
lda #<str4
sta print_str.str
lda #>str4
sta print_str.str+1
jsr print_str
jsr print_sword
jsr print_ln
lda x
clc
adc step
@ -282,145 +358,24 @@ sin16s_gen: {
inc i+1
!:
lda i+1
cmp #>wavelength
bcc b29
cmp #>main.wavelength
bcs !b1+
jmp b1
!b1:
bne !+
lda i
cmp #<wavelength
bcc b29
!:
rts
b29:
lda line_cursor
sta char_cursor
lda line_cursor+1
sta char_cursor+1
cmp #<main.wavelength
bcs !b1+
jmp b1
str: .text " @"
str1: .text " @"
str2: .text " @"
str3: .text " @"
str4: .text " @"
}
print_ln: {
b1:
lda line_cursor
clc
adc #$28
sta line_cursor
bcc !+
inc line_cursor+1
!b1:
!:
lda line_cursor+1
cmp char_cursor+1
bcc b1
bne !+
lda line_cursor
cmp char_cursor
bcc b1
!:
rts
}
print_sword: {
.label w = $c
lda w+1
bpl b1
lda #'-'
jsr print_char
sec
lda w
eor #$ff
adc #0
sta w
lda w+1
eor #$ff
adc #0
sta w+1
b1:
lda w
sta print_word.w
lda w+1
sta print_word.w+1
jsr print_word
rts
}
print_word: {
.label w = $10
lda w+1
tax
jsr print_byte
lda w
tax
jsr print_byte
rts
}
print_byte: {
txa
lsr
lsr
lsr
lsr
tay
lda hextab,y
jsr print_char
txa
and #$f
tay
lda hextab,y
jsr print_char
rts
hextab: .text "0123456789abcdef"
}
print_char: {
ldy #0
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
rts
}
print_str: {
.label str = $10
b1:
ldy #0
lda (str),y
cmp #'@'
bne b2
rts
b2:
ldy #0
lda (str),y
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
inc str
bne !+
inc str+1
!:
jmp b1
}
print_dword: {
.label dw = 2
lda dw+2
sta print_word.w
lda dw+3
sta print_word.w+1
jsr print_word
lda dw
sta print_word.w
lda dw+1
sta print_word.w+1
jsr print_word
rts
}
mul16u: {
.label mb = $18
.label a = $10
.label res = $14
.label return = $14
.label mb = $14
.label a = $e
.label res = $10
.label return = $10
.label b = $c
lda b
sta mb
@ -468,11 +423,11 @@ mul16u: {
jmp b1
}
mul_u4f12: {
.label _0 = $14
.label _1 = $14
.label v1 = $10
.label v2 = $a
.label return = $10
.label _0 = $10
.label _1 = $10
.label v1 = $e
.label v2 = 6
.label return = $e
lda v2
sta mul16u.b
lda v2+1
@ -501,11 +456,11 @@ mul_u4f12: {
rts
}
divr16u: {
.label rem = 8
.label dividend = $a
.label rem = 4
.label dividend = 6
.label quotient = $c
.label return = $c
.label divisor = 6
.label divisor = 2
ldx #0
txa
sta quotient
@ -550,25 +505,3 @@ divr16u: {
bne b1
rts
}
print_cls: {
.label sc = 6
lda #<SCREEN
sta sc
lda #>SCREEN
sta sc+1
b1:
lda #' '
ldy #0
sta (sc),y
inc sc
bne !+
inc sc+1
!:
lda sc+1
cmp #>SCREEN+$3e8
bne b1
lda sc
cmp #<SCREEN+$3e8
bne b1
rts
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,15 +10,13 @@
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte*) char_cursor
(byte*) char_cursor#1 char_cursor zp ZP_WORD:18 101.0
(byte*~) char_cursor#102 char_cursor zp ZP_WORD:18 22.0
(byte*) char_cursor#17 char_cursor zp ZP_WORD:18 3.1388888888888875
(byte*) char_cursor#2 char_cursor zp ZP_WORD:18 20.235294117647058
(byte*) char_cursor#54 char_cursor zp ZP_WORD:18 5.0
(byte*) char_cursor#76 char_cursor zp ZP_WORD:18 3.0
(byte*) char_cursor#78 char_cursor zp ZP_WORD:18 26.0
(byte*) char_cursor#80 char_cursor zp ZP_WORD:18 2.0
(byte*) char_cursor#82 char_cursor zp ZP_WORD:18 0.46808510638297873
(byte*) char_cursor#1 char_cursor zp ZP_WORD:6 101.0
(byte*) char_cursor#12 char_cursor zp ZP_WORD:6 0.5555555555555556
(byte*) char_cursor#2 char_cursor zp ZP_WORD:6 45.142857142857146
(byte*) char_cursor#32 char_cursor zp ZP_WORD:6 5.0
(byte*) char_cursor#41 char_cursor zp ZP_WORD:6 3.0
(byte*) char_cursor#44 char_cursor zp ZP_WORD:6 2.0
(byte*) char_cursor#46 char_cursor zp ZP_WORD:6 3.75
(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem)
(byte~) divr16u::$1 reg byte a 22.0
(byte~) divr16u::$2 reg byte a 22.0
@ -30,11 +28,11 @@
(label) divr16u::@6
(label) divr16u::@return
(word) divr16u::dividend
(word) divr16u::dividend#0 dividend zp ZP_WORD:10 2.75
(word) divr16u::dividend#3 dividend zp ZP_WORD:10 5.0
(word) divr16u::dividend#5 dividend zp ZP_WORD:10 2.0
(word) divr16u::dividend#0 dividend zp ZP_WORD:6 2.75
(word) divr16u::dividend#3 dividend zp ZP_WORD:6 5.0
(word) divr16u::dividend#5 dividend zp ZP_WORD:6 2.0
(word) divr16u::divisor
(word) divr16u::divisor#6 divisor zp ZP_WORD:6 1.375
(word) divr16u::divisor#6 divisor zp ZP_WORD:2 1.375
(byte) divr16u::i
(byte) divr16u::i#1 reg byte x 16.5
(byte) divr16u::i#2 reg byte x 1.6923076923076923
@ -43,28 +41,33 @@
(word) divr16u::quotient#2 quotient zp ZP_WORD:12 11.0
(word) divr16u::quotient#3 quotient zp ZP_WORD:12 2.75
(word) divr16u::rem
(word) divr16u::rem#0 rem zp ZP_WORD:8 8.25
(word) divr16u::rem#1 rem zp ZP_WORD:8 22.0
(word) divr16u::rem#10 rem zp ZP_WORD:8 4.0
(word) divr16u::rem#11 rem zp ZP_WORD:8 11.666666666666666
(word) divr16u::rem#2 rem zp ZP_WORD:8 22.0
(word) divr16u::rem#4 rem zp ZP_WORD:8 4.0
(word) divr16u::rem#5 rem zp ZP_WORD:8 24.0
(word) divr16u::rem#6 rem zp ZP_WORD:8 11.0
(word) divr16u::rem#0 rem zp ZP_WORD:4 8.25
(word) divr16u::rem#1 rem zp ZP_WORD:4 22.0
(word) divr16u::rem#10 rem zp ZP_WORD:4 4.0
(word) divr16u::rem#11 rem zp ZP_WORD:4 11.666666666666666
(word) divr16u::rem#2 rem zp ZP_WORD:4 22.0
(word) divr16u::rem#4 rem zp ZP_WORD:4 4.0
(word) divr16u::rem#5 rem zp ZP_WORD:4 24.0
(word) divr16u::rem#6 rem zp ZP_WORD:4 11.0
(word) divr16u::return
(word) divr16u::return#0 return zp ZP_WORD:12 5.285714285714286
(word) divr16u::return#2 return zp ZP_WORD:12 4.0
(word) divr16u::return#3 return zp ZP_WORD:12 4.0
(byte*) line_cursor
(byte*) line_cursor#1 line_cursor zp ZP_WORD:14 40.625
(byte*) line_cursor#11 line_cursor zp ZP_WORD:14 204.0
(byte*) line_cursor#23 line_cursor zp ZP_WORD:14 0.18571428571428572
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@6
(label) main::@return
(signed word[20]) main::sintab
(const signed word[20]) main::sintab#0 sintab = { fill( 20, 0) }
(signed word[128]) main::sintab1
(const signed word[128]) main::sintab1#0 sintab1 = { fill( 128, 0) }
(signed word*) main::st1
(signed word*) main::st1#1 st1 zp ZP_WORD:2 16.5
(signed word*) main::st1#2 st1 zp ZP_WORD:2 6.6000000000000005
(const string) main::str str = (string) " @"
(word) main::wavelength
(const word) main::wavelength#0 wavelength = (byte/word/signed word/dword/signed dword) 128
(dword()) mul16u((word) mul16u::a , (word) mul16u::b)
(byte~) mul16u::$1 reg byte a 202.0
(label) mul16u::@1
@ -73,50 +76,50 @@
(label) mul16u::@7
(label) mul16u::@return
(word) mul16u::a
(word) mul16u::a#0 a zp ZP_WORD:16 101.0
(word) mul16u::a#1 a zp ZP_WORD:16 22.0
(word) mul16u::a#2 a zp ZP_WORD:16 22.0
(word) mul16u::a#3 a zp ZP_WORD:16 2.0
(word) mul16u::a#4 a zp ZP_WORD:16 67.66666666666666
(word) mul16u::a#7 a zp ZP_WORD:16 13.0
(word) mul16u::a#0 a zp ZP_WORD:14 101.0
(word) mul16u::a#1 a zp ZP_WORD:14 22.0
(word) mul16u::a#2 a zp ZP_WORD:14 22.0
(word) mul16u::a#3 a zp ZP_WORD:14 2.0
(word) mul16u::a#4 a zp ZP_WORD:14 67.66666666666666
(word) mul16u::a#7 a zp ZP_WORD:14 13.0
(word) mul16u::b
(word) mul16u::b#2 b zp ZP_WORD:12 4.0
(word) mul16u::b#3 b zp ZP_WORD:12 4.0
(dword) mul16u::mb
(dword) mul16u::mb#0 mb zp ZP_DWORD:24 4.0
(dword) mul16u::mb#1 mb zp ZP_DWORD:24 202.0
(dword) mul16u::mb#2 mb zp ZP_DWORD:24 43.57142857142858
(dword) mul16u::mb#0 mb zp ZP_DWORD:20 4.0
(dword) mul16u::mb#1 mb zp ZP_DWORD:20 202.0
(dword) mul16u::mb#2 mb zp ZP_DWORD:20 43.57142857142858
(dword) mul16u::res
(dword) mul16u::res#1 res zp ZP_DWORD:20 202.0
(dword) mul16u::res#2 res zp ZP_DWORD:20 40.875
(dword) mul16u::res#6 res zp ZP_DWORD:20 101.0
(dword) mul16u::res#1 res zp ZP_DWORD:16 202.0
(dword) mul16u::res#2 res zp ZP_DWORD:16 40.875
(dword) mul16u::res#6 res zp ZP_DWORD:16 101.0
(dword) mul16u::return
(dword) mul16u::return#2 return zp ZP_DWORD:20 22.0
(dword) mul16u::return#3 return zp ZP_DWORD:20 22.0
(dword) mul16u::return#4 return zp ZP_DWORD:20 4.0
(dword) mul16u::return#2 return zp ZP_DWORD:16 22.0
(dword) mul16u::return#3 return zp ZP_DWORD:16 22.0
(dword) mul16u::return#4 return zp ZP_DWORD:16 4.0
(word()) mul_u4f12((word) mul_u4f12::v1 , (word) mul_u4f12::v2)
(dword~) mul_u4f12::$0 $0 zp ZP_DWORD:20 4.0
(dword~) mul_u4f12::$1 $1 zp ZP_DWORD:20 4.0
(dword~) mul_u4f12::$0 $0 zp ZP_DWORD:16 4.0
(dword~) mul_u4f12::$1 $1 zp ZP_DWORD:16 4.0
(label) mul_u4f12::@2
(label) mul_u4f12::@return
(word) mul_u4f12::return
(word) mul_u4f12::return#0 return zp ZP_WORD:16 22.0
(word) mul_u4f12::return#1 return zp ZP_WORD:16 22.0
(word) mul_u4f12::return#10 return zp ZP_WORD:16 7.666666666666666
(word) mul_u4f12::return#2 return zp ZP_WORD:16 22.0
(word) mul_u4f12::return#3 return zp ZP_WORD:16 22.0
(word) mul_u4f12::return#0 return zp ZP_WORD:14 22.0
(word) mul_u4f12::return#1 return zp ZP_WORD:14 22.0
(word) mul_u4f12::return#10 return zp ZP_WORD:14 7.666666666666666
(word) mul_u4f12::return#2 return zp ZP_WORD:14 22.0
(word) mul_u4f12::return#3 return zp ZP_WORD:14 22.0
(word) mul_u4f12::v1
(word) mul_u4f12::v1#0 v1 zp ZP_WORD:16 11.0
(word) mul_u4f12::v1#1 v1 zp ZP_WORD:16 11.0
(word) mul_u4f12::v1#2 v1 zp ZP_WORD:16 11.0
(word) mul_u4f12::v1#3 v1 zp ZP_WORD:16 11.0
(word) mul_u4f12::v1#4 v1 zp ZP_WORD:16 46.0
(word) mul_u4f12::v1#0 v1 zp ZP_WORD:14 11.0
(word) mul_u4f12::v1#1 v1 zp ZP_WORD:14 11.0
(word) mul_u4f12::v1#2 v1 zp ZP_WORD:14 11.0
(word) mul_u4f12::v1#3 v1 zp ZP_WORD:14 11.0
(word) mul_u4f12::v1#4 v1 zp ZP_WORD:14 46.0
(word) mul_u4f12::v2
(word) mul_u4f12::v2#0 v2 zp ZP_WORD:10 22.0
(word) mul_u4f12::v2#1 v2 zp ZP_WORD:10 22.0
(word) mul_u4f12::v2#2 v2 zp ZP_WORD:10 22.0
(word) mul_u4f12::v2#3 v2 zp ZP_WORD:10 22.0
(word) mul_u4f12::v2#4 v2 zp ZP_WORD:10 23.0
(word) mul_u4f12::v2#0 v2 zp ZP_WORD:6 22.0
(word) mul_u4f12::v2#1 v2 zp ZP_WORD:6 22.0
(word) mul_u4f12::v2#2 v2 zp ZP_WORD:6 22.0
(word) mul_u4f12::v2#3 v2 zp ZP_WORD:6 22.0
(word) mul_u4f12::v2#4 v2 zp ZP_WORD:6 23.0
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte a 4.0
@ -138,51 +141,34 @@
(label) print_cls::@1
(label) print_cls::@return
(byte*) print_cls::sc
(byte*) print_cls::sc#1 sc zp ZP_WORD:6 16.5
(byte*) print_cls::sc#2 sc zp ZP_WORD:6 16.5
(void()) print_dword((dword) print_dword::dw)
(label) print_dword::@1
(label) print_dword::@return
(dword) print_dword::dw
(dword) print_dword::dw#0 dw zp ZP_DWORD:2 5.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5
(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0 str zp ZP_WORD:16 202.0
(byte*) print_str::str#6 str zp ZP_WORD:16 101.5
(byte*) print_str::str#8 str zp ZP_WORD:16 2.0
(byte*) print_str::str#0 str zp ZP_WORD:4 202.0
(byte*) print_str::str#2 str zp ZP_WORD:4 101.0
(void()) print_sword((signed word) print_sword::w)
(label) print_sword::@1
(label) print_sword::@2
(label) print_sword::@4
(label) print_sword::@return
(signed word) print_sword::w
(signed word) print_sword::w#0 w zp ZP_WORD:12 4.0
(signed word) print_sword::w#1 w zp ZP_WORD:12 4.25
(signed word) print_sword::w#3 w zp ZP_WORD:12 4.0
(signed word) print_sword::w#0 w zp ZP_WORD:4 4.0
(signed word) print_sword::w#1 w zp ZP_WORD:4 4.25
(signed word) print_sword::w#3 w zp ZP_WORD:4 1.3333333333333333
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#1 w zp ZP_WORD:16 4.0
(word~) print_word::w#11 w zp ZP_WORD:16 4.0
(word) print_word::w#2 w zp ZP_WORD:16 4.0
(word) print_word::w#3 w zp ZP_WORD:16 22.0
(word) print_word::w#4 w zp ZP_WORD:16 22.0
(word) print_word::w#5 w zp ZP_WORD:16 22.0
(word) print_word::w#6 w zp ZP_WORD:16 22.0
(word) print_word::w#7 w zp ZP_WORD:16 18.0
(word) rem16u
(word) rem16u#1 rem16u zp ZP_WORD:8 0.8
(word) rem16u#1 rem16u zp ZP_WORD:4 0.8
(void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength)
(dword~) sin16s_gen::$15 $15 zp ZP_DWORD:20 22.0
(dword~) sin16s_gen::$17 $17 zp ZP_DWORD:20 22.0
(word~) sin16s_gen::$19 $19 zp ZP_WORD:12 22.0
(dword~) sin16s_gen::$15 $15 zp ZP_DWORD:16 22.0
(dword~) sin16s_gen::$17 $17 zp ZP_DWORD:16 22.0
(word~) sin16s_gen::$19 $19 zp ZP_WORD:6 22.0
(label) sin16s_gen::@1
(label) sin16s_gen::@10
(label) sin16s_gen::@11
@ -191,22 +177,9 @@
(label) sin16s_gen::@14
(label) sin16s_gen::@15
(label) sin16s_gen::@16
(label) sin16s_gen::@17
(label) sin16s_gen::@18
(label) sin16s_gen::@19
(label) sin16s_gen::@2
(label) sin16s_gen::@20
(label) sin16s_gen::@21
(label) sin16s_gen::@22
(label) sin16s_gen::@23
(label) sin16s_gen::@24
(label) sin16s_gen::@25
(label) sin16s_gen::@26
(label) sin16s_gen::@27
(label) sin16s_gen::@28
(label) sin16s_gen::@29
(label) sin16s_gen::@3
(label) sin16s_gen::@32
(label) sin16s_gen::@4
(label) sin16s_gen::@5
(label) sin16s_gen::@6
@ -218,73 +191,65 @@
(word) sin16s_gen::div6
(const word) sin16s_gen::div6#0 div6 = (dword/signed dword) 65536/(byte/signed byte/word/signed word/dword/signed dword) 6
(word) sin16s_gen::i
(word) sin16s_gen::i#1 i zp ZP_WORD:8 11.0
(word) sin16s_gen::i#10 i zp ZP_WORD:8 0.46478873239436613
(word) sin16s_gen::i#1 i zp ZP_WORD:4 16.5
(word) sin16s_gen::i#10 i zp ZP_WORD:4 0.46808510638297873
(byte) sin16s_gen::isUpper
(byte) sin16s_gen::isUpper#10 reg byte x 0.3055555555555556
(signed word*) sin16s_gen::sintab
(signed word*) sin16s_gen::sintab#1 sintab zp ZP_WORD:6 0.7586206896551724
(signed word*) sin16s_gen::sintab#10 sintab zp ZP_WORD:6 0.7333333333333333
(signed word*) sin16s_gen::sintab#1 sintab zp ZP_WORD:2 5.5
(signed word*) sin16s_gen::sintab#10 sintab zp ZP_WORD:2 0.7333333333333333
(signed word) sin16s_gen::sinx
(signed word) sin16s_gen::sinx#1 sinx zp ZP_WORD:12 22.0
(signed word) sin16s_gen::sinx#10 sinx zp ZP_WORD:12 1.9130434782608696
(signed word~) sin16s_gen::sinx#14 sinx zp ZP_WORD:12 22.0
(signed word) sin16s_gen::sinx#1 sinx zp ZP_WORD:6 22.0
(signed word) sin16s_gen::sinx#2 sinx zp ZP_WORD:6 33.0
(signed word~) sin16s_gen::sinx#4 sinx zp ZP_WORD:6 22.0
(dword) sin16s_gen::step
(dword) sin16s_gen::step#0 step zp ZP_DWORD:28 0.17333333333333334
(dword) sin16s_gen::step#0 step zp ZP_DWORD:24 0.26
(word) sin16s_gen::stepf
(word) sin16s_gen::stepf#0 stepf zp ZP_WORD:12 4.0
(word) sin16s_gen::stepi
(word) sin16s_gen::stepi#0 stepi zp ZP_WORD:14 0.8
(const string) sin16s_gen::str str = (string) " @"
(const string) sin16s_gen::str1 str1 = (string) " @"
(const string) sin16s_gen::str2 str2 = (string) " @"
(const string) sin16s_gen::str3 str3 = (string) " @"
(const string) sin16s_gen::str4 str4 = (string) " @"
(word) sin16s_gen::usinx
(word) sin16s_gen::usinx#0 usinx zp ZP_WORD:12 5.5
(word) sin16s_gen::usinx#0 usinx zp ZP_WORD:6 5.5
(word) sin16s_gen::wavelength
(const word) sin16s_gen::wavelength#0 wavelength = (byte/signed byte/word/signed word/dword/signed dword) 20
(dword) sin16s_gen::x
(dword) sin16s_gen::x#1 x zp ZP_DWORD:2 5.5
(dword) sin16s_gen::x#10 x zp ZP_DWORD:2 0.6285714285714286
(dword) sin16s_gen::x#1 x zp ZP_DWORD:8 7.333333333333333
(dword) sin16s_gen::x#10 x zp ZP_DWORD:8 0.7173913043478262
(word) sin16s_gen::x1
(word) sin16s_gen::x1#0 x1 zp ZP_WORD:10 22.0
(word) sin16s_gen::x1#1 x1 zp ZP_WORD:10 22.0
(word) sin16s_gen::x1#10 x1 zp ZP_WORD:10 27.5
(word) sin16s_gen::x1#11 x1 zp ZP_WORD:10 2.1063829787234045
(word) sin16s_gen::x1#2 x1 zp ZP_WORD:10 22.0
(word) sin16s_gen::x1#0 x1 zp ZP_WORD:6 22.0
(word) sin16s_gen::x1#1 x1 zp ZP_WORD:6 22.0
(word) sin16s_gen::x1#10 x1 zp ZP_WORD:6 27.5
(word) sin16s_gen::x1#11 x1 zp ZP_WORD:6 2.8387096774193554
(word) sin16s_gen::x1#2 x1 zp ZP_WORD:6 22.0
(word) sin16s_gen::x2
(word) sin16s_gen::x2#0 x2 zp ZP_WORD:16 22.0
(word) sin16s_gen::x2#0 x2 zp ZP_WORD:14 22.0
(word) sin16s_gen::x3
(word) sin16s_gen::x3#0 x3 zp ZP_WORD:32 3.0
(word) sin16s_gen::x3#0 x3 zp ZP_WORD:28 3.0
(word) sin16s_gen::x3_6
(word) sin16s_gen::x3_6#0 x3_6 zp ZP_WORD:32 1.2692307692307692
(word) sin16s_gen::x3_6#0 x3_6 zp ZP_WORD:28 3.6666666666666665
(word) sin16s_gen::x4
(word) sin16s_gen::x4#0 x4 zp ZP_WORD:16 22.0
(word) sin16s_gen::x4#0 x4 zp ZP_WORD:14 22.0
(word) sin16s_gen::x5
(word) sin16s_gen::x5#0 x5 zp ZP_WORD:34 3.6666666666666665
(word) sin16s_gen::x5#0 x5 zp ZP_WORD:30 3.6666666666666665
(word) sin16s_gen::x5_128
(word) sin16s_gen::x5_128#0 x5_128 zp ZP_WORD:34 1.32
(word) sin16s_gen::x5_128#0 x5_128 zp ZP_WORD:12 11.0
zp ZP_DWORD:2 [ sin16s_gen::x#10 sin16s_gen::x#1 print_dword::dw#0 ]
zp ZP_WORD:6 [ sin16s_gen::sintab#10 sin16s_gen::sintab#1 divr16u::divisor#6 print_cls::sc#2 print_cls::sc#1 ]
zp ZP_WORD:8 [ sin16s_gen::i#10 sin16s_gen::i#1 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ]
reg byte x [ sin16s_gen::isUpper#10 ]
zp ZP_WORD:10 [ sin16s_gen::x1#11 sin16s_gen::x1#10 sin16s_gen::x1#0 sin16s_gen::x1#1 sin16s_gen::x1#2 mul_u4f12::v2#4 mul_u4f12::v2#1 mul_u4f12::v2#2 mul_u4f12::v2#3 mul_u4f12::v2#0 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ]
zp ZP_WORD:12 [ sin16s_gen::sinx#10 sin16s_gen::sinx#14 sin16s_gen::sinx#1 sin16s_gen::usinx#0 print_sword::w#3 print_sword::w#1 print_sword::w#0 sin16s_gen::$19 mul16u::b#3 mul16u::b#2 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 sin16s_gen::stepf#0 ]
zp ZP_WORD:14 [ line_cursor#11 line_cursor#23 line_cursor#1 sin16s_gen::stepi#0 ]
zp ZP_WORD:16 [ print_word::w#7 print_word::w#1 print_word::w#2 print_word::w#11 print_word::w#4 print_word::w#5 print_word::w#6 print_word::w#3 print_str::str#6 print_str::str#8 print_str::str#0 mul16u::a#4 mul16u::a#7 mul16u::a#3 mul16u::a#1 mul16u::a#2 mul16u::a#0 mul_u4f12::v1#4 mul_u4f12::v1#1 mul_u4f12::v1#2 mul_u4f12::v1#3 mul_u4f12::v1#0 sin16s_gen::x2#0 mul_u4f12::return#0 sin16s_gen::x4#0 mul_u4f12::return#2 mul_u4f12::return#10 mul_u4f12::return#1 mul_u4f12::return#3 ]
zp ZP_WORD:2 [ main::st1#2 main::st1#1 print_cls::sc#2 print_cls::sc#1 sin16s_gen::sintab#10 sin16s_gen::sintab#1 divr16u::divisor#6 ]
zp ZP_WORD:4 [ print_str::str#2 print_str::str#0 print_sword::w#3 print_sword::w#1 print_sword::w#0 sin16s_gen::i#10 sin16s_gen::i#1 divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ]
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ]
zp ZP_WORD:18 [ char_cursor#54 char_cursor#80 char_cursor#78 char_cursor#76 char_cursor#2 char_cursor#17 char_cursor#82 char_cursor#102 char_cursor#1 ]
zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 sin16s_gen::$15 mul16u::return#3 sin16s_gen::$17 mul16u::return#4 mul_u4f12::$0 mul_u4f12::$1 ]
zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
zp ZP_WORD:6 [ char_cursor#32 char_cursor#44 char_cursor#41 char_cursor#46 char_cursor#2 char_cursor#12 char_cursor#1 sin16s_gen::x1#11 sin16s_gen::x1#10 sin16s_gen::x1#0 sin16s_gen::x1#1 sin16s_gen::x1#2 mul_u4f12::v2#4 mul_u4f12::v2#1 mul_u4f12::v2#2 mul_u4f12::v2#3 mul_u4f12::v2#0 sin16s_gen::$19 sin16s_gen::sinx#2 sin16s_gen::sinx#4 sin16s_gen::sinx#1 sin16s_gen::usinx#0 divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ]
zp ZP_DWORD:8 [ sin16s_gen::x#10 sin16s_gen::x#1 ]
reg byte x [ sin16s_gen::isUpper#10 ]
zp ZP_WORD:12 [ mul16u::b#3 mul16u::b#2 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 sin16s_gen::stepf#0 sin16s_gen::x5_128#0 ]
zp ZP_WORD:14 [ mul16u::a#4 mul16u::a#7 mul16u::a#3 mul16u::a#1 mul16u::a#2 mul16u::a#0 mul_u4f12::v1#4 mul_u4f12::v1#1 mul_u4f12::v1#2 mul_u4f12::v1#3 mul_u4f12::v1#0 sin16s_gen::x2#0 mul_u4f12::return#0 sin16s_gen::x4#0 mul_u4f12::return#2 mul_u4f12::return#10 mul_u4f12::return#1 mul_u4f12::return#3 sin16s_gen::stepi#0 ]
zp ZP_DWORD:16 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 sin16s_gen::$15 mul16u::return#3 sin16s_gen::$17 mul16u::return#4 mul_u4f12::$0 mul_u4f12::$1 ]
zp ZP_DWORD:20 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
reg byte x [ divr16u::i#2 divr16u::i#1 ]
zp ZP_DWORD:28 [ sin16s_gen::step#0 ]
zp ZP_WORD:32 [ sin16s_gen::x3#0 sin16s_gen::x3_6#0 ]
zp ZP_WORD:34 [ sin16s_gen::x5#0 sin16s_gen::x5_128#0 ]
reg byte a [ print_byte::$0 ]
reg byte a [ print_byte::$2 ]
zp ZP_DWORD:24 [ sin16s_gen::step#0 ]
zp ZP_WORD:28 [ sin16s_gen::x3#0 sin16s_gen::x3_6#0 ]
zp ZP_WORD:30 [ sin16s_gen::x5#0 ]
reg byte a [ mul16u::$1 ]
reg byte a [ divr16u::$1 ]
reg byte a [ divr16u::$2 ]