mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-27 04:49:27 +00:00
Merged optimizations.
This commit is contained in:
commit
49c930f71e
4
src/main/fragment/vwsz1=vwsz1_ror_1.asm
Normal file
4
src/main/fragment/vwsz1=vwsz1_ror_1.asm
Normal file
@ -0,0 +1,4 @@
|
||||
lda {z1}+1
|
||||
cmp #$80
|
||||
ror {z1}+1
|
||||
ror {z1}
|
@ -22,8 +22,19 @@ word atan2_16(signed word x, signed word y) {
|
||||
// We found the correct angle!
|
||||
break;
|
||||
}
|
||||
signed word xd = xi>>i;
|
||||
signed word yd = yi>>i;
|
||||
// xd=xi>>i; yd=yi>>i
|
||||
signed word xd = xi;
|
||||
signed word yd = yi;
|
||||
byte shift = i;
|
||||
while(shift>1) {
|
||||
xd >>= 2;
|
||||
yd >>= 2;
|
||||
shift -=2;
|
||||
}
|
||||
if(shift) {
|
||||
xd >>= 1;
|
||||
yd >>= 1;
|
||||
}
|
||||
if(yi>=0) {
|
||||
xi += yd;
|
||||
yi -= xd;
|
||||
|
@ -10,17 +10,17 @@
|
||||
.label COLS = $d800
|
||||
.label CHARSET = $2000
|
||||
.label SCREEN = $2800
|
||||
.label print_char_cursor = 9
|
||||
.label print_char_cursor = $a
|
||||
main: {
|
||||
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
|
||||
.label _12 = $10
|
||||
.label xw = $1b
|
||||
.label yw = $1d
|
||||
.label xw = $1f
|
||||
.label yw = $21
|
||||
.label angle_w = $10
|
||||
.label ang_w = $1f
|
||||
.label diff_sum = 5
|
||||
.label screen = 7
|
||||
.label screen_ref = 3
|
||||
.label diff_sum = 6
|
||||
.label screen = 8
|
||||
.label screen_ref = 4
|
||||
.label x = 3
|
||||
.label y = 2
|
||||
jsr init_font_hex
|
||||
lda #toD0181_return
|
||||
@ -39,10 +39,11 @@ main: {
|
||||
lda #-$c
|
||||
sta y
|
||||
b1:
|
||||
ldx #-$13
|
||||
lda #-$13
|
||||
sta x
|
||||
b2:
|
||||
lda x
|
||||
ldy #0
|
||||
txa
|
||||
sta xw+1
|
||||
sty xw
|
||||
lda y
|
||||
@ -57,7 +58,7 @@ main: {
|
||||
inc _12+1
|
||||
!:
|
||||
lda _12+1
|
||||
sta ang_w
|
||||
tax
|
||||
ldy #0
|
||||
lda (screen_ref),y
|
||||
jsr diff
|
||||
@ -69,7 +70,7 @@ main: {
|
||||
bcc !+
|
||||
inc diff_sum+1
|
||||
!:
|
||||
lda ang_w
|
||||
txa
|
||||
sec
|
||||
ldy #0
|
||||
sbc (screen_ref),y
|
||||
@ -82,8 +83,9 @@ main: {
|
||||
bne !+
|
||||
inc screen_ref+1
|
||||
!:
|
||||
inx
|
||||
cpx #$15
|
||||
inc x
|
||||
lda #$15
|
||||
cmp x
|
||||
bne b2
|
||||
inc y
|
||||
lda #$d
|
||||
@ -98,9 +100,9 @@ main: {
|
||||
jmp b5
|
||||
}
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage(5) w)
|
||||
// print_word(word zeropage(6) w)
|
||||
print_word: {
|
||||
.label w = 5
|
||||
.label w = 6
|
||||
lda w+1
|
||||
tax
|
||||
lda #<$400
|
||||
@ -141,38 +143,37 @@ print_char: {
|
||||
!:
|
||||
rts
|
||||
}
|
||||
// diff(byte zeropage($1f) bb1, byte register(A) bb2)
|
||||
// diff(byte register(X) bb1, byte register(A) bb2)
|
||||
diff: {
|
||||
.label bb1 = $1f
|
||||
cmp bb1
|
||||
beq !+
|
||||
bcs b1
|
||||
!:
|
||||
eor #$ff
|
||||
sta $ff
|
||||
cpx $ff
|
||||
bcc b1
|
||||
sta $ff
|
||||
txa
|
||||
sec
|
||||
adc bb1
|
||||
sbc $ff
|
||||
rts
|
||||
b1:
|
||||
stx $ff
|
||||
sec
|
||||
sbc bb1
|
||||
sbc $ff
|
||||
rts
|
||||
}
|
||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
||||
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
|
||||
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
|
||||
// atan2_16(signed word zeropage($1b) x, signed word zeropage($1d) y)
|
||||
// atan2_16(signed word zeropage($1f) x, signed word zeropage($21) y)
|
||||
atan2_16: {
|
||||
.label _2 = $b
|
||||
.label _7 = $d
|
||||
.label yi = $b
|
||||
.label xi = $d
|
||||
.label xd = $20
|
||||
.label yd = $22
|
||||
.label _2 = $c
|
||||
.label _7 = $e
|
||||
.label yi = $c
|
||||
.label xi = $e
|
||||
.label angle = $10
|
||||
.label i = $f
|
||||
.label xd = $14
|
||||
.label yd = $12
|
||||
.label return = $10
|
||||
.label x = $1b
|
||||
.label y = $1d
|
||||
.label x = $1f
|
||||
.label y = $21
|
||||
lda y+1
|
||||
bmi !b1+
|
||||
jmp b1
|
||||
@ -200,7 +201,7 @@ atan2_16: {
|
||||
lda #0
|
||||
sta angle
|
||||
sta angle+1
|
||||
sta i
|
||||
tax
|
||||
b10:
|
||||
lda yi+1
|
||||
bne b11
|
||||
@ -231,38 +232,32 @@ atan2_16: {
|
||||
b8:
|
||||
rts
|
||||
b11:
|
||||
ldy i
|
||||
txa
|
||||
tay
|
||||
lda xi
|
||||
sta xd
|
||||
lda xi+1
|
||||
sta xd+1
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
ldy i
|
||||
lda yi
|
||||
sta yd
|
||||
lda yi+1
|
||||
sta yd+1
|
||||
b13:
|
||||
cpy #1+1
|
||||
bcs b14
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
beq b17
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
b17:
|
||||
lda yi+1
|
||||
bpl b13
|
||||
bpl b18
|
||||
lda xi
|
||||
sec
|
||||
sbc yd
|
||||
@ -277,7 +272,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
adc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
sec
|
||||
@ -287,15 +282,14 @@ atan2_16: {
|
||||
lda angle+1
|
||||
sbc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
b14:
|
||||
inc i
|
||||
lda #CORDIC_ITERATIONS_16-1+1
|
||||
cmp i
|
||||
b19:
|
||||
inx
|
||||
cpx #CORDIC_ITERATIONS_16-1+1
|
||||
bne !b12+
|
||||
jmp b12
|
||||
!b12:
|
||||
jmp b10
|
||||
b13:
|
||||
b18:
|
||||
lda xi
|
||||
clc
|
||||
adc yd
|
||||
@ -310,7 +304,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
sbc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
clc
|
||||
@ -320,7 +314,27 @@ atan2_16: {
|
||||
lda angle+1
|
||||
adc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
jmp b14
|
||||
jmp b19
|
||||
b14:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
dey
|
||||
jmp b13
|
||||
b4:
|
||||
lda x
|
||||
sta xi
|
||||
@ -335,15 +349,15 @@ atan2_16: {
|
||||
jmp b3
|
||||
}
|
||||
// Make charset from proto chars
|
||||
// init_font_hex(byte* zeropage($15) charset)
|
||||
// init_font_hex(byte* zeropage($19) charset)
|
||||
init_font_hex: {
|
||||
.label _0 = $24
|
||||
.label idx = $1a
|
||||
.label proto_lo = $17
|
||||
.label charset = $15
|
||||
.label c1 = $19
|
||||
.label proto_hi = $12
|
||||
.label c = $14
|
||||
.label _0 = $23
|
||||
.label idx = $1e
|
||||
.label proto_lo = $1b
|
||||
.label charset = $19
|
||||
.label c1 = $1d
|
||||
.label proto_hi = $16
|
||||
.label c = $18
|
||||
lda #0
|
||||
sta c
|
||||
lda #<FONT_HEX_PROTO
|
||||
|
@ -122,32 +122,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16
|
||||
[59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
||||
[60] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[60] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
||||
to:atan2_16::@5
|
||||
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
||||
[62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
||||
[63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
[63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
to:atan2_16::@10
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6
|
||||
[64] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[64] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
|
||||
[64] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[64] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
[65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
||||
to:atan2_16::@12
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14
|
||||
[66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 )
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
|
||||
[66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
|
||||
[67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
|
||||
[68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@12
|
||||
to:atan2_16::@21
|
||||
atan2_16::@21: scope:[atan2_16] from atan2_16::@12
|
||||
[69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
|
||||
to:atan2_16::@7
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16
|
||||
[70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 )
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
|
||||
[70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
|
||||
[71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
|
||||
to:atan2_16::@9
|
||||
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
||||
@ -160,74 +160,97 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
||||
[74] return
|
||||
to:@return
|
||||
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
||||
[75] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2
|
||||
[76] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2
|
||||
[77] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13
|
||||
[75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
|
||||
[76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
|
||||
[77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
|
||||
to:atan2_16::@13
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
|
||||
[78] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
|
||||
[78] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
|
||||
[78] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
|
||||
[79] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14
|
||||
to:atan2_16::@15
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@11
|
||||
[78] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0
|
||||
[79] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0
|
||||
[80] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[81] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15
|
||||
[82] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 )
|
||||
[82] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 )
|
||||
[82] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 )
|
||||
[83] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[84] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@13
|
||||
[80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@15
|
||||
[81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
|
||||
[82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
|
||||
to:atan2_16::@17
|
||||
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
|
||||
[83] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
|
||||
[83] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
|
||||
[84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
|
||||
to:atan2_16::@20
|
||||
atan2_16::@20: scope:[atan2_16] from atan2_16::@17
|
||||
[85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
|
||||
[86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
|
||||
[87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
|
||||
[89] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
|
||||
[89] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
|
||||
[89] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
|
||||
[90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
to:atan2_16::@10
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11
|
||||
[85] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0
|
||||
[86] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0
|
||||
[87] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[88] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@18: scope:[atan2_16] from atan2_16::@17
|
||||
[92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
|
||||
[93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
|
||||
[94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13
|
||||
[96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
|
||||
[97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
|
||||
[98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
|
||||
to:atan2_16::@13
|
||||
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
||||
[89] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0
|
||||
[99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@1: scope:[atan2_16] from atan2_16
|
||||
[90] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0
|
||||
[100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
init_font_hex: scope:[init_font_hex] from main
|
||||
[91] phi()
|
||||
[101] phi()
|
||||
to:init_font_hex::@1
|
||||
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
|
||||
[92] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[92] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[92] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
[102] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[102] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[102] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
to:init_font_hex::@2
|
||||
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
|
||||
[93] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[93] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[93] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[94] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
[103] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[103] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[103] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[104] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
to:init_font_hex::@3
|
||||
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3
|
||||
[95] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[95] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[96] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[97] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[98] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[100] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[101] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[102] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
[105] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[105] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[106] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[107] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[112] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
to:init_font_hex::@4
|
||||
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
|
||||
[103] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[104] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[106] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[107] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[108] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[109] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
[113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[119] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
to:init_font_hex::@5
|
||||
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
|
||||
[110] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[111] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[112] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
[120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[122] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
to:init_font_hex::@return
|
||||
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
||||
[113] return
|
||||
[123] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,10 +23,10 @@
|
||||
.byte round(256*atan2(y, x)/PI/2)
|
||||
}}
|
||||
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:11 4.0
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:12 4.0
|
||||
(byte~) atan2_16::$23 reg byte a 2002.0
|
||||
(byte~) atan2_16::$24 reg byte a 2002.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:13 4.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:14 4.0
|
||||
(label) atan2_16::@1
|
||||
(label) atan2_16::@10
|
||||
(label) atan2_16::@11
|
||||
@ -35,7 +35,12 @@
|
||||
(label) atan2_16::@14
|
||||
(label) atan2_16::@15
|
||||
(label) atan2_16::@16
|
||||
(label) atan2_16::@17
|
||||
(label) atan2_16::@18
|
||||
(label) atan2_16::@19
|
||||
(label) atan2_16::@2
|
||||
(label) atan2_16::@20
|
||||
(label) atan2_16::@21
|
||||
(label) atan2_16::@3
|
||||
(label) atan2_16::@4
|
||||
(label) atan2_16::@5
|
||||
@ -47,7 +52,7 @@
|
||||
(word) atan2_16::angle
|
||||
(word) atan2_16::angle#1 angle zp ZP_WORD:16 3.0
|
||||
(word) atan2_16::angle#11 angle zp ZP_WORD:16 4.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:16 364.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:16 190.66666666666666
|
||||
(word) atan2_16::angle#13 angle zp ZP_WORD:16 1334.6666666666667
|
||||
(word) atan2_16::angle#2 angle zp ZP_WORD:16 2002.0
|
||||
(word) atan2_16::angle#3 angle zp ZP_WORD:16 2002.0
|
||||
@ -55,33 +60,45 @@
|
||||
(word) atan2_16::angle#5 angle zp ZP_WORD:16 4.0
|
||||
(word) atan2_16::angle#6 angle zp ZP_WORD:16 2004.0
|
||||
(byte) atan2_16::i
|
||||
(byte) atan2_16::i#1 i zp ZP_BYTE:15 1501.5
|
||||
(byte) atan2_16::i#2 i zp ZP_BYTE:15 429.0
|
||||
(byte) atan2_16::i#1 reg byte x 1501.5
|
||||
(byte) atan2_16::i#2 reg byte x 208.54166666666669
|
||||
(word) atan2_16::return
|
||||
(word) atan2_16::return#0 return zp ZP_WORD:16 34.99999999999999
|
||||
(word) atan2_16::return#2 return zp ZP_WORD:16 202.0
|
||||
(byte) atan2_16::shift
|
||||
(byte) atan2_16::shift#1 reg byte y 20002.0
|
||||
(byte) atan2_16::shift#2 reg byte y 8001.25
|
||||
(byte~) atan2_16::shift#5 reg byte y 667.3333333333334
|
||||
(signed word) atan2_16::x
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:27 3.8928571428571437
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:31 2.8684210526315796
|
||||
(signed word) atan2_16::xd
|
||||
(signed word) atan2_16::xd#0 xd zp ZP_WORD:32 600.5999999999999
|
||||
(signed word) atan2_16::xd#1 xd zp ZP_WORD:20 6667.333333333333
|
||||
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:20 1001.0
|
||||
(signed word) atan2_16::xd#2 xd zp ZP_WORD:20 1001.0
|
||||
(signed word) atan2_16::xd#3 xd zp ZP_WORD:20 7668.333333333332
|
||||
(signed word) atan2_16::xd#5 xd zp ZP_WORD:20 1001.0
|
||||
(signed word) atan2_16::xi
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:13 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:13 500.5
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:13 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:13 801.2
|
||||
(signed word) atan2_16::xi#7 xi zp ZP_WORD:13 1001.0
|
||||
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:13 4.0
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:14 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:14 500.5
|
||||
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:14 4.0
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:14 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:14 267.0666666666667
|
||||
(signed word) atan2_16::xi#8 xi zp ZP_WORD:14 1001.0
|
||||
(signed word) atan2_16::y
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:29 3.633333333333334
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:33 2.724999999999999
|
||||
(signed word) atan2_16::yd
|
||||
(signed word) atan2_16::yd#0 yd zp ZP_WORD:34 1501.5
|
||||
(signed word) atan2_16::yd#1 yd zp ZP_WORD:18 10001.0
|
||||
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:18 2002.0
|
||||
(signed word) atan2_16::yd#2 yd zp ZP_WORD:18 2002.0
|
||||
(signed word) atan2_16::yd#3 yd zp ZP_WORD:18 4601.0
|
||||
(signed word) atan2_16::yd#5 yd zp ZP_WORD:18 2002.0
|
||||
(signed word) atan2_16::yi
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:11 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:11 667.3333333333334
|
||||
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:11 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:11 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:11 858.2857142857142
|
||||
(signed word) atan2_16::yi#7 yi zp ZP_WORD:11 1001.0
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:12 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:12 667.3333333333334
|
||||
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:12 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:12 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:12 353.4117647058823
|
||||
(signed word) atan2_16::yi#8 yi zp ZP_WORD:12 1001.0
|
||||
(byte()) diff((byte) diff::bb1 , (byte) diff::bb2)
|
||||
(byte~) diff::$2 reg byte a 4.0
|
||||
(byte~) diff::$4 reg byte a 4.0
|
||||
@ -90,14 +107,14 @@
|
||||
(label) diff::@3
|
||||
(label) diff::@return
|
||||
(byte) diff::bb1
|
||||
(byte) diff::bb1#0 bb1 zp ZP_BYTE:31 35.66666666666666
|
||||
(byte) diff::bb1#0 reg byte x 35.66666666666666
|
||||
(byte) diff::bb2
|
||||
(byte) diff::bb2#0 reg byte a 53.5
|
||||
(byte) diff::return
|
||||
(byte) diff::return#0 reg byte a 202.0
|
||||
(byte) diff::return#1 reg byte a 34.99999999999999
|
||||
(void()) init_font_hex((byte*) init_font_hex::charset)
|
||||
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:36 1001.0
|
||||
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 1001.0
|
||||
(byte~) init_font_hex::$1 reg byte a 2002.0
|
||||
(byte~) init_font_hex::$2 reg byte a 2002.0
|
||||
(label) init_font_hex::@1
|
||||
@ -107,28 +124,28 @@
|
||||
(label) init_font_hex::@5
|
||||
(label) init_font_hex::@return
|
||||
(byte) init_font_hex::c
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:20 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:20 1.1578947368421053
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:24 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053
|
||||
(byte) init_font_hex::c1
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:25 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:25 13.466666666666667
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667
|
||||
(byte*) init_font_hex::charset
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:21 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:21 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:21 22.0
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 22.0
|
||||
(byte) init_font_hex::i
|
||||
(byte) init_font_hex::i#1 reg byte x 1501.5
|
||||
(byte) init_font_hex::i#2 reg byte x 667.3333333333334
|
||||
(byte) init_font_hex::idx
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:26 551.0
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:30 551.0
|
||||
(byte) init_font_hex::idx#3 reg byte y 202.0
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:26 600.5999999999999
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999
|
||||
(byte*) init_font_hex::proto_hi
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:18 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:18 56.83333333333334
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334
|
||||
(byte*) init_font_hex::proto_lo
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:23 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:23 92.53846153846155
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155
|
||||
(void()) main()
|
||||
(word~) main::$12 $12 zp ZP_WORD:16 202.0
|
||||
(byte~) main::$14 reg byte a 202.0
|
||||
@ -142,22 +159,22 @@
|
||||
(label) main::@7
|
||||
(label) main::@8
|
||||
(byte) main::ang_w
|
||||
(byte) main::ang_w#0 ang_w zp ZP_BYTE:31 43.285714285714285
|
||||
(byte) main::ang_w#0 reg byte x 43.285714285714285
|
||||
(word) main::angle_w
|
||||
(word) main::angle_w#0 angle_w zp ZP_WORD:16 202.0
|
||||
(byte*) main::col00
|
||||
(word) main::diff_sum
|
||||
(word) main::diff_sum#1 diff_sum zp ZP_WORD:5 23.888888888888886
|
||||
(word) main::diff_sum#2 diff_sum zp ZP_WORD:5 14.2
|
||||
(word) main::diff_sum#7 diff_sum zp ZP_WORD:5 22.0
|
||||
(word) main::diff_sum#1 diff_sum zp ZP_WORD:6 23.888888888888886
|
||||
(word) main::diff_sum#2 diff_sum zp ZP_WORD:6 14.2
|
||||
(word) main::diff_sum#7 diff_sum zp ZP_WORD:6 22.0
|
||||
(byte*) main::screen
|
||||
(byte*) main::screen#1 screen zp ZP_WORD:7 35.5
|
||||
(byte*) main::screen#2 screen zp ZP_WORD:7 17.444444444444443
|
||||
(byte*) main::screen#5 screen zp ZP_WORD:7 22.0
|
||||
(byte*) main::screen#1 screen zp ZP_WORD:8 35.5
|
||||
(byte*) main::screen#2 screen zp ZP_WORD:8 17.444444444444443
|
||||
(byte*) main::screen#5 screen zp ZP_WORD:8 22.0
|
||||
(byte*) main::screen_ref
|
||||
(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:3 42.599999999999994
|
||||
(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:3 21.842105263157897
|
||||
(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:3 22.0
|
||||
(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:4 42.599999999999994
|
||||
(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:4 21.842105263157897
|
||||
(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:4 22.0
|
||||
(label) main::toD0181
|
||||
(word~) main::toD0181_$0
|
||||
(number~) main::toD0181_$1
|
||||
@ -173,15 +190,15 @@
|
||||
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
|
||||
(byte*) main::toD0181_screen
|
||||
(signed byte) main::x
|
||||
(signed byte) main::x#1 reg byte x 151.5
|
||||
(signed byte) main::x#2 reg byte x 10.1
|
||||
(signed byte) main::x#1 x zp ZP_BYTE:3 151.5
|
||||
(signed byte) main::x#2 x zp ZP_BYTE:3 10.1
|
||||
(signed word) main::xw
|
||||
(word) main::xw#0 xw zp ZP_WORD:27 50.5
|
||||
(word) main::xw#0 xw zp ZP_WORD:31 50.5
|
||||
(signed byte) main::y
|
||||
(signed byte) main::y#1 y zp ZP_BYTE:2 16.5
|
||||
(signed byte) main::y#4 y zp ZP_BYTE:2 0.9565217391304348
|
||||
(signed word) main::yw
|
||||
(word) main::yw#0 yw zp ZP_WORD:29 50.5
|
||||
(word) main::yw#0 yw zp ZP_WORD:33 50.5
|
||||
(void()) print_byte((byte) print_byte::b)
|
||||
(byte~) print_byte::$0 reg byte a 4.0
|
||||
(byte~) print_byte::$2 reg byte x 4.0
|
||||
@ -198,9 +215,9 @@
|
||||
(byte) print_char::ch#1 reg byte a 4.0
|
||||
(byte) print_char::ch#2 reg byte a 6.0
|
||||
(byte*) print_char_cursor
|
||||
(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:9 4.0
|
||||
(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:9 0.6666666666666666
|
||||
(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:9 1.3333333333333333
|
||||
(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:10 4.0
|
||||
(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:10 0.6666666666666666
|
||||
(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:10 1.3333333333333333
|
||||
(byte[]) print_hextab
|
||||
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
|
||||
(byte*) print_line_cursor
|
||||
@ -209,42 +226,44 @@
|
||||
(label) print_word::@1
|
||||
(label) print_word::@return
|
||||
(word) print_word::w
|
||||
(word) print_word::w#0 w zp ZP_WORD:5 2.0
|
||||
(word) print_word::w#0 w zp ZP_WORD:6 2.0
|
||||
|
||||
zp ZP_BYTE:2 [ main::y#4 main::y#1 ]
|
||||
reg byte x [ main::x#2 main::x#1 ]
|
||||
zp ZP_WORD:3 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
|
||||
zp ZP_WORD:5 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ]
|
||||
zp ZP_WORD:7 [ main::screen#2 main::screen#5 main::screen#1 ]
|
||||
zp ZP_BYTE:3 [ main::x#2 main::x#1 ]
|
||||
zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
|
||||
zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ]
|
||||
zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ]
|
||||
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
|
||||
zp ZP_WORD:9 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
|
||||
zp ZP_WORD:10 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
|
||||
reg byte a [ diff::return#1 diff::$4 diff::$2 ]
|
||||
zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
zp ZP_BYTE:15 [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_WORD:12 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:14 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
reg byte x [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 main::angle_w#0 main::$12 ]
|
||||
zp ZP_WORD:18 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:20 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:21 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:23 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:25 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
|
||||
zp ZP_WORD:18 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
|
||||
zp ZP_WORD:20 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
|
||||
zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
|
||||
zp ZP_BYTE:26 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_WORD:27 [ main::xw#0 atan2_16::x#0 ]
|
||||
zp ZP_WORD:29 [ main::yw#0 atan2_16::y#0 ]
|
||||
zp ZP_BYTE:31 [ main::ang_w#0 diff::bb1#0 ]
|
||||
zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_WORD:31 [ main::xw#0 atan2_16::x#0 ]
|
||||
zp ZP_WORD:33 [ main::yw#0 atan2_16::y#0 ]
|
||||
reg byte x [ main::ang_w#0 ]
|
||||
reg byte x [ diff::bb1#0 ]
|
||||
reg byte a [ diff::bb2#0 ]
|
||||
reg byte a [ diff::return#0 ]
|
||||
reg byte a [ main::$14 ]
|
||||
reg byte a [ main::$15 ]
|
||||
reg byte a [ print_byte::$0 ]
|
||||
reg byte x [ print_byte::$2 ]
|
||||
zp ZP_WORD:32 [ atan2_16::xd#0 ]
|
||||
zp ZP_WORD:34 [ atan2_16::yd#0 ]
|
||||
reg byte a [ atan2_16::$24 ]
|
||||
reg byte a [ atan2_16::$23 ]
|
||||
zp ZP_BYTE:36 [ init_font_hex::$0 ]
|
||||
zp ZP_BYTE:35 [ init_font_hex::$0 ]
|
||||
reg byte a [ init_font_hex::$1 ]
|
||||
reg byte a [ init_font_hex::$2 ]
|
||||
reg byte y [ init_font_hex::idx#3 ]
|
||||
|
@ -13,10 +13,11 @@
|
||||
main: {
|
||||
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
|
||||
.label _11 = $a
|
||||
.label xw = $15
|
||||
.label yw = $17
|
||||
.label xw = $19
|
||||
.label yw = $1b
|
||||
.label angle_w = $a
|
||||
.label screen = 3
|
||||
.label screen = 4
|
||||
.label x = 3
|
||||
.label y = 2
|
||||
jsr init_font_hex
|
||||
lda #toD0181_return
|
||||
@ -28,10 +29,11 @@ main: {
|
||||
lda #-$c
|
||||
sta y
|
||||
b1:
|
||||
ldx #-$13
|
||||
lda #-$13
|
||||
sta x
|
||||
b2:
|
||||
lda x
|
||||
ldy #0
|
||||
txa
|
||||
sta xw+1
|
||||
sty xw
|
||||
lda y
|
||||
@ -52,8 +54,9 @@ main: {
|
||||
bne !+
|
||||
inc screen+1
|
||||
!:
|
||||
inx
|
||||
cpx #$15
|
||||
inc x
|
||||
lda #$15
|
||||
cmp x
|
||||
bne b2
|
||||
inc y
|
||||
lda #$d
|
||||
@ -69,19 +72,18 @@ main: {
|
||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
||||
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
|
||||
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
|
||||
// atan2_16(signed word zeropage($15) x, signed word zeropage($17) y)
|
||||
// atan2_16(signed word zeropage($19) x, signed word zeropage($1b) y)
|
||||
atan2_16: {
|
||||
.label _2 = 5
|
||||
.label _7 = 7
|
||||
.label yi = 5
|
||||
.label xi = 7
|
||||
.label xd = $19
|
||||
.label yd = $1b
|
||||
.label _2 = 6
|
||||
.label _7 = 8
|
||||
.label yi = 6
|
||||
.label xi = 8
|
||||
.label angle = $a
|
||||
.label i = 9
|
||||
.label xd = $e
|
||||
.label yd = $c
|
||||
.label return = $a
|
||||
.label x = $15
|
||||
.label y = $17
|
||||
.label x = $19
|
||||
.label y = $1b
|
||||
lda y+1
|
||||
bmi !b1+
|
||||
jmp b1
|
||||
@ -109,7 +111,7 @@ atan2_16: {
|
||||
lda #0
|
||||
sta angle
|
||||
sta angle+1
|
||||
sta i
|
||||
tax
|
||||
b10:
|
||||
lda yi+1
|
||||
bne b11
|
||||
@ -140,38 +142,32 @@ atan2_16: {
|
||||
b8:
|
||||
rts
|
||||
b11:
|
||||
ldy i
|
||||
txa
|
||||
tay
|
||||
lda xi
|
||||
sta xd
|
||||
lda xi+1
|
||||
sta xd+1
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
ldy i
|
||||
lda yi
|
||||
sta yd
|
||||
lda yi+1
|
||||
sta yd+1
|
||||
b13:
|
||||
cpy #1+1
|
||||
bcs b14
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
beq b17
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
b17:
|
||||
lda yi+1
|
||||
bpl b13
|
||||
bpl b18
|
||||
lda xi
|
||||
sec
|
||||
sbc yd
|
||||
@ -186,7 +182,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
adc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
sec
|
||||
@ -196,15 +192,14 @@ atan2_16: {
|
||||
lda angle+1
|
||||
sbc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
b14:
|
||||
inc i
|
||||
lda #CORDIC_ITERATIONS_16-1+1
|
||||
cmp i
|
||||
b19:
|
||||
inx
|
||||
cpx #CORDIC_ITERATIONS_16-1+1
|
||||
bne !b12+
|
||||
jmp b12
|
||||
!b12:
|
||||
jmp b10
|
||||
b13:
|
||||
b18:
|
||||
lda xi
|
||||
clc
|
||||
adc yd
|
||||
@ -219,7 +214,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
sbc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
clc
|
||||
@ -229,7 +224,27 @@ atan2_16: {
|
||||
lda angle+1
|
||||
adc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
jmp b14
|
||||
jmp b19
|
||||
b14:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
dey
|
||||
jmp b13
|
||||
b4:
|
||||
lda x
|
||||
sta xi
|
||||
@ -244,15 +259,15 @@ atan2_16: {
|
||||
jmp b3
|
||||
}
|
||||
// Make charset from proto chars
|
||||
// init_font_hex(byte* zeropage($f) charset)
|
||||
// init_font_hex(byte* zeropage($13) charset)
|
||||
init_font_hex: {
|
||||
.label _0 = $1d
|
||||
.label idx = $14
|
||||
.label proto_lo = $11
|
||||
.label charset = $f
|
||||
.label c1 = $13
|
||||
.label proto_hi = $c
|
||||
.label c = $e
|
||||
.label idx = $18
|
||||
.label proto_lo = $15
|
||||
.label charset = $13
|
||||
.label c1 = $17
|
||||
.label proto_hi = $10
|
||||
.label c = $12
|
||||
lda #0
|
||||
sta c
|
||||
lda #<FONT_HEX_PROTO
|
||||
|
@ -54,32 +54,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16
|
||||
[27] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
||||
[28] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[28] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[29] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
||||
to:atan2_16::@5
|
||||
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
||||
[30] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
||||
[31] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
[31] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
to:atan2_16::@10
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6
|
||||
[32] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[32] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[32] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[32] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
|
||||
[32] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[32] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[32] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[32] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
[33] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
||||
to:atan2_16::@12
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14
|
||||
[34] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 )
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
|
||||
[34] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
|
||||
[35] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
|
||||
[36] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@12
|
||||
to:atan2_16::@21
|
||||
atan2_16::@21: scope:[atan2_16] from atan2_16::@12
|
||||
[37] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
|
||||
to:atan2_16::@7
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16
|
||||
[38] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 )
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
|
||||
[38] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
|
||||
[39] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
|
||||
to:atan2_16::@9
|
||||
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
||||
@ -92,74 +92,97 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
||||
[42] return
|
||||
to:@return
|
||||
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
||||
[43] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2
|
||||
[44] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2
|
||||
[45] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13
|
||||
[43] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
|
||||
[44] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
|
||||
[45] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
|
||||
to:atan2_16::@13
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
|
||||
[46] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
|
||||
[46] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
|
||||
[46] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
|
||||
[47] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14
|
||||
to:atan2_16::@15
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@11
|
||||
[46] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0
|
||||
[47] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0
|
||||
[48] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[49] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15
|
||||
[50] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 )
|
||||
[50] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 )
|
||||
[50] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 )
|
||||
[51] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[52] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@13
|
||||
[48] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@15
|
||||
[49] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
|
||||
[50] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
|
||||
to:atan2_16::@17
|
||||
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
|
||||
[51] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
|
||||
[51] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
|
||||
[52] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
|
||||
to:atan2_16::@20
|
||||
atan2_16::@20: scope:[atan2_16] from atan2_16::@17
|
||||
[53] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
|
||||
[54] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
|
||||
[55] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[56] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
|
||||
[57] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
|
||||
[57] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
|
||||
[57] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
|
||||
[58] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[59] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
to:atan2_16::@10
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11
|
||||
[53] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0
|
||||
[54] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0
|
||||
[55] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[56] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@18: scope:[atan2_16] from atan2_16::@17
|
||||
[60] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
|
||||
[61] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
|
||||
[62] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[63] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13
|
||||
[64] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
|
||||
[65] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
|
||||
[66] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
|
||||
to:atan2_16::@13
|
||||
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
||||
[57] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0
|
||||
[67] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@1: scope:[atan2_16] from atan2_16
|
||||
[58] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0
|
||||
[68] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
init_font_hex: scope:[init_font_hex] from main
|
||||
[59] phi()
|
||||
[69] phi()
|
||||
to:init_font_hex::@1
|
||||
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
|
||||
[60] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[60] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[60] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
[70] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[70] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[70] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
to:init_font_hex::@2
|
||||
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
|
||||
[61] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[61] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[61] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[62] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
[71] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[71] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[71] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[72] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
to:init_font_hex::@3
|
||||
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3
|
||||
[63] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[63] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[64] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[65] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[66] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[68] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[69] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[70] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
[73] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[73] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[74] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[75] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[76] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[77] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[78] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[79] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[80] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
to:init_font_hex::@4
|
||||
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
|
||||
[71] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[72] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[73] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[74] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[75] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[76] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[77] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
[81] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[82] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[83] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[84] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[85] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[86] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[87] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
to:init_font_hex::@5
|
||||
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
|
||||
[78] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[79] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[80] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
[88] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[89] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[90] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
to:init_font_hex::@return
|
||||
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
||||
[81] return
|
||||
[91] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,10 +18,10 @@
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
||||
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:5 4.0
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:6 4.0
|
||||
(byte~) atan2_16::$23 reg byte a 2002.0
|
||||
(byte~) atan2_16::$24 reg byte a 2002.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:7 4.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:8 4.0
|
||||
(label) atan2_16::@1
|
||||
(label) atan2_16::@10
|
||||
(label) atan2_16::@11
|
||||
@ -30,7 +30,12 @@
|
||||
(label) atan2_16::@14
|
||||
(label) atan2_16::@15
|
||||
(label) atan2_16::@16
|
||||
(label) atan2_16::@17
|
||||
(label) atan2_16::@18
|
||||
(label) atan2_16::@19
|
||||
(label) atan2_16::@2
|
||||
(label) atan2_16::@20
|
||||
(label) atan2_16::@21
|
||||
(label) atan2_16::@3
|
||||
(label) atan2_16::@4
|
||||
(label) atan2_16::@5
|
||||
@ -42,7 +47,7 @@
|
||||
(word) atan2_16::angle
|
||||
(word) atan2_16::angle#1 angle zp ZP_WORD:10 3.0
|
||||
(word) atan2_16::angle#11 angle zp ZP_WORD:10 4.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:10 364.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:10 190.66666666666666
|
||||
(word) atan2_16::angle#13 angle zp ZP_WORD:10 1334.6666666666667
|
||||
(word) atan2_16::angle#2 angle zp ZP_WORD:10 2002.0
|
||||
(word) atan2_16::angle#3 angle zp ZP_WORD:10 2002.0
|
||||
@ -50,33 +55,45 @@
|
||||
(word) atan2_16::angle#5 angle zp ZP_WORD:10 4.0
|
||||
(word) atan2_16::angle#6 angle zp ZP_WORD:10 2004.0
|
||||
(byte) atan2_16::i
|
||||
(byte) atan2_16::i#1 i zp ZP_BYTE:9 1501.5
|
||||
(byte) atan2_16::i#2 i zp ZP_BYTE:9 429.0
|
||||
(byte) atan2_16::i#1 reg byte x 1501.5
|
||||
(byte) atan2_16::i#2 reg byte x 208.54166666666669
|
||||
(word) atan2_16::return
|
||||
(word) atan2_16::return#0 return zp ZP_WORD:10 34.99999999999999
|
||||
(word) atan2_16::return#2 return zp ZP_WORD:10 202.0
|
||||
(byte) atan2_16::shift
|
||||
(byte) atan2_16::shift#1 reg byte y 20002.0
|
||||
(byte) atan2_16::shift#2 reg byte y 8001.25
|
||||
(byte~) atan2_16::shift#5 reg byte y 667.3333333333334
|
||||
(signed word) atan2_16::x
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:21 3.8928571428571437
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:25 2.8684210526315796
|
||||
(signed word) atan2_16::xd
|
||||
(signed word) atan2_16::xd#0 xd zp ZP_WORD:25 600.5999999999999
|
||||
(signed word) atan2_16::xd#1 xd zp ZP_WORD:14 6667.333333333333
|
||||
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:14 1001.0
|
||||
(signed word) atan2_16::xd#2 xd zp ZP_WORD:14 1001.0
|
||||
(signed word) atan2_16::xd#3 xd zp ZP_WORD:14 7668.333333333332
|
||||
(signed word) atan2_16::xd#5 xd zp ZP_WORD:14 1001.0
|
||||
(signed word) atan2_16::xi
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:7 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:7 500.5
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:7 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:7 801.2
|
||||
(signed word) atan2_16::xi#7 xi zp ZP_WORD:7 1001.0
|
||||
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:7 4.0
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:8 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:8 500.5
|
||||
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:8 4.0
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:8 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:8 267.0666666666667
|
||||
(signed word) atan2_16::xi#8 xi zp ZP_WORD:8 1001.0
|
||||
(signed word) atan2_16::y
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:23 3.633333333333334
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:27 2.724999999999999
|
||||
(signed word) atan2_16::yd
|
||||
(signed word) atan2_16::yd#0 yd zp ZP_WORD:27 1501.5
|
||||
(signed word) atan2_16::yd#1 yd zp ZP_WORD:12 10001.0
|
||||
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:12 2002.0
|
||||
(signed word) atan2_16::yd#2 yd zp ZP_WORD:12 2002.0
|
||||
(signed word) atan2_16::yd#3 yd zp ZP_WORD:12 4601.0
|
||||
(signed word) atan2_16::yd#5 yd zp ZP_WORD:12 2002.0
|
||||
(signed word) atan2_16::yi
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:5 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:5 667.3333333333334
|
||||
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:5 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:5 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:5 858.2857142857142
|
||||
(signed word) atan2_16::yi#7 yi zp ZP_WORD:5 1001.0
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:6 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:6 667.3333333333334
|
||||
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:6 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:6 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:6 353.4117647058823
|
||||
(signed word) atan2_16::yi#8 yi zp ZP_WORD:6 1001.0
|
||||
(void()) init_font_hex((byte*) init_font_hex::charset)
|
||||
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:29 1001.0
|
||||
(byte~) init_font_hex::$1 reg byte a 2002.0
|
||||
@ -88,28 +105,28 @@
|
||||
(label) init_font_hex::@5
|
||||
(label) init_font_hex::@return
|
||||
(byte) init_font_hex::c
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:14 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:14 1.1578947368421053
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:18 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:18 1.1578947368421053
|
||||
(byte) init_font_hex::c1
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:19 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:19 13.466666666666667
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:23 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:23 13.466666666666667
|
||||
(byte*) init_font_hex::charset
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:15 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:15 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:15 22.0
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:19 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:19 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:19 22.0
|
||||
(byte) init_font_hex::i
|
||||
(byte) init_font_hex::i#1 reg byte x 1501.5
|
||||
(byte) init_font_hex::i#2 reg byte x 667.3333333333334
|
||||
(byte) init_font_hex::idx
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:20 551.0
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0
|
||||
(byte) init_font_hex::idx#3 reg byte y 202.0
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:20 600.5999999999999
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999
|
||||
(byte*) init_font_hex::proto_hi
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:12 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:12 56.83333333333334
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:16 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:16 56.83333333333334
|
||||
(byte*) init_font_hex::proto_lo
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:17 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:17 92.53846153846155
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:21 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:21 92.53846153846155
|
||||
(void()) main()
|
||||
(word~) main::$11 $11 zp ZP_WORD:10 202.0
|
||||
(label) main::@1
|
||||
@ -124,9 +141,9 @@
|
||||
(word) main::angle_w#0 angle_w zp ZP_WORD:10 202.0
|
||||
(byte*) main::col00
|
||||
(byte*) main::screen
|
||||
(byte*) main::screen#1 screen zp ZP_WORD:3 42.599999999999994
|
||||
(byte*) main::screen#2 screen zp ZP_WORD:3 28.545454545454547
|
||||
(byte*) main::screen#4 screen zp ZP_WORD:3 22.0
|
||||
(byte*) main::screen#1 screen zp ZP_WORD:4 42.599999999999994
|
||||
(byte*) main::screen#2 screen zp ZP_WORD:4 28.545454545454547
|
||||
(byte*) main::screen#4 screen zp ZP_WORD:4 22.0
|
||||
(label) main::toD0181
|
||||
(word~) main::toD0181_$0
|
||||
(number~) main::toD0181_$1
|
||||
@ -142,35 +159,36 @@
|
||||
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
|
||||
(byte*) main::toD0181_screen
|
||||
(signed byte) main::x
|
||||
(signed byte) main::x#1 reg byte x 151.5
|
||||
(signed byte) main::x#2 reg byte x 16.833333333333332
|
||||
(signed byte) main::x#1 x zp ZP_BYTE:3 151.5
|
||||
(signed byte) main::x#2 x zp ZP_BYTE:3 16.833333333333332
|
||||
(signed word) main::xw
|
||||
(word) main::xw#0 xw zp ZP_WORD:21 50.5
|
||||
(word) main::xw#0 xw zp ZP_WORD:25 50.5
|
||||
(signed byte) main::y
|
||||
(signed byte) main::y#1 y zp ZP_BYTE:2 16.5
|
||||
(signed byte) main::y#4 y zp ZP_BYTE:2 1.4666666666666666
|
||||
(signed word) main::yw
|
||||
(word) main::yw#0 yw zp ZP_WORD:23 50.5
|
||||
(word) main::yw#0 yw zp ZP_WORD:27 50.5
|
||||
|
||||
zp ZP_BYTE:2 [ main::y#4 main::y#1 ]
|
||||
reg byte x [ main::x#2 main::x#1 ]
|
||||
zp ZP_WORD:3 [ main::screen#2 main::screen#4 main::screen#1 ]
|
||||
zp ZP_WORD:5 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:7 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
zp ZP_BYTE:9 [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_BYTE:3 [ main::x#2 main::x#1 ]
|
||||
zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ]
|
||||
zp ZP_WORD:6 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:8 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
reg byte x [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_WORD:10 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 main::angle_w#0 main::$11 ]
|
||||
zp ZP_WORD:12 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:14 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:15 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:17 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:19 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
|
||||
zp ZP_WORD:12 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
|
||||
zp ZP_WORD:14 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
|
||||
zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
|
||||
zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_WORD:21 [ main::xw#0 atan2_16::x#0 ]
|
||||
zp ZP_WORD:23 [ main::yw#0 atan2_16::y#0 ]
|
||||
zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_WORD:25 [ main::xw#0 atan2_16::x#0 ]
|
||||
zp ZP_WORD:27 [ main::yw#0 atan2_16::y#0 ]
|
||||
reg byte a [ main::ang_w#0 ]
|
||||
zp ZP_WORD:25 [ atan2_16::xd#0 ]
|
||||
zp ZP_WORD:27 [ atan2_16::yd#0 ]
|
||||
reg byte a [ atan2_16::$24 ]
|
||||
reg byte a [ atan2_16::$23 ]
|
||||
zp ZP_BYTE:29 [ init_font_hex::$0 ]
|
||||
|
@ -45,11 +45,12 @@ main: {
|
||||
// Utilizes symmetry around the center
|
||||
init_angle_screen: {
|
||||
.label _10 = $f
|
||||
.label xw = $1a
|
||||
.label yw = $1c
|
||||
.label xw = $1e
|
||||
.label yw = $20
|
||||
.label angle_w = $f
|
||||
.label ang_w = $1e
|
||||
.label xb = 9
|
||||
.label ang_w = $22
|
||||
.label x = 9
|
||||
.label xb = $a
|
||||
.label screen_topline = 5
|
||||
.label screen_bottomline = 7
|
||||
.label y = 4
|
||||
@ -66,9 +67,10 @@ init_angle_screen: {
|
||||
b1:
|
||||
lda #$27
|
||||
sta xb
|
||||
ldx #0
|
||||
lda #0
|
||||
sta x
|
||||
b2:
|
||||
txa
|
||||
lda x
|
||||
asl
|
||||
eor #$ff
|
||||
clc
|
||||
@ -93,14 +95,11 @@ init_angle_screen: {
|
||||
lda #$80
|
||||
clc
|
||||
adc ang_w
|
||||
stx $ff
|
||||
ldy $ff
|
||||
ldy x
|
||||
sta (screen_topline),y
|
||||
lda #$80
|
||||
sec
|
||||
sbc ang_w
|
||||
stx $ff
|
||||
ldy $ff
|
||||
sta (screen_bottomline),y
|
||||
lda ang_w
|
||||
eor #$ff
|
||||
@ -110,9 +109,10 @@ init_angle_screen: {
|
||||
sta (screen_topline),y
|
||||
lda ang_w
|
||||
sta (screen_bottomline),y
|
||||
inx
|
||||
inc x
|
||||
dec xb
|
||||
cpx #$13+1
|
||||
lda x
|
||||
cmp #$13+1
|
||||
bcc b2
|
||||
lda screen_topline
|
||||
sec
|
||||
@ -137,19 +137,18 @@ init_angle_screen: {
|
||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
||||
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
|
||||
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
|
||||
// atan2_16(signed word zeropage($1a) x, signed word zeropage($1c) y)
|
||||
// atan2_16(signed word zeropage($1e) x, signed word zeropage($20) y)
|
||||
atan2_16: {
|
||||
.label _2 = $a
|
||||
.label _7 = $c
|
||||
.label yi = $a
|
||||
.label xi = $c
|
||||
.label xd = $1f
|
||||
.label yd = $21
|
||||
.label _2 = $b
|
||||
.label _7 = $d
|
||||
.label yi = $b
|
||||
.label xi = $d
|
||||
.label angle = $f
|
||||
.label i = $e
|
||||
.label xd = $13
|
||||
.label yd = $11
|
||||
.label return = $f
|
||||
.label x = $1a
|
||||
.label y = $1c
|
||||
.label x = $1e
|
||||
.label y = $20
|
||||
lda y+1
|
||||
bmi !b1+
|
||||
jmp b1
|
||||
@ -177,7 +176,7 @@ atan2_16: {
|
||||
lda #0
|
||||
sta angle
|
||||
sta angle+1
|
||||
sta i
|
||||
tax
|
||||
b10:
|
||||
lda yi+1
|
||||
bne b11
|
||||
@ -208,38 +207,32 @@ atan2_16: {
|
||||
b8:
|
||||
rts
|
||||
b11:
|
||||
ldy i
|
||||
txa
|
||||
tay
|
||||
lda xi
|
||||
sta xd
|
||||
lda xi+1
|
||||
sta xd+1
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
ldy i
|
||||
lda yi
|
||||
sta yd
|
||||
lda yi+1
|
||||
sta yd+1
|
||||
b13:
|
||||
cpy #1+1
|
||||
bcs b14
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
beq b17
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
b17:
|
||||
lda yi+1
|
||||
bpl b13
|
||||
bpl b18
|
||||
lda xi
|
||||
sec
|
||||
sbc yd
|
||||
@ -254,7 +247,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
adc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
sec
|
||||
@ -264,15 +257,14 @@ atan2_16: {
|
||||
lda angle+1
|
||||
sbc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
b14:
|
||||
inc i
|
||||
lda #CORDIC_ITERATIONS_16-1+1
|
||||
cmp i
|
||||
b19:
|
||||
inx
|
||||
cpx #CORDIC_ITERATIONS_16-1+1
|
||||
bne !b12+
|
||||
jmp b12
|
||||
!b12:
|
||||
jmp b10
|
||||
b13:
|
||||
b18:
|
||||
lda xi
|
||||
clc
|
||||
adc yd
|
||||
@ -287,7 +279,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
sbc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
clc
|
||||
@ -297,7 +289,27 @@ atan2_16: {
|
||||
lda angle+1
|
||||
adc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
jmp b14
|
||||
jmp b19
|
||||
b14:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
dey
|
||||
jmp b13
|
||||
b4:
|
||||
lda x
|
||||
sta xi
|
||||
@ -312,15 +324,15 @@ atan2_16: {
|
||||
jmp b3
|
||||
}
|
||||
// Make charset from proto chars
|
||||
// init_font_hex(byte* zeropage($14) charset)
|
||||
// init_font_hex(byte* zeropage($18) charset)
|
||||
init_font_hex: {
|
||||
.label _0 = $23
|
||||
.label idx = $19
|
||||
.label proto_lo = $16
|
||||
.label charset = $14
|
||||
.label c1 = $18
|
||||
.label proto_hi = $11
|
||||
.label c = $13
|
||||
.label idx = $1d
|
||||
.label proto_lo = $1a
|
||||
.label charset = $18
|
||||
.label c1 = $1c
|
||||
.label proto_hi = $15
|
||||
.label c = $17
|
||||
lda #0
|
||||
sta c
|
||||
lda #<FONT_HEX_PROTO
|
||||
|
@ -83,32 +83,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16
|
||||
[45] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
||||
[46] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[46] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
||||
to:atan2_16::@5
|
||||
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
||||
[48] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
||||
[49] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
[49] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
to:atan2_16::@10
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6
|
||||
[50] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[50] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[50] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[50] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
|
||||
[50] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[50] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[50] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[50] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
[51] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
||||
to:atan2_16::@12
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14
|
||||
[52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 )
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
|
||||
[52] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
|
||||
[53] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
|
||||
[54] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@12
|
||||
to:atan2_16::@21
|
||||
atan2_16::@21: scope:[atan2_16] from atan2_16::@12
|
||||
[55] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
|
||||
to:atan2_16::@7
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16
|
||||
[56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 )
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
|
||||
[56] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
|
||||
[57] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
|
||||
to:atan2_16::@9
|
||||
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
||||
@ -121,74 +121,97 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
||||
[60] return
|
||||
to:@return
|
||||
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
||||
[61] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2
|
||||
[62] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2
|
||||
[63] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13
|
||||
[61] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
|
||||
[62] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
|
||||
[63] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
|
||||
to:atan2_16::@13
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
|
||||
[64] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
|
||||
[64] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
|
||||
[64] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
|
||||
[65] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14
|
||||
to:atan2_16::@15
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@11
|
||||
[64] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0
|
||||
[65] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0
|
||||
[66] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[67] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15
|
||||
[68] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 )
|
||||
[68] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 )
|
||||
[68] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 )
|
||||
[69] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[70] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@13
|
||||
[66] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@15
|
||||
[67] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
|
||||
[68] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
|
||||
to:atan2_16::@17
|
||||
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
|
||||
[69] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
|
||||
[69] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
|
||||
[70] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
|
||||
to:atan2_16::@20
|
||||
atan2_16::@20: scope:[atan2_16] from atan2_16::@17
|
||||
[71] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
|
||||
[72] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
|
||||
[73] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[74] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
|
||||
[75] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
|
||||
[75] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
|
||||
[75] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
|
||||
[76] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[77] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
to:atan2_16::@10
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11
|
||||
[71] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0
|
||||
[72] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0
|
||||
[73] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[74] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@18: scope:[atan2_16] from atan2_16::@17
|
||||
[78] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
|
||||
[79] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
|
||||
[80] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[81] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13
|
||||
[82] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
|
||||
[83] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
|
||||
[84] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
|
||||
to:atan2_16::@13
|
||||
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
||||
[75] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0
|
||||
[85] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@1: scope:[atan2_16] from atan2_16
|
||||
[76] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0
|
||||
[86] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
init_font_hex: scope:[init_font_hex] from main
|
||||
[77] phi()
|
||||
[87] phi()
|
||||
to:init_font_hex::@1
|
||||
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
|
||||
[78] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[78] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[78] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
[88] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[88] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[88] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
to:init_font_hex::@2
|
||||
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
|
||||
[79] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[79] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[79] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[80] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
[89] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[89] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[89] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[90] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
to:init_font_hex::@3
|
||||
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3
|
||||
[81] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[81] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[82] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[83] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[84] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[85] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[86] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[87] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[88] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
[91] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[91] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[92] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[93] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[94] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[95] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[96] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[97] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[98] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
to:init_font_hex::@4
|
||||
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
|
||||
[89] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[90] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[91] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[92] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[93] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[94] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[95] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
[99] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[100] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[102] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[103] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[104] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[105] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
to:init_font_hex::@5
|
||||
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
|
||||
[96] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[97] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[98] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
[106] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[107] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[108] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
to:init_font_hex::@return
|
||||
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
||||
[99] return
|
||||
[109] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,10 +18,10 @@
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
||||
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:10 4.0
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:11 4.0
|
||||
(byte~) atan2_16::$23 reg byte a 2002.0
|
||||
(byte~) atan2_16::$24 reg byte a 2002.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:12 4.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:13 4.0
|
||||
(label) atan2_16::@1
|
||||
(label) atan2_16::@10
|
||||
(label) atan2_16::@11
|
||||
@ -30,7 +30,12 @@
|
||||
(label) atan2_16::@14
|
||||
(label) atan2_16::@15
|
||||
(label) atan2_16::@16
|
||||
(label) atan2_16::@17
|
||||
(label) atan2_16::@18
|
||||
(label) atan2_16::@19
|
||||
(label) atan2_16::@2
|
||||
(label) atan2_16::@20
|
||||
(label) atan2_16::@21
|
||||
(label) atan2_16::@3
|
||||
(label) atan2_16::@4
|
||||
(label) atan2_16::@5
|
||||
@ -42,7 +47,7 @@
|
||||
(word) atan2_16::angle
|
||||
(word) atan2_16::angle#1 angle zp ZP_WORD:15 3.0
|
||||
(word) atan2_16::angle#11 angle zp ZP_WORD:15 4.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:15 364.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:15 190.66666666666666
|
||||
(word) atan2_16::angle#13 angle zp ZP_WORD:15 1334.6666666666667
|
||||
(word) atan2_16::angle#2 angle zp ZP_WORD:15 2002.0
|
||||
(word) atan2_16::angle#3 angle zp ZP_WORD:15 2002.0
|
||||
@ -50,33 +55,45 @@
|
||||
(word) atan2_16::angle#5 angle zp ZP_WORD:15 4.0
|
||||
(word) atan2_16::angle#6 angle zp ZP_WORD:15 2004.0
|
||||
(byte) atan2_16::i
|
||||
(byte) atan2_16::i#1 i zp ZP_BYTE:14 1501.5
|
||||
(byte) atan2_16::i#2 i zp ZP_BYTE:14 429.0
|
||||
(byte) atan2_16::i#1 reg byte x 1501.5
|
||||
(byte) atan2_16::i#2 reg byte x 208.54166666666669
|
||||
(word) atan2_16::return
|
||||
(word) atan2_16::return#0 return zp ZP_WORD:15 34.99999999999999
|
||||
(word) atan2_16::return#2 return zp ZP_WORD:15 202.0
|
||||
(byte) atan2_16::shift
|
||||
(byte) atan2_16::shift#1 reg byte y 20002.0
|
||||
(byte) atan2_16::shift#2 reg byte y 8001.25
|
||||
(byte~) atan2_16::shift#5 reg byte y 667.3333333333334
|
||||
(signed word) atan2_16::x
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:26 3.8928571428571437
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:30 2.8684210526315796
|
||||
(signed word) atan2_16::xd
|
||||
(signed word) atan2_16::xd#0 xd zp ZP_WORD:31 600.5999999999999
|
||||
(signed word) atan2_16::xd#1 xd zp ZP_WORD:19 6667.333333333333
|
||||
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:19 1001.0
|
||||
(signed word) atan2_16::xd#2 xd zp ZP_WORD:19 1001.0
|
||||
(signed word) atan2_16::xd#3 xd zp ZP_WORD:19 7668.333333333332
|
||||
(signed word) atan2_16::xd#5 xd zp ZP_WORD:19 1001.0
|
||||
(signed word) atan2_16::xi
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:12 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:12 500.5
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:12 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:12 801.2
|
||||
(signed word) atan2_16::xi#7 xi zp ZP_WORD:12 1001.0
|
||||
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:12 4.0
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:13 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:13 500.5
|
||||
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:13 4.0
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:13 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:13 267.0666666666667
|
||||
(signed word) atan2_16::xi#8 xi zp ZP_WORD:13 1001.0
|
||||
(signed word) atan2_16::y
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:28 3.633333333333334
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:32 2.724999999999999
|
||||
(signed word) atan2_16::yd
|
||||
(signed word) atan2_16::yd#0 yd zp ZP_WORD:33 1501.5
|
||||
(signed word) atan2_16::yd#1 yd zp ZP_WORD:17 10001.0
|
||||
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:17 2002.0
|
||||
(signed word) atan2_16::yd#2 yd zp ZP_WORD:17 2002.0
|
||||
(signed word) atan2_16::yd#3 yd zp ZP_WORD:17 4601.0
|
||||
(signed word) atan2_16::yd#5 yd zp ZP_WORD:17 2002.0
|
||||
(signed word) atan2_16::yi
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:10 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:10 667.3333333333334
|
||||
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:10 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:10 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:10 858.2857142857142
|
||||
(signed word) atan2_16::yi#7 yi zp ZP_WORD:10 1001.0
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:11 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:11 667.3333333333334
|
||||
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:11 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:11 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:11 353.4117647058823
|
||||
(signed word) atan2_16::yi#8 yi zp ZP_WORD:11 1001.0
|
||||
(void()) init_angle_screen((byte*) init_angle_screen::screen)
|
||||
(word~) init_angle_screen::$10 $10 zp ZP_WORD:15 202.0
|
||||
(byte~) init_angle_screen::$12 reg byte a 202.0
|
||||
@ -91,7 +108,7 @@
|
||||
(label) init_angle_screen::@4
|
||||
(label) init_angle_screen::@return
|
||||
(byte) init_angle_screen::ang_w
|
||||
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:30 72.14285714285714
|
||||
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:34 72.14285714285714
|
||||
(word) init_angle_screen::angle_w
|
||||
(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:15 202.0
|
||||
(byte*) init_angle_screen::screen
|
||||
@ -102,18 +119,18 @@
|
||||
(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:5 5.5
|
||||
(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:5 9.333333333333334
|
||||
(byte) init_angle_screen::x
|
||||
(byte) init_angle_screen::x#1 reg byte x 101.0
|
||||
(byte) init_angle_screen::x#2 reg byte x 25.25
|
||||
(byte) init_angle_screen::x#1 x zp ZP_BYTE:9 101.0
|
||||
(byte) init_angle_screen::x#2 x zp ZP_BYTE:9 25.25
|
||||
(byte) init_angle_screen::xb
|
||||
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:9 101.0
|
||||
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:9 19.238095238095237
|
||||
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:10 101.0
|
||||
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:10 19.238095238095237
|
||||
(signed word) init_angle_screen::xw
|
||||
(word) init_angle_screen::xw#0 xw zp ZP_WORD:26 33.666666666666664
|
||||
(word) init_angle_screen::xw#0 xw zp ZP_WORD:30 33.666666666666664
|
||||
(byte) init_angle_screen::y
|
||||
(byte) init_angle_screen::y#1 y zp ZP_BYTE:4 16.5
|
||||
(byte) init_angle_screen::y#4 y zp ZP_BYTE:4 4.730769230769231
|
||||
(signed word) init_angle_screen::yw
|
||||
(word) init_angle_screen::yw#0 yw zp ZP_WORD:28 50.5
|
||||
(word) init_angle_screen::yw#0 yw zp ZP_WORD:32 50.5
|
||||
(void()) init_font_hex((byte*) init_font_hex::charset)
|
||||
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 1001.0
|
||||
(byte~) init_font_hex::$1 reg byte a 2002.0
|
||||
@ -125,28 +142,28 @@
|
||||
(label) init_font_hex::@5
|
||||
(label) init_font_hex::@return
|
||||
(byte) init_font_hex::c
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:19 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:19 1.1578947368421053
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:23 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:23 1.1578947368421053
|
||||
(byte) init_font_hex::c1
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:24 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:24 13.466666666666667
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:28 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:28 13.466666666666667
|
||||
(byte*) init_font_hex::charset
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:20 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:20 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:20 22.0
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:24 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:24 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:24 22.0
|
||||
(byte) init_font_hex::i
|
||||
(byte) init_font_hex::i#1 reg byte x 1501.5
|
||||
(byte) init_font_hex::i#2 reg byte x 667.3333333333334
|
||||
(byte) init_font_hex::idx
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:25 551.0
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:29 551.0
|
||||
(byte) init_font_hex::idx#3 reg byte y 202.0
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:25 600.5999999999999
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:29 600.5999999999999
|
||||
(byte*) init_font_hex::proto_hi
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:17 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:17 56.83333333333334
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:21 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:21 56.83333333333334
|
||||
(byte*) init_font_hex::proto_lo
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:22 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:22 92.53846153846155
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:26 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:26 92.53846153846155
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
@ -175,30 +192,31 @@ zp ZP_WORD:2 [ main::clear_char#5 main::clear_char#1 ]
|
||||
zp ZP_BYTE:4 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
|
||||
zp ZP_WORD:5 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
|
||||
zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ]
|
||||
reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ]
|
||||
zp ZP_BYTE:9 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
|
||||
zp ZP_WORD:10 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:12 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
zp ZP_BYTE:14 [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_BYTE:9 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
|
||||
zp ZP_BYTE:10 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
|
||||
zp ZP_WORD:11 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:13 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
reg byte x [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_WORD:15 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ]
|
||||
zp ZP_WORD:17 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:19 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:20 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:22 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:24 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
|
||||
zp ZP_WORD:17 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
|
||||
zp ZP_WORD:19 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
|
||||
zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
|
||||
zp ZP_BYTE:25 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_BYTE:29 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
reg byte a [ init_angle_screen::$2 ]
|
||||
reg byte a [ init_angle_screen::$3 ]
|
||||
zp ZP_WORD:26 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
||||
zp ZP_WORD:30 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
||||
reg byte a [ init_angle_screen::$6 ]
|
||||
zp ZP_WORD:28 [ init_angle_screen::yw#0 atan2_16::y#0 ]
|
||||
zp ZP_BYTE:30 [ init_angle_screen::ang_w#0 ]
|
||||
zp ZP_WORD:32 [ init_angle_screen::yw#0 atan2_16::y#0 ]
|
||||
zp ZP_BYTE:34 [ init_angle_screen::ang_w#0 ]
|
||||
reg byte a [ init_angle_screen::$12 ]
|
||||
reg byte a [ init_angle_screen::$13 ]
|
||||
reg byte a [ init_angle_screen::$14 ]
|
||||
zp ZP_WORD:31 [ atan2_16::xd#0 ]
|
||||
zp ZP_WORD:33 [ atan2_16::yd#0 ]
|
||||
reg byte a [ atan2_16::$24 ]
|
||||
reg byte a [ atan2_16::$23 ]
|
||||
zp ZP_BYTE:35 [ init_font_hex::$0 ]
|
||||
|
@ -2,6 +2,7 @@ Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
|
||||
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
|
||||
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
|
||||
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
|
||||
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET
|
||||
Culled Empty Block (label) init_font_hex::@6
|
||||
|
@ -28,8 +28,8 @@ main: {
|
||||
.label BASE_CHARSET = $1000
|
||||
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
|
||||
.const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f
|
||||
.label _4 = $1f
|
||||
.label cyclecount = $1f
|
||||
.label _4 = $23
|
||||
.label cyclecount = $23
|
||||
jsr init_font_hex
|
||||
lda #toD0181_return
|
||||
sta D018
|
||||
@ -55,9 +55,9 @@ main: {
|
||||
rts
|
||||
}
|
||||
// Print a dword as HEX at a specific position
|
||||
// print_dword_at(dword zeropage($1f) dw)
|
||||
// print_dword_at(dword zeropage($23) dw)
|
||||
print_dword_at: {
|
||||
.label dw = $1f
|
||||
.label dw = $23
|
||||
lda dw+2
|
||||
sta print_word_at.w
|
||||
lda dw+3
|
||||
@ -141,7 +141,7 @@ print_char_at: {
|
||||
// Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program).
|
||||
// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start()
|
||||
clock: {
|
||||
.label return = $1f
|
||||
.label return = $23
|
||||
lda #<$ffffffff
|
||||
sec
|
||||
sbc CIA2_TIMER_AB
|
||||
@ -161,11 +161,12 @@ clock: {
|
||||
// Utilizes symmetry around the center
|
||||
init_angle_screen: {
|
||||
.label _10 = $14
|
||||
.label xw = $23
|
||||
.label yw = $25
|
||||
.label xw = $27
|
||||
.label yw = $29
|
||||
.label angle_w = $14
|
||||
.label ang_w = $27
|
||||
.label xb = $e
|
||||
.label ang_w = $2b
|
||||
.label x = $e
|
||||
.label xb = $f
|
||||
.label screen_topline = $a
|
||||
.label screen_bottomline = $c
|
||||
.label y = 9
|
||||
@ -182,9 +183,10 @@ init_angle_screen: {
|
||||
b1:
|
||||
lda #$27
|
||||
sta xb
|
||||
ldx #0
|
||||
lda #0
|
||||
sta x
|
||||
b2:
|
||||
txa
|
||||
lda x
|
||||
asl
|
||||
eor #$ff
|
||||
clc
|
||||
@ -209,14 +211,11 @@ init_angle_screen: {
|
||||
lda #$80
|
||||
clc
|
||||
adc ang_w
|
||||
stx $ff
|
||||
ldy $ff
|
||||
ldy x
|
||||
sta (screen_topline),y
|
||||
lda #$80
|
||||
sec
|
||||
sbc ang_w
|
||||
stx $ff
|
||||
ldy $ff
|
||||
sta (screen_bottomline),y
|
||||
lda ang_w
|
||||
eor #$ff
|
||||
@ -226,9 +225,10 @@ init_angle_screen: {
|
||||
sta (screen_topline),y
|
||||
lda ang_w
|
||||
sta (screen_bottomline),y
|
||||
inx
|
||||
inc x
|
||||
dec xb
|
||||
cpx #$13+1
|
||||
lda x
|
||||
cmp #$13+1
|
||||
bcc b2
|
||||
lda screen_topline
|
||||
sec
|
||||
@ -253,19 +253,18 @@ init_angle_screen: {
|
||||
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
|
||||
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
|
||||
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
|
||||
// atan2_16(signed word zeropage($23) x, signed word zeropage($25) y)
|
||||
// atan2_16(signed word zeropage($27) x, signed word zeropage($29) y)
|
||||
atan2_16: {
|
||||
.label _2 = $f
|
||||
.label _7 = $11
|
||||
.label yi = $f
|
||||
.label xi = $11
|
||||
.label xd = $28
|
||||
.label yd = $2a
|
||||
.label _2 = $10
|
||||
.label _7 = $12
|
||||
.label yi = $10
|
||||
.label xi = $12
|
||||
.label angle = $14
|
||||
.label i = $13
|
||||
.label xd = $18
|
||||
.label yd = $16
|
||||
.label return = $14
|
||||
.label x = $23
|
||||
.label y = $25
|
||||
.label x = $27
|
||||
.label y = $29
|
||||
lda y+1
|
||||
bmi !b1+
|
||||
jmp b1
|
||||
@ -293,7 +292,7 @@ atan2_16: {
|
||||
lda #0
|
||||
sta angle
|
||||
sta angle+1
|
||||
sta i
|
||||
tax
|
||||
b10:
|
||||
lda yi+1
|
||||
bne b11
|
||||
@ -324,38 +323,32 @@ atan2_16: {
|
||||
b8:
|
||||
rts
|
||||
b11:
|
||||
ldy i
|
||||
txa
|
||||
tay
|
||||
lda xi
|
||||
sta xd
|
||||
lda xi+1
|
||||
sta xd+1
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
ldy i
|
||||
lda yi
|
||||
sta yd
|
||||
lda yi+1
|
||||
sta yd+1
|
||||
b13:
|
||||
cpy #1+1
|
||||
bcs b14
|
||||
cpy #0
|
||||
beq !e+
|
||||
!:
|
||||
beq b17
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
bne !-
|
||||
!e:
|
||||
b17:
|
||||
lda yi+1
|
||||
bpl b13
|
||||
bpl b18
|
||||
lda xi
|
||||
sec
|
||||
sbc yd
|
||||
@ -370,7 +363,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
adc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
sec
|
||||
@ -380,15 +373,14 @@ atan2_16: {
|
||||
lda angle+1
|
||||
sbc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
b14:
|
||||
inc i
|
||||
lda #CORDIC_ITERATIONS_16-1+1
|
||||
cmp i
|
||||
b19:
|
||||
inx
|
||||
cpx #CORDIC_ITERATIONS_16-1+1
|
||||
bne !b12+
|
||||
jmp b12
|
||||
!b12:
|
||||
jmp b10
|
||||
b13:
|
||||
b18:
|
||||
lda xi
|
||||
clc
|
||||
adc yd
|
||||
@ -403,7 +395,7 @@ atan2_16: {
|
||||
lda yi+1
|
||||
sbc xd+1
|
||||
sta yi+1
|
||||
lda i
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
clc
|
||||
@ -413,7 +405,27 @@ atan2_16: {
|
||||
lda angle+1
|
||||
adc CORDIC_ATAN2_ANGLES_16+1,y
|
||||
sta angle+1
|
||||
jmp b14
|
||||
jmp b19
|
||||
b14:
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda xd+1
|
||||
cmp #$80
|
||||
ror xd+1
|
||||
ror xd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
lda yd+1
|
||||
cmp #$80
|
||||
ror yd+1
|
||||
ror yd
|
||||
dey
|
||||
dey
|
||||
jmp b13
|
||||
b4:
|
||||
lda x
|
||||
sta xi
|
||||
@ -450,15 +462,15 @@ clock_start: {
|
||||
rts
|
||||
}
|
||||
// Make charset from proto chars
|
||||
// init_font_hex(byte* zeropage($19) charset)
|
||||
// init_font_hex(byte* zeropage($1d) charset)
|
||||
init_font_hex: {
|
||||
.label _0 = $2c
|
||||
.label idx = $1e
|
||||
.label proto_lo = $1b
|
||||
.label charset = $19
|
||||
.label c1 = $1d
|
||||
.label proto_hi = $16
|
||||
.label c = $18
|
||||
.label idx = $22
|
||||
.label proto_lo = $1f
|
||||
.label charset = $1d
|
||||
.label c1 = $21
|
||||
.label proto_hi = $1a
|
||||
.label c = $1c
|
||||
lda #0
|
||||
sta c
|
||||
lda #<FONT_HEX_PROTO
|
||||
|
@ -151,32 +151,32 @@ atan2_16::@2: scope:[atan2_16] from atan2_16
|
||||
[80] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
||||
[81] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#11 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[81] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
|
||||
[82] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
|
||||
to:atan2_16::@5
|
||||
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
||||
[83] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
||||
[84] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#8 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
[84] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
|
||||
to:atan2_16::@10
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@14 atan2_16::@6
|
||||
[85] (word) atan2_16::angle#12 ← phi( atan2_16::@14/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[85] (byte) atan2_16::i#2 ← phi( atan2_16::@14/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[85] (signed word) atan2_16::xi#3 ← phi( atan2_16::@14/(signed word) atan2_16::xi#7 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[85] (signed word) atan2_16::yi#3 ← phi( atan2_16::@14/(signed word) atan2_16::yi#7 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
|
||||
[85] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
|
||||
[85] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
|
||||
[85] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
|
||||
[85] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
|
||||
[86] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
|
||||
to:atan2_16::@12
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@14
|
||||
[87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@14/(word) atan2_16::angle#13 )
|
||||
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
|
||||
[87] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
|
||||
[88] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
|
||||
[89] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@12
|
||||
to:atan2_16::@21
|
||||
atan2_16::@21: scope:[atan2_16] from atan2_16::@12
|
||||
[90] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
|
||||
to:atan2_16::@7
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@16
|
||||
[91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@16/(word) atan2_16::angle#4 )
|
||||
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
|
||||
[91] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
|
||||
[92] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
|
||||
to:atan2_16::@9
|
||||
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
||||
@ -189,84 +189,107 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
||||
[95] return
|
||||
to:@return
|
||||
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
||||
[96] (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3 >> (byte) atan2_16::i#2
|
||||
[97] (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#3 >> (byte) atan2_16::i#2
|
||||
[98] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@13
|
||||
[96] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
|
||||
[97] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
|
||||
[98] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
|
||||
to:atan2_16::@13
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
|
||||
[99] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
|
||||
[99] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
|
||||
[99] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
|
||||
[100] if((byte) atan2_16::shift#2>=(byte) 1+(byte) 1) goto atan2_16::@14
|
||||
to:atan2_16::@15
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@11
|
||||
[99] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#0
|
||||
[100] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#0
|
||||
[101] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[102] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::@15
|
||||
[103] (signed word) atan2_16::xi#7 ← phi( atan2_16::@13/(signed word) atan2_16::xi#1 atan2_16::@15/(signed word) atan2_16::xi#2 )
|
||||
[103] (word) atan2_16::angle#13 ← phi( atan2_16::@13/(word) atan2_16::angle#2 atan2_16::@15/(word) atan2_16::angle#3 )
|
||||
[103] (signed word) atan2_16::yi#7 ← phi( atan2_16::@13/(signed word) atan2_16::yi#1 atan2_16::@15/(signed word) atan2_16::yi#2 )
|
||||
[104] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[105] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
atan2_16::@15: scope:[atan2_16] from atan2_16::@13
|
||||
[101] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
|
||||
to:atan2_16::@16
|
||||
atan2_16::@16: scope:[atan2_16] from atan2_16::@15
|
||||
[102] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
|
||||
[103] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
|
||||
to:atan2_16::@17
|
||||
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
|
||||
[104] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
|
||||
[104] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
|
||||
[105] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
|
||||
to:atan2_16::@20
|
||||
atan2_16::@20: scope:[atan2_16] from atan2_16::@17
|
||||
[106] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
|
||||
[107] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
|
||||
[108] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[109] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
|
||||
[110] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
|
||||
[110] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
|
||||
[110] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
|
||||
[111] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
|
||||
[112] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
|
||||
to:atan2_16::@10
|
||||
atan2_16::@13: scope:[atan2_16] from atan2_16::@11
|
||||
[106] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#0
|
||||
[107] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#0
|
||||
[108] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[109] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@14
|
||||
atan2_16::@18: scope:[atan2_16] from atan2_16::@17
|
||||
[113] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
|
||||
[114] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
|
||||
[115] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
|
||||
[116] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
|
||||
to:atan2_16::@19
|
||||
atan2_16::@14: scope:[atan2_16] from atan2_16::@13
|
||||
[117] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
|
||||
[118] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
|
||||
[119] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
|
||||
to:atan2_16::@13
|
||||
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
||||
[110] (signed word~) atan2_16::xi#8 ← (signed word) atan2_16::x#0
|
||||
[120] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0
|
||||
to:atan2_16::@6
|
||||
atan2_16::@1: scope:[atan2_16] from atan2_16
|
||||
[111] (signed word~) atan2_16::yi#11 ← (signed word) atan2_16::y#0
|
||||
[121] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
|
||||
to:atan2_16::@3
|
||||
clock_start: scope:[clock_start] from main::@1
|
||||
[112] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0
|
||||
[113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0
|
||||
[114] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff
|
||||
[115] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0
|
||||
[116] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0
|
||||
[122] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0
|
||||
[123] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0
|
||||
[124] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff
|
||||
[125] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0
|
||||
[126] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0
|
||||
to:clock_start::@return
|
||||
clock_start::@return: scope:[clock_start] from clock_start
|
||||
[117] return
|
||||
[127] return
|
||||
to:@return
|
||||
init_font_hex: scope:[init_font_hex] from main
|
||||
[118] phi()
|
||||
[128] phi()
|
||||
to:init_font_hex::@1
|
||||
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
|
||||
[119] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[119] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[119] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
[129] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
|
||||
[129] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
|
||||
[129] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
|
||||
to:init_font_hex::@2
|
||||
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
|
||||
[120] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[120] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[120] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[121] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
[130] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
|
||||
[130] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
|
||||
[130] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
|
||||
[131] *((byte*) init_font_hex::charset#2) ← (byte) 0
|
||||
to:init_font_hex::@3
|
||||
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3
|
||||
[122] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[122] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[123] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[124] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[125] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[126] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[127] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[128] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[129] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
[132] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
|
||||
[132] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
|
||||
[133] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
|
||||
[134] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
|
||||
[135] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
|
||||
[136] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
|
||||
[137] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
|
||||
[138] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
|
||||
[139] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
|
||||
to:init_font_hex::@4
|
||||
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
|
||||
[130] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[131] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[132] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[133] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[134] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[135] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[136] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
[140] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
|
||||
[141] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
|
||||
[142] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
|
||||
[143] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
|
||||
[144] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
|
||||
[145] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
|
||||
[146] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
|
||||
to:init_font_hex::@5
|
||||
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
|
||||
[137] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[138] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[139] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
[147] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
|
||||
[148] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
|
||||
[149] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
|
||||
to:init_font_hex::@return
|
||||
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
|
||||
[140] return
|
||||
[150] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -32,10 +32,10 @@
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
|
||||
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:15 4.0
|
||||
(signed word~) atan2_16::$2 $2 zp ZP_WORD:16 4.0
|
||||
(byte~) atan2_16::$23 reg byte a 2002.0
|
||||
(byte~) atan2_16::$24 reg byte a 2002.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:17 4.0
|
||||
(signed word~) atan2_16::$7 $7 zp ZP_WORD:18 4.0
|
||||
(label) atan2_16::@1
|
||||
(label) atan2_16::@10
|
||||
(label) atan2_16::@11
|
||||
@ -44,7 +44,12 @@
|
||||
(label) atan2_16::@14
|
||||
(label) atan2_16::@15
|
||||
(label) atan2_16::@16
|
||||
(label) atan2_16::@17
|
||||
(label) atan2_16::@18
|
||||
(label) atan2_16::@19
|
||||
(label) atan2_16::@2
|
||||
(label) atan2_16::@20
|
||||
(label) atan2_16::@21
|
||||
(label) atan2_16::@3
|
||||
(label) atan2_16::@4
|
||||
(label) atan2_16::@5
|
||||
@ -56,7 +61,7 @@
|
||||
(word) atan2_16::angle
|
||||
(word) atan2_16::angle#1 angle zp ZP_WORD:20 3.0
|
||||
(word) atan2_16::angle#11 angle zp ZP_WORD:20 4.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:20 364.0
|
||||
(word) atan2_16::angle#12 angle zp ZP_WORD:20 190.66666666666666
|
||||
(word) atan2_16::angle#13 angle zp ZP_WORD:20 1334.6666666666667
|
||||
(word) atan2_16::angle#2 angle zp ZP_WORD:20 2002.0
|
||||
(word) atan2_16::angle#3 angle zp ZP_WORD:20 2002.0
|
||||
@ -64,38 +69,50 @@
|
||||
(word) atan2_16::angle#5 angle zp ZP_WORD:20 4.0
|
||||
(word) atan2_16::angle#6 angle zp ZP_WORD:20 2004.0
|
||||
(byte) atan2_16::i
|
||||
(byte) atan2_16::i#1 i zp ZP_BYTE:19 1501.5
|
||||
(byte) atan2_16::i#2 i zp ZP_BYTE:19 429.0
|
||||
(byte) atan2_16::i#1 reg byte x 1501.5
|
||||
(byte) atan2_16::i#2 reg byte x 208.54166666666669
|
||||
(word) atan2_16::return
|
||||
(word) atan2_16::return#0 return zp ZP_WORD:20 34.99999999999999
|
||||
(word) atan2_16::return#2 return zp ZP_WORD:20 202.0
|
||||
(byte) atan2_16::shift
|
||||
(byte) atan2_16::shift#1 reg byte y 20002.0
|
||||
(byte) atan2_16::shift#2 reg byte y 8001.25
|
||||
(byte~) atan2_16::shift#5 reg byte y 667.3333333333334
|
||||
(signed word) atan2_16::x
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:35 3.8928571428571437
|
||||
(signed word) atan2_16::x#0 x zp ZP_WORD:39 2.8684210526315796
|
||||
(signed word) atan2_16::xd
|
||||
(signed word) atan2_16::xd#0 xd zp ZP_WORD:40 600.5999999999999
|
||||
(signed word) atan2_16::xd#1 xd zp ZP_WORD:24 6667.333333333333
|
||||
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:24 1001.0
|
||||
(signed word) atan2_16::xd#2 xd zp ZP_WORD:24 1001.0
|
||||
(signed word) atan2_16::xd#3 xd zp ZP_WORD:24 7668.333333333332
|
||||
(signed word) atan2_16::xd#5 xd zp ZP_WORD:24 1001.0
|
||||
(signed word) atan2_16::xi
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:17 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:17 500.5
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:17 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:17 801.2
|
||||
(signed word) atan2_16::xi#7 xi zp ZP_WORD:17 1001.0
|
||||
(signed word~) atan2_16::xi#8 xi zp ZP_WORD:17 4.0
|
||||
(signed word) atan2_16::xi#0 xi zp ZP_WORD:18 6.0
|
||||
(signed word) atan2_16::xi#1 xi zp ZP_WORD:18 500.5
|
||||
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:18 4.0
|
||||
(signed word) atan2_16::xi#2 xi zp ZP_WORD:18 500.5
|
||||
(signed word) atan2_16::xi#3 xi zp ZP_WORD:18 267.0666666666667
|
||||
(signed word) atan2_16::xi#8 xi zp ZP_WORD:18 1001.0
|
||||
(signed word) atan2_16::y
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:37 3.633333333333334
|
||||
(signed word) atan2_16::y#0 y zp ZP_WORD:41 2.724999999999999
|
||||
(signed word) atan2_16::yd
|
||||
(signed word) atan2_16::yd#0 yd zp ZP_WORD:42 1501.5
|
||||
(signed word) atan2_16::yd#1 yd zp ZP_WORD:22 10001.0
|
||||
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:22 2002.0
|
||||
(signed word) atan2_16::yd#2 yd zp ZP_WORD:22 2002.0
|
||||
(signed word) atan2_16::yd#3 yd zp ZP_WORD:22 4601.0
|
||||
(signed word) atan2_16::yd#5 yd zp ZP_WORD:22 2002.0
|
||||
(signed word) atan2_16::yi
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:15 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:15 667.3333333333334
|
||||
(signed word~) atan2_16::yi#11 yi zp ZP_WORD:15 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:15 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:15 858.2857142857142
|
||||
(signed word) atan2_16::yi#7 yi zp ZP_WORD:15 1001.0
|
||||
(signed word) atan2_16::yi#0 yi zp ZP_WORD:16 1.2000000000000002
|
||||
(signed word) atan2_16::yi#1 yi zp ZP_WORD:16 667.3333333333334
|
||||
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:16 4.0
|
||||
(signed word) atan2_16::yi#2 yi zp ZP_WORD:16 667.3333333333334
|
||||
(signed word) atan2_16::yi#3 yi zp ZP_WORD:16 353.4117647058823
|
||||
(signed word) atan2_16::yi#8 yi zp ZP_WORD:16 1001.0
|
||||
(dword()) clock()
|
||||
(label) clock::@return
|
||||
(dword) clock::return
|
||||
(dword) clock::return#0 return zp ZP_DWORD:31 1.3333333333333333
|
||||
(dword) clock::return#2 return zp ZP_DWORD:31 4.0
|
||||
(dword) clock::return#0 return zp ZP_DWORD:35 1.3333333333333333
|
||||
(dword) clock::return#2 return zp ZP_DWORD:35 4.0
|
||||
(void()) clock_start()
|
||||
(label) clock_start::@return
|
||||
(void()) init_angle_screen((byte*) init_angle_screen::screen)
|
||||
@ -112,7 +129,7 @@
|
||||
(label) init_angle_screen::@4
|
||||
(label) init_angle_screen::@return
|
||||
(byte) init_angle_screen::ang_w
|
||||
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:39 72.14285714285714
|
||||
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:43 72.14285714285714
|
||||
(word) init_angle_screen::angle_w
|
||||
(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:20 202.0
|
||||
(byte*) init_angle_screen::screen
|
||||
@ -123,18 +140,18 @@
|
||||
(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:10 5.5
|
||||
(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:10 9.333333333333334
|
||||
(byte) init_angle_screen::x
|
||||
(byte) init_angle_screen::x#1 reg byte x 101.0
|
||||
(byte) init_angle_screen::x#2 reg byte x 25.25
|
||||
(byte) init_angle_screen::x#1 x zp ZP_BYTE:14 101.0
|
||||
(byte) init_angle_screen::x#2 x zp ZP_BYTE:14 25.25
|
||||
(byte) init_angle_screen::xb
|
||||
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:14 101.0
|
||||
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:14 19.238095238095237
|
||||
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:15 101.0
|
||||
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:15 19.238095238095237
|
||||
(signed word) init_angle_screen::xw
|
||||
(word) init_angle_screen::xw#0 xw zp ZP_WORD:35 33.666666666666664
|
||||
(word) init_angle_screen::xw#0 xw zp ZP_WORD:39 33.666666666666664
|
||||
(byte) init_angle_screen::y
|
||||
(byte) init_angle_screen::y#1 y zp ZP_BYTE:9 16.5
|
||||
(byte) init_angle_screen::y#4 y zp ZP_BYTE:9 4.730769230769231
|
||||
(signed word) init_angle_screen::yw
|
||||
(word) init_angle_screen::yw#0 yw zp ZP_WORD:37 50.5
|
||||
(word) init_angle_screen::yw#0 yw zp ZP_WORD:41 50.5
|
||||
(void()) init_font_hex((byte*) init_font_hex::charset)
|
||||
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:44 1001.0
|
||||
(byte~) init_font_hex::$1 reg byte a 2002.0
|
||||
@ -146,30 +163,30 @@
|
||||
(label) init_font_hex::@5
|
||||
(label) init_font_hex::@return
|
||||
(byte) init_font_hex::c
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:24 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053
|
||||
(byte) init_font_hex::c#1 c zp ZP_BYTE:28 16.5
|
||||
(byte) init_font_hex::c#6 c zp ZP_BYTE:28 1.1578947368421053
|
||||
(byte) init_font_hex::c1
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667
|
||||
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:33 151.5
|
||||
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:33 13.466666666666667
|
||||
(byte*) init_font_hex::charset
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 22.0
|
||||
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:29 35.5
|
||||
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:29 108.35714285714285
|
||||
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:29 22.0
|
||||
(byte) init_font_hex::i
|
||||
(byte) init_font_hex::i#1 reg byte x 1501.5
|
||||
(byte) init_font_hex::i#2 reg byte x 667.3333333333334
|
||||
(byte) init_font_hex::idx
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:30 551.0
|
||||
(byte) init_font_hex::idx#2 idx zp ZP_BYTE:34 551.0
|
||||
(byte) init_font_hex::idx#3 reg byte y 202.0
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999
|
||||
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:34 600.5999999999999
|
||||
(byte*) init_font_hex::proto_hi
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334
|
||||
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:26 7.333333333333333
|
||||
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:26 56.83333333333334
|
||||
(byte*) init_font_hex::proto_lo
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155
|
||||
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:31 50.5
|
||||
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:31 92.53846153846155
|
||||
(void()) main()
|
||||
(dword~) main::$4 $4 zp ZP_DWORD:31 4.0
|
||||
(dword~) main::$4 $4 zp ZP_DWORD:35 4.0
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
@ -181,7 +198,7 @@
|
||||
(byte*) main::BASE_SCREEN
|
||||
(const byte*) main::BASE_SCREEN#0 BASE_SCREEN = (byte*) 1024
|
||||
(dword) main::cyclecount
|
||||
(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:31 4.0
|
||||
(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:35 4.0
|
||||
(label) main::toD0181
|
||||
(word~) main::toD0181_$0
|
||||
(number~) main::toD0181_$1
|
||||
@ -238,7 +255,7 @@
|
||||
(label) print_dword_at::@return
|
||||
(byte*) print_dword_at::at
|
||||
(dword) print_dword_at::dw
|
||||
(dword) print_dword_at::dw#0 dw zp ZP_DWORD:31 2.0
|
||||
(dword) print_dword_at::dw#0 dw zp ZP_DWORD:35 2.0
|
||||
(byte[]) print_hextab
|
||||
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
|
||||
(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at)
|
||||
@ -259,33 +276,34 @@ zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ]
|
||||
zp ZP_BYTE:9 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
|
||||
zp ZP_WORD:10 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
|
||||
zp ZP_WORD:12 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ]
|
||||
reg byte x [ init_angle_screen::x#2 init_angle_screen::x#1 ]
|
||||
zp ZP_BYTE:14 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
|
||||
zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#7 atan2_16::yi#0 atan2_16::yi#11 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#7 atan2_16::xi#0 atan2_16::xi#8 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_BYTE:14 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
|
||||
zp ZP_BYTE:15 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
|
||||
zp ZP_WORD:16 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
|
||||
zp ZP_WORD:18 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
|
||||
reg byte x [ atan2_16::i#2 atan2_16::i#1 ]
|
||||
zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$10 ]
|
||||
zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
|
||||
zp ZP_WORD:22 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
|
||||
zp ZP_WORD:24 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
|
||||
zp ZP_WORD:26 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
|
||||
zp ZP_BYTE:28 [ init_font_hex::c#6 init_font_hex::c#1 ]
|
||||
zp ZP_WORD:29 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
|
||||
zp ZP_WORD:31 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
|
||||
zp ZP_BYTE:33 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
|
||||
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
|
||||
zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_DWORD:31 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ]
|
||||
zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
|
||||
zp ZP_DWORD:35 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ]
|
||||
reg byte a [ print_byte_at::$0 ]
|
||||
reg byte y [ print_byte_at::$2 ]
|
||||
reg byte a [ init_angle_screen::$2 ]
|
||||
reg byte a [ init_angle_screen::$3 ]
|
||||
zp ZP_WORD:35 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
||||
zp ZP_WORD:39 [ init_angle_screen::xw#0 atan2_16::x#0 ]
|
||||
reg byte a [ init_angle_screen::$6 ]
|
||||
zp ZP_WORD:37 [ init_angle_screen::yw#0 atan2_16::y#0 ]
|
||||
zp ZP_BYTE:39 [ init_angle_screen::ang_w#0 ]
|
||||
zp ZP_WORD:41 [ init_angle_screen::yw#0 atan2_16::y#0 ]
|
||||
zp ZP_BYTE:43 [ init_angle_screen::ang_w#0 ]
|
||||
reg byte a [ init_angle_screen::$12 ]
|
||||
reg byte a [ init_angle_screen::$13 ]
|
||||
reg byte a [ init_angle_screen::$14 ]
|
||||
zp ZP_WORD:40 [ atan2_16::xd#0 ]
|
||||
zp ZP_WORD:42 [ atan2_16::yd#0 ]
|
||||
reg byte a [ atan2_16::$24 ]
|
||||
reg byte a [ atan2_16::$23 ]
|
||||
zp ZP_BYTE:44 [ init_font_hex::$0 ]
|
||||
|
Loading…
Reference in New Issue
Block a user