mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-02-11 16:30:56 +00:00
Updated to use new array initialization by kickasm.
This commit is contained in:
parent
cc08edb0e4
commit
cb81fc07f6
@ -4,20 +4,18 @@
|
||||
import "c64"
|
||||
import "string"
|
||||
|
||||
byte* MEDUSA_SCREEN = 0x1000;
|
||||
byte* MEDUSA_COLORS = 0x1400;
|
||||
|
||||
byte* SCREEN = 0x0400;
|
||||
|
||||
kickasm(pc MEDUSA_SCREEN, resource "medusas.prg" ) {{
|
||||
byte[1000] MEDUSA_SCREEN = kickasm(resource "medusas.prg" ) {{
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
}};
|
||||
|
||||
kickasm(pc MEDUSA_COLORS, resource "medusac.prg" ) {{
|
||||
|
||||
byte[] MEDUSA_COLORS = kickasm(resource "medusac.prg" ) {{
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
}};
|
||||
|
||||
byte* SCREEN = 0x0400;
|
||||
|
||||
void main() {
|
||||
*BGCOL = BLACK;
|
||||
|
@ -1,16 +1,13 @@
|
||||
import "tetris-sprites"
|
||||
|
||||
byte* SIN = $1400;
|
||||
|
||||
byte* SIN_SPRITE = $2800;
|
||||
|
||||
kickasm(pc SIN) {{
|
||||
byte[256] SIN = kickasm {{
|
||||
.var AMPL = 200-21
|
||||
.for(var i=0; i<256; i++) {
|
||||
.byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
|
||||
}
|
||||
}}
|
||||
}};
|
||||
|
||||
byte* SIN_SPRITE = $2800;
|
||||
kickasm(pc SIN_SPRITE) {{
|
||||
.fill $40, $ff
|
||||
}}
|
||||
|
@ -389,25 +389,22 @@ void rotate_matrix(signed byte x, signed byte y, signed byte z) {
|
||||
|
||||
// mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
|
||||
// f(x) = >(( x * x ))
|
||||
byte* mulf_sqr1 = $2400;
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
byte* mulf_sqr2 = $2600;
|
||||
|
||||
kickasm(pc mulf_sqr1) {{
|
||||
byte[0x200] align(0x100) mulf_sqr1 = kickasm {{
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
}}
|
||||
}};
|
||||
|
||||
kickasm(pc mulf_sqr2) {{
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
byte[0x200] align(0x100) mulf_sqr2 = kickasm {{
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
}}
|
||||
}};
|
||||
|
||||
/*
|
||||
// Multiplication tables for seriously fast multiplication.
|
||||
@ -454,9 +451,7 @@ kickasm(pc SPRITE, resource "balloon.png") {{
|
||||
}}
|
||||
|
||||
// Perspective multiplication table containing (d/(z0-z)[z] for each z-value
|
||||
signed byte* PERSP_Z = $2800;
|
||||
|
||||
kickasm(pc PERSP_Z) {{
|
||||
signed byte[0x100] align(0x100) PERSP_Z = kickasm {{
|
||||
{
|
||||
.var d = 256.0
|
||||
.var z0 = 6.0
|
||||
@ -469,17 +464,12 @@ kickasm(pc PERSP_Z) {{
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
}};
|
||||
|
||||
// Sine and Cosine Tables
|
||||
// Angles: $00=0, $80=PI,$100=2*PI
|
||||
// Half Sine/Cosine: signed fixed [-$20;20]
|
||||
signed byte* SINH = $2000;
|
||||
signed byte* COSH = SINH+$40; // sin(x) = cos(x+PI/2)
|
||||
// Quarter Sine/Cosine: signed fixed [-$10,$10]
|
||||
signed byte* SINQ = $2200;
|
||||
signed byte* COSQ = SINQ+$40; // sin(x) = cos(x+PI/2)
|
||||
kickasm(pc SINH) {{
|
||||
signed byte[0x140] align(0x40) SINH = kickasm {{
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
@ -489,8 +479,11 @@ kickasm(pc SINH) {{
|
||||
.byte round((min+(ampl/2)+(ampl/2)*sin(rad))/256)
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(pc SINQ) {{
|
||||
}};
|
||||
signed byte* COSH = SINH+$40; // sin(x) = cos(x+PI/2)
|
||||
|
||||
// Quarter Sine/Cosine: signed fixed [-$10,$10]
|
||||
signed byte[0x140] align(0x40) SINQ = kickasm {{
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
@ -500,62 +493,62 @@ kickasm(pc SINQ) {{
|
||||
.byte round((min+(ampl/2)+(ampl/2)*sin(rad))/256)
|
||||
}
|
||||
}
|
||||
}}
|
||||
}};
|
||||
signed byte* COSQ = SINQ+$40; // sin(x) = cos(x+PI/2)
|
||||
|
||||
// 16 bit Sine and Cosine Tables
|
||||
// Angles: $00=0, $80=PI,$100=2*PI
|
||||
// Half Sine/Cosine: signed fixed [-$1f,$1f]
|
||||
byte* SINH_LO = $4000;
|
||||
byte[0x140] align(0x40) SINH_LO = kickasm {{
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}};
|
||||
byte* COSH_LO = SINH_LO+$40; // sin(x) = cos(x+PI/2)
|
||||
byte* SINH_HI = $4200;
|
||||
byte* COSH_HI = SINH_HI+$40; // sin(x) = cos(x+PI/2)
|
||||
// Quarter Sine/Cosine: signed fixed [-$0f,$0f]
|
||||
byte* SINQ_LO = $4400;
|
||||
byte* COSQ_LO = SINQ_LO+$40; // sin(x) = cos(x+PI/2)
|
||||
byte* SINQ_HI = $4600;
|
||||
byte* COSQ_HI = SINQ_HI+$40; // sin(x) = cos(x+PI/2)
|
||||
kickasm(pc SINH_LO) {{
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(pc SINH_HI) {{
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(pc SINQ_LO) {{
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(pc SINQ_HI) {{
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
byte[0x140] align(0x40) SINH_HI = kickasm {{
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}};
|
||||
byte* COSH_HI = SINH_HI+$40; // sin(x) = cos(x+PI/2)
|
||||
|
||||
// Quarter Sine/Cosine: signed fixed [-$0f,$0f]
|
||||
byte[0x140] align(0x40) SINQ_LO = kickasm {{
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}};
|
||||
byte* COSQ_LO = SINQ_LO+$40; // sin(x) = cos(x+PI/2)
|
||||
|
||||
byte[0x140] align(0x40) SINQ_HI = kickasm {{
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}};
|
||||
byte* COSQ_HI = SINQ_HI+$40; // sin(x) = cos(x+PI/2)
|
||||
|
||||
|
@ -71,22 +71,20 @@ signed byte fmul8(signed byte a, signed byte b) {
|
||||
|
||||
// mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
|
||||
// f(x) = >(( x * x ))
|
||||
byte* mulf_sqr1 = $2000;
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
byte* mulf_sqr2 = $2200;
|
||||
|
||||
kickasm(pc mulf_sqr1) {{
|
||||
byte[0x200] align(0x100) mulf_sqr1 = kickasm {{
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
}}
|
||||
}};
|
||||
|
||||
kickasm(pc mulf_sqr2) {{
|
||||
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
byte[0x200] align(0x100) mulf_sqr2 = kickasm {{
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
}}
|
||||
}};
|
@ -12,13 +12,11 @@ const word SIN_SIZE = 512;
|
||||
|
||||
signed word[512] align($100) sin;
|
||||
|
||||
signed word* sin2 = $1400;
|
||||
|
||||
kickasm(pc sin2) {{
|
||||
signed word[512] sin2 = kickasm {{
|
||||
.for(var i=0; i<512; i++) {
|
||||
.word sin(toRadians([i*360]/512))*320
|
||||
}
|
||||
}}
|
||||
}};
|
||||
|
||||
void main() {
|
||||
asm { sei } // Disable normal interrupt
|
||||
|
@ -8,8 +8,6 @@
|
||||
.label COLS = $d800
|
||||
// The colors of the C64
|
||||
.const BLACK = 0
|
||||
.label MEDUSA_SCREEN = $1000
|
||||
.label MEDUSA_COLORS = $1400
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
lda #BLACK
|
||||
@ -76,11 +74,11 @@ memcpy: {
|
||||
!:
|
||||
jmp b1
|
||||
}
|
||||
.pc = MEDUSA_SCREEN "MEDUSA_SCREEN"
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
MEDUSA_SCREEN:
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
|
||||
.pc = MEDUSA_COLORS "MEDUSA_COLORS"
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
MEDUSA_COLORS:
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
|
||||
|
@ -2,47 +2,39 @@
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
kickasm(location (const byte*) MEDUSA_SCREEN#0) {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
kickasm(location (const byte*) MEDUSA_COLORS#0) {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[3] phi()
|
||||
[4] call main
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
[5] phi()
|
||||
main: scope:[main] from @2
|
||||
[6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
|
||||
[7] call memcpy
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
|
||||
[5] call memcpy
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main
|
||||
[8] phi()
|
||||
[9] call memcpy
|
||||
[6] phi()
|
||||
[7] call memcpy
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@1 main::@2
|
||||
[10] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e
|
||||
[8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e
|
||||
to:main::@1
|
||||
memcpy: scope:[memcpy] from main main::@2
|
||||
[11] (void*) memcpy::destination#2 ← phi( main/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) COLS#0 )
|
||||
[11] (void*) memcpy::source#2 ← phi( main/(void*)(const byte*) MEDUSA_SCREEN#0 main::@2/(void*)(const byte*) MEDUSA_COLORS#0 )
|
||||
[12] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8
|
||||
[13] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
[14] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
[9] (void*) memcpy::destination#2 ← phi( main/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) COLS#0 )
|
||||
[9] (void*) memcpy::source#2 ← phi( main/(void*)(const byte[$3e8]) MEDUSA_SCREEN#0 main::@2/(void*)(const byte[]) MEDUSA_COLORS#0 )
|
||||
[10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8
|
||||
[11] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
[12] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
to:memcpy::@1
|
||||
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
|
||||
[15] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*~) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
|
||||
[15] (byte*) memcpy::src#2 ← phi( memcpy/(byte*~) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
|
||||
[16] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
|
||||
[13] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*~) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
|
||||
[13] (byte*) memcpy::src#2 ← phi( memcpy/(byte*~) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
|
||||
[14] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
|
||||
to:memcpy::@return
|
||||
memcpy::@return: scope:[memcpy] from memcpy::@1
|
||||
[17] return
|
||||
[15] return
|
||||
to:@return
|
||||
memcpy::@2: scope:[memcpy] from memcpy::@1
|
||||
[18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
|
||||
[19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
|
||||
[20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
|
||||
[16] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
|
||||
[17] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
|
||||
[18] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
|
||||
to:memcpy::@1
|
||||
|
@ -45,16 +45,12 @@ Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWA
|
||||
Adding pointer type conversion cast to void pointer (byte*) memcpy::source in (byte*) memcpy::src ← (void*) memcpy::source
|
||||
Adding pointer type conversion cast to void pointer (byte*) memcpy::destination in (byte*) memcpy::dst ← (void*) memcpy::destination
|
||||
Adding pointer type conversion cast to void pointer (byte*) memset::str in (byte*) memset::dst ← (void*) memset::str
|
||||
Adding pointer type conversion cast (byte*) MEDUSA_SCREEN in (byte*) MEDUSA_SCREEN ← (number) $1000
|
||||
Adding pointer type conversion cast (byte*) MEDUSA_COLORS in (byte*) MEDUSA_COLORS ← (number) $1400
|
||||
Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400
|
||||
Adding void pointer type conversion cast (void*) SCREEN in (void*~) main::$0 ← call memcpy (byte*) SCREEN (byte*) MEDUSA_SCREEN (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) MEDUSA_SCREEN in (void*~) main::$0 ← call memcpy (void*)(byte*) SCREEN (byte*) MEDUSA_SCREEN (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) COLS in (void*~) main::$1 ← call memcpy (byte*) COLS (byte*) MEDUSA_COLORS (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) MEDUSA_COLORS in (void*~) main::$1 ← call memcpy (void*)(byte*) COLS (byte*) MEDUSA_COLORS (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) SCREEN in (void*~) main::$0 ← call memcpy (byte*) SCREEN (byte[$3e8]) MEDUSA_SCREEN (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) MEDUSA_SCREEN in (void*~) main::$0 ← call memcpy (void*)(byte*) SCREEN (byte[$3e8]) MEDUSA_SCREEN (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) COLS in (void*~) main::$1 ← call memcpy (byte*) COLS (byte[]) MEDUSA_COLORS (number) $3e8
|
||||
Adding void pointer type conversion cast (void*) MEDUSA_COLORS in (void*~) main::$1 ← call memcpy (void*)(byte*) COLS (byte[]) MEDUSA_COLORS (number) $3e8
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
|
||||
Identified constant variable (byte*) MEDUSA_SCREEN
|
||||
Identified constant variable (byte*) MEDUSA_COLORS
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
||||
Culled Empty Block (label) @1
|
||||
@ -116,27 +112,25 @@ memcpy::@return: scope:[memcpy] from memcpy::@3
|
||||
return
|
||||
to:@return
|
||||
@8: scope:[] from @begin
|
||||
(byte*) MEDUSA_SCREEN#0 ← ((byte*)) (number) $1000
|
||||
(byte*) MEDUSA_COLORS#0 ← ((byte*)) (number) $1400
|
||||
(byte*) SCREEN#0 ← ((byte*)) (number) $400
|
||||
kickasm(location (byte*) MEDUSA_SCREEN#0) {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
(byte[$3e8]) MEDUSA_SCREEN#0 ← kickasm {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
kickasm(location (byte*) MEDUSA_COLORS#0) {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
(byte[]) MEDUSA_COLORS#0 ← kickasm {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
(byte*) SCREEN#0 ← ((byte*)) (number) $400
|
||||
to:@9
|
||||
main: scope:[main] from @9
|
||||
*((byte*) BGCOL#0) ← (byte) BLACK#0
|
||||
(void*) memcpy::destination#0 ← (void*)(byte*) SCREEN#0
|
||||
(void*) memcpy::source#0 ← (void*)(byte*) MEDUSA_SCREEN#0
|
||||
(void*) memcpy::source#0 ← (void*)(byte[$3e8]) MEDUSA_SCREEN#0
|
||||
(word) memcpy::num#0 ← (number) $3e8
|
||||
call memcpy
|
||||
(void*) memcpy::return#2 ← (void*) memcpy::return#1
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main
|
||||
(void*) memcpy::destination#1 ← (void*)(byte*) COLS#0
|
||||
(void*) memcpy::source#1 ← (void*)(byte*) MEDUSA_COLORS#0
|
||||
(void*) memcpy::source#1 ← (void*)(byte[]) MEDUSA_COLORS#0
|
||||
(word) memcpy::num#1 ← (number) $3e8
|
||||
call memcpy
|
||||
(void*) memcpy::return#3 ← (void*) memcpy::return#1
|
||||
@ -172,10 +166,10 @@ SYMBOL TABLE SSA
|
||||
(byte) BLACK#0
|
||||
(byte*) COLS
|
||||
(byte*) COLS#0
|
||||
(byte*) MEDUSA_COLORS
|
||||
(byte*) MEDUSA_COLORS#0
|
||||
(byte*) MEDUSA_SCREEN
|
||||
(byte*) MEDUSA_SCREEN#0
|
||||
(byte[]) MEDUSA_COLORS
|
||||
(byte[]) MEDUSA_COLORS#0
|
||||
(byte[$3e8]) MEDUSA_SCREEN
|
||||
(byte[$3e8]) MEDUSA_SCREEN#0
|
||||
(byte*) SCREEN
|
||||
(byte*) SCREEN#0
|
||||
(void()) main()
|
||||
@ -241,8 +235,6 @@ Inlining cast (byte) BLACK#0 ← (unumber)(number) 0
|
||||
Inlining cast (byte*) memcpy::src#0 ← (byte*)(void*) memcpy::source#2
|
||||
Inlining cast (byte*) memcpy::dst#0 ← (byte*)(void*) memcpy::destination#2
|
||||
Inlining cast (byte*~) memcpy::$0 ← (byte*)(void*) memcpy::source#2
|
||||
Inlining cast (byte*) MEDUSA_SCREEN#0 ← (byte*)(number) $1000
|
||||
Inlining cast (byte*) MEDUSA_COLORS#0 ← (byte*)(number) $1400
|
||||
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
|
||||
Inlining cast (word) memcpy::num#0 ← (unumber)(number) $3e8
|
||||
Inlining cast (word) memcpy::num#1 ← (unumber)(number) $3e8
|
||||
@ -250,8 +242,6 @@ Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant pointer cast (byte*) 53281
|
||||
Simplifying constant pointer cast (byte*) 55296
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant pointer cast (byte*) 4096
|
||||
Simplifying constant pointer cast (byte*) 5120
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Simplifying constant integer cast $3e8
|
||||
Simplifying constant integer cast $3e8
|
||||
@ -281,25 +271,29 @@ Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant (const byte*) BGCOL#0 = (byte*) 53281
|
||||
Constant (const byte*) COLS#0 = (byte*) 55296
|
||||
Constant (const byte) BLACK#0 = 0
|
||||
Constant (const byte*) MEDUSA_SCREEN#0 = (byte*) 4096
|
||||
Constant (const byte*) MEDUSA_COLORS#0 = (byte*) 5120
|
||||
Constant (const byte[$3e8]) MEDUSA_SCREEN#0 = kickasm {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
Constant (const byte[]) MEDUSA_COLORS#0 = kickasm {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
Constant (const byte*) SCREEN#0 = (byte*) 1024
|
||||
Constant (const word) memcpy::num#0 = $3e8
|
||||
Constant (const word) memcpy::num#1 = $3e8
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Constant value identified (void*)SCREEN#0 in [27] (void*) memcpy::destination#0 ← (void*)(const byte*) SCREEN#0
|
||||
Constant value identified (void*)MEDUSA_SCREEN#0 in [28] (void*) memcpy::source#0 ← (void*)(const byte*) MEDUSA_SCREEN#0
|
||||
Constant value identified (void*)COLS#0 in [32] (void*) memcpy::destination#1 ← (void*)(const byte*) COLS#0
|
||||
Constant value identified (void*)MEDUSA_COLORS#0 in [33] (void*) memcpy::source#1 ← (void*)(const byte*) MEDUSA_COLORS#0
|
||||
Constant value identified (void*)SCREEN#0 in [25] (void*) memcpy::destination#0 ← (void*)(const byte*) SCREEN#0
|
||||
Constant value identified (void*)MEDUSA_SCREEN#0 in [26] (void*) memcpy::source#0 ← (void*)(const byte[$3e8]) MEDUSA_SCREEN#0
|
||||
Constant value identified (void*)COLS#0 in [30] (void*) memcpy::destination#1 ← (void*)(const byte*) COLS#0
|
||||
Constant value identified (void*)MEDUSA_COLORS#0 in [31] (void*) memcpy::source#1 ← (void*)(const byte[]) MEDUSA_COLORS#0
|
||||
Successful SSA optimization Pass2ConstantValues
|
||||
if() condition always true - replacing block destination [37] if(true) goto main::@2
|
||||
if() condition always true - replacing block destination [35] if(true) goto main::@2
|
||||
Successful SSA optimization Pass2ConstantIfs
|
||||
Eliminating unused variable (void*) memcpy::return#2 and assignment [17] (void*) memcpy::return#2 ← (void*) memcpy::destination#2
|
||||
Eliminating unused variable (void*) memcpy::return#3 and assignment [21] (void*) memcpy::return#3 ← (void*) memcpy::destination#2
|
||||
Eliminating unused variable (void*) memcpy::return#2 and assignment [15] (void*) memcpy::return#2 ← (void*) memcpy::destination#2
|
||||
Eliminating unused variable (void*) memcpy::return#3 and assignment [19] (void*) memcpy::return#3 ← (void*) memcpy::destination#2
|
||||
Successful SSA optimization PassNEliminateUnusedVars
|
||||
Removing unused block main::@return
|
||||
Successful SSA optimization Pass2EliminateUnusedBlocks
|
||||
Constant right-side identified [20] (byte*~) main::$2 ← (const byte*) SCREEN#0 + (word) $3e7
|
||||
Constant right-side identified [18] (byte*~) main::$2 ← (const byte*) SCREEN#0 + (word) $3e7
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Constant (const void*) memcpy::destination#0 = (void*)SCREEN#0
|
||||
Constant (const void*) memcpy::source#0 = (void*)MEDUSA_SCREEN#0
|
||||
@ -319,15 +313,16 @@ Inlining constant with var siblings (const void*) memcpy::destination#1
|
||||
Inlining constant with var siblings (const void*) memcpy::source#1
|
||||
Constant inlined memcpy::num#1 = (word) $3e8
|
||||
Constant inlined memcpy::num#0 = (word) $3e8
|
||||
Constant inlined memcpy::source#1 = (void*)(const byte*) MEDUSA_COLORS#0
|
||||
Constant inlined memcpy::source#1 = (void*)(const byte[]) MEDUSA_COLORS#0
|
||||
Constant inlined main::$2 = (const byte*) SCREEN#0+(word) $3e7
|
||||
Constant inlined memcpy::destination#0 = (void*)(const byte*) SCREEN#0
|
||||
Constant inlined memcpy::destination#1 = (void*)(const byte*) COLS#0
|
||||
Constant inlined memcpy::source#0 = (void*)(const byte*) MEDUSA_SCREEN#0
|
||||
Constant inlined memcpy::source#0 = (void*)(const byte[$3e8]) MEDUSA_SCREEN#0
|
||||
Successful SSA optimization Pass2ConstantInlining
|
||||
Identical Phi Values (word) memcpy::num#2 (word) $3e8
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @8
|
||||
Adding NOP phi() at start of @9
|
||||
Adding NOP phi() at start of @10
|
||||
Adding NOP phi() at start of @end
|
||||
@ -336,23 +331,23 @@ Adding NOP phi() at start of main::@8
|
||||
Adding NOP phi() at start of main::@1
|
||||
Adding NOP phi() at start of memcpy::@3
|
||||
CALL GRAPH
|
||||
Calls in [] to main:4
|
||||
Calls in [main] to memcpy:8 memcpy:10
|
||||
Calls in [] to main:3
|
||||
Calls in [main] to memcpy:7 memcpy:9
|
||||
|
||||
Created 4 initial phi equivalence classes
|
||||
Coalesced [25] memcpy::src#5 ← memcpy::src#1
|
||||
Coalesced [26] memcpy::dst#5 ← memcpy::dst#1
|
||||
Coalesced [24] memcpy::src#5 ← memcpy::src#1
|
||||
Coalesced [25] memcpy::dst#5 ← memcpy::dst#1
|
||||
Coalesced down to 4 phi equivalence classes
|
||||
Culled Empty Block (label) @8
|
||||
Culled Empty Block (label) @10
|
||||
Culled Empty Block (label) main::@8
|
||||
Culled Empty Block (label) main::@1
|
||||
Culled Empty Block (label) memcpy::@3
|
||||
Renumbering block @8 to @1
|
||||
Renumbering block @9 to @2
|
||||
Renumbering block @9 to @1
|
||||
Renumbering block main::@2 to main::@1
|
||||
Renumbering block main::@7 to main::@2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@2
|
||||
|
||||
@ -361,49 +356,41 @@ FINAL CONTROL FLOW GRAPH
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
kickasm(location (const byte*) MEDUSA_SCREEN#0) {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
kickasm(location (const byte*) MEDUSA_COLORS#0) {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[3] phi()
|
||||
[4] call main
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
[5] phi()
|
||||
main: scope:[main] from @2
|
||||
[6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
|
||||
[7] call memcpy
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
|
||||
[5] call memcpy
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main
|
||||
[8] phi()
|
||||
[9] call memcpy
|
||||
[6] phi()
|
||||
[7] call memcpy
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@1 main::@2
|
||||
[10] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e
|
||||
[8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e
|
||||
to:main::@1
|
||||
memcpy: scope:[memcpy] from main main::@2
|
||||
[11] (void*) memcpy::destination#2 ← phi( main/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) COLS#0 )
|
||||
[11] (void*) memcpy::source#2 ← phi( main/(void*)(const byte*) MEDUSA_SCREEN#0 main::@2/(void*)(const byte*) MEDUSA_COLORS#0 )
|
||||
[12] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8
|
||||
[13] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
[14] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
[9] (void*) memcpy::destination#2 ← phi( main/(void*)(const byte*) SCREEN#0 main::@2/(void*)(const byte*) COLS#0 )
|
||||
[9] (void*) memcpy::source#2 ← phi( main/(void*)(const byte[$3e8]) MEDUSA_SCREEN#0 main::@2/(void*)(const byte[]) MEDUSA_COLORS#0 )
|
||||
[10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8
|
||||
[11] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
[12] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
to:memcpy::@1
|
||||
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
|
||||
[15] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*~) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
|
||||
[15] (byte*) memcpy::src#2 ← phi( memcpy/(byte*~) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
|
||||
[16] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
|
||||
[13] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*~) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
|
||||
[13] (byte*) memcpy::src#2 ← phi( memcpy/(byte*~) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
|
||||
[14] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
|
||||
to:memcpy::@return
|
||||
memcpy::@return: scope:[memcpy] from memcpy::@1
|
||||
[17] return
|
||||
[15] return
|
||||
to:@return
|
||||
memcpy::@2: scope:[memcpy] from memcpy::@1
|
||||
[18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
|
||||
[19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
|
||||
[20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
|
||||
[16] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
|
||||
[17] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
|
||||
[18] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
|
||||
to:memcpy::@1
|
||||
|
||||
|
||||
@ -411,8 +398,8 @@ VARIABLE REGISTER WEIGHTS
|
||||
(byte*) BGCOL
|
||||
(byte) BLACK
|
||||
(byte*) COLS
|
||||
(byte*) MEDUSA_COLORS
|
||||
(byte*) MEDUSA_SCREEN
|
||||
(byte[]) MEDUSA_COLORS
|
||||
(byte[$3e8]) MEDUSA_SCREEN
|
||||
(byte*) SCREEN
|
||||
(void()) main()
|
||||
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
|
||||
@ -465,76 +452,69 @@ INITIAL ASM
|
||||
.label COLS = $d800
|
||||
// The colors of the C64
|
||||
.const BLACK = 0
|
||||
.label MEDUSA_SCREEN = $1000
|
||||
.label MEDUSA_COLORS = $1400
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG4 @1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG5 kickasm(location (const byte*) MEDUSA_SCREEN#0) {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE) .fill fileScreen.getSize(), fileScreen.get(i) }}
|
||||
//SEG6 kickasm(location (const byte*) MEDUSA_COLORS#0) {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE) .fill fileCols.getSize(), fileCols.get(i) }}
|
||||
//SEG7 [3] phi from @1 to @2 [phi:@1->@2]
|
||||
b2_from_b1:
|
||||
jmp b2
|
||||
//SEG8 @2
|
||||
b2:
|
||||
//SEG9 [4] call main
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG10 [5] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG11 @end
|
||||
//SEG8 @end
|
||||
bend:
|
||||
//SEG12 main
|
||||
//SEG9 main
|
||||
main: {
|
||||
//SEG13 [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
|
||||
//SEG10 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
|
||||
lda #BLACK
|
||||
sta BGCOL
|
||||
//SEG14 [7] call memcpy
|
||||
//SEG15 [11] phi from main to memcpy [phi:main->memcpy]
|
||||
//SEG11 [5] call memcpy
|
||||
//SEG12 [9] phi from main to memcpy [phi:main->memcpy]
|
||||
memcpy_from_main:
|
||||
//SEG16 [11] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN#0 [phi:main->memcpy#0] -- pvoz1=pvoc1
|
||||
//SEG13 [9] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN#0 [phi:main->memcpy#0] -- pvoz1=pvoc1
|
||||
lda #<SCREEN
|
||||
sta memcpy.destination
|
||||
lda #>SCREEN
|
||||
sta memcpy.destination+1
|
||||
//SEG17 [11] phi (void*) memcpy::source#2 = (void*)(const byte*) MEDUSA_SCREEN#0 [phi:main->memcpy#1] -- pvoz1=pvoc1
|
||||
//SEG14 [9] phi (void*) memcpy::source#2 = (void*)(const byte[$3e8]) MEDUSA_SCREEN#0 [phi:main->memcpy#1] -- pvoz1=pvoc1
|
||||
lda #<MEDUSA_SCREEN
|
||||
sta memcpy.source
|
||||
lda #>MEDUSA_SCREEN
|
||||
sta memcpy.source+1
|
||||
jsr memcpy
|
||||
//SEG18 [8] phi from main to main::@2 [phi:main->main::@2]
|
||||
//SEG15 [6] phi from main to main::@2 [phi:main->main::@2]
|
||||
b2_from_main:
|
||||
jmp b2
|
||||
//SEG19 main::@2
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG20 [9] call memcpy
|
||||
//SEG21 [11] phi from main::@2 to memcpy [phi:main::@2->memcpy]
|
||||
//SEG17 [7] call memcpy
|
||||
//SEG18 [9] phi from main::@2 to memcpy [phi:main::@2->memcpy]
|
||||
memcpy_from_b2:
|
||||
//SEG22 [11] phi (void*) memcpy::destination#2 = (void*)(const byte*) COLS#0 [phi:main::@2->memcpy#0] -- pvoz1=pvoc1
|
||||
//SEG19 [9] phi (void*) memcpy::destination#2 = (void*)(const byte*) COLS#0 [phi:main::@2->memcpy#0] -- pvoz1=pvoc1
|
||||
lda #<COLS
|
||||
sta memcpy.destination
|
||||
lda #>COLS
|
||||
sta memcpy.destination+1
|
||||
//SEG23 [11] phi (void*) memcpy::source#2 = (void*)(const byte*) MEDUSA_COLORS#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1
|
||||
//SEG20 [9] phi (void*) memcpy::source#2 = (void*)(const byte[]) MEDUSA_COLORS#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1
|
||||
lda #<MEDUSA_COLORS
|
||||
sta memcpy.source
|
||||
lda #>MEDUSA_COLORS
|
||||
sta memcpy.source+1
|
||||
jsr memcpy
|
||||
jmp b1
|
||||
//SEG24 main::@1
|
||||
//SEG21 main::@1
|
||||
b1:
|
||||
//SEG25 [10] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e -- _deref_pbuc1=_deref_pbuc1_bxor_vbuc2
|
||||
//SEG22 [8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e -- _deref_pbuc1=_deref_pbuc1_bxor_vbuc2
|
||||
lda #$e
|
||||
eor SCREEN+$3e7
|
||||
sta SCREEN+$3e7
|
||||
jmp b1
|
||||
}
|
||||
//SEG26 memcpy
|
||||
//SEG23 memcpy
|
||||
// Copy block of memory (forwards)
|
||||
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
||||
// memcpy(void* zeropage(4) destination, void* zeropage(2) source)
|
||||
@ -544,7 +524,7 @@ memcpy: {
|
||||
.label src = 6
|
||||
.label source = 2
|
||||
.label destination = 4
|
||||
//SEG27 [12] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1
|
||||
//SEG24 [10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1
|
||||
lda source
|
||||
clc
|
||||
adc #<$3e8
|
||||
@ -552,25 +532,25 @@ memcpy: {
|
||||
lda source+1
|
||||
adc #>$3e8
|
||||
sta src_end+1
|
||||
//SEG28 [13] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 -- pbuz1=pbuz2
|
||||
//SEG25 [11] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 -- pbuz1=pbuz2
|
||||
lda source
|
||||
sta src
|
||||
lda source+1
|
||||
sta src+1
|
||||
//SEG29 [14] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 -- pbuz1=pbuz2
|
||||
//SEG26 [12] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 -- pbuz1=pbuz2
|
||||
lda destination
|
||||
sta dst
|
||||
lda destination+1
|
||||
sta dst+1
|
||||
//SEG30 [15] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
|
||||
//SEG27 [13] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
|
||||
b1_from_memcpy:
|
||||
b1_from_b2:
|
||||
//SEG31 [15] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
|
||||
//SEG32 [15] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
|
||||
//SEG28 [13] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
|
||||
//SEG29 [13] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
|
||||
jmp b1
|
||||
//SEG33 memcpy::@1
|
||||
//SEG30 memcpy::@1
|
||||
b1:
|
||||
//SEG34 [16] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
|
||||
//SEG31 [14] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
|
||||
lda src+1
|
||||
cmp src_end+1
|
||||
bne b2
|
||||
@ -578,47 +558,47 @@ memcpy: {
|
||||
cmp src_end
|
||||
bne b2
|
||||
jmp breturn
|
||||
//SEG35 memcpy::@return
|
||||
//SEG32 memcpy::@return
|
||||
breturn:
|
||||
//SEG36 [17] return
|
||||
//SEG33 [15] return
|
||||
rts
|
||||
//SEG37 memcpy::@2
|
||||
//SEG34 memcpy::@2
|
||||
b2:
|
||||
//SEG38 [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
|
||||
//SEG35 [16] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
|
||||
ldy #0
|
||||
lda (src),y
|
||||
ldy #0
|
||||
sta (dst),y
|
||||
//SEG39 [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
|
||||
//SEG36 [17] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
|
||||
inc dst
|
||||
bne !+
|
||||
inc dst+1
|
||||
!:
|
||||
//SEG40 [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
|
||||
//SEG37 [18] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
|
||||
inc src
|
||||
bne !+
|
||||
inc src+1
|
||||
!:
|
||||
jmp b1_from_b2
|
||||
}
|
||||
//SEG41 File Data
|
||||
.pc = MEDUSA_SCREEN "MEDUSA_SCREEN"
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
//SEG38 File Data
|
||||
MEDUSA_SCREEN:
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
|
||||
.pc = MEDUSA_COLORS "MEDUSA_COLORS"
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
MEDUSA_COLORS:
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:4 [ ] ) always clobbers reg byte a
|
||||
Statement [10] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e [ ] ( main:4 [ ] ) always clobbers reg byte a
|
||||
Statement [12] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:4::memcpy:7 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] main:4::memcpy:9 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ) always clobbers reg byte a
|
||||
Statement [13] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:4::memcpy:7 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] main:4::memcpy:9 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ) always clobbers reg byte a
|
||||
Statement [14] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ( main:4::memcpy:7 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] main:4::memcpy:9 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ) always clobbers reg byte a
|
||||
Statement [16] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:4::memcpy:7 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] main:4::memcpy:9 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ) always clobbers reg byte a
|
||||
Statement [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:4::memcpy:7 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] main:4::memcpy:9 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ) always clobbers reg byte a reg byte y
|
||||
Statement [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ( main:2::memcpy:5 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] main:2::memcpy:7 [ memcpy::source#2 memcpy::destination#2 memcpy::src_end#0 ] ) always clobbers reg byte a
|
||||
Statement [11] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ( main:2::memcpy:5 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] main:2::memcpy:7 [ memcpy::destination#2 memcpy::src_end#0 memcpy::src#4 ] ) always clobbers reg byte a
|
||||
Statement [12] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ( main:2::memcpy:5 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] main:2::memcpy:7 [ memcpy::src_end#0 memcpy::src#4 memcpy::dst#4 ] ) always clobbers reg byte a
|
||||
Statement [14] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:2::memcpy:5 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] main:2::memcpy:7 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ) always clobbers reg byte a
|
||||
Statement [16] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ( main:2::memcpy:5 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] main:2::memcpy:7 [ memcpy::src_end#0 memcpy::src#2 memcpy::dst#2 ] ) always clobbers reg byte a reg byte y
|
||||
Potential registers zp ZP_WORD:2 [ memcpy::source#2 ] : zp ZP_WORD:2 ,
|
||||
Potential registers zp ZP_WORD:4 [ memcpy::destination#2 ] : zp ZP_WORD:4 ,
|
||||
Potential registers zp ZP_WORD:6 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] : zp ZP_WORD:6 ,
|
||||
@ -630,9 +610,9 @@ Uplift Scope [memcpy] 35.5: zp ZP_WORD:6 [ memcpy::src#2 memcpy::src#4 memcpy::s
|
||||
Uplift Scope [main]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [memcpy] best 6069 combination zp ZP_WORD:6 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp ZP_WORD:8 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp ZP_WORD:10 [ memcpy::src_end#0 ] zp ZP_WORD:2 [ memcpy::source#2 ] zp ZP_WORD:4 [ memcpy::destination#2 ]
|
||||
Uplifting [main] best 6069 combination
|
||||
Uplifting [] best 6069 combination
|
||||
Uplifting [memcpy] best 919 combination zp ZP_WORD:6 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp ZP_WORD:8 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp ZP_WORD:10 [ memcpy::src_end#0 ] zp ZP_WORD:2 [ memcpy::source#2 ] zp ZP_WORD:4 [ memcpy::destination#2 ]
|
||||
Uplifting [main] best 919 combination
|
||||
Uplifting [] best 919 combination
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ memcpy::source#2 ] ] with [ zp ZP_WORD:6 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] - score: 1
|
||||
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ memcpy::destination#2 ] ] with [ zp ZP_WORD:8 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] - score: 1
|
||||
Allocated (was zp ZP_WORD:10) zp ZP_WORD:6 [ memcpy::src_end#0 ]
|
||||
@ -651,76 +631,69 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label COLS = $d800
|
||||
// The colors of the C64
|
||||
.const BLACK = 0
|
||||
.label MEDUSA_SCREEN = $1000
|
||||
.label MEDUSA_COLORS = $1400
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG4 @1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG5 kickasm(location (const byte*) MEDUSA_SCREEN#0) {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE) .fill fileScreen.getSize(), fileScreen.get(i) }}
|
||||
//SEG6 kickasm(location (const byte*) MEDUSA_COLORS#0) {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE) .fill fileCols.getSize(), fileCols.get(i) }}
|
||||
//SEG7 [3] phi from @1 to @2 [phi:@1->@2]
|
||||
b2_from_b1:
|
||||
jmp b2
|
||||
//SEG8 @2
|
||||
b2:
|
||||
//SEG9 [4] call main
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG10 [5] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG11 @end
|
||||
//SEG8 @end
|
||||
bend:
|
||||
//SEG12 main
|
||||
//SEG9 main
|
||||
main: {
|
||||
//SEG13 [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
|
||||
//SEG10 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
|
||||
lda #BLACK
|
||||
sta BGCOL
|
||||
//SEG14 [7] call memcpy
|
||||
//SEG15 [11] phi from main to memcpy [phi:main->memcpy]
|
||||
//SEG11 [5] call memcpy
|
||||
//SEG12 [9] phi from main to memcpy [phi:main->memcpy]
|
||||
memcpy_from_main:
|
||||
//SEG16 [11] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN#0 [phi:main->memcpy#0] -- pvoz1=pvoc1
|
||||
//SEG13 [9] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN#0 [phi:main->memcpy#0] -- pvoz1=pvoc1
|
||||
lda #<SCREEN
|
||||
sta memcpy.destination
|
||||
lda #>SCREEN
|
||||
sta memcpy.destination+1
|
||||
//SEG17 [11] phi (void*) memcpy::source#2 = (void*)(const byte*) MEDUSA_SCREEN#0 [phi:main->memcpy#1] -- pvoz1=pvoc1
|
||||
//SEG14 [9] phi (void*) memcpy::source#2 = (void*)(const byte[$3e8]) MEDUSA_SCREEN#0 [phi:main->memcpy#1] -- pvoz1=pvoc1
|
||||
lda #<MEDUSA_SCREEN
|
||||
sta memcpy.source
|
||||
lda #>MEDUSA_SCREEN
|
||||
sta memcpy.source+1
|
||||
jsr memcpy
|
||||
//SEG18 [8] phi from main to main::@2 [phi:main->main::@2]
|
||||
//SEG15 [6] phi from main to main::@2 [phi:main->main::@2]
|
||||
b2_from_main:
|
||||
jmp b2
|
||||
//SEG19 main::@2
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG20 [9] call memcpy
|
||||
//SEG21 [11] phi from main::@2 to memcpy [phi:main::@2->memcpy]
|
||||
//SEG17 [7] call memcpy
|
||||
//SEG18 [9] phi from main::@2 to memcpy [phi:main::@2->memcpy]
|
||||
memcpy_from_b2:
|
||||
//SEG22 [11] phi (void*) memcpy::destination#2 = (void*)(const byte*) COLS#0 [phi:main::@2->memcpy#0] -- pvoz1=pvoc1
|
||||
//SEG19 [9] phi (void*) memcpy::destination#2 = (void*)(const byte*) COLS#0 [phi:main::@2->memcpy#0] -- pvoz1=pvoc1
|
||||
lda #<COLS
|
||||
sta memcpy.destination
|
||||
lda #>COLS
|
||||
sta memcpy.destination+1
|
||||
//SEG23 [11] phi (void*) memcpy::source#2 = (void*)(const byte*) MEDUSA_COLORS#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1
|
||||
//SEG20 [9] phi (void*) memcpy::source#2 = (void*)(const byte[]) MEDUSA_COLORS#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1
|
||||
lda #<MEDUSA_COLORS
|
||||
sta memcpy.source
|
||||
lda #>MEDUSA_COLORS
|
||||
sta memcpy.source+1
|
||||
jsr memcpy
|
||||
jmp b1
|
||||
//SEG24 main::@1
|
||||
//SEG21 main::@1
|
||||
b1:
|
||||
//SEG25 [10] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e -- _deref_pbuc1=_deref_pbuc1_bxor_vbuc2
|
||||
//SEG22 [8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e -- _deref_pbuc1=_deref_pbuc1_bxor_vbuc2
|
||||
lda #$e
|
||||
eor SCREEN+$3e7
|
||||
sta SCREEN+$3e7
|
||||
jmp b1
|
||||
}
|
||||
//SEG26 memcpy
|
||||
//SEG23 memcpy
|
||||
// Copy block of memory (forwards)
|
||||
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
||||
// memcpy(void* zeropage(4) destination, void* zeropage(2) source)
|
||||
@ -730,7 +703,7 @@ memcpy: {
|
||||
.label src = 2
|
||||
.label source = 2
|
||||
.label destination = 4
|
||||
//SEG27 [12] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1
|
||||
//SEG24 [10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1
|
||||
lda source
|
||||
clc
|
||||
adc #<$3e8
|
||||
@ -738,17 +711,17 @@ memcpy: {
|
||||
lda source+1
|
||||
adc #>$3e8
|
||||
sta src_end+1
|
||||
//SEG28 [13] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
//SEG29 [14] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
//SEG30 [15] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
|
||||
//SEG25 [11] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
//SEG26 [12] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
//SEG27 [13] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
|
||||
b1_from_memcpy:
|
||||
b1_from_b2:
|
||||
//SEG31 [15] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
|
||||
//SEG32 [15] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
|
||||
//SEG28 [13] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
|
||||
//SEG29 [13] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
|
||||
jmp b1
|
||||
//SEG33 memcpy::@1
|
||||
//SEG30 memcpy::@1
|
||||
b1:
|
||||
//SEG34 [16] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
|
||||
//SEG31 [14] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
|
||||
lda src+1
|
||||
cmp src_end+1
|
||||
bne b2
|
||||
@ -756,42 +729,41 @@ memcpy: {
|
||||
cmp src_end
|
||||
bne b2
|
||||
jmp breturn
|
||||
//SEG35 memcpy::@return
|
||||
//SEG32 memcpy::@return
|
||||
breturn:
|
||||
//SEG36 [17] return
|
||||
//SEG33 [15] return
|
||||
rts
|
||||
//SEG37 memcpy::@2
|
||||
//SEG34 memcpy::@2
|
||||
b2:
|
||||
//SEG38 [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
|
||||
//SEG35 [16] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
|
||||
ldy #0
|
||||
lda (src),y
|
||||
ldy #0
|
||||
sta (dst),y
|
||||
//SEG39 [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
|
||||
//SEG36 [17] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
|
||||
inc dst
|
||||
bne !+
|
||||
inc dst+1
|
||||
!:
|
||||
//SEG40 [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
|
||||
//SEG37 [18] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
|
||||
inc src
|
||||
bne !+
|
||||
inc src+1
|
||||
!:
|
||||
jmp b1_from_b2
|
||||
}
|
||||
//SEG41 File Data
|
||||
.pc = MEDUSA_SCREEN "MEDUSA_SCREEN"
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
//SEG38 File Data
|
||||
MEDUSA_SCREEN:
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
|
||||
.pc = MEDUSA_COLORS "MEDUSA_COLORS"
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
MEDUSA_COLORS:
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
@ -801,10 +773,9 @@ Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction ldy #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Replacing label b1_from_b2 with b1
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction b2_from_b1:
|
||||
Removing instruction b2:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b2_from_main:
|
||||
Removing instruction memcpy_from_b2:
|
||||
Removing instruction b1_from_memcpy:
|
||||
@ -823,7 +794,6 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -832,10 +802,14 @@ FINAL SYMBOL TABLE
|
||||
(const byte) BLACK#0 BLACK = (byte) 0
|
||||
(byte*) COLS
|
||||
(const byte*) COLS#0 COLS = (byte*) 55296
|
||||
(byte*) MEDUSA_COLORS
|
||||
(const byte*) MEDUSA_COLORS#0 MEDUSA_COLORS = (byte*) 5120
|
||||
(byte*) MEDUSA_SCREEN
|
||||
(const byte*) MEDUSA_SCREEN#0 MEDUSA_SCREEN = (byte*) 4096
|
||||
(byte[]) MEDUSA_COLORS
|
||||
(const byte[]) MEDUSA_COLORS#0 MEDUSA_COLORS = kickasm {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
(byte[$3e8]) MEDUSA_SCREEN
|
||||
(const byte[$3e8]) MEDUSA_SCREEN#0 MEDUSA_SCREEN = kickasm {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(void()) main()
|
||||
@ -868,7 +842,7 @@ zp ZP_WORD:6 [ memcpy::src_end#0 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 5917
|
||||
Score: 797
|
||||
|
||||
//SEG0 File Comments
|
||||
// Display MEDUSA PETSCII by Buzz_clik
|
||||
@ -883,60 +857,55 @@ Score: 5917
|
||||
.label COLS = $d800
|
||||
// The colors of the C64
|
||||
.const BLACK = 0
|
||||
.label MEDUSA_SCREEN = $1000
|
||||
.label MEDUSA_COLORS = $1400
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
//SEG4 @1
|
||||
//SEG5 kickasm(location (const byte*) MEDUSA_SCREEN#0) {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE) .fill fileScreen.getSize(), fileScreen.get(i) }}
|
||||
//SEG6 kickasm(location (const byte*) MEDUSA_COLORS#0) {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE) .fill fileCols.getSize(), fileCols.get(i) }}
|
||||
//SEG7 [3] phi from @1 to @2 [phi:@1->@2]
|
||||
//SEG8 @2
|
||||
//SEG9 [4] call main
|
||||
//SEG10 [5] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG11 @end
|
||||
//SEG12 main
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
//SEG13 [6] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
|
||||
//SEG10 [4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
|
||||
lda #BLACK
|
||||
sta BGCOL
|
||||
//SEG14 [7] call memcpy
|
||||
//SEG15 [11] phi from main to memcpy [phi:main->memcpy]
|
||||
//SEG16 [11] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN#0 [phi:main->memcpy#0] -- pvoz1=pvoc1
|
||||
//SEG11 [5] call memcpy
|
||||
//SEG12 [9] phi from main to memcpy [phi:main->memcpy]
|
||||
//SEG13 [9] phi (void*) memcpy::destination#2 = (void*)(const byte*) SCREEN#0 [phi:main->memcpy#0] -- pvoz1=pvoc1
|
||||
lda #<SCREEN
|
||||
sta memcpy.destination
|
||||
lda #>SCREEN
|
||||
sta memcpy.destination+1
|
||||
//SEG17 [11] phi (void*) memcpy::source#2 = (void*)(const byte*) MEDUSA_SCREEN#0 [phi:main->memcpy#1] -- pvoz1=pvoc1
|
||||
//SEG14 [9] phi (void*) memcpy::source#2 = (void*)(const byte[$3e8]) MEDUSA_SCREEN#0 [phi:main->memcpy#1] -- pvoz1=pvoc1
|
||||
lda #<MEDUSA_SCREEN
|
||||
sta memcpy.source
|
||||
lda #>MEDUSA_SCREEN
|
||||
sta memcpy.source+1
|
||||
jsr memcpy
|
||||
//SEG18 [8] phi from main to main::@2 [phi:main->main::@2]
|
||||
//SEG19 main::@2
|
||||
//SEG20 [9] call memcpy
|
||||
//SEG21 [11] phi from main::@2 to memcpy [phi:main::@2->memcpy]
|
||||
//SEG22 [11] phi (void*) memcpy::destination#2 = (void*)(const byte*) COLS#0 [phi:main::@2->memcpy#0] -- pvoz1=pvoc1
|
||||
//SEG15 [6] phi from main to main::@2 [phi:main->main::@2]
|
||||
//SEG16 main::@2
|
||||
//SEG17 [7] call memcpy
|
||||
//SEG18 [9] phi from main::@2 to memcpy [phi:main::@2->memcpy]
|
||||
//SEG19 [9] phi (void*) memcpy::destination#2 = (void*)(const byte*) COLS#0 [phi:main::@2->memcpy#0] -- pvoz1=pvoc1
|
||||
lda #<COLS
|
||||
sta memcpy.destination
|
||||
lda #>COLS
|
||||
sta memcpy.destination+1
|
||||
//SEG23 [11] phi (void*) memcpy::source#2 = (void*)(const byte*) MEDUSA_COLORS#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1
|
||||
//SEG20 [9] phi (void*) memcpy::source#2 = (void*)(const byte[]) MEDUSA_COLORS#0 [phi:main::@2->memcpy#1] -- pvoz1=pvoc1
|
||||
lda #<MEDUSA_COLORS
|
||||
sta memcpy.source
|
||||
lda #>MEDUSA_COLORS
|
||||
sta memcpy.source+1
|
||||
jsr memcpy
|
||||
//SEG24 main::@1
|
||||
//SEG21 main::@1
|
||||
b1:
|
||||
//SEG25 [10] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e -- _deref_pbuc1=_deref_pbuc1_bxor_vbuc2
|
||||
//SEG22 [8] *((const byte*) SCREEN#0+(word) $3e7) ← *((const byte*) SCREEN#0+(word) $3e7) ^ (byte) $e -- _deref_pbuc1=_deref_pbuc1_bxor_vbuc2
|
||||
lda #$e
|
||||
eor SCREEN+$3e7
|
||||
sta SCREEN+$3e7
|
||||
jmp b1
|
||||
}
|
||||
//SEG26 memcpy
|
||||
//SEG23 memcpy
|
||||
// Copy block of memory (forwards)
|
||||
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
||||
// memcpy(void* zeropage(4) destination, void* zeropage(2) source)
|
||||
@ -946,7 +915,7 @@ memcpy: {
|
||||
.label src = 2
|
||||
.label source = 2
|
||||
.label destination = 4
|
||||
//SEG27 [12] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1
|
||||
//SEG24 [10] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word) $3e8 -- pbuz1=pbuz2_plus_vwuc1
|
||||
lda source
|
||||
clc
|
||||
adc #<$3e8
|
||||
@ -954,48 +923,48 @@ memcpy: {
|
||||
lda source+1
|
||||
adc #>$3e8
|
||||
sta src_end+1
|
||||
//SEG28 [13] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
//SEG29 [14] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
//SEG30 [15] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
|
||||
//SEG31 [15] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
|
||||
//SEG32 [15] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
|
||||
//SEG33 memcpy::@1
|
||||
//SEG25 [11] (byte*~) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
//SEG26 [12] (byte*~) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
//SEG27 [13] phi from memcpy memcpy::@2 to memcpy::@1 [phi:memcpy/memcpy::@2->memcpy::@1]
|
||||
//SEG28 [13] phi (byte*) memcpy::dst#2 = (byte*~) memcpy::dst#4 [phi:memcpy/memcpy::@2->memcpy::@1#0] -- register_copy
|
||||
//SEG29 [13] phi (byte*) memcpy::src#2 = (byte*~) memcpy::src#4 [phi:memcpy/memcpy::@2->memcpy::@1#1] -- register_copy
|
||||
//SEG30 memcpy::@1
|
||||
b1:
|
||||
//SEG34 [16] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
|
||||
//SEG31 [14] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -- pbuz1_neq_pbuz2_then_la1
|
||||
lda src+1
|
||||
cmp src_end+1
|
||||
bne b2
|
||||
lda src
|
||||
cmp src_end
|
||||
bne b2
|
||||
//SEG35 memcpy::@return
|
||||
//SEG36 [17] return
|
||||
//SEG32 memcpy::@return
|
||||
//SEG33 [15] return
|
||||
rts
|
||||
//SEG37 memcpy::@2
|
||||
//SEG34 memcpy::@2
|
||||
b2:
|
||||
//SEG38 [18] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
|
||||
//SEG35 [16] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2) -- _deref_pbuz1=_deref_pbuz2
|
||||
ldy #0
|
||||
lda (src),y
|
||||
sta (dst),y
|
||||
//SEG39 [19] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
|
||||
//SEG36 [17] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2 -- pbuz1=_inc_pbuz1
|
||||
inc dst
|
||||
bne !+
|
||||
inc dst+1
|
||||
!:
|
||||
//SEG40 [20] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
|
||||
//SEG37 [18] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2 -- pbuz1=_inc_pbuz1
|
||||
inc src
|
||||
bne !+
|
||||
inc src+1
|
||||
!:
|
||||
jmp b1
|
||||
}
|
||||
//SEG41 File Data
|
||||
.pc = MEDUSA_SCREEN "MEDUSA_SCREEN"
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
//SEG38 File Data
|
||||
MEDUSA_SCREEN:
|
||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
|
||||
.pc = MEDUSA_COLORS "MEDUSA_COLORS"
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
MEDUSA_COLORS:
|
||||
.var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -8,10 +7,14 @@
|
||||
(const byte) BLACK#0 BLACK = (byte) 0
|
||||
(byte*) COLS
|
||||
(const byte*) COLS#0 COLS = (byte*) 55296
|
||||
(byte*) MEDUSA_COLORS
|
||||
(const byte*) MEDUSA_COLORS#0 MEDUSA_COLORS = (byte*) 5120
|
||||
(byte*) MEDUSA_SCREEN
|
||||
(const byte*) MEDUSA_SCREEN#0 MEDUSA_SCREEN = (byte*) 4096
|
||||
(byte[]) MEDUSA_COLORS
|
||||
(const byte[]) MEDUSA_COLORS#0 MEDUSA_COLORS = kickasm {{ .var fileCols = LoadBinary("medusac.prg", BF_C64FILE)
|
||||
.fill fileCols.getSize(), fileCols.get(i)
|
||||
}}
|
||||
(byte[$3e8]) MEDUSA_SCREEN
|
||||
(const byte[$3e8]) MEDUSA_SCREEN#0 MEDUSA_SCREEN = kickasm {{ .var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||
.fill fileScreen.getSize(), fileScreen.get(i)
|
||||
}}
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(void()) main()
|
||||
|
@ -49,7 +49,6 @@
|
||||
.label PLAYFIELD_CHARSET = $2800
|
||||
// The Y-position of the first sprite row
|
||||
.const SPRITES_FIRST_YPOS = $31
|
||||
.label SIN = $1400
|
||||
.label SIN_SPRITE = $2800
|
||||
// Screen Sprite pointers on screen 1
|
||||
.label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS
|
||||
@ -312,6 +311,12 @@ sprites_irq: {
|
||||
sta PLAYFIELD_SPRITE_PTRS_1+3
|
||||
jmp b2
|
||||
}
|
||||
SIN:
|
||||
.var AMPL = 200-21
|
||||
.for(var i=0; i<256; i++) {
|
||||
.byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
|
||||
}
|
||||
|
||||
.pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES"
|
||||
.var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
|
||||
// Put the sprites into memory
|
||||
@ -328,12 +333,6 @@ sprites_irq: {
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SIN "SIN"
|
||||
.var AMPL = 200-21
|
||||
.for(var i=0; i<256; i++) {
|
||||
.byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
|
||||
}
|
||||
|
||||
.pc = SIN_SPRITE "SIN_SPRITE"
|
||||
.fill $40, $ff
|
||||
|
||||
|
@ -31,201 +31,196 @@ toSpritePtr1: scope:[] from @2
|
||||
[7] (byte) irq_cnt#0 ← (byte) 0
|
||||
to:@3
|
||||
@3: scope:[] from @5
|
||||
kickasm(location (const byte*) SIN#0) {{ .var AMPL = 200-21
|
||||
.for(var i=0; i<256; i++) {
|
||||
.byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff
|
||||
}}
|
||||
to:@4
|
||||
@4: scope:[] from @3
|
||||
[10] phi()
|
||||
[11] call main
|
||||
[9] phi()
|
||||
[10] call main
|
||||
to:@end
|
||||
@end: scope:[] from @4
|
||||
[12] phi()
|
||||
[11] phi()
|
||||
main: scope:[main] from @4
|
||||
[13] phi()
|
||||
[12] phi()
|
||||
to:main::vicSelectGfxBank1
|
||||
main::vicSelectGfxBank1: scope:[main] from main
|
||||
[14] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
|
||||
[13] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
|
||||
to:main::vicSelectGfxBank1_toDd001
|
||||
main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1
|
||||
[15] phi()
|
||||
[14] phi()
|
||||
to:main::vicSelectGfxBank1_@1
|
||||
main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
|
||||
[16] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
|
||||
[15] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
|
||||
to:main::toD0181
|
||||
main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1
|
||||
[17] phi()
|
||||
[16] phi()
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::toD0181
|
||||
[18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||
[19] call sprites_init
|
||||
[17] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||
[18] call sprites_init
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@3
|
||||
[20] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff
|
||||
[19] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@4 main::@5
|
||||
[21] (byte) main::ypos#2 ← phi( main::@4/(byte) main::ypos#1 main::@5/(byte) $32 )
|
||||
[21] (byte) main::xpos#2 ← phi( main::@4/(byte) main::xpos#1 main::@5/(byte) $18 )
|
||||
[21] (byte) main::s#2 ← phi( main::@4/(byte) main::s#1 main::@5/(byte) 4 )
|
||||
[22] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1
|
||||
[23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
|
||||
[24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
|
||||
[25] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3
|
||||
[26] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte~) main::$6
|
||||
[20] (byte) main::ypos#2 ← phi( main::@4/(byte) main::ypos#1 main::@5/(byte) $32 )
|
||||
[20] (byte) main::xpos#2 ← phi( main::@4/(byte) main::xpos#1 main::@5/(byte) $18 )
|
||||
[20] (byte) main::s#2 ← phi( main::@4/(byte) main::s#1 main::@5/(byte) 4 )
|
||||
[21] (byte) main::s2#0 ← (byte) main::s#2 << (byte) 1
|
||||
[22] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
|
||||
[23] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
|
||||
[24] (byte~) main::$6 ← (byte) main::s#2 - (byte) 3
|
||||
[25] *((const byte*) SPRITES_COLS#0 + (byte) main::s#2) ← (byte~) main::$6
|
||||
to:main::toSpritePtr2
|
||||
main::toSpritePtr2: scope:[main] from main::@1
|
||||
[27] phi()
|
||||
[26] phi()
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::toSpritePtr2
|
||||
[28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0
|
||||
[29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18
|
||||
[30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18
|
||||
[31] (byte) main::s#1 ← ++ (byte) main::s#2
|
||||
[32] if((byte) main::s#1!=(byte) 8) goto main::@1
|
||||
[27] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0
|
||||
[28] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte) $18
|
||||
[29] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte) $18
|
||||
[30] (byte) main::s#1 ← ++ (byte) main::s#2
|
||||
[31] if((byte) main::s#1!=(byte) 8) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@4
|
||||
[33] phi()
|
||||
[34] call sprites_irq_init
|
||||
[32] phi()
|
||||
[33] call sprites_irq_init
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@2
|
||||
[35] phi()
|
||||
[36] call loop
|
||||
[34] phi()
|
||||
[35] call loop
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@6
|
||||
[37] return
|
||||
[36] return
|
||||
to:@return
|
||||
loop: scope:[loop] from main::@6
|
||||
[38] phi()
|
||||
[37] phi()
|
||||
to:loop::@1
|
||||
loop::@1: scope:[loop] from loop loop::@5
|
||||
[39] (byte) sin_idx#10 ← phi( loop/(byte) 0 loop::@5/(byte) sin_idx#3 )
|
||||
[38] (byte) sin_idx#10 ← phi( loop/(byte) 0 loop::@5/(byte) sin_idx#3 )
|
||||
to:loop::@2
|
||||
loop::@2: scope:[loop] from loop::@1 loop::@2
|
||||
[40] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2
|
||||
[39] if(*((const byte*) RASTER#0)!=(byte) $ff) goto loop::@2
|
||||
to:loop::@3
|
||||
loop::@3: scope:[loop] from loop::@2
|
||||
[41] (byte) loop::idx#0 ← (byte) sin_idx#10
|
||||
[40] (byte) loop::idx#0 ← (byte) sin_idx#10
|
||||
to:loop::@4
|
||||
loop::@4: scope:[loop] from loop::@3 loop::@4
|
||||
[42] (byte) loop::idx#2 ← phi( loop::@3/(byte) loop::idx#0 loop::@4/(byte) loop::idx#1 )
|
||||
[42] (byte) loop::s#2 ← phi( loop::@3/(byte) 4 loop::@4/(byte) loop::s#1 )
|
||||
[43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1
|
||||
[44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2)
|
||||
[45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a
|
||||
[46] (byte) loop::s#1 ← ++ (byte) loop::s#2
|
||||
[47] if((byte) loop::s#1!=(byte) 8) goto loop::@4
|
||||
[41] (byte) loop::idx#2 ← phi( loop::@3/(byte) loop::idx#0 loop::@4/(byte) loop::idx#1 )
|
||||
[41] (byte) loop::s#2 ← phi( loop::@3/(byte) 4 loop::@4/(byte) loop::s#1 )
|
||||
[42] (byte~) loop::$1 ← (byte) loop::s#2 << (byte) 1
|
||||
[43] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte[$100]) SIN#0 + (byte) loop::idx#2)
|
||||
[44] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte) $a
|
||||
[45] (byte) loop::s#1 ← ++ (byte) loop::s#2
|
||||
[46] if((byte) loop::s#1!=(byte) 8) goto loop::@4
|
||||
to:loop::@5
|
||||
loop::@5: scope:[loop] from loop::@4
|
||||
[48] (byte) sin_idx#3 ← ++ (byte) sin_idx#10
|
||||
[47] (byte) sin_idx#3 ← ++ (byte) sin_idx#10
|
||||
to:loop::@1
|
||||
sprites_irq_init: scope:[sprites_irq_init] from main::@2
|
||||
asm { sei }
|
||||
[50] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
[49] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
asm { ldaCIA1_INTERRUPT }
|
||||
[52] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[54] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
|
||||
[55] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
|
||||
[56] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0
|
||||
[57] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
|
||||
[58] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
|
||||
[51] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[52] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[53] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
|
||||
[54] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
|
||||
[55] *((const byte*) RASTER#0) ← (const byte) IRQ_RASTER_FIRST#0
|
||||
[56] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
|
||||
[57] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
|
||||
asm { cli }
|
||||
to:sprites_irq_init::@return
|
||||
sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init
|
||||
[60] return
|
||||
[59] return
|
||||
to:@return
|
||||
sprites_init: scope:[sprites_init] from main::@3
|
||||
[61] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f
|
||||
[62] *((const byte*) SPRITES_MC#0) ← (byte) 0
|
||||
[63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
|
||||
[64] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0)
|
||||
[60] *((const byte*) SPRITES_ENABLE#0) ← (byte) $f
|
||||
[61] *((const byte*) SPRITES_MC#0) ← (byte) 0
|
||||
[62] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
|
||||
[63] *((const byte*) SPRITES_EXPAND_X#0) ← *((const byte*) SPRITES_EXPAND_Y#0)
|
||||
to:sprites_init::@1
|
||||
sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1
|
||||
[65] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 )
|
||||
[65] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 )
|
||||
[66] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1
|
||||
[67] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2
|
||||
[68] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0
|
||||
[69] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18
|
||||
[70] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2
|
||||
[71] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1
|
||||
[64] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 )
|
||||
[64] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 )
|
||||
[65] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1
|
||||
[66] *((const byte*) SPRITES_XPOS#0 + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2
|
||||
[67] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::s#2) ← (const byte) BLACK#0
|
||||
[68] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18
|
||||
[69] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2
|
||||
[70] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1
|
||||
to:sprites_init::@return
|
||||
sprites_init::@return: scope:[sprites_init] from sprites_init::@1
|
||||
[72] return
|
||||
[71] return
|
||||
to:@return
|
||||
sprites_irq: scope:[sprites_irq] from
|
||||
asm { cld }
|
||||
[74] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0
|
||||
[75] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0
|
||||
[76] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0
|
||||
[77] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0
|
||||
[78] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0
|
||||
[79] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1
|
||||
[80] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0
|
||||
[73] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos#0
|
||||
[74] *((const byte*) SPRITES_YPOS#0) ← (byte) sprites_irq::ypos#0
|
||||
[75] *((const byte*) SPRITES_YPOS#0+(byte) 2) ← (byte) sprites_irq::ypos#0
|
||||
[76] *((const byte*) SPRITES_YPOS#0+(byte) 4) ← (byte) sprites_irq::ypos#0
|
||||
[77] *((const byte*) SPRITES_YPOS#0+(byte) 6) ← (byte) sprites_irq::ypos#0
|
||||
[78] (byte~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte) 1
|
||||
[79] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte~) sprites_irq::$0
|
||||
to:sprites_irq::@8
|
||||
sprites_irq::@8: scope:[sprites_irq] from sprites_irq sprites_irq::@8
|
||||
[81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8
|
||||
[80] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8
|
||||
to:sprites_irq::@9
|
||||
sprites_irq::@9: scope:[sprites_irq] from sprites_irq::@8
|
||||
[82] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0
|
||||
[83] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1
|
||||
[81] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0
|
||||
[82] if((byte) render_screen_showing#0==(byte) 0) goto sprites_irq::@1
|
||||
to:sprites_irq::@10
|
||||
sprites_irq::@10: scope:[sprites_irq] from sprites_irq::@9
|
||||
[84] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0
|
||||
[85] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0
|
||||
[86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3
|
||||
[87] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3
|
||||
[88] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
|
||||
[89] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4
|
||||
[83] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0
|
||||
[84] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0
|
||||
[85] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 1) ← (byte) sprites_irq::ptr#3
|
||||
[86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 2) ← (byte) sprites_irq::ptr#3
|
||||
[87] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
|
||||
[88] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte) 3) ← (byte) sprites_irq::ptr#4
|
||||
to:sprites_irq::@2
|
||||
sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@10
|
||||
[90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
|
||||
[91] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3
|
||||
[89] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
|
||||
[90] if((byte) irq_cnt#1==(byte) 9) goto sprites_irq::@3
|
||||
to:sprites_irq::@6
|
||||
sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@2
|
||||
[92] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4
|
||||
[91] if((byte) irq_cnt#1==(byte) $a) goto sprites_irq::@4
|
||||
to:sprites_irq::@7
|
||||
sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@6
|
||||
[93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14
|
||||
[94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15
|
||||
[95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3
|
||||
[92] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte) $14
|
||||
[93] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte) $15
|
||||
[94] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte) 3
|
||||
to:sprites_irq::@5
|
||||
sprites_irq::@5: scope:[sprites_irq] from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7
|
||||
[96] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 )
|
||||
[96] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 )
|
||||
[96] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 )
|
||||
[96] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 )
|
||||
[97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4
|
||||
[98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
[95] (byte) irq_sprite_ptr#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ptr#1 sprites_irq::@4/(byte) irq_sprite_ptr#2 sprites_irq::@7/(byte) irq_sprite_ptr#3 )
|
||||
[95] (byte) irq_sprite_ypos#11 ← phi( sprites_irq::@11/(byte) irq_sprite_ypos#1 sprites_irq::@4/(byte) irq_sprite_ypos#2 sprites_irq::@7/(byte) irq_sprite_ypos#3 )
|
||||
[95] (byte) irq_cnt#3 ← phi( sprites_irq::@11/(byte) irq_cnt#1 sprites_irq::@4/(byte) irq_cnt#2 sprites_irq::@7/(byte) irq_cnt#1 )
|
||||
[95] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 )
|
||||
[96] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4
|
||||
[97] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
to:sprites_irq::@return
|
||||
sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@5
|
||||
[99] return
|
||||
[98] return
|
||||
to:@return
|
||||
sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@6
|
||||
[100] (byte) irq_cnt#2 ← (byte) 0
|
||||
[101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0
|
||||
[102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15
|
||||
[103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3
|
||||
[99] (byte) irq_cnt#2 ← (byte) 0
|
||||
[100] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0
|
||||
[101] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte) $15
|
||||
[102] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte) 3
|
||||
to:sprites_irq::@5
|
||||
sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2
|
||||
[104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15
|
||||
[105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0
|
||||
[103] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte) $15
|
||||
[104] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0
|
||||
to:sprites_irq::toSpritePtr2
|
||||
sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3
|
||||
[106] phi()
|
||||
[105] phi()
|
||||
to:sprites_irq::@11
|
||||
sprites_irq::@11: scope:[sprites_irq] from sprites_irq::toSpritePtr2
|
||||
[107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0
|
||||
[106] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0
|
||||
to:sprites_irq::@5
|
||||
sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@9
|
||||
[108] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0
|
||||
[109] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0
|
||||
[110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1
|
||||
[111] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1
|
||||
[112] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1
|
||||
[113] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2
|
||||
[107] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0
|
||||
[108] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0
|
||||
[109] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 1) ← (byte) sprites_irq::ptr#1
|
||||
[110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 2) ← (byte) sprites_irq::ptr#1
|
||||
[111] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1
|
||||
[112] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte) 3) ← (byte) sprites_irq::ptr#2
|
||||
to:sprites_irq::@2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -49,8 +49,12 @@
|
||||
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35
|
||||
(byte*) RASTER
|
||||
(const byte*) RASTER#0 RASTER = (byte*) 53266
|
||||
(byte*) SIN
|
||||
(const byte*) SIN#0 SIN = (byte*) 5120
|
||||
(byte[$100]) SIN
|
||||
(const byte[$100]) SIN#0 SIN = kickasm {{ .var AMPL = 200-21
|
||||
.for(var i=0; i<256; i++) {
|
||||
.byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
|
||||
}
|
||||
}}
|
||||
(byte*) SIN_SPRITE
|
||||
(const byte*) SIN_SPRITE#0 SIN_SPRITE = (byte*) 10240
|
||||
(byte*) SPRITES_COLS
|
||||
|
@ -28,39 +28,12 @@
|
||||
.label psp2 = $f8
|
||||
.label SCREEN = $400
|
||||
.const sz = 0
|
||||
// mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
|
||||
// f(x) = >(( x * x ))
|
||||
.label mulf_sqr1 = $2400
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
.label mulf_sqr2 = $2600
|
||||
// A single sprite
|
||||
.label SPRITE = $3000
|
||||
// Perspective multiplication table containing (d/(z0-z)[z] for each z-value
|
||||
.label PERSP_Z = $2800
|
||||
// Sine and Cosine Tables
|
||||
// Angles: $00=0, $80=PI,$100=2*PI
|
||||
// Half Sine/Cosine: signed fixed [-$20;20]
|
||||
.label SINH = $2000
|
||||
// sin(x) = cos(x+PI/2)
|
||||
// Quarter Sine/Cosine: signed fixed [-$10,$10]
|
||||
.label SINQ = $2200
|
||||
// 16 bit Sine and Cosine Tables
|
||||
// Angles: $00=0, $80=PI,$100=2*PI
|
||||
// Half Sine/Cosine: signed fixed [-$1f,$1f]
|
||||
.label SINH_LO = $4000
|
||||
// sin(x) = cos(x+PI/2)
|
||||
.label SINH_HI = $4200
|
||||
// sin(x) = cos(x+PI/2)
|
||||
// Quarter Sine/Cosine: signed fixed [-$0f,$0f]
|
||||
.label SINQ_LO = $4400
|
||||
// sin(x) = cos(x+PI/2)
|
||||
.label SINQ_HI = $4600
|
||||
.label COSH = SINH+$40
|
||||
.label COSQ = SINQ+$40
|
||||
.label sx = 2
|
||||
.label sy = 3
|
||||
// sin(x) = cos(x+PI/2)
|
||||
// sin(x) = cos(x+PI/2)
|
||||
main: {
|
||||
sei
|
||||
jsr sprites_init
|
||||
@ -1031,28 +1004,29 @@ sprites_init: {
|
||||
yps: .fill 8, 0
|
||||
// The rotation matrix
|
||||
rotation_matrix: .fill 9, 0
|
||||
.pc = mulf_sqr1 "mulf_sqr1"
|
||||
.for(var i=0;i<$200;i++) {
|
||||
// mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
|
||||
// f(x) = >(( x * x ))
|
||||
.align $100
|
||||
mulf_sqr1:
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
|
||||
.pc = mulf_sqr2 "mulf_sqr2"
|
||||
.for(var i=0;i<$200;i++) {
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
.align $100
|
||||
mulf_sqr2:
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
|
||||
.pc = SPRITE "SPRITE"
|
||||
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
|
||||
.for (var y=0; y<21; y++)
|
||||
.for (var x=0;x<3; x++)
|
||||
.byte pic.getSinglecolorByte(x,y)
|
||||
|
||||
.pc = PERSP_Z "PERSP_Z"
|
||||
{
|
||||
// Perspective multiplication table containing (d/(z0-z)[z] for each z-value
|
||||
.align $100
|
||||
PERSP_Z:
|
||||
{
|
||||
.var d = 256.0
|
||||
.var z0 = 6.0
|
||||
// These values of d/z0 result in table values from $20 to $40 (effectively max is $3f)
|
||||
@ -1065,8 +1039,12 @@ sprites_init: {
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SINH "SINH"
|
||||
{
|
||||
// Sine and Cosine Tables
|
||||
// Angles: $00=0, $80=PI,$100=2*PI
|
||||
// Half Sine/Cosine: signed fixed [-$20;20]
|
||||
.align $40
|
||||
SINH:
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
@ -1076,8 +1054,10 @@ sprites_init: {
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SINQ "SINQ"
|
||||
{
|
||||
// Quarter Sine/Cosine: signed fixed [-$10,$10]
|
||||
.align $40
|
||||
SINQ:
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
@ -1087,47 +1067,9 @@ sprites_init: {
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SINH_LO "SINH_LO"
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SINH_HI "SINH_HI"
|
||||
{
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SINQ_LO "SINQ_LO"
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
|
||||
.pc = SINQ_HI "SINQ_HI"
|
||||
{
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
.pc = SPRITE "SPRITE"
|
||||
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
|
||||
.for (var y=0; y<21; y++)
|
||||
.for (var x=0;x<3; x++)
|
||||
.byte pic.getSinglecolorByte(x,y)
|
||||
|
||||
|
@ -2,547 +2,462 @@
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
kickasm(location (const byte*) mulf_sqr1#0) {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) mulf_sqr2#0) {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) SPRITE#0) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
|
||||
.for (var y=0; y<21; y++)
|
||||
.for (var x=0;x<3; x++)
|
||||
.byte pic.getSinglecolorByte(x,y)
|
||||
}}
|
||||
kickasm(location (const signed byte*) PERSP_Z#0) {{ {
|
||||
.var d = 256.0
|
||||
.var z0 = 6.0
|
||||
// These values of d/z0 result in table values from $20 to $40 (effectively max is $3f)
|
||||
.for(var z=0;z<$100;z++) {
|
||||
.if(z>127) {
|
||||
.byte round(d / (z0 - ((z - 256) / 64.0)));
|
||||
} else {
|
||||
.byte round(d / (z0 - (z / 64.0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(location (const signed byte*) SINH#0) {{ {
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte round((min+(ampl/2)+(ampl/2)*sin(rad))/256)
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(location (const signed byte*) SINQ#0) {{ {
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte round((min+(ampl/2)+(ampl/2)*sin(rad))/256)
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) SINH_LO#0) {{ {
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) SINH_HI#0) {{ {
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) SINQ_LO#0) {{ {
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte <(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) SINQ_HI#0) {{ {
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte >(min+(ampl/2)+(ampl/2)*sin(rad))
|
||||
}
|
||||
}
|
||||
}}
|
||||
[11] call main
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[12] phi()
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[14] call sprites_init
|
||||
[5] call sprites_init
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[15] *((const word*) psp1#0) ← (word)(const byte*) mulf_sqr1#0
|
||||
[16] *((const word*) psp2#0) ← (word)(const byte*) mulf_sqr2#0
|
||||
[17] call debug_print_init
|
||||
[6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0
|
||||
[7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0
|
||||
[8] call debug_print_init
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[18] phi()
|
||||
[19] call anim
|
||||
[9] phi()
|
||||
[10] call anim
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
[20] return
|
||||
[11] return
|
||||
to:@return
|
||||
anim: scope:[anim] from main::@2
|
||||
[21] phi()
|
||||
[12] phi()
|
||||
to:anim::@1
|
||||
anim::@1: scope:[anim] from anim anim::@10
|
||||
[22] (signed byte) sy#10 ← phi( anim/(signed byte) 0 anim::@10/(signed byte) sy#3 )
|
||||
[22] (signed byte) sx#10 ← phi( anim/(signed byte) 0 anim::@10/(signed byte) sx#3 )
|
||||
[13] (signed byte) sy#10 ← phi( anim/(signed byte) 0 anim::@10/(signed byte) sy#3 )
|
||||
[13] (signed byte) sx#10 ← phi( anim/(signed byte) 0 anim::@10/(signed byte) sx#3 )
|
||||
to:anim::@2
|
||||
anim::@2: scope:[anim] from anim::@1 anim::@2
|
||||
[23] if(*((const byte*) RASTER#0)!=(byte) $ff) goto anim::@2
|
||||
[14] if(*((const byte*) RASTER#0)!=(byte) $ff) goto anim::@2
|
||||
to:anim::@3
|
||||
anim::@3: scope:[anim] from anim::@2 anim::@3
|
||||
[24] if(*((const byte*) RASTER#0)!=(byte) $fe) goto anim::@3
|
||||
[15] if(*((const byte*) RASTER#0)!=(byte) $fe) goto anim::@3
|
||||
to:anim::@4
|
||||
anim::@4: scope:[anim] from anim::@3 anim::@4
|
||||
[25] if(*((const byte*) RASTER#0)!=(byte) $fd) goto anim::@4
|
||||
[16] if(*((const byte*) RASTER#0)!=(byte) $fd) goto anim::@4
|
||||
to:anim::@5
|
||||
anim::@5: scope:[anim] from anim::@4
|
||||
[26] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
|
||||
[27] (signed byte) calculate_matrix::sx#0 ← (signed byte) sx#10
|
||||
[28] (signed byte) calculate_matrix::sy#0 ← (signed byte) sy#10
|
||||
[29] call calculate_matrix
|
||||
[17] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
|
||||
[18] (signed byte) calculate_matrix::sx#0 ← (signed byte) sx#10
|
||||
[19] (signed byte) calculate_matrix::sy#0 ← (signed byte) sy#10
|
||||
[20] call calculate_matrix
|
||||
to:anim::@8
|
||||
anim::@8: scope:[anim] from anim::@5
|
||||
[30] phi()
|
||||
[31] call store_matrix
|
||||
[21] phi()
|
||||
[22] call store_matrix
|
||||
to:anim::@6
|
||||
anim::@6: scope:[anim] from anim::@8 anim::@9
|
||||
[32] (byte) anim::i#2 ← phi( anim::@8/(byte) 0 anim::@9/(byte) anim::i#1 )
|
||||
[33] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
|
||||
[34] (signed byte) rotate_matrix::x#0 ← *((const signed byte[8]) xs#0 + (byte) anim::i#2)
|
||||
[35] (signed byte) rotate_matrix::y#0 ← *((const signed byte[8]) ys#0 + (byte) anim::i#2)
|
||||
[36] (signed byte) rotate_matrix::z#0 ← *((const signed byte[8]) zs#0 + (byte) anim::i#2)
|
||||
[37] call rotate_matrix
|
||||
[23] (byte) anim::i#2 ← phi( anim::@8/(byte) 0 anim::@9/(byte) anim::i#1 )
|
||||
[24] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
|
||||
[25] (signed byte) rotate_matrix::x#0 ← *((const signed byte[8]) xs#0 + (byte) anim::i#2)
|
||||
[26] (signed byte) rotate_matrix::y#0 ← *((const signed byte[8]) ys#0 + (byte) anim::i#2)
|
||||
[27] (signed byte) rotate_matrix::z#0 ← *((const signed byte[8]) zs#0 + (byte) anim::i#2)
|
||||
[28] call rotate_matrix
|
||||
to:anim::@9
|
||||
anim::@9: scope:[anim] from anim::@6
|
||||
[38] *((const signed byte[8]) xrs#0 + (byte) anim::i#2) ← *((const signed byte*) xr#0)
|
||||
[39] *((const signed byte[8]) yrs#0 + (byte) anim::i#2) ← *((const signed byte*) yr#0)
|
||||
[40] *((const signed byte[8]) zrs#0 + (byte) anim::i#2) ← *((const signed byte*) zr#0)
|
||||
[41] *((const signed byte[8]) pps#0 + (byte) anim::i#2) ← *((const signed byte*) pp#0)
|
||||
[42] *((const signed byte[8]) xps#0 + (byte) anim::i#2) ← *((const signed byte*) xp#0)
|
||||
[43] *((const signed byte[8]) yps#0 + (byte) anim::i#2) ← *((const signed byte*) yp#0)
|
||||
[44] (byte) anim::i2#0 ← (byte) anim::i#2 << (byte) 1
|
||||
[45] (byte~) anim::$8 ← (byte) $80 + (byte)*((const signed byte*) xp#0)
|
||||
[46] *((const byte*) SPRITES_XPOS#0 + (byte) anim::i2#0) ← (byte~) anim::$8
|
||||
[47] (byte~) anim::$10 ← (byte) $80 + (byte)*((const signed byte*) yp#0)
|
||||
[48] *((const byte*) SPRITES_YPOS#0 + (byte) anim::i2#0) ← (byte~) anim::$10
|
||||
[49] (byte) anim::i#1 ← ++ (byte) anim::i#2
|
||||
[50] if((byte) anim::i#1!=(byte) 8) goto anim::@6
|
||||
[29] *((const signed byte[8]) xrs#0 + (byte) anim::i#2) ← *((const signed byte*) xr#0)
|
||||
[30] *((const signed byte[8]) yrs#0 + (byte) anim::i#2) ← *((const signed byte*) yr#0)
|
||||
[31] *((const signed byte[8]) zrs#0 + (byte) anim::i#2) ← *((const signed byte*) zr#0)
|
||||
[32] *((const signed byte[8]) pps#0 + (byte) anim::i#2) ← *((const signed byte*) pp#0)
|
||||
[33] *((const signed byte[8]) xps#0 + (byte) anim::i#2) ← *((const signed byte*) xp#0)
|
||||
[34] *((const signed byte[8]) yps#0 + (byte) anim::i#2) ← *((const signed byte*) yp#0)
|
||||
[35] (byte) anim::i2#0 ← (byte) anim::i#2 << (byte) 1
|
||||
[36] (byte~) anim::$8 ← (byte) $80 + (byte)*((const signed byte*) xp#0)
|
||||
[37] *((const byte*) SPRITES_XPOS#0 + (byte) anim::i2#0) ← (byte~) anim::$8
|
||||
[38] (byte~) anim::$10 ← (byte) $80 + (byte)*((const signed byte*) yp#0)
|
||||
[39] *((const byte*) SPRITES_YPOS#0 + (byte) anim::i2#0) ← (byte~) anim::$10
|
||||
[40] (byte) anim::i#1 ← ++ (byte) anim::i#2
|
||||
[41] if((byte) anim::i#1!=(byte) 8) goto anim::@6
|
||||
to:anim::@7
|
||||
anim::@7: scope:[anim] from anim::@9
|
||||
[51] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_GREY#0
|
||||
[52] call debug_print
|
||||
[42] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_GREY#0
|
||||
[43] call debug_print
|
||||
to:anim::@10
|
||||
anim::@10: scope:[anim] from anim::@7
|
||||
[53] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
||||
[54] (signed byte) sx#3 ← (signed byte) sx#10 + (signed byte) 2
|
||||
[55] (signed byte) sy#3 ← (signed byte) sy#10 - (signed byte) 3
|
||||
[44] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
||||
[45] (signed byte) sx#3 ← (signed byte) sx#10 + (signed byte) 2
|
||||
[46] (signed byte) sy#3 ← (signed byte) sy#10 - (signed byte) 3
|
||||
to:anim::@1
|
||||
debug_print: scope:[debug_print] from anim::@7
|
||||
[56] (signed byte) debug_print::print_sbyte_pos1_sb#0 ← (signed byte) sx#10
|
||||
[47] (signed byte) debug_print::print_sbyte_pos1_sb#0 ← (signed byte) sx#10
|
||||
to:debug_print::print_sbyte_pos1
|
||||
debug_print::print_sbyte_pos1: scope:[debug_print] from debug_print
|
||||
[57] (signed byte) print_sbyte_at::b#4 ← (signed byte) debug_print::print_sbyte_pos1_sb#0
|
||||
[58] call print_sbyte_at
|
||||
[48] (signed byte) print_sbyte_at::b#4 ← (signed byte) debug_print::print_sbyte_pos1_sb#0
|
||||
[49] call print_sbyte_at
|
||||
to:debug_print::@2
|
||||
debug_print::@2: scope:[debug_print] from debug_print::print_sbyte_pos1
|
||||
[59] (signed byte) debug_print::print_sbyte_pos2_sb#0 ← (signed byte) sy#10
|
||||
[50] (signed byte) debug_print::print_sbyte_pos2_sb#0 ← (signed byte) sy#10
|
||||
to:debug_print::print_sbyte_pos2
|
||||
debug_print::print_sbyte_pos2: scope:[debug_print] from debug_print::@2
|
||||
[60] (signed byte) print_sbyte_at::b#5 ← (signed byte) debug_print::print_sbyte_pos2_sb#0
|
||||
[61] call print_sbyte_at
|
||||
[51] (signed byte) print_sbyte_at::b#5 ← (signed byte) debug_print::print_sbyte_pos2_sb#0
|
||||
[52] call print_sbyte_at
|
||||
to:debug_print::print_sbyte_pos3
|
||||
debug_print::print_sbyte_pos3: scope:[debug_print] from debug_print::print_sbyte_pos2
|
||||
[62] phi()
|
||||
[63] call print_sbyte_at
|
||||
[53] phi()
|
||||
[54] call print_sbyte_at
|
||||
to:debug_print::@3
|
||||
debug_print::@3: scope:[debug_print] from debug_print::print_sbyte_pos3
|
||||
[64] (signed byte) debug_print::print_sbyte_pos4_sb#0 ← *((const signed byte[9]) rotation_matrix#0)
|
||||
[55] (signed byte) debug_print::print_sbyte_pos4_sb#0 ← *((const signed byte[9]) rotation_matrix#0)
|
||||
to:debug_print::print_sbyte_pos4
|
||||
debug_print::print_sbyte_pos4: scope:[debug_print] from debug_print::@3
|
||||
[65] (signed byte) print_sbyte_at::b#7 ← (signed byte) debug_print::print_sbyte_pos4_sb#0
|
||||
[66] call print_sbyte_at
|
||||
[56] (signed byte) print_sbyte_at::b#7 ← (signed byte) debug_print::print_sbyte_pos4_sb#0
|
||||
[57] call print_sbyte_at
|
||||
to:debug_print::@4
|
||||
debug_print::@4: scope:[debug_print] from debug_print::print_sbyte_pos4
|
||||
[67] (signed byte) debug_print::print_sbyte_pos5_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 1)
|
||||
[58] (signed byte) debug_print::print_sbyte_pos5_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 1)
|
||||
to:debug_print::print_sbyte_pos5
|
||||
debug_print::print_sbyte_pos5: scope:[debug_print] from debug_print::@4
|
||||
[68] (signed byte) print_sbyte_at::b#8 ← (signed byte) debug_print::print_sbyte_pos5_sb#0
|
||||
[69] call print_sbyte_at
|
||||
[59] (signed byte) print_sbyte_at::b#8 ← (signed byte) debug_print::print_sbyte_pos5_sb#0
|
||||
[60] call print_sbyte_at
|
||||
to:debug_print::@5
|
||||
debug_print::@5: scope:[debug_print] from debug_print::print_sbyte_pos5
|
||||
[70] (signed byte) debug_print::print_sbyte_pos6_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 2)
|
||||
[61] (signed byte) debug_print::print_sbyte_pos6_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 2)
|
||||
to:debug_print::print_sbyte_pos6
|
||||
debug_print::print_sbyte_pos6: scope:[debug_print] from debug_print::@5
|
||||
[71] (signed byte) print_sbyte_at::b#9 ← (signed byte) debug_print::print_sbyte_pos6_sb#0
|
||||
[72] call print_sbyte_at
|
||||
[62] (signed byte) print_sbyte_at::b#9 ← (signed byte) debug_print::print_sbyte_pos6_sb#0
|
||||
[63] call print_sbyte_at
|
||||
to:debug_print::@6
|
||||
debug_print::@6: scope:[debug_print] from debug_print::print_sbyte_pos6
|
||||
[73] (signed byte) debug_print::print_sbyte_pos7_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 3)
|
||||
[64] (signed byte) debug_print::print_sbyte_pos7_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 3)
|
||||
to:debug_print::print_sbyte_pos7
|
||||
debug_print::print_sbyte_pos7: scope:[debug_print] from debug_print::@6
|
||||
[74] (signed byte) print_sbyte_at::b#10 ← (signed byte) debug_print::print_sbyte_pos7_sb#0
|
||||
[75] call print_sbyte_at
|
||||
[65] (signed byte) print_sbyte_at::b#10 ← (signed byte) debug_print::print_sbyte_pos7_sb#0
|
||||
[66] call print_sbyte_at
|
||||
to:debug_print::@7
|
||||
debug_print::@7: scope:[debug_print] from debug_print::print_sbyte_pos7
|
||||
[76] (signed byte) debug_print::print_sbyte_pos8_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 4)
|
||||
[67] (signed byte) debug_print::print_sbyte_pos8_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 4)
|
||||
to:debug_print::print_sbyte_pos8
|
||||
debug_print::print_sbyte_pos8: scope:[debug_print] from debug_print::@7
|
||||
[77] (signed byte) print_sbyte_at::b#11 ← (signed byte) debug_print::print_sbyte_pos8_sb#0
|
||||
[78] call print_sbyte_at
|
||||
[68] (signed byte) print_sbyte_at::b#11 ← (signed byte) debug_print::print_sbyte_pos8_sb#0
|
||||
[69] call print_sbyte_at
|
||||
to:debug_print::@8
|
||||
debug_print::@8: scope:[debug_print] from debug_print::print_sbyte_pos8
|
||||
[79] (signed byte) debug_print::print_sbyte_pos9_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 5)
|
||||
[70] (signed byte) debug_print::print_sbyte_pos9_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 5)
|
||||
to:debug_print::print_sbyte_pos9
|
||||
debug_print::print_sbyte_pos9: scope:[debug_print] from debug_print::@8
|
||||
[80] (signed byte) print_sbyte_at::b#12 ← (signed byte) debug_print::print_sbyte_pos9_sb#0
|
||||
[81] call print_sbyte_at
|
||||
[71] (signed byte) print_sbyte_at::b#12 ← (signed byte) debug_print::print_sbyte_pos9_sb#0
|
||||
[72] call print_sbyte_at
|
||||
to:debug_print::@9
|
||||
debug_print::@9: scope:[debug_print] from debug_print::print_sbyte_pos9
|
||||
[82] (signed byte) debug_print::print_sbyte_pos10_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 6)
|
||||
[73] (signed byte) debug_print::print_sbyte_pos10_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 6)
|
||||
to:debug_print::print_sbyte_pos10
|
||||
debug_print::print_sbyte_pos10: scope:[debug_print] from debug_print::@9
|
||||
[83] (signed byte) print_sbyte_at::b#13 ← (signed byte) debug_print::print_sbyte_pos10_sb#0
|
||||
[84] call print_sbyte_at
|
||||
[74] (signed byte) print_sbyte_at::b#13 ← (signed byte) debug_print::print_sbyte_pos10_sb#0
|
||||
[75] call print_sbyte_at
|
||||
to:debug_print::@10
|
||||
debug_print::@10: scope:[debug_print] from debug_print::print_sbyte_pos10
|
||||
[85] (signed byte) debug_print::print_sbyte_pos11_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 7)
|
||||
[76] (signed byte) debug_print::print_sbyte_pos11_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 7)
|
||||
to:debug_print::print_sbyte_pos11
|
||||
debug_print::print_sbyte_pos11: scope:[debug_print] from debug_print::@10
|
||||
[86] (signed byte) print_sbyte_at::b#14 ← (signed byte) debug_print::print_sbyte_pos11_sb#0
|
||||
[87] call print_sbyte_at
|
||||
[77] (signed byte) print_sbyte_at::b#14 ← (signed byte) debug_print::print_sbyte_pos11_sb#0
|
||||
[78] call print_sbyte_at
|
||||
to:debug_print::@11
|
||||
debug_print::@11: scope:[debug_print] from debug_print::print_sbyte_pos11
|
||||
[88] (signed byte) debug_print::print_sbyte_pos12_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 8)
|
||||
[79] (signed byte) debug_print::print_sbyte_pos12_sb#0 ← *((const signed byte[9]) rotation_matrix#0+(byte) 8)
|
||||
to:debug_print::print_sbyte_pos12
|
||||
debug_print::print_sbyte_pos12: scope:[debug_print] from debug_print::@11
|
||||
[89] (signed byte) print_sbyte_at::b#15 ← (signed byte) debug_print::print_sbyte_pos12_sb#0
|
||||
[90] call print_sbyte_at
|
||||
[80] (signed byte) print_sbyte_at::b#15 ← (signed byte) debug_print::print_sbyte_pos12_sb#0
|
||||
[81] call print_sbyte_at
|
||||
to:debug_print::@1
|
||||
debug_print::@1: scope:[debug_print] from debug_print::@17 debug_print::print_sbyte_pos12
|
||||
[91] (byte) debug_print::i#2 ← phi( debug_print::print_sbyte_pos12/(byte) 0 debug_print::@17/(byte) debug_print::i#1 )
|
||||
[91] (byte) debug_print::c#2 ← phi( debug_print::print_sbyte_pos12/(byte) 4 debug_print::@17/(byte) debug_print::c#1 )
|
||||
[92] (byte*) print_sbyte_at::at#15 ← (const byte*) debug_print::at_line#0 + (byte) debug_print::c#2
|
||||
[93] (signed byte) print_sbyte_at::b#16 ← *((const signed byte[8]) xrs#0 + (byte) debug_print::i#2)
|
||||
[94] call print_sbyte_at
|
||||
[82] (byte) debug_print::i#2 ← phi( debug_print::print_sbyte_pos12/(byte) 0 debug_print::@17/(byte) debug_print::i#1 )
|
||||
[82] (byte) debug_print::c#2 ← phi( debug_print::print_sbyte_pos12/(byte) 4 debug_print::@17/(byte) debug_print::c#1 )
|
||||
[83] (byte*) print_sbyte_at::at#15 ← (const byte*) debug_print::at_line#0 + (byte) debug_print::c#2
|
||||
[84] (signed byte) print_sbyte_at::b#16 ← *((const signed byte[8]) xrs#0 + (byte) debug_print::i#2)
|
||||
[85] call print_sbyte_at
|
||||
to:debug_print::@12
|
||||
debug_print::@12: scope:[debug_print] from debug_print::@1
|
||||
[95] (byte*) print_sbyte_at::at#16 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 1 + (byte) debug_print::c#2
|
||||
[96] (signed byte) print_sbyte_at::b#17 ← *((const signed byte[8]) yrs#0 + (byte) debug_print::i#2)
|
||||
[97] call print_sbyte_at
|
||||
[86] (byte*) print_sbyte_at::at#16 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 1 + (byte) debug_print::c#2
|
||||
[87] (signed byte) print_sbyte_at::b#17 ← *((const signed byte[8]) yrs#0 + (byte) debug_print::i#2)
|
||||
[88] call print_sbyte_at
|
||||
to:debug_print::@13
|
||||
debug_print::@13: scope:[debug_print] from debug_print::@12
|
||||
[98] (byte*) print_sbyte_at::at#17 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 2 + (byte) debug_print::c#2
|
||||
[99] (signed byte) print_sbyte_at::b#18 ← *((const signed byte[8]) zrs#0 + (byte) debug_print::i#2)
|
||||
[100] call print_sbyte_at
|
||||
[89] (byte*) print_sbyte_at::at#17 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 2 + (byte) debug_print::c#2
|
||||
[90] (signed byte) print_sbyte_at::b#18 ← *((const signed byte[8]) zrs#0 + (byte) debug_print::i#2)
|
||||
[91] call print_sbyte_at
|
||||
to:debug_print::@14
|
||||
debug_print::@14: scope:[debug_print] from debug_print::@13
|
||||
[101] (byte*) print_sbyte_at::at#18 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 3 + (byte) debug_print::c#2
|
||||
[102] (signed byte) print_sbyte_at::b#19 ← *((const signed byte[8]) pps#0 + (byte) debug_print::i#2)
|
||||
[103] call print_sbyte_at
|
||||
[92] (byte*) print_sbyte_at::at#18 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 3 + (byte) debug_print::c#2
|
||||
[93] (signed byte) print_sbyte_at::b#19 ← *((const signed byte[8]) pps#0 + (byte) debug_print::i#2)
|
||||
[94] call print_sbyte_at
|
||||
to:debug_print::@15
|
||||
debug_print::@15: scope:[debug_print] from debug_print::@14
|
||||
[104] (byte*) print_sbyte_at::at#19 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 4 + (byte) debug_print::c#2
|
||||
[105] (signed byte) print_sbyte_at::b#20 ← *((const signed byte[8]) xps#0 + (byte) debug_print::i#2)
|
||||
[106] call print_sbyte_at
|
||||
[95] (byte*) print_sbyte_at::at#19 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 4 + (byte) debug_print::c#2
|
||||
[96] (signed byte) print_sbyte_at::b#20 ← *((const signed byte[8]) xps#0 + (byte) debug_print::i#2)
|
||||
[97] call print_sbyte_at
|
||||
to:debug_print::@16
|
||||
debug_print::@16: scope:[debug_print] from debug_print::@15
|
||||
[107] (byte*) print_sbyte_at::at#20 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 5 + (byte) debug_print::c#2
|
||||
[108] (signed byte) print_sbyte_at::b#21 ← *((const signed byte[8]) yps#0 + (byte) debug_print::i#2)
|
||||
[109] call print_sbyte_at
|
||||
[98] (byte*) print_sbyte_at::at#20 ← (const byte*) debug_print::at_line#0+(byte)(number) $28*(number) 5 + (byte) debug_print::c#2
|
||||
[99] (signed byte) print_sbyte_at::b#21 ← *((const signed byte[8]) yps#0 + (byte) debug_print::i#2)
|
||||
[100] call print_sbyte_at
|
||||
to:debug_print::@17
|
||||
debug_print::@17: scope:[debug_print] from debug_print::@16
|
||||
[110] (byte) debug_print::c#1 ← (byte) debug_print::c#2 + (byte) 4
|
||||
[111] (byte) debug_print::i#1 ← ++ (byte) debug_print::i#2
|
||||
[112] if((byte) debug_print::i#1!=(byte) 8) goto debug_print::@1
|
||||
[101] (byte) debug_print::c#1 ← (byte) debug_print::c#2 + (byte) 4
|
||||
[102] (byte) debug_print::i#1 ← ++ (byte) debug_print::i#2
|
||||
[103] if((byte) debug_print::i#1!=(byte) 8) goto debug_print::@1
|
||||
to:debug_print::@return
|
||||
debug_print::@return: scope:[debug_print] from debug_print::@17
|
||||
[113] return
|
||||
[104] return
|
||||
to:@return
|
||||
print_sbyte_at: scope:[print_sbyte_at] from debug_print::@1 debug_print::@12 debug_print::@13 debug_print::@14 debug_print::@15 debug_print::@16 debug_print::print_sbyte_pos1 debug_print::print_sbyte_pos10 debug_print::print_sbyte_pos11 debug_print::print_sbyte_pos12 debug_print::print_sbyte_pos2 debug_print::print_sbyte_pos3 debug_print::print_sbyte_pos4 debug_print::print_sbyte_pos5 debug_print::print_sbyte_pos6 debug_print::print_sbyte_pos7 debug_print::print_sbyte_pos8 debug_print::print_sbyte_pos9 debug_print_init::@1 debug_print_init::@16 debug_print_init::@17
|
||||
[114] (byte*) print_sbyte_at::at#21 ← phi( debug_print::@1/(byte*) print_sbyte_at::at#15 debug_print::@12/(byte*) print_sbyte_at::at#16 debug_print::@13/(byte*) print_sbyte_at::at#17 debug_print::@14/(byte*) print_sbyte_at::at#18 debug_print::@15/(byte*) print_sbyte_at::at#19 debug_print::@16/(byte*) print_sbyte_at::at#20 debug_print::print_sbyte_pos1/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos1_col#0 debug_print::print_sbyte_pos10/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos10_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos10_col#0 debug_print::print_sbyte_pos11/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos11_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos11_col#0 debug_print::print_sbyte_pos12/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos12_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos12_col#0 debug_print::print_sbyte_pos2/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos2_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos2_col#0 debug_print::print_sbyte_pos3/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos3_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos3_col#0 debug_print::print_sbyte_pos4/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos4_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos4_col#0 debug_print::print_sbyte_pos5/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos5_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos5_col#0 debug_print::print_sbyte_pos6/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos6_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos6_col#0 debug_print::print_sbyte_pos7/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos7_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos7_col#0 debug_print::print_sbyte_pos8/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos8_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos8_col#0 debug_print::print_sbyte_pos9/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos9_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos9_col#0 debug_print_init::@1/(byte*) print_sbyte_at::at#0 debug_print_init::@16/(byte*) print_sbyte_at::at#1 debug_print_init::@17/(byte*) print_sbyte_at::at#2 )
|
||||
[114] (signed byte) print_sbyte_at::b#22 ← phi( debug_print::@1/(signed byte) print_sbyte_at::b#16 debug_print::@12/(signed byte) print_sbyte_at::b#17 debug_print::@13/(signed byte) print_sbyte_at::b#18 debug_print::@14/(signed byte) print_sbyte_at::b#19 debug_print::@15/(signed byte) print_sbyte_at::b#20 debug_print::@16/(signed byte) print_sbyte_at::b#21 debug_print::print_sbyte_pos1/(signed byte) print_sbyte_at::b#4 debug_print::print_sbyte_pos10/(signed byte) print_sbyte_at::b#13 debug_print::print_sbyte_pos11/(signed byte) print_sbyte_at::b#14 debug_print::print_sbyte_pos12/(signed byte) print_sbyte_at::b#15 debug_print::print_sbyte_pos2/(signed byte) print_sbyte_at::b#5 debug_print::print_sbyte_pos3/(const signed byte) sz#0 debug_print::print_sbyte_pos4/(signed byte) print_sbyte_at::b#7 debug_print::print_sbyte_pos5/(signed byte) print_sbyte_at::b#8 debug_print::print_sbyte_pos6/(signed byte) print_sbyte_at::b#9 debug_print::print_sbyte_pos7/(signed byte) print_sbyte_at::b#10 debug_print::print_sbyte_pos8/(signed byte) print_sbyte_at::b#11 debug_print::print_sbyte_pos9/(signed byte) print_sbyte_at::b#12 debug_print_init::@1/(signed byte) print_sbyte_at::b#1 debug_print_init::@16/(signed byte) print_sbyte_at::b#2 debug_print_init::@17/(signed byte) print_sbyte_at::b#3 )
|
||||
[115] if((signed byte) print_sbyte_at::b#22<(signed byte) 0) goto print_sbyte_at::@1
|
||||
[105] (byte*) print_sbyte_at::at#21 ← phi( debug_print::@1/(byte*) print_sbyte_at::at#15 debug_print::@12/(byte*) print_sbyte_at::at#16 debug_print::@13/(byte*) print_sbyte_at::at#17 debug_print::@14/(byte*) print_sbyte_at::at#18 debug_print::@15/(byte*) print_sbyte_at::at#19 debug_print::@16/(byte*) print_sbyte_at::at#20 debug_print::print_sbyte_pos1/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos1_col#0 debug_print::print_sbyte_pos10/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos10_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos10_col#0 debug_print::print_sbyte_pos11/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos11_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos11_col#0 debug_print::print_sbyte_pos12/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos12_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos12_col#0 debug_print::print_sbyte_pos2/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos2_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos2_col#0 debug_print::print_sbyte_pos3/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos3_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos3_col#0 debug_print::print_sbyte_pos4/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos4_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos4_col#0 debug_print::print_sbyte_pos5/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos5_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos5_col#0 debug_print::print_sbyte_pos6/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos6_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos6_col#0 debug_print::print_sbyte_pos7/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos7_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos7_col#0 debug_print::print_sbyte_pos8/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos8_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos8_col#0 debug_print::print_sbyte_pos9/(const byte*) print_screen#0+(const byte) debug_print::print_sbyte_pos9_row#0*(byte) $28+(const byte) debug_print::print_sbyte_pos9_col#0 debug_print_init::@1/(byte*) print_sbyte_at::at#0 debug_print_init::@16/(byte*) print_sbyte_at::at#1 debug_print_init::@17/(byte*) print_sbyte_at::at#2 )
|
||||
[105] (signed byte) print_sbyte_at::b#22 ← phi( debug_print::@1/(signed byte) print_sbyte_at::b#16 debug_print::@12/(signed byte) print_sbyte_at::b#17 debug_print::@13/(signed byte) print_sbyte_at::b#18 debug_print::@14/(signed byte) print_sbyte_at::b#19 debug_print::@15/(signed byte) print_sbyte_at::b#20 debug_print::@16/(signed byte) print_sbyte_at::b#21 debug_print::print_sbyte_pos1/(signed byte) print_sbyte_at::b#4 debug_print::print_sbyte_pos10/(signed byte) print_sbyte_at::b#13 debug_print::print_sbyte_pos11/(signed byte) print_sbyte_at::b#14 debug_print::print_sbyte_pos12/(signed byte) print_sbyte_at::b#15 debug_print::print_sbyte_pos2/(signed byte) print_sbyte_at::b#5 debug_print::print_sbyte_pos3/(const signed byte) sz#0 debug_print::print_sbyte_pos4/(signed byte) print_sbyte_at::b#7 debug_print::print_sbyte_pos5/(signed byte) print_sbyte_at::b#8 debug_print::print_sbyte_pos6/(signed byte) print_sbyte_at::b#9 debug_print::print_sbyte_pos7/(signed byte) print_sbyte_at::b#10 debug_print::print_sbyte_pos8/(signed byte) print_sbyte_at::b#11 debug_print::print_sbyte_pos9/(signed byte) print_sbyte_at::b#12 debug_print_init::@1/(signed byte) print_sbyte_at::b#1 debug_print_init::@16/(signed byte) print_sbyte_at::b#2 debug_print_init::@17/(signed byte) print_sbyte_at::b#3 )
|
||||
[106] if((signed byte) print_sbyte_at::b#22<(signed byte) 0) goto print_sbyte_at::@1
|
||||
to:print_sbyte_at::@3
|
||||
print_sbyte_at::@3: scope:[print_sbyte_at] from print_sbyte_at
|
||||
[116] (byte*) print_char_at::at#1 ← (byte*) print_sbyte_at::at#21
|
||||
[117] call print_char_at
|
||||
[107] (byte*) print_char_at::at#1 ← (byte*) print_sbyte_at::at#21
|
||||
[108] call print_char_at
|
||||
to:print_sbyte_at::@2
|
||||
print_sbyte_at::@2: scope:[print_sbyte_at] from print_sbyte_at::@3 print_sbyte_at::@4
|
||||
[118] (signed byte) print_sbyte_at::b#24 ← phi( print_sbyte_at::@4/(signed byte) print_sbyte_at::b#0 print_sbyte_at::@3/(signed byte) print_sbyte_at::b#22 )
|
||||
[119] (byte) print_byte_at::b#0 ← (byte)(signed byte) print_sbyte_at::b#24
|
||||
[120] (byte*) print_byte_at::at#0 ← (byte*) print_sbyte_at::at#21 + (byte) 1
|
||||
[121] call print_byte_at
|
||||
[109] (signed byte) print_sbyte_at::b#24 ← phi( print_sbyte_at::@4/(signed byte) print_sbyte_at::b#0 print_sbyte_at::@3/(signed byte) print_sbyte_at::b#22 )
|
||||
[110] (byte) print_byte_at::b#0 ← (byte)(signed byte) print_sbyte_at::b#24
|
||||
[111] (byte*) print_byte_at::at#0 ← (byte*) print_sbyte_at::at#21 + (byte) 1
|
||||
[112] call print_byte_at
|
||||
to:print_sbyte_at::@return
|
||||
print_sbyte_at::@return: scope:[print_sbyte_at] from print_sbyte_at::@2
|
||||
[122] return
|
||||
[113] return
|
||||
to:@return
|
||||
print_sbyte_at::@1: scope:[print_sbyte_at] from print_sbyte_at
|
||||
[123] (byte*) print_char_at::at#0 ← (byte*) print_sbyte_at::at#21
|
||||
[124] call print_char_at
|
||||
[114] (byte*) print_char_at::at#0 ← (byte*) print_sbyte_at::at#21
|
||||
[115] call print_char_at
|
||||
to:print_sbyte_at::@4
|
||||
print_sbyte_at::@4: scope:[print_sbyte_at] from print_sbyte_at::@1
|
||||
[125] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#22
|
||||
[116] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#22
|
||||
to:print_sbyte_at::@2
|
||||
print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3
|
||||
[126] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 )
|
||||
[126] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' )
|
||||
[127] *((byte*) print_char_at::at#4) ← (byte) print_char_at::ch#4
|
||||
[117] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 )
|
||||
[117] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' )
|
||||
[118] *((byte*) print_char_at::at#4) ← (byte) print_char_at::ch#4
|
||||
to:print_char_at::@return
|
||||
print_char_at::@return: scope:[print_char_at] from print_char_at
|
||||
[128] return
|
||||
[119] return
|
||||
to:@return
|
||||
print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2
|
||||
[129] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4
|
||||
[130] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0)
|
||||
[131] (byte*) print_char_at::at#2 ← (byte*) print_byte_at::at#0
|
||||
[132] call print_char_at
|
||||
[120] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4
|
||||
[121] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0)
|
||||
[122] (byte*) print_char_at::at#2 ← (byte*) print_byte_at::at#0
|
||||
[123] call print_char_at
|
||||
to:print_byte_at::@1
|
||||
print_byte_at::@1: scope:[print_byte_at] from print_byte_at
|
||||
[133] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#0 & (byte) $f
|
||||
[134] (byte*) print_char_at::at#3 ← (byte*) print_byte_at::at#0 + (byte) 1
|
||||
[135] (byte) print_char_at::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2)
|
||||
[136] call print_char_at
|
||||
[124] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#0 & (byte) $f
|
||||
[125] (byte*) print_char_at::at#3 ← (byte*) print_byte_at::at#0 + (byte) 1
|
||||
[126] (byte) print_char_at::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2)
|
||||
[127] call print_char_at
|
||||
to:print_byte_at::@return
|
||||
print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1
|
||||
[137] return
|
||||
[128] return
|
||||
to:@return
|
||||
rotate_matrix: scope:[rotate_matrix] from anim::@6
|
||||
[138] *((const signed byte*) xr#0) ← (signed byte) rotate_matrix::x#0
|
||||
[139] *((const signed byte*) yr#0) ← (signed byte) rotate_matrix::y#0
|
||||
[140] *((const signed byte*) zr#0) ← (signed byte) rotate_matrix::z#0
|
||||
[129] *((const signed byte*) xr#0) ← (signed byte) rotate_matrix::x#0
|
||||
[130] *((const signed byte*) yr#0) ← (signed byte) rotate_matrix::y#0
|
||||
[131] *((const signed byte*) zr#0) ← (signed byte) rotate_matrix::z#0
|
||||
asm { ldxzr C1: ldamulf_sqr1,x sec C2: sbcmulf_sqr2,x staC3+1 F1: ldamulf_sqr1,x sec F2: sbcmulf_sqr2,x staF3+1 I1: ldamulf_sqr1,x sec I2: sbcmulf_sqr2,x staI3+1 ldxxr ldyyr I3: lda#0 clc G1: adcmulf_sqr1,x sec G2: sbcmulf_sqr2,x clc H1: adcmulf_sqr1,y sec H2: sbcmulf_sqr2,y stazr staPP+1 PP: ldaPERSP_Z stapp stapsp1 eor#$ff stapsp2 C3: lda#0 clc A1: adcmulf_sqr1,x sec A2: sbcmulf_sqr2,x clc B1: adcmulf_sqr1,y sec B2: sbcmulf_sqr2,y staxr staXX+1 clc F3: lda#0 clc D1: adcmulf_sqr1,x sec D2: sbcmulf_sqr2,x clc E1: adcmulf_sqr1,y sec E2: sbcmulf_sqr2,y stayr tay lda(psp1),y sec sbc(psp2),y stayp XX: ldy#0 lda(psp1),y sec sbc(psp2),y staxp }
|
||||
to:rotate_matrix::@return
|
||||
rotate_matrix::@return: scope:[rotate_matrix] from rotate_matrix
|
||||
[142] return
|
||||
[133] return
|
||||
to:@return
|
||||
store_matrix: scope:[store_matrix] from anim::@8
|
||||
asm { ldarotation_matrix+0 starotate_matrix.A1+1 eor#$ff starotate_matrix.A2+1 ldarotation_matrix+1 starotate_matrix.B1+1 eor#$ff starotate_matrix.B2+1 ldarotation_matrix+2 starotate_matrix.C1+1 eor#$ff starotate_matrix.C2+1 ldarotation_matrix+3 starotate_matrix.D1+1 eor#$ff starotate_matrix.D2+1 ldarotation_matrix+4 starotate_matrix.E1+1 eor#$ff starotate_matrix.E2+1 ldarotation_matrix+5 starotate_matrix.F1+1 eor#$ff starotate_matrix.F2+1 ldarotation_matrix+6 starotate_matrix.G1+1 eor#$ff starotate_matrix.G2+1 ldarotation_matrix+7 starotate_matrix.H1+1 eor#$ff starotate_matrix.H2+1 ldarotation_matrix+8 starotate_matrix.I1+1 eor#$ff starotate_matrix.I2+1 }
|
||||
to:store_matrix::@return
|
||||
store_matrix::@return: scope:[store_matrix] from store_matrix
|
||||
[144] return
|
||||
[135] return
|
||||
to:@return
|
||||
calculate_matrix: scope:[calculate_matrix] from anim::@5
|
||||
[145] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0
|
||||
[146] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0
|
||||
[147] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0
|
||||
[148] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0
|
||||
[149] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0
|
||||
[150] (signed byte) calculate_matrix::t6#0 ← (signed byte) calculate_matrix::sx#0 - (signed byte) calculate_matrix::t1#0
|
||||
[151] (signed byte) calculate_matrix::t7#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t1#0
|
||||
[152] (signed byte) calculate_matrix::t8#0 ← (signed byte) calculate_matrix::t2#0 - (signed byte) calculate_matrix::sx#0
|
||||
[153] (signed byte) calculate_matrix::t9#0 ← (signed byte) calculate_matrix::sy#0 - (signed byte) calculate_matrix::sx#0
|
||||
[154] (signed byte) calculate_matrix::t10#0 ← (signed byte) calculate_matrix::sy#0 + (signed byte) calculate_matrix::sx#0
|
||||
[155] (signed byte~) calculate_matrix::$10 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t1#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t2#0)
|
||||
[156] *((const signed byte[9]) rotation_matrix#0) ← (signed byte~) calculate_matrix::$10
|
||||
[157] (signed byte~) calculate_matrix::$11 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t1#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t2#0)
|
||||
[158] *((const signed byte[9]) rotation_matrix#0+(byte) 1) ← (signed byte~) calculate_matrix::$11
|
||||
[159] (signed byte~) calculate_matrix::$12 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) + *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0)
|
||||
[160] *((const signed byte[9]) rotation_matrix#0+(byte) 2) ← (signed byte~) calculate_matrix::$12
|
||||
[161] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0)
|
||||
[162] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[163] (signed byte~) calculate_matrix::$15 ← (signed byte~) calculate_matrix::$14 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[164] (signed byte~) calculate_matrix::$16 ← (signed byte~) calculate_matrix::$15 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[165] (signed byte~) calculate_matrix::$17 ← (signed byte~) calculate_matrix::$16 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[166] *((const signed byte[9]) rotation_matrix#0+(byte) 3) ← (signed byte~) calculate_matrix::$17
|
||||
[167] (signed byte~) calculate_matrix::$18 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t3#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t4#0)
|
||||
[168] (signed byte~) calculate_matrix::$19 ← (signed byte~) calculate_matrix::$18 + *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[169] (signed byte~) calculate_matrix::$20 ← (signed byte~) calculate_matrix::$19 - *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[170] (signed byte~) calculate_matrix::$21 ← (signed byte~) calculate_matrix::$20 - *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[171] (signed byte~) calculate_matrix::$22 ← (signed byte~) calculate_matrix::$21 - *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[172] *((const signed byte[9]) rotation_matrix#0+(byte) 4) ← (signed byte~) calculate_matrix::$22
|
||||
[173] (signed byte~) calculate_matrix::$23 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t9#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t10#0)
|
||||
[174] *((const signed byte[9]) rotation_matrix#0+(byte) 5) ← (signed byte~) calculate_matrix::$23
|
||||
[175] (signed byte~) calculate_matrix::$24 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t4#0) - *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t3#0)
|
||||
[176] (signed byte~) calculate_matrix::$25 ← (signed byte~) calculate_matrix::$24 + *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[177] (signed byte~) calculate_matrix::$26 ← (signed byte~) calculate_matrix::$25 - *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[178] (signed byte~) calculate_matrix::$27 ← (signed byte~) calculate_matrix::$26 - *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[179] (signed byte~) calculate_matrix::$28 ← (signed byte~) calculate_matrix::$27 - *((const signed byte*) SINQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[180] *((const signed byte[9]) rotation_matrix#0+(byte) 6) ← (signed byte~) calculate_matrix::$28
|
||||
[181] (signed byte~) calculate_matrix::$29 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) + *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0)
|
||||
[182] (signed byte~) calculate_matrix::$30 ← (signed byte~) calculate_matrix::$29 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[183] (signed byte~) calculate_matrix::$31 ← (signed byte~) calculate_matrix::$30 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[184] (signed byte~) calculate_matrix::$32 ← (signed byte~) calculate_matrix::$31 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[185] (signed byte~) calculate_matrix::$33 ← (signed byte~) calculate_matrix::$32 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[186] *((const signed byte[9]) rotation_matrix#0+(byte) 7) ← (signed byte~) calculate_matrix::$33
|
||||
[187] (signed byte~) calculate_matrix::$34 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t9#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t10#0)
|
||||
[188] *((const signed byte[9]) rotation_matrix#0+(byte) 8) ← (signed byte~) calculate_matrix::$34
|
||||
[136] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0
|
||||
[137] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0
|
||||
[138] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0
|
||||
[139] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0
|
||||
[140] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0
|
||||
[141] (signed byte) calculate_matrix::t6#0 ← (signed byte) calculate_matrix::sx#0 - (signed byte) calculate_matrix::t1#0
|
||||
[142] (signed byte) calculate_matrix::t7#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t1#0
|
||||
[143] (signed byte) calculate_matrix::t8#0 ← (signed byte) calculate_matrix::t2#0 - (signed byte) calculate_matrix::sx#0
|
||||
[144] (signed byte) calculate_matrix::t9#0 ← (signed byte) calculate_matrix::sy#0 - (signed byte) calculate_matrix::sx#0
|
||||
[145] (signed byte) calculate_matrix::t10#0 ← (signed byte) calculate_matrix::sy#0 + (signed byte) calculate_matrix::sx#0
|
||||
[146] (signed byte~) calculate_matrix::$10 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t1#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t2#0)
|
||||
[147] *((const signed byte[9]) rotation_matrix#0) ← (signed byte~) calculate_matrix::$10
|
||||
[148] (signed byte~) calculate_matrix::$11 ← *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t1#0) - *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t2#0)
|
||||
[149] *((const signed byte[9]) rotation_matrix#0+(byte) 1) ← (signed byte~) calculate_matrix::$11
|
||||
[150] (signed byte~) calculate_matrix::$12 ← *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::sy#0) + *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::sy#0)
|
||||
[151] *((const signed byte[9]) rotation_matrix#0+(byte) 2) ← (signed byte~) calculate_matrix::$12
|
||||
[152] (signed byte~) calculate_matrix::$13 ← *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t4#0)
|
||||
[153] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[154] (signed byte~) calculate_matrix::$15 ← (signed byte~) calculate_matrix::$14 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[155] (signed byte~) calculate_matrix::$16 ← (signed byte~) calculate_matrix::$15 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[156] (signed byte~) calculate_matrix::$17 ← (signed byte~) calculate_matrix::$16 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[157] *((const signed byte[9]) rotation_matrix#0+(byte) 3) ← (signed byte~) calculate_matrix::$17
|
||||
[158] (signed byte~) calculate_matrix::$18 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t3#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t4#0)
|
||||
[159] (signed byte~) calculate_matrix::$19 ← (signed byte~) calculate_matrix::$18 + *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[160] (signed byte~) calculate_matrix::$20 ← (signed byte~) calculate_matrix::$19 - *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[161] (signed byte~) calculate_matrix::$21 ← (signed byte~) calculate_matrix::$20 - *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[162] (signed byte~) calculate_matrix::$22 ← (signed byte~) calculate_matrix::$21 - *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[163] *((const signed byte[9]) rotation_matrix#0+(byte) 4) ← (signed byte~) calculate_matrix::$22
|
||||
[164] (signed byte~) calculate_matrix::$23 ← *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t9#0) - *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t10#0)
|
||||
[165] *((const signed byte[9]) rotation_matrix#0+(byte) 5) ← (signed byte~) calculate_matrix::$23
|
||||
[166] (signed byte~) calculate_matrix::$24 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t4#0) - *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t3#0)
|
||||
[167] (signed byte~) calculate_matrix::$25 ← (signed byte~) calculate_matrix::$24 + *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[168] (signed byte~) calculate_matrix::$26 ← (signed byte~) calculate_matrix::$25 - *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[169] (signed byte~) calculate_matrix::$27 ← (signed byte~) calculate_matrix::$26 - *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[170] (signed byte~) calculate_matrix::$28 ← (signed byte~) calculate_matrix::$27 - *((const signed byte[$140]) SINQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[171] *((const signed byte[9]) rotation_matrix#0+(byte) 6) ← (signed byte~) calculate_matrix::$28
|
||||
[172] (signed byte~) calculate_matrix::$29 ← *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t3#0) + *((const signed byte[$140]) SINH#0 + (signed byte) calculate_matrix::t4#0)
|
||||
[173] (signed byte~) calculate_matrix::$30 ← (signed byte~) calculate_matrix::$29 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0)
|
||||
[174] (signed byte~) calculate_matrix::$31 ← (signed byte~) calculate_matrix::$30 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t5#0)
|
||||
[175] (signed byte~) calculate_matrix::$32 ← (signed byte~) calculate_matrix::$31 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t7#0)
|
||||
[176] (signed byte~) calculate_matrix::$33 ← (signed byte~) calculate_matrix::$32 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t8#0)
|
||||
[177] *((const signed byte[9]) rotation_matrix#0+(byte) 7) ← (signed byte~) calculate_matrix::$33
|
||||
[178] (signed byte~) calculate_matrix::$34 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t9#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t10#0)
|
||||
[179] *((const signed byte[9]) rotation_matrix#0+(byte) 8) ← (signed byte~) calculate_matrix::$34
|
||||
to:calculate_matrix::@return
|
||||
calculate_matrix::@return: scope:[calculate_matrix] from calculate_matrix
|
||||
[189] return
|
||||
[180] return
|
||||
to:@return
|
||||
debug_print_init: scope:[debug_print_init] from main::@1
|
||||
[190] phi()
|
||||
[191] call print_cls
|
||||
[181] phi()
|
||||
[182] call print_cls
|
||||
to:debug_print_init::@4
|
||||
debug_print_init::@4: scope:[debug_print_init] from debug_print_init
|
||||
[192] phi()
|
||||
[193] call print_str_at
|
||||
[183] phi()
|
||||
[184] call print_str_at
|
||||
to:debug_print_init::@5
|
||||
debug_print_init::@5: scope:[debug_print_init] from debug_print_init::@4
|
||||
[194] phi()
|
||||
[195] call print_str_at
|
||||
[185] phi()
|
||||
[186] call print_str_at
|
||||
to:debug_print_init::@6
|
||||
debug_print_init::@6: scope:[debug_print_init] from debug_print_init::@5
|
||||
[196] phi()
|
||||
[197] call print_str_at
|
||||
[187] phi()
|
||||
[188] call print_str_at
|
||||
to:debug_print_init::@7
|
||||
debug_print_init::@7: scope:[debug_print_init] from debug_print_init::@6
|
||||
[198] phi()
|
||||
[199] call print_str_at
|
||||
[189] phi()
|
||||
[190] call print_str_at
|
||||
to:debug_print_init::@8
|
||||
debug_print_init::@8: scope:[debug_print_init] from debug_print_init::@7
|
||||
[200] phi()
|
||||
[201] call print_str_at
|
||||
[191] phi()
|
||||
[192] call print_str_at
|
||||
to:debug_print_init::@9
|
||||
debug_print_init::@9: scope:[debug_print_init] from debug_print_init::@8
|
||||
[202] phi()
|
||||
[203] call print_str_at
|
||||
[193] phi()
|
||||
[194] call print_str_at
|
||||
to:debug_print_init::@10
|
||||
debug_print_init::@10: scope:[debug_print_init] from debug_print_init::@9
|
||||
[204] phi()
|
||||
[205] call print_str_at
|
||||
[195] phi()
|
||||
[196] call print_str_at
|
||||
to:debug_print_init::@11
|
||||
debug_print_init::@11: scope:[debug_print_init] from debug_print_init::@10
|
||||
[206] phi()
|
||||
[207] call print_str_at
|
||||
[197] phi()
|
||||
[198] call print_str_at
|
||||
to:debug_print_init::@12
|
||||
debug_print_init::@12: scope:[debug_print_init] from debug_print_init::@11
|
||||
[208] phi()
|
||||
[209] call print_str_at
|
||||
[199] phi()
|
||||
[200] call print_str_at
|
||||
to:debug_print_init::@13
|
||||
debug_print_init::@13: scope:[debug_print_init] from debug_print_init::@12
|
||||
[210] phi()
|
||||
[211] call print_str_at
|
||||
[201] phi()
|
||||
[202] call print_str_at
|
||||
to:debug_print_init::@14
|
||||
debug_print_init::@14: scope:[debug_print_init] from debug_print_init::@13
|
||||
[212] phi()
|
||||
[213] call print_str_at
|
||||
[203] phi()
|
||||
[204] call print_str_at
|
||||
to:debug_print_init::@15
|
||||
debug_print_init::@15: scope:[debug_print_init] from debug_print_init::@14
|
||||
[214] phi()
|
||||
[215] call print_str_at
|
||||
[205] phi()
|
||||
[206] call print_str_at
|
||||
to:debug_print_init::@1
|
||||
debug_print_init::@1: scope:[debug_print_init] from debug_print_init::@15 debug_print_init::@3
|
||||
[216] (byte) debug_print_init::i#2 ← phi( debug_print_init::@15/(byte) 0 debug_print_init::@3/(byte) debug_print_init::i#1 )
|
||||
[216] (byte) debug_print_init::c#2 ← phi( debug_print_init::@15/(byte) 4 debug_print_init::@3/(byte) debug_print_init::c#1 )
|
||||
[217] (byte*) print_sbyte_at::at#0 ← (const byte*) debug_print_init::at_line#0 + (byte) debug_print_init::c#2
|
||||
[218] (signed byte) print_sbyte_at::b#1 ← *((const signed byte[8]) xs#0 + (byte) debug_print_init::i#2)
|
||||
[219] call print_sbyte_at
|
||||
[207] (byte) debug_print_init::i#2 ← phi( debug_print_init::@15/(byte) 0 debug_print_init::@3/(byte) debug_print_init::i#1 )
|
||||
[207] (byte) debug_print_init::c#2 ← phi( debug_print_init::@15/(byte) 4 debug_print_init::@3/(byte) debug_print_init::c#1 )
|
||||
[208] (byte*) print_sbyte_at::at#0 ← (const byte*) debug_print_init::at_line#0 + (byte) debug_print_init::c#2
|
||||
[209] (signed byte) print_sbyte_at::b#1 ← *((const signed byte[8]) xs#0 + (byte) debug_print_init::i#2)
|
||||
[210] call print_sbyte_at
|
||||
to:debug_print_init::@16
|
||||
debug_print_init::@16: scope:[debug_print_init] from debug_print_init::@1
|
||||
[220] (byte*) print_sbyte_at::at#1 ← (const byte*) debug_print_init::at_line#0+(byte)(number) $28*(number) 1 + (byte) debug_print_init::c#2
|
||||
[221] (signed byte) print_sbyte_at::b#2 ← *((const signed byte[8]) ys#0 + (byte) debug_print_init::i#2)
|
||||
[222] call print_sbyte_at
|
||||
[211] (byte*) print_sbyte_at::at#1 ← (const byte*) debug_print_init::at_line#0+(byte)(number) $28*(number) 1 + (byte) debug_print_init::c#2
|
||||
[212] (signed byte) print_sbyte_at::b#2 ← *((const signed byte[8]) ys#0 + (byte) debug_print_init::i#2)
|
||||
[213] call print_sbyte_at
|
||||
to:debug_print_init::@17
|
||||
debug_print_init::@17: scope:[debug_print_init] from debug_print_init::@16
|
||||
[223] (byte*) print_sbyte_at::at#2 ← (const byte*) debug_print_init::at_line#0+(byte)(number) $28*(number) 2 + (byte) debug_print_init::c#2
|
||||
[224] (signed byte) print_sbyte_at::b#3 ← *((const signed byte[8]) zs#0 + (byte) debug_print_init::i#2)
|
||||
[225] call print_sbyte_at
|
||||
[214] (byte*) print_sbyte_at::at#2 ← (const byte*) debug_print_init::at_line#0+(byte)(number) $28*(number) 2 + (byte) debug_print_init::c#2
|
||||
[215] (signed byte) print_sbyte_at::b#3 ← *((const signed byte[8]) zs#0 + (byte) debug_print_init::i#2)
|
||||
[216] call print_sbyte_at
|
||||
to:debug_print_init::@2
|
||||
debug_print_init::@2: scope:[debug_print_init] from debug_print_init::@17 debug_print_init::@2
|
||||
[226] (byte) debug_print_init::j#2 ← phi( debug_print_init::@2/(byte) debug_print_init::j#1 debug_print_init::@17/(byte) 0 )
|
||||
[227] (byte) debug_print_init::col#0 ← (byte) 8 + (byte) debug_print_init::i#2
|
||||
[228] (byte*~) debug_print_init::$41 ← (const byte*) debug_print_init::at_cols#0 + (byte) debug_print_init::c#2
|
||||
[229] *((byte*~) debug_print_init::$41 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[230] (byte*~) debug_print_init::$44 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 1 + (byte) debug_print_init::c#2
|
||||
[231] *((byte*~) debug_print_init::$44 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[232] (byte*~) debug_print_init::$47 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 2 + (byte) debug_print_init::c#2
|
||||
[233] *((byte*~) debug_print_init::$47 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[234] (byte*~) debug_print_init::$50 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 3 + (byte) debug_print_init::c#2
|
||||
[235] *((byte*~) debug_print_init::$50 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[236] (byte*~) debug_print_init::$53 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 4 + (byte) debug_print_init::c#2
|
||||
[237] *((byte*~) debug_print_init::$53 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[238] (byte*~) debug_print_init::$56 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 5 + (byte) debug_print_init::c#2
|
||||
[239] *((byte*~) debug_print_init::$56 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[240] (byte*~) debug_print_init::$59 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 6 + (byte) debug_print_init::c#2
|
||||
[241] *((byte*~) debug_print_init::$59 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[242] (byte*~) debug_print_init::$62 ← (const byte*) debug_print_init::at_cols#0+(word)(number) $28*(number) 7 + (byte) debug_print_init::c#2
|
||||
[243] *((byte*~) debug_print_init::$62 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[244] (byte*~) debug_print_init::$65 ← (const byte*) debug_print_init::at_cols#0+(word)(number) $28*(number) 8 + (byte) debug_print_init::c#2
|
||||
[245] *((byte*~) debug_print_init::$65 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[246] (byte) debug_print_init::j#1 ← ++ (byte) debug_print_init::j#2
|
||||
[247] if((byte) debug_print_init::j#1!=(byte) 4) goto debug_print_init::@2
|
||||
[217] (byte) debug_print_init::j#2 ← phi( debug_print_init::@2/(byte) debug_print_init::j#1 debug_print_init::@17/(byte) 0 )
|
||||
[218] (byte) debug_print_init::col#0 ← (byte) 8 + (byte) debug_print_init::i#2
|
||||
[219] (byte*~) debug_print_init::$41 ← (const byte*) debug_print_init::at_cols#0 + (byte) debug_print_init::c#2
|
||||
[220] *((byte*~) debug_print_init::$41 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[221] (byte*~) debug_print_init::$44 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 1 + (byte) debug_print_init::c#2
|
||||
[222] *((byte*~) debug_print_init::$44 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[223] (byte*~) debug_print_init::$47 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 2 + (byte) debug_print_init::c#2
|
||||
[224] *((byte*~) debug_print_init::$47 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[225] (byte*~) debug_print_init::$50 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 3 + (byte) debug_print_init::c#2
|
||||
[226] *((byte*~) debug_print_init::$50 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[227] (byte*~) debug_print_init::$53 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 4 + (byte) debug_print_init::c#2
|
||||
[228] *((byte*~) debug_print_init::$53 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[229] (byte*~) debug_print_init::$56 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 5 + (byte) debug_print_init::c#2
|
||||
[230] *((byte*~) debug_print_init::$56 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[231] (byte*~) debug_print_init::$59 ← (const byte*) debug_print_init::at_cols#0+(byte)(number) $28*(number) 6 + (byte) debug_print_init::c#2
|
||||
[232] *((byte*~) debug_print_init::$59 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[233] (byte*~) debug_print_init::$62 ← (const byte*) debug_print_init::at_cols#0+(word)(number) $28*(number) 7 + (byte) debug_print_init::c#2
|
||||
[234] *((byte*~) debug_print_init::$62 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[235] (byte*~) debug_print_init::$65 ← (const byte*) debug_print_init::at_cols#0+(word)(number) $28*(number) 8 + (byte) debug_print_init::c#2
|
||||
[236] *((byte*~) debug_print_init::$65 + (byte) debug_print_init::j#2) ← (byte) debug_print_init::col#0
|
||||
[237] (byte) debug_print_init::j#1 ← ++ (byte) debug_print_init::j#2
|
||||
[238] if((byte) debug_print_init::j#1!=(byte) 4) goto debug_print_init::@2
|
||||
to:debug_print_init::@3
|
||||
debug_print_init::@3: scope:[debug_print_init] from debug_print_init::@2
|
||||
[248] (byte) debug_print_init::c#1 ← (byte) debug_print_init::c#2 + (byte) 4
|
||||
[249] (byte) debug_print_init::i#1 ← ++ (byte) debug_print_init::i#2
|
||||
[250] if((byte) debug_print_init::i#1!=(byte) 8) goto debug_print_init::@1
|
||||
[239] (byte) debug_print_init::c#1 ← (byte) debug_print_init::c#2 + (byte) 4
|
||||
[240] (byte) debug_print_init::i#1 ← ++ (byte) debug_print_init::i#2
|
||||
[241] if((byte) debug_print_init::i#1!=(byte) 8) goto debug_print_init::@1
|
||||
to:debug_print_init::@return
|
||||
debug_print_init::@return: scope:[debug_print_init] from debug_print_init::@3
|
||||
[251] return
|
||||
[242] return
|
||||
to:@return
|
||||
print_str_at: scope:[print_str_at] from debug_print_init::@10 debug_print_init::@11 debug_print_init::@12 debug_print_init::@13 debug_print_init::@14 debug_print_init::@15 debug_print_init::@4 debug_print_init::@5 debug_print_init::@6 debug_print_init::@7 debug_print_init::@8 debug_print_init::@9
|
||||
[252] (byte*) print_str_at::at#15 ← phi( debug_print_init::@9/(const byte*) SCREEN#0+(word)(number) $28*(number) $12 debug_print_init::@10/(const byte*) SCREEN#0+(word)(number) $28*(number) $13 debug_print_init::@11/(const byte*) SCREEN#0+(word)(number) $28*(number) $14 debug_print_init::@12/(const byte*) SCREEN#0+(word)(number) $28*(number) $15 debug_print_init::@13/(const byte*) SCREEN#0+(word)(number) $28*(number) $16 debug_print_init::@14/(const byte*) SCREEN#0+(word)(number) $28*(number) $17 debug_print_init::@15/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 debug_print_init::@4/(const byte*) SCREEN#0+(byte) $22 debug_print_init::@5/(const byte*) SCREEN#0+(byte)(number) $28*(number) 1+(byte) $22 debug_print_init::@6/(const byte*) SCREEN#0+(byte)(number) $28*(number) 2+(byte) $22 debug_print_init::@7/(const byte*) SCREEN#0+(word)(number) $28*(number) $10 debug_print_init::@8/(const byte*) SCREEN#0+(word)(number) $28*(number) $11 )
|
||||
[252] (byte*) print_str_at::str#15 ← phi( debug_print_init::@9/(const string) debug_print_init::str5 debug_print_init::@10/(const string) debug_print_init::str6 debug_print_init::@11/(const string) debug_print_init::str7 debug_print_init::@12/(const string) debug_print_init::str8 debug_print_init::@13/(const string) debug_print_init::str9 debug_print_init::@14/(const string) debug_print_init::str10 debug_print_init::@15/(const string) debug_print_init::str11 debug_print_init::@4/(const string) debug_print_init::str debug_print_init::@5/(const string) debug_print_init::str1 debug_print_init::@6/(const string) debug_print_init::str2 debug_print_init::@7/(const string) debug_print_init::str3 debug_print_init::@8/(const string) debug_print_init::str4 )
|
||||
[243] (byte*) print_str_at::at#15 ← phi( debug_print_init::@9/(const byte*) SCREEN#0+(word)(number) $28*(number) $12 debug_print_init::@10/(const byte*) SCREEN#0+(word)(number) $28*(number) $13 debug_print_init::@11/(const byte*) SCREEN#0+(word)(number) $28*(number) $14 debug_print_init::@12/(const byte*) SCREEN#0+(word)(number) $28*(number) $15 debug_print_init::@13/(const byte*) SCREEN#0+(word)(number) $28*(number) $16 debug_print_init::@14/(const byte*) SCREEN#0+(word)(number) $28*(number) $17 debug_print_init::@15/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 debug_print_init::@4/(const byte*) SCREEN#0+(byte) $22 debug_print_init::@5/(const byte*) SCREEN#0+(byte)(number) $28*(number) 1+(byte) $22 debug_print_init::@6/(const byte*) SCREEN#0+(byte)(number) $28*(number) 2+(byte) $22 debug_print_init::@7/(const byte*) SCREEN#0+(word)(number) $28*(number) $10 debug_print_init::@8/(const byte*) SCREEN#0+(word)(number) $28*(number) $11 )
|
||||
[243] (byte*) print_str_at::str#15 ← phi( debug_print_init::@9/(const string) debug_print_init::str5 debug_print_init::@10/(const string) debug_print_init::str6 debug_print_init::@11/(const string) debug_print_init::str7 debug_print_init::@12/(const string) debug_print_init::str8 debug_print_init::@13/(const string) debug_print_init::str9 debug_print_init::@14/(const string) debug_print_init::str10 debug_print_init::@15/(const string) debug_print_init::str11 debug_print_init::@4/(const string) debug_print_init::str debug_print_init::@5/(const string) debug_print_init::str1 debug_print_init::@6/(const string) debug_print_init::str2 debug_print_init::@7/(const string) debug_print_init::str3 debug_print_init::@8/(const string) debug_print_init::str4 )
|
||||
to:print_str_at::@1
|
||||
print_str_at::@1: scope:[print_str_at] from print_str_at print_str_at::@2
|
||||
[253] (byte*) print_str_at::at#13 ← phi( print_str_at/(byte*) print_str_at::at#15 print_str_at::@2/(byte*) print_str_at::at#0 )
|
||||
[253] (byte*) print_str_at::str#13 ← phi( print_str_at/(byte*) print_str_at::str#15 print_str_at::@2/(byte*) print_str_at::str#0 )
|
||||
[254] if(*((byte*) print_str_at::str#13)!=(byte) '@') goto print_str_at::@2
|
||||
[244] (byte*) print_str_at::at#13 ← phi( print_str_at/(byte*) print_str_at::at#15 print_str_at::@2/(byte*) print_str_at::at#0 )
|
||||
[244] (byte*) print_str_at::str#13 ← phi( print_str_at/(byte*) print_str_at::str#15 print_str_at::@2/(byte*) print_str_at::str#0 )
|
||||
[245] if(*((byte*) print_str_at::str#13)!=(byte) '@') goto print_str_at::@2
|
||||
to:print_str_at::@return
|
||||
print_str_at::@return: scope:[print_str_at] from print_str_at::@1
|
||||
[255] return
|
||||
[246] return
|
||||
to:@return
|
||||
print_str_at::@2: scope:[print_str_at] from print_str_at::@1
|
||||
[256] *((byte*) print_str_at::at#13) ← *((byte*) print_str_at::str#13)
|
||||
[257] (byte*) print_str_at::at#0 ← ++ (byte*) print_str_at::at#13
|
||||
[258] (byte*) print_str_at::str#0 ← ++ (byte*) print_str_at::str#13
|
||||
[247] *((byte*) print_str_at::at#13) ← *((byte*) print_str_at::str#13)
|
||||
[248] (byte*) print_str_at::at#0 ← ++ (byte*) print_str_at::at#13
|
||||
[249] (byte*) print_str_at::str#0 ← ++ (byte*) print_str_at::str#13
|
||||
to:print_str_at::@1
|
||||
print_cls: scope:[print_cls] from debug_print_init
|
||||
[259] phi()
|
||||
[250] phi()
|
||||
to:print_cls::@1
|
||||
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
|
||||
[260] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_screen#0 print_cls::@1/(byte*) print_cls::sc#1 )
|
||||
[261] *((byte*) print_cls::sc#2) ← (byte) ' '
|
||||
[262] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
|
||||
[263] if((byte*) print_cls::sc#1!=(const byte*) print_screen#0+(word) $3e8) goto print_cls::@1
|
||||
[251] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_screen#0 print_cls::@1/(byte*) print_cls::sc#1 )
|
||||
[252] *((byte*) print_cls::sc#2) ← (byte) ' '
|
||||
[253] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
|
||||
[254] if((byte*) print_cls::sc#1!=(const byte*) print_screen#0+(word) $3e8) goto print_cls::@1
|
||||
to:print_cls::@return
|
||||
print_cls::@return: scope:[print_cls] from print_cls::@1
|
||||
[264] return
|
||||
[255] return
|
||||
to:@return
|
||||
sprites_init: scope:[sprites_init] from main
|
||||
[265] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff
|
||||
[256] *((const byte*) SPRITES_ENABLE#0) ← (byte) $ff
|
||||
to:sprites_init::@1
|
||||
sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1
|
||||
[266] (byte) sprites_init::i#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::i#1 )
|
||||
[267] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE#0/(byte) $40
|
||||
[268] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::i#2) ← (const byte) GREEN#0
|
||||
[269] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2
|
||||
[270] if((byte) sprites_init::i#1!=(byte) 8) goto sprites_init::@1
|
||||
[257] (byte) sprites_init::i#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::i#1 )
|
||||
[258] *((const byte*) sprites_init::sprites_ptr#0 + (byte) sprites_init::i#2) ← (byte)(const byte*) SPRITE#0/(byte) $40
|
||||
[259] *((const byte*) SPRITES_COLS#0 + (byte) sprites_init::i#2) ← (const byte) GREEN#0
|
||||
[260] (byte) sprites_init::i#1 ← ++ (byte) sprites_init::i#2
|
||||
[261] if((byte) sprites_init::i#1!=(byte) 8) goto sprites_init::@1
|
||||
to:sprites_init::@return
|
||||
sprites_init::@return: scope:[sprites_init] from sprites_init::@1
|
||||
[271] return
|
||||
[262] return
|
||||
to:@return
|
||||
|
File diff suppressed because one or more lines are too long
@ -4,33 +4,55 @@
|
||||
(byte*) BORDERCOL
|
||||
(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280
|
||||
(signed byte*) COSH
|
||||
(const signed byte*) COSH#0 COSH = (const signed byte*) SINH#0+(byte) $40
|
||||
(const signed byte*) COSH#0 COSH = (const signed byte[$140]) SINH#0+(byte) $40
|
||||
(signed byte*) COSQ
|
||||
(const signed byte*) COSQ#0 COSQ = (const signed byte*) SINQ#0+(byte) $40
|
||||
(const signed byte*) COSQ#0 COSQ = (const signed byte[$140]) SINQ#0+(byte) $40
|
||||
(byte) GREEN
|
||||
(const byte) GREEN#0 GREEN = (byte) 5
|
||||
(byte) LIGHT_BLUE
|
||||
(const byte) LIGHT_BLUE#0 LIGHT_BLUE = (byte) $e
|
||||
(byte) LIGHT_GREY
|
||||
(const byte) LIGHT_GREY#0 LIGHT_GREY = (byte) $f
|
||||
(signed byte*) PERSP_Z
|
||||
(const signed byte*) PERSP_Z#0 PERSP_Z = (signed byte*) 10240
|
||||
(signed byte[$100]) PERSP_Z
|
||||
(const signed byte[$100]) PERSP_Z#0 PERSP_Z = kickasm {{ {
|
||||
.var d = 256.0
|
||||
.var z0 = 6.0
|
||||
// These values of d/z0 result in table values from $20 to $40 (effectively max is $3f)
|
||||
.for(var z=0;z<$100;z++) {
|
||||
.if(z>127) {
|
||||
.byte round(d / (z0 - ((z - 256) / 64.0)));
|
||||
} else {
|
||||
.byte round(d / (z0 - (z / 64.0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
(byte*) RASTER
|
||||
(const byte*) RASTER#0 RASTER = (byte*) 53266
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(signed byte*) SINH
|
||||
(const signed byte*) SINH#0 SINH = (signed byte*) 8192
|
||||
(byte*) SINH_HI
|
||||
(const byte*) SINH_HI#0 SINH_HI = (byte*) 16896
|
||||
(byte*) SINH_LO
|
||||
(const byte*) SINH_LO#0 SINH_LO = (byte*) 16384
|
||||
(signed byte*) SINQ
|
||||
(const signed byte*) SINQ#0 SINQ = (signed byte*) 8704
|
||||
(byte*) SINQ_HI
|
||||
(const byte*) SINQ_HI#0 SINQ_HI = (byte*) 17920
|
||||
(byte*) SINQ_LO
|
||||
(const byte*) SINQ_LO#0 SINQ_LO = (byte*) 17408
|
||||
(signed byte[$140]) SINH
|
||||
(const signed byte[$140]) SINH#0 SINH = kickasm {{ {
|
||||
.var min = -$2000
|
||||
.var max = $2000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte round((min+(ampl/2)+(ampl/2)*sin(rad))/256)
|
||||
}
|
||||
}
|
||||
}}
|
||||
(signed byte[$140]) SINQ
|
||||
(const signed byte[$140]) SINQ#0 SINQ = kickasm {{ {
|
||||
.var min = -$1000
|
||||
.var max = $1000
|
||||
.var ampl = max-min;
|
||||
.for(var i=0;i<$140;i++) {
|
||||
.var rad = i*2*PI/256;
|
||||
.byte round((min+(ampl/2)+(ampl/2)*sin(rad))/256)
|
||||
}
|
||||
}
|
||||
}}
|
||||
(byte*) SPRITE
|
||||
(const byte*) SPRITE#0 SPRITE = (byte*) 12288
|
||||
(byte*) SPRITES_COLS
|
||||
@ -317,10 +339,20 @@
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
(byte*) mulf_sqr1
|
||||
(const byte*) mulf_sqr1#0 mulf_sqr1 = (byte*) 9216
|
||||
(byte*) mulf_sqr2
|
||||
(const byte*) mulf_sqr2#0 mulf_sqr2 = (byte*) 9728
|
||||
(byte[$200]) mulf_sqr1
|
||||
(const byte[$200]) mulf_sqr1#0 mulf_sqr1 = kickasm {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
}}
|
||||
(byte[$200]) mulf_sqr2
|
||||
(const byte[$200]) mulf_sqr2#0 mulf_sqr2 = kickasm {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
}}
|
||||
(signed byte*) pp
|
||||
(const signed byte*) pp#0 pp = (signed byte*) 243
|
||||
(signed byte[8]) pps
|
||||
|
@ -13,11 +13,6 @@
|
||||
.label ap = $fd
|
||||
.label bp = $fe
|
||||
.label cp = $ff
|
||||
// mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
|
||||
// f(x) = >(( x * x ))
|
||||
.label mulf_sqr1 = $2000
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
.label mulf_sqr2 = $2200
|
||||
main: {
|
||||
.label at = 2
|
||||
.label at_2 = 4
|
||||
@ -252,15 +247,20 @@ print_cls: {
|
||||
}
|
||||
print_hextab: .text "0123456789abcdef"
|
||||
vals: .byte -$5f, -$40, -$20, -$10, 0, $10, $20, $40, $5f
|
||||
.pc = mulf_sqr1 "mulf_sqr1"
|
||||
.for(var i=0;i<$200;i++) {
|
||||
// mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
|
||||
// f(x) = >(( x * x ))
|
||||
.align $100
|
||||
mulf_sqr1:
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
|
||||
.pc = mulf_sqr2 "mulf_sqr2"
|
||||
.for(var i=0;i<$200;i++) {
|
||||
// g(x) = >((( 1 - x ) * ( 1 - x )))
|
||||
.align $100
|
||||
mulf_sqr2:
|
||||
.for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
|
@ -2,165 +2,154 @@
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
kickasm(location (const byte*) mulf_sqr1#0) {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
}}
|
||||
kickasm(location (const byte*) mulf_sqr2#0) {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
}}
|
||||
[3] call main
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[4] phi()
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[5] phi()
|
||||
[6] call init_screen
|
||||
[4] phi()
|
||||
[5] call init_screen
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@5
|
||||
[7] (byte*) main::at#4 ← phi( main/(byte*) 1024+(byte) 4 main::@5/(byte*) main::at#1 )
|
||||
[7] (byte) main::k#2 ← phi( main/(byte) 0 main::@5/(byte) main::k#1 )
|
||||
[8] (signed byte) print_sbyte_at::b#1 ← *((const signed byte[]) vals#0 + (byte) main::k#2)
|
||||
[9] (byte*) print_sbyte_at::at#0 ← (byte*) main::at#4
|
||||
[10] call print_sbyte_at
|
||||
[6] (byte*) main::at#4 ← phi( main/(byte*) 1024+(byte) 4 main::@5/(byte*) main::at#1 )
|
||||
[6] (byte) main::k#2 ← phi( main/(byte) 0 main::@5/(byte) main::k#1 )
|
||||
[7] (signed byte) print_sbyte_at::b#1 ← *((const signed byte[]) vals#0 + (byte) main::k#2)
|
||||
[8] (byte*) print_sbyte_at::at#0 ← (byte*) main::at#4
|
||||
[9] call print_sbyte_at
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@1
|
||||
[11] (byte*) main::at#1 ← (byte*) main::at#4 + (byte) 4
|
||||
[12] (byte) main::k#1 ← ++ (byte) main::k#2
|
||||
[13] if((byte) main::k#1!=(byte) 9) goto main::@1
|
||||
[10] (byte*) main::at#1 ← (byte*) main::at#4 + (byte) 4
|
||||
[11] (byte) main::k#1 ← ++ (byte) main::k#2
|
||||
[12] if((byte) main::k#1!=(byte) 9) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@4 main::@5
|
||||
[14] (byte) main::i#2 ← phi( main::@5/(byte) 0 main::@4/(byte) main::i#1 )
|
||||
[14] (byte*) main::at_line#2 ← phi( main::@5/(byte*) 1024 main::@4/(byte*) main::at#2 )
|
||||
[15] (byte*) main::at#2 ← (byte*) main::at_line#2 + (byte) $28
|
||||
[16] (signed byte) print_sbyte_at::b#2 ← *((const signed byte[]) vals#0 + (byte) main::i#2)
|
||||
[17] (byte*) print_sbyte_at::at#1 ← (byte*) main::at#2
|
||||
[18] call print_sbyte_at
|
||||
[13] (byte) main::i#2 ← phi( main::@5/(byte) 0 main::@4/(byte) main::i#1 )
|
||||
[13] (byte*) main::at_line#2 ← phi( main::@5/(byte*) 1024 main::@4/(byte*) main::at#2 )
|
||||
[14] (byte*) main::at#2 ← (byte*) main::at_line#2 + (byte) $28
|
||||
[15] (signed byte) print_sbyte_at::b#2 ← *((const signed byte[]) vals#0 + (byte) main::i#2)
|
||||
[16] (byte*) print_sbyte_at::at#1 ← (byte*) main::at#2
|
||||
[17] call print_sbyte_at
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@2
|
||||
[19] (byte*~) main::at#12 ← (byte*) main::at#2
|
||||
[18] (byte*~) main::at#12 ← (byte*) main::at#2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@6 main::@8
|
||||
[20] (byte) main::j#2 ← phi( main::@8/(byte) main::j#1 main::@6/(byte) 0 )
|
||||
[20] (byte*) main::at#6 ← phi( main::@8/(byte*) main::at#3 main::@6/(byte*~) main::at#12 )
|
||||
[21] (byte*) main::at#3 ← (byte*) main::at#6 + (byte) 4
|
||||
[22] (signed byte) fmul8::a#0 ← *((const signed byte[]) vals#0 + (byte) main::i#2)
|
||||
[23] (signed byte) fmul8::b#0 ← *((const signed byte[]) vals#0 + (byte) main::j#2)
|
||||
[24] call fmul8
|
||||
[25] (signed byte) fmul8::return#0 ← (signed byte) fmul8::return#1
|
||||
[19] (byte) main::j#2 ← phi( main::@8/(byte) main::j#1 main::@6/(byte) 0 )
|
||||
[19] (byte*) main::at#6 ← phi( main::@8/(byte*) main::at#3 main::@6/(byte*~) main::at#12 )
|
||||
[20] (byte*) main::at#3 ← (byte*) main::at#6 + (byte) 4
|
||||
[21] (signed byte) fmul8::a#0 ← *((const signed byte[]) vals#0 + (byte) main::i#2)
|
||||
[22] (signed byte) fmul8::b#0 ← *((const signed byte[]) vals#0 + (byte) main::j#2)
|
||||
[23] call fmul8
|
||||
[24] (signed byte) fmul8::return#0 ← (signed byte) fmul8::return#1
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@3
|
||||
[26] (signed byte) main::r#0 ← (signed byte) fmul8::return#0
|
||||
[27] (signed byte) print_sbyte_at::b#3 ← (signed byte) main::r#0
|
||||
[28] (byte*) print_sbyte_at::at#2 ← (byte*) main::at#3
|
||||
[29] call print_sbyte_at
|
||||
[25] (signed byte) main::r#0 ← (signed byte) fmul8::return#0
|
||||
[26] (signed byte) print_sbyte_at::b#3 ← (signed byte) main::r#0
|
||||
[27] (byte*) print_sbyte_at::at#2 ← (byte*) main::at#3
|
||||
[28] call print_sbyte_at
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@7
|
||||
[30] (byte) main::j#1 ← ++ (byte) main::j#2
|
||||
[31] if((byte) main::j#1!=(byte) 9) goto main::@3
|
||||
[29] (byte) main::j#1 ← ++ (byte) main::j#2
|
||||
[30] if((byte) main::j#1!=(byte) 9) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@8
|
||||
[32] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[33] if((byte) main::i#1!=(byte) 9) goto main::@2
|
||||
[31] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[32] if((byte) main::i#1!=(byte) 9) goto main::@2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@4
|
||||
[34] return
|
||||
[33] return
|
||||
to:@return
|
||||
print_sbyte_at: scope:[print_sbyte_at] from main::@1 main::@2 main::@7
|
||||
[35] (byte*) print_sbyte_at::at#3 ← phi( main::@1/(byte*) print_sbyte_at::at#0 main::@7/(byte*) print_sbyte_at::at#2 main::@2/(byte*) print_sbyte_at::at#1 )
|
||||
[35] (signed byte) print_sbyte_at::b#4 ← phi( main::@1/(signed byte) print_sbyte_at::b#1 main::@7/(signed byte) print_sbyte_at::b#3 main::@2/(signed byte) print_sbyte_at::b#2 )
|
||||
[36] if((signed byte) print_sbyte_at::b#4<(signed byte) 0) goto print_sbyte_at::@1
|
||||
[34] (byte*) print_sbyte_at::at#3 ← phi( main::@1/(byte*) print_sbyte_at::at#0 main::@7/(byte*) print_sbyte_at::at#2 main::@2/(byte*) print_sbyte_at::at#1 )
|
||||
[34] (signed byte) print_sbyte_at::b#4 ← phi( main::@1/(signed byte) print_sbyte_at::b#1 main::@7/(signed byte) print_sbyte_at::b#3 main::@2/(signed byte) print_sbyte_at::b#2 )
|
||||
[35] if((signed byte) print_sbyte_at::b#4<(signed byte) 0) goto print_sbyte_at::@1
|
||||
to:print_sbyte_at::@3
|
||||
print_sbyte_at::@3: scope:[print_sbyte_at] from print_sbyte_at
|
||||
[37] (byte*) print_char_at::at#1 ← (byte*) print_sbyte_at::at#3
|
||||
[38] call print_char_at
|
||||
[36] (byte*) print_char_at::at#1 ← (byte*) print_sbyte_at::at#3
|
||||
[37] call print_char_at
|
||||
to:print_sbyte_at::@2
|
||||
print_sbyte_at::@2: scope:[print_sbyte_at] from print_sbyte_at::@3 print_sbyte_at::@4
|
||||
[39] (signed byte) print_sbyte_at::b#6 ← phi( print_sbyte_at::@4/(signed byte) print_sbyte_at::b#0 print_sbyte_at::@3/(signed byte) print_sbyte_at::b#4 )
|
||||
[40] (byte) print_byte_at::b#0 ← (byte)(signed byte) print_sbyte_at::b#6
|
||||
[41] (byte*) print_byte_at::at#0 ← (byte*) print_sbyte_at::at#3 + (byte) 1
|
||||
[42] call print_byte_at
|
||||
[38] (signed byte) print_sbyte_at::b#6 ← phi( print_sbyte_at::@4/(signed byte) print_sbyte_at::b#0 print_sbyte_at::@3/(signed byte) print_sbyte_at::b#4 )
|
||||
[39] (byte) print_byte_at::b#0 ← (byte)(signed byte) print_sbyte_at::b#6
|
||||
[40] (byte*) print_byte_at::at#0 ← (byte*) print_sbyte_at::at#3 + (byte) 1
|
||||
[41] call print_byte_at
|
||||
to:print_sbyte_at::@return
|
||||
print_sbyte_at::@return: scope:[print_sbyte_at] from print_sbyte_at::@2
|
||||
[43] return
|
||||
[42] return
|
||||
to:@return
|
||||
print_sbyte_at::@1: scope:[print_sbyte_at] from print_sbyte_at
|
||||
[44] (byte*) print_char_at::at#0 ← (byte*) print_sbyte_at::at#3
|
||||
[45] call print_char_at
|
||||
[43] (byte*) print_char_at::at#0 ← (byte*) print_sbyte_at::at#3
|
||||
[44] call print_char_at
|
||||
to:print_sbyte_at::@4
|
||||
print_sbyte_at::@4: scope:[print_sbyte_at] from print_sbyte_at::@1
|
||||
[46] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#4
|
||||
[45] (signed byte) print_sbyte_at::b#0 ← - (signed byte) print_sbyte_at::b#4
|
||||
to:print_sbyte_at::@2
|
||||
print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1 print_sbyte_at::@1 print_sbyte_at::@3
|
||||
[47] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 )
|
||||
[47] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' )
|
||||
[48] *((byte*) print_char_at::at#4) ← (byte) print_char_at::ch#4
|
||||
[46] (byte*) print_char_at::at#4 ← phi( print_byte_at/(byte*) print_char_at::at#2 print_byte_at::@1/(byte*) print_char_at::at#3 print_sbyte_at::@1/(byte*) print_char_at::at#0 print_sbyte_at::@3/(byte*) print_char_at::at#1 )
|
||||
[46] (byte) print_char_at::ch#4 ← phi( print_byte_at/(byte) print_char_at::ch#2 print_byte_at::@1/(byte) print_char_at::ch#3 print_sbyte_at::@1/(byte) '-' print_sbyte_at::@3/(byte) ' ' )
|
||||
[47] *((byte*) print_char_at::at#4) ← (byte) print_char_at::ch#4
|
||||
to:print_char_at::@return
|
||||
print_char_at::@return: scope:[print_char_at] from print_char_at
|
||||
[49] return
|
||||
[48] return
|
||||
to:@return
|
||||
print_byte_at: scope:[print_byte_at] from print_sbyte_at::@2
|
||||
[50] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4
|
||||
[51] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0)
|
||||
[52] (byte*) print_char_at::at#2 ← (byte*) print_byte_at::at#0
|
||||
[53] call print_char_at
|
||||
[49] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#0 >> (byte) 4
|
||||
[50] (byte) print_char_at::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0)
|
||||
[51] (byte*) print_char_at::at#2 ← (byte*) print_byte_at::at#0
|
||||
[52] call print_char_at
|
||||
to:print_byte_at::@1
|
||||
print_byte_at::@1: scope:[print_byte_at] from print_byte_at
|
||||
[54] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#0 & (byte) $f
|
||||
[55] (byte*) print_char_at::at#3 ← (byte*) print_byte_at::at#0 + (byte) 1
|
||||
[56] (byte) print_char_at::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2)
|
||||
[57] call print_char_at
|
||||
[53] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#0 & (byte) $f
|
||||
[54] (byte*) print_char_at::at#3 ← (byte*) print_byte_at::at#0 + (byte) 1
|
||||
[55] (byte) print_char_at::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2)
|
||||
[56] call print_char_at
|
||||
to:print_byte_at::@return
|
||||
print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1
|
||||
[58] return
|
||||
[57] return
|
||||
to:@return
|
||||
fmul8: scope:[fmul8] from main::@3
|
||||
[59] *((const signed byte*) ap#0) ← (signed byte) fmul8::a#0
|
||||
[60] *((const signed byte*) bp#0) ← (signed byte) fmul8::b#0
|
||||
[58] *((const signed byte*) ap#0) ← (signed byte) fmul8::a#0
|
||||
[59] *((const signed byte*) bp#0) ← (signed byte) fmul8::b#0
|
||||
asm { ldaap staA1+1 eor#$ff staA2+1 ldxbp sec A1: ldamulf_sqr1,x A2: sbcmulf_sqr2,x stacp }
|
||||
[62] (signed byte) fmul8::return#1 ← *((const signed byte*) cp#0)
|
||||
[61] (signed byte) fmul8::return#1 ← *((const signed byte*) cp#0)
|
||||
to:fmul8::@return
|
||||
fmul8::@return: scope:[fmul8] from fmul8
|
||||
[63] return
|
||||
[62] return
|
||||
to:@return
|
||||
init_screen: scope:[init_screen] from main
|
||||
[64] phi()
|
||||
[65] call print_cls
|
||||
[63] phi()
|
||||
[64] call print_cls
|
||||
to:init_screen::@1
|
||||
init_screen::@1: scope:[init_screen] from init_screen init_screen::@1
|
||||
[66] (byte) init_screen::l#2 ← phi( init_screen::@1/(byte) init_screen::l#1 init_screen/(byte) 0 )
|
||||
[67] *((byte*) 55296 + (byte) init_screen::l#2) ← (const byte) init_screen::WHITE#0
|
||||
[68] (byte) init_screen::l#1 ← ++ (byte) init_screen::l#2
|
||||
[69] if((byte) init_screen::l#1!=(byte) $28) goto init_screen::@1
|
||||
[65] (byte) init_screen::l#2 ← phi( init_screen::@1/(byte) init_screen::l#1 init_screen/(byte) 0 )
|
||||
[66] *((byte*) 55296 + (byte) init_screen::l#2) ← (const byte) init_screen::WHITE#0
|
||||
[67] (byte) init_screen::l#1 ← ++ (byte) init_screen::l#2
|
||||
[68] if((byte) init_screen::l#1!=(byte) $28) goto init_screen::@1
|
||||
to:init_screen::@2
|
||||
init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@2
|
||||
[70] (byte) init_screen::m#2 ← phi( init_screen::@1/(byte) 0 init_screen::@2/(byte) init_screen::m#1 )
|
||||
[70] (byte*) init_screen::COLS#3 ← phi( init_screen::@1/(byte*) 55296 init_screen::@2/(byte*) init_screen::COLS#1 )
|
||||
[71] *((byte*) init_screen::COLS#3) ← (const byte) init_screen::WHITE#0
|
||||
[72] *((byte*) init_screen::COLS#3 + (byte) 1) ← (const byte) init_screen::WHITE#0
|
||||
[73] *((byte*) init_screen::COLS#3 + (byte) 2) ← (const byte) init_screen::WHITE#0
|
||||
[74] *((byte*) init_screen::COLS#3 + (byte) 3) ← (const byte) init_screen::WHITE#0
|
||||
[75] (byte*) init_screen::COLS#1 ← (byte*) init_screen::COLS#3 + (byte) $28
|
||||
[76] (byte) init_screen::m#1 ← ++ (byte) init_screen::m#2
|
||||
[77] if((byte) init_screen::m#1!=(byte) $19) goto init_screen::@2
|
||||
[69] (byte) init_screen::m#2 ← phi( init_screen::@1/(byte) 0 init_screen::@2/(byte) init_screen::m#1 )
|
||||
[69] (byte*) init_screen::COLS#3 ← phi( init_screen::@1/(byte*) 55296 init_screen::@2/(byte*) init_screen::COLS#1 )
|
||||
[70] *((byte*) init_screen::COLS#3) ← (const byte) init_screen::WHITE#0
|
||||
[71] *((byte*) init_screen::COLS#3 + (byte) 1) ← (const byte) init_screen::WHITE#0
|
||||
[72] *((byte*) init_screen::COLS#3 + (byte) 2) ← (const byte) init_screen::WHITE#0
|
||||
[73] *((byte*) init_screen::COLS#3 + (byte) 3) ← (const byte) init_screen::WHITE#0
|
||||
[74] (byte*) init_screen::COLS#1 ← (byte*) init_screen::COLS#3 + (byte) $28
|
||||
[75] (byte) init_screen::m#1 ← ++ (byte) init_screen::m#2
|
||||
[76] if((byte) init_screen::m#1!=(byte) $19) goto init_screen::@2
|
||||
to:init_screen::@return
|
||||
init_screen::@return: scope:[init_screen] from init_screen::@2
|
||||
[78] return
|
||||
[77] return
|
||||
to:@return
|
||||
print_cls: scope:[print_cls] from init_screen
|
||||
[79] phi()
|
||||
[78] phi()
|
||||
to:print_cls::@1
|
||||
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
|
||||
[80] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_screen#0 print_cls::@1/(byte*) print_cls::sc#1 )
|
||||
[81] *((byte*) print_cls::sc#2) ← (byte) ' '
|
||||
[82] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
|
||||
[83] if((byte*) print_cls::sc#1!=(const byte*) print_screen#0+(word) $3e8) goto print_cls::@1
|
||||
[79] (byte*) print_cls::sc#2 ← phi( print_cls/(const byte*) print_screen#0 print_cls::@1/(byte*) print_cls::sc#1 )
|
||||
[80] *((byte*) print_cls::sc#2) ← (byte) ' '
|
||||
[81] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
|
||||
[82] if((byte*) print_cls::sc#1!=(const byte*) print_screen#0+(word) $3e8) goto print_cls::@1
|
||||
to:print_cls::@return
|
||||
print_cls::@return: scope:[print_cls] from print_cls::@1
|
||||
[84] return
|
||||
[83] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -61,10 +61,20 @@
|
||||
(byte) main::k#2 reg byte x 6.6000000000000005
|
||||
(signed byte) main::r
|
||||
(signed byte) main::r#0 reg byte a 202.0
|
||||
(byte*) mulf_sqr1
|
||||
(const byte*) mulf_sqr1#0 mulf_sqr1 = (byte*) 8192
|
||||
(byte*) mulf_sqr2
|
||||
(const byte*) mulf_sqr2#0 mulf_sqr2 = (byte*) 8704
|
||||
(byte[$200]) mulf_sqr1
|
||||
(const byte[$200]) mulf_sqr1#0 mulf_sqr1 = kickasm {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((i*i)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) }
|
||||
.if(i>351) { .byte round(((512-i)*(512-i))/256) }
|
||||
}
|
||||
}}
|
||||
(byte[$200]) mulf_sqr2
|
||||
(const byte[$200]) mulf_sqr2#0 mulf_sqr2 = kickasm {{ .for(var i=0;i<$200;i++) {
|
||||
.if(i<=159) { .byte round((-i-1)*(-i-1)/256) }
|
||||
.if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) }
|
||||
.if(i>351) { .byte round(((i-511)*(i-511))/256) }
|
||||
}
|
||||
}}
|
||||
(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at)
|
||||
(byte~) print_byte_at::$0 reg byte a 4.0
|
||||
(byte~) print_byte_at::$2 reg byte y 2.0
|
||||
|
@ -33,7 +33,6 @@
|
||||
.label SCREEN = $400
|
||||
.label BITMAP = $2000
|
||||
.const SIN_SIZE = $200
|
||||
.label sin2 = $1400
|
||||
.label rem16u = $25
|
||||
main: {
|
||||
.const vicSelectGfxBank1_toDd001_return = 3
|
||||
@ -819,8 +818,8 @@ bitmap_init: {
|
||||
bitmap_plot_bit: .fill $100, 0
|
||||
.align $100
|
||||
sin: .fill 2*$200, 0
|
||||
.pc = sin2 "sin2"
|
||||
.for(var i=0; i<512; i++) {
|
||||
sin2:
|
||||
.for(var i=0; i<512; i++) {
|
||||
.word sin(toRadians([i*360]/512))*320
|
||||
}
|
||||
|
||||
|
@ -2,428 +2,422 @@
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
kickasm(location (const signed word*) sin2#0) {{ .for(var i=0; i<512; i++) {
|
||||
.word sin(toRadians([i*360]/512))*320
|
||||
}
|
||||
}}
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[2] phi()
|
||||
[3] call main
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
[4] phi()
|
||||
main: scope:[main] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[6] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[7] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[8] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3
|
||||
[5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[7] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3
|
||||
to:main::vicSelectGfxBank1
|
||||
main::vicSelectGfxBank1: scope:[main] from main
|
||||
[9] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
|
||||
[8] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
|
||||
to:main::vicSelectGfxBank1_toDd001
|
||||
main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1
|
||||
[10] phi()
|
||||
[9] phi()
|
||||
to:main::vicSelectGfxBank1_@1
|
||||
main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
|
||||
[11] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
|
||||
[10] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::vicSelectGfxBank1_@1
|
||||
[12] *((const byte*) D016#0) ← (const byte) VIC_CSEL#0
|
||||
[11] *((const byte*) D016#0) ← (const byte) VIC_CSEL#0
|
||||
to:main::toD0181
|
||||
main::toD0181: scope:[main] from main::@2
|
||||
[13] phi()
|
||||
[12] phi()
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::toD0181
|
||||
[14] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||
[15] call bitmap_init
|
||||
[13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||
[14] call bitmap_init
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
[16] phi()
|
||||
[17] call bitmap_clear
|
||||
[15] phi()
|
||||
[16] call bitmap_clear
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4
|
||||
[18] phi()
|
||||
[19] call sin16s_gen2
|
||||
[17] phi()
|
||||
[18] call sin16s_gen2
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@5
|
||||
[20] phi()
|
||||
[21] call render_sine
|
||||
[19] phi()
|
||||
[20] call render_sine
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@1 main::@6
|
||||
[22] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
|
||||
[21] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
|
||||
to:main::@1
|
||||
render_sine: scope:[render_sine] from main::@6
|
||||
[23] phi()
|
||||
[22] phi()
|
||||
to:render_sine::@1
|
||||
render_sine::@1: scope:[render_sine] from render_sine render_sine::@2
|
||||
[24] (word) render_sine::xpos#3 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::xpos#8 )
|
||||
[24] (word) render_sine::sin_idx#2 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::sin_idx#1 )
|
||||
[25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1
|
||||
[26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10
|
||||
[27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0)
|
||||
[28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
|
||||
[29] call wrap_y
|
||||
[30] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2
|
||||
[23] (word) render_sine::xpos#3 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::xpos#8 )
|
||||
[23] (word) render_sine::sin_idx#2 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::sin_idx#1 )
|
||||
[24] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1
|
||||
[25] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10
|
||||
[26] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0)
|
||||
[27] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0
|
||||
[28] call wrap_y
|
||||
[29] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2
|
||||
to:render_sine::@3
|
||||
render_sine::@3: scope:[render_sine] from render_sine::@1
|
||||
[31] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0
|
||||
[32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3
|
||||
[33] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0
|
||||
[34] call bitmap_plot
|
||||
[30] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0
|
||||
[31] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3
|
||||
[32] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0
|
||||
[33] call bitmap_plot
|
||||
to:render_sine::@4
|
||||
render_sine::@4: scope:[render_sine] from render_sine::@3
|
||||
[35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1
|
||||
[36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11
|
||||
[37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3)
|
||||
[38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a
|
||||
[39] call wrap_y
|
||||
[40] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
|
||||
[34] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1
|
||||
[35] (signed word*~) render_sine::$3 ← (const signed word[$200]) sin2#0 + (word~) render_sine::$11
|
||||
[36] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3)
|
||||
[37] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a
|
||||
[38] call wrap_y
|
||||
[39] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2
|
||||
to:render_sine::@5
|
||||
render_sine::@5: scope:[render_sine] from render_sine::@4
|
||||
[41] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1
|
||||
[42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3
|
||||
[43] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
|
||||
[44] call bitmap_plot
|
||||
[40] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1
|
||||
[41] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3
|
||||
[42] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0
|
||||
[43] call bitmap_plot
|
||||
to:render_sine::@6
|
||||
render_sine::@6: scope:[render_sine] from render_sine::@5
|
||||
[45] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3
|
||||
[46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7
|
||||
[44] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3
|
||||
[45] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7
|
||||
to:render_sine::@2
|
||||
render_sine::@7: scope:[render_sine] from render_sine::@6
|
||||
[47] phi()
|
||||
[46] phi()
|
||||
to:render_sine::@2
|
||||
render_sine::@2: scope:[render_sine] from render_sine::@6 render_sine::@7
|
||||
[48] (word) render_sine::xpos#8 ← phi( render_sine::@6/(byte) 0 render_sine::@7/(word) render_sine::xpos#1 )
|
||||
[49] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2
|
||||
[50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1
|
||||
[47] (word) render_sine::xpos#8 ← phi( render_sine::@6/(byte) 0 render_sine::@7/(word) render_sine::xpos#1 )
|
||||
[48] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2
|
||||
[49] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1
|
||||
to:render_sine::@return
|
||||
render_sine::@return: scope:[render_sine] from render_sine::@2
|
||||
[51] return
|
||||
[50] return
|
||||
to:@return
|
||||
bitmap_plot: scope:[bitmap_plot] from render_sine::@3 render_sine::@5
|
||||
[52] (word) bitmap_plot::x#2 ← phi( render_sine::@3/(word) bitmap_plot::x#0 render_sine::@5/(word) bitmap_plot::x#1 )
|
||||
[52] (byte) bitmap_plot::y#2 ← phi( render_sine::@3/(byte) bitmap_plot::y#0 render_sine::@5/(byte) bitmap_plot::y#1 )
|
||||
[53] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2)
|
||||
[54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8
|
||||
[55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
|
||||
[56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2
|
||||
[57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
|
||||
[51] (word) bitmap_plot::x#2 ← phi( render_sine::@3/(word) bitmap_plot::x#0 render_sine::@5/(word) bitmap_plot::x#1 )
|
||||
[51] (byte) bitmap_plot::y#2 ← phi( render_sine::@3/(byte) bitmap_plot::y#0 render_sine::@5/(byte) bitmap_plot::y#1 )
|
||||
[52] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2)
|
||||
[53] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8
|
||||
[54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
|
||||
[55] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2
|
||||
[56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
|
||||
to:bitmap_plot::@return
|
||||
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
|
||||
[58] return
|
||||
[57] return
|
||||
to:@return
|
||||
wrap_y: scope:[wrap_y] from render_sine::@1 render_sine::@4
|
||||
[59] (signed word) wrap_y::y#9 ← phi( render_sine::@1/(signed word) wrap_y::y#0 render_sine::@4/(signed word) wrap_y::y#1 )
|
||||
[58] (signed word) wrap_y::y#9 ← phi( render_sine::@1/(signed word) wrap_y::y#0 render_sine::@4/(signed word) wrap_y::y#1 )
|
||||
to:wrap_y::@1
|
||||
wrap_y::@1: scope:[wrap_y] from wrap_y wrap_y::@2
|
||||
[60] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 )
|
||||
[61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2
|
||||
[59] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 )
|
||||
[60] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2
|
||||
to:wrap_y::@3
|
||||
wrap_y::@3: scope:[wrap_y] from wrap_y::@1 wrap_y::@4
|
||||
[62] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 )
|
||||
[63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4
|
||||
[61] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 )
|
||||
[62] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4
|
||||
to:wrap_y::@5
|
||||
wrap_y::@5: scope:[wrap_y] from wrap_y::@3
|
||||
[64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6
|
||||
[63] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6
|
||||
to:wrap_y::@return
|
||||
wrap_y::@return: scope:[wrap_y] from wrap_y::@5
|
||||
[65] return
|
||||
[64] return
|
||||
to:@return
|
||||
wrap_y::@4: scope:[wrap_y] from wrap_y::@3
|
||||
[66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8
|
||||
[65] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8
|
||||
to:wrap_y::@3
|
||||
wrap_y::@2: scope:[wrap_y] from wrap_y::@1
|
||||
[67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8
|
||||
[66] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8
|
||||
to:wrap_y::@1
|
||||
sin16s_gen2: scope:[sin16s_gen2] from main::@5
|
||||
[68] phi()
|
||||
[69] call div32u16u
|
||||
[70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0
|
||||
[67] phi()
|
||||
[68] call div32u16u
|
||||
[69] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0
|
||||
to:sin16s_gen2::@2
|
||||
sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2
|
||||
[71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2
|
||||
[70] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2
|
||||
to:sin16s_gen2::@1
|
||||
sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4
|
||||
[72] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 )
|
||||
[72] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) sin#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 )
|
||||
[72] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 )
|
||||
[73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2
|
||||
[74] call sin16s
|
||||
[75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1
|
||||
[71] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 )
|
||||
[71] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) sin#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 )
|
||||
[71] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 )
|
||||
[72] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2
|
||||
[73] call sin16s
|
||||
[74] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1
|
||||
to:sin16s_gen2::@3
|
||||
sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1
|
||||
[76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0
|
||||
[77] call mul16s
|
||||
[78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0
|
||||
[75] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0
|
||||
[76] call mul16s
|
||||
[77] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0
|
||||
to:sin16s_gen2::@4
|
||||
sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3
|
||||
[79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2
|
||||
[80] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5
|
||||
[81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8
|
||||
[82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD
|
||||
[83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0
|
||||
[84] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2
|
||||
[85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1
|
||||
[78] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2
|
||||
[79] (word~) sin16s_gen2::$8 ← > (signed dword~) sin16s_gen2::$5
|
||||
[80] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$8
|
||||
[81] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD
|
||||
[82] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0
|
||||
[83] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2
|
||||
[84] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1
|
||||
to:sin16s_gen2::@return
|
||||
sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4
|
||||
[86] return
|
||||
[85] return
|
||||
to:@return
|
||||
mul16s: scope:[mul16s] from sin16s_gen2::@3
|
||||
[87] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0
|
||||
[88] call mul16u
|
||||
[89] (dword) mul16u::return#2 ← (dword) mul16u::res#2
|
||||
[86] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0
|
||||
[87] call mul16u
|
||||
[88] (dword) mul16u::return#2 ← (dword) mul16u::res#2
|
||||
to:mul16s::@4
|
||||
mul16s::@4: scope:[mul16s] from mul16s
|
||||
[90] (dword) mul16s::m#0 ← (dword) mul16u::return#2
|
||||
[91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
|
||||
[89] (dword) mul16s::m#0 ← (dword) mul16u::return#2
|
||||
[90] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
|
||||
to:mul16s::@3
|
||||
mul16s::@3: scope:[mul16s] from mul16s::@4
|
||||
[92] (word~) mul16s::$9 ← > (dword) mul16s::m#0
|
||||
[93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0
|
||||
[94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16
|
||||
[91] (word~) mul16s::$9 ← > (dword) mul16s::m#0
|
||||
[92] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0
|
||||
[93] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16
|
||||
to:mul16s::@1
|
||||
mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@4
|
||||
[95] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 )
|
||||
[94] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 )
|
||||
to:mul16s::@2
|
||||
mul16s::@2: scope:[mul16s] from mul16s::@1
|
||||
[96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
|
||||
[95] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
|
||||
to:mul16s::@return
|
||||
mul16s::@return: scope:[mul16s] from mul16s::@2
|
||||
[97] return
|
||||
[96] return
|
||||
to:@return
|
||||
mul16u: scope:[mul16u] from mul16s mulu16_sel
|
||||
[98] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 )
|
||||
[98] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 )
|
||||
[97] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 )
|
||||
[97] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 )
|
||||
to:mul16u::@1
|
||||
mul16u::@1: scope:[mul16u] from mul16u mul16u::@3
|
||||
[99] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 )
|
||||
[99] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 )
|
||||
[99] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 )
|
||||
[100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
|
||||
[98] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 )
|
||||
[98] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 )
|
||||
[98] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 )
|
||||
[99] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
|
||||
to:mul16u::@return
|
||||
mul16u::@return: scope:[mul16u] from mul16u::@1
|
||||
[101] return
|
||||
[100] return
|
||||
to:@return
|
||||
mul16u::@2: scope:[mul16u] from mul16u::@1
|
||||
[102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1
|
||||
[103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3
|
||||
[101] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1
|
||||
[102] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3
|
||||
to:mul16u::@4
|
||||
mul16u::@4: scope:[mul16u] from mul16u::@2
|
||||
[104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2
|
||||
[103] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2
|
||||
to:mul16u::@3
|
||||
mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4
|
||||
[105] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 )
|
||||
[106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1
|
||||
[107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1
|
||||
[104] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 )
|
||||
[105] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1
|
||||
[106] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1
|
||||
to:mul16u::@1
|
||||
sin16s: scope:[sin16s] from sin16s_gen2::@1
|
||||
[108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1
|
||||
[107] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1
|
||||
to:sin16s::@4
|
||||
sin16s::@4: scope:[sin16s] from sin16s
|
||||
[109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0
|
||||
[108] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0
|
||||
to:sin16s::@1
|
||||
sin16s::@1: scope:[sin16s] from sin16s sin16s::@4
|
||||
[110] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 )
|
||||
[110] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 )
|
||||
[111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2
|
||||
[109] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 )
|
||||
[109] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 )
|
||||
[110] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2
|
||||
to:sin16s::@5
|
||||
sin16s::@5: scope:[sin16s] from sin16s::@1
|
||||
[112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4
|
||||
[111] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4
|
||||
to:sin16s::@2
|
||||
sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5
|
||||
[113] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 )
|
||||
[114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3
|
||||
[115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4
|
||||
[116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0
|
||||
[117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0
|
||||
[118] call mulu16_sel
|
||||
[119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12
|
||||
[112] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 )
|
||||
[113] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3
|
||||
[114] (word) sin16s::x1#0 ← > (dword~) sin16s::$4
|
||||
[115] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0
|
||||
[116] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0
|
||||
[117] call mulu16_sel
|
||||
[118] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12
|
||||
to:sin16s::@7
|
||||
sin16s::@7: scope:[sin16s] from sin16s::@2
|
||||
[120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0
|
||||
[121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
|
||||
[122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0
|
||||
[123] call mulu16_sel
|
||||
[124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12
|
||||
[119] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0
|
||||
[120] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0
|
||||
[121] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0
|
||||
[122] call mulu16_sel
|
||||
[123] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12
|
||||
to:sin16s::@8
|
||||
sin16s::@8: scope:[sin16s] from sin16s::@7
|
||||
[125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1
|
||||
[126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
|
||||
[127] call mulu16_sel
|
||||
[128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12
|
||||
[124] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1
|
||||
[125] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0
|
||||
[126] call mulu16_sel
|
||||
[127] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12
|
||||
to:sin16s::@9
|
||||
sin16s::@9: scope:[sin16s] from sin16s::@8
|
||||
[129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2
|
||||
[130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0
|
||||
[131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0
|
||||
[132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0
|
||||
[133] call mulu16_sel
|
||||
[134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12
|
||||
[128] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2
|
||||
[129] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0
|
||||
[130] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0
|
||||
[131] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0
|
||||
[132] call mulu16_sel
|
||||
[133] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12
|
||||
to:sin16s::@10
|
||||
sin16s::@10: scope:[sin16s] from sin16s::@9
|
||||
[135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10
|
||||
[136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
|
||||
[137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0
|
||||
[138] call mulu16_sel
|
||||
[139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12
|
||||
[134] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10
|
||||
[135] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0
|
||||
[136] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0
|
||||
[137] call mulu16_sel
|
||||
[138] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12
|
||||
to:sin16s::@11
|
||||
sin16s::@11: scope:[sin16s] from sin16s::@10
|
||||
[140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11
|
||||
[141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4
|
||||
[142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0
|
||||
[143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12
|
||||
[139] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11
|
||||
[140] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4
|
||||
[141] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0
|
||||
[142] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12
|
||||
to:sin16s::@6
|
||||
sin16s::@6: scope:[sin16s] from sin16s::@11
|
||||
[144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1
|
||||
[143] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1
|
||||
to:sin16s::@3
|
||||
sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6
|
||||
[145] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 )
|
||||
[144] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 )
|
||||
to:sin16s::@return
|
||||
sin16s::@return: scope:[sin16s] from sin16s::@3
|
||||
[146] return
|
||||
[145] return
|
||||
to:@return
|
||||
sin16s::@12: scope:[sin16s] from sin16s::@11
|
||||
[147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1
|
||||
[146] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1
|
||||
to:sin16s::@3
|
||||
mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9
|
||||
[148] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 )
|
||||
[148] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 )
|
||||
[148] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 )
|
||||
[149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5
|
||||
[150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
|
||||
[151] call mul16u
|
||||
[152] (dword) mul16u::return#3 ← (dword) mul16u::res#2
|
||||
[147] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 )
|
||||
[147] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 )
|
||||
[147] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 )
|
||||
[148] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5
|
||||
[149] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5
|
||||
[150] call mul16u
|
||||
[151] (dword) mul16u::return#3 ← (dword) mul16u::res#2
|
||||
to:mulu16_sel::@1
|
||||
mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel
|
||||
[153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3
|
||||
[154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5
|
||||
[155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1
|
||||
[152] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3
|
||||
[153] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5
|
||||
[154] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1
|
||||
to:mulu16_sel::@return
|
||||
mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1
|
||||
[156] return
|
||||
[155] return
|
||||
to:@return
|
||||
div32u16u: scope:[div32u16u] from sin16s_gen2
|
||||
[157] phi()
|
||||
[158] call divr16u
|
||||
[159] (word) divr16u::return#2 ← (word) divr16u::return#0
|
||||
[156] phi()
|
||||
[157] call divr16u
|
||||
[158] (word) divr16u::return#2 ← (word) divr16u::return#0
|
||||
to:div32u16u::@1
|
||||
div32u16u::@1: scope:[div32u16u] from div32u16u
|
||||
[160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2
|
||||
[161] (word) divr16u::rem#4 ← (word) rem16u#1
|
||||
[162] call divr16u
|
||||
[163] (word) divr16u::return#3 ← (word) divr16u::return#0
|
||||
[159] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2
|
||||
[160] (word) divr16u::rem#4 ← (word) rem16u#1
|
||||
[161] call divr16u
|
||||
[162] (word) divr16u::return#3 ← (word) divr16u::return#0
|
||||
to:div32u16u::@2
|
||||
div32u16u::@2: scope:[div32u16u] from div32u16u::@1
|
||||
[164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3
|
||||
[165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0
|
||||
[163] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3
|
||||
[164] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0
|
||||
to:div32u16u::@return
|
||||
div32u16u::@return: scope:[div32u16u] from div32u16u::@2
|
||||
[166] return
|
||||
[165] return
|
||||
to:@return
|
||||
divr16u: scope:[divr16u] from div32u16u div32u16u::@1
|
||||
[167] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 )
|
||||
[167] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 )
|
||||
[166] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 )
|
||||
[166] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 )
|
||||
to:divr16u::@1
|
||||
divr16u::@1: scope:[divr16u] from divr16u divr16u::@3
|
||||
[168] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 )
|
||||
[168] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 )
|
||||
[168] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 )
|
||||
[168] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 )
|
||||
[169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1
|
||||
[170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3
|
||||
[171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
|
||||
[172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
|
||||
[167] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 )
|
||||
[167] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 )
|
||||
[167] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 )
|
||||
[167] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 )
|
||||
[168] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1
|
||||
[169] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3
|
||||
[170] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80
|
||||
[171] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2
|
||||
to:divr16u::@4
|
||||
divr16u::@4: scope:[divr16u] from divr16u::@1
|
||||
[173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1
|
||||
[172] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1
|
||||
to:divr16u::@2
|
||||
divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4
|
||||
[174] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
|
||||
[175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1
|
||||
[176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1
|
||||
[177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3
|
||||
[173] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 )
|
||||
[174] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1
|
||||
[175] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1
|
||||
[176] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3
|
||||
to:divr16u::@5
|
||||
divr16u::@5: scope:[divr16u] from divr16u::@2
|
||||
[178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1
|
||||
[179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0
|
||||
[177] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1
|
||||
[178] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0
|
||||
to:divr16u::@3
|
||||
divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5
|
||||
[180] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
|
||||
[180] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 )
|
||||
[181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2
|
||||
[182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1
|
||||
[179] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 )
|
||||
[179] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 )
|
||||
[180] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2
|
||||
[181] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1
|
||||
to:divr16u::@6
|
||||
divr16u::@6: scope:[divr16u] from divr16u::@3
|
||||
[183] (word) rem16u#1 ← (word) divr16u::rem#11
|
||||
[182] (word) rem16u#1 ← (word) divr16u::rem#11
|
||||
to:divr16u::@return
|
||||
divr16u::@return: scope:[divr16u] from divr16u::@6
|
||||
[184] return
|
||||
[183] return
|
||||
to:@return
|
||||
bitmap_clear: scope:[bitmap_clear] from main::@4
|
||||
[185] phi()
|
||||
[186] call memset
|
||||
[184] phi()
|
||||
[185] call memset
|
||||
to:bitmap_clear::@1
|
||||
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear
|
||||
[187] phi()
|
||||
[188] call memset
|
||||
[186] phi()
|
||||
[187] call memset
|
||||
to:bitmap_clear::@return
|
||||
bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
|
||||
[189] return
|
||||
[188] return
|
||||
to:@return
|
||||
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
|
||||
[190] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
|
||||
[190] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
|
||||
[190] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
|
||||
[191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2
|
||||
[192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2
|
||||
[189] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
|
||||
[189] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
|
||||
[189] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
|
||||
[190] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2
|
||||
[191] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2
|
||||
to:memset::@1
|
||||
memset::@1: scope:[memset] from memset memset::@1
|
||||
[193] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 )
|
||||
[194] *((byte*) memset::dst#2) ← (byte) memset::c#3
|
||||
[195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
[196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1
|
||||
[192] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 )
|
||||
[193] *((byte*) memset::dst#2) ← (byte) memset::c#3
|
||||
[194] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
[195] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1
|
||||
to:memset::@return
|
||||
memset::@return: scope:[memset] from memset::@1
|
||||
[197] return
|
||||
[196] return
|
||||
to:@return
|
||||
bitmap_init: scope:[bitmap_init] from main::@3
|
||||
[198] phi()
|
||||
[197] phi()
|
||||
to:bitmap_init::@1
|
||||
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
|
||||
[199] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
|
||||
[199] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
|
||||
[200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
|
||||
[201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
|
||||
[202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
|
||||
[198] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
|
||||
[198] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
|
||||
[199] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
|
||||
[200] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
|
||||
[201] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
|
||||
to:bitmap_init::@2
|
||||
bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1
|
||||
[203] phi()
|
||||
[202] phi()
|
||||
to:bitmap_init::@2
|
||||
bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
|
||||
[204] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
|
||||
[205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
|
||||
[206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
|
||||
[203] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
|
||||
[204] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
|
||||
[205] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
|
||||
to:bitmap_init::@3
|
||||
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
|
||||
[207] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
|
||||
[207] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
|
||||
[208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
|
||||
[209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
|
||||
[210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
|
||||
[211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
|
||||
[212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
|
||||
[213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
|
||||
[214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
|
||||
[206] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
|
||||
[206] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
|
||||
[207] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
|
||||
[208] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
|
||||
[209] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
|
||||
[210] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
|
||||
[211] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
|
||||
[212] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
|
||||
[213] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
|
||||
to:bitmap_init::@5
|
||||
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3
|
||||
[215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
|
||||
[214] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
|
||||
to:bitmap_init::@4
|
||||
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5
|
||||
[216] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
|
||||
[217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
|
||||
[218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
|
||||
[215] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
|
||||
[216] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
|
||||
[217] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
|
||||
to:bitmap_init::@return
|
||||
bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4
|
||||
[219] return
|
||||
[218] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,4 @@
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -378,8 +377,11 @@
|
||||
(dword) sin16s_gen2::x
|
||||
(dword) sin16s_gen2::x#1 x zp ZP_DWORD:8 7.333333333333333
|
||||
(dword) sin16s_gen2::x#2 x zp ZP_DWORD:8 3.0
|
||||
(signed word*) sin2
|
||||
(const signed word*) sin2#0 sin2 = (signed word*) 5120
|
||||
(signed word[$200]) sin2
|
||||
(const signed word[$200]) sin2#0 sin2 = kickasm {{ .for(var i=0; i<512; i++) {
|
||||
.word sin(toRadians([i*360]/512))*320
|
||||
}
|
||||
}}
|
||||
(byte()) wrap_y((signed word) wrap_y::y)
|
||||
(label) wrap_y::@1
|
||||
(label) wrap_y::@2
|
||||
|
Loading…
x
Reference in New Issue
Block a user