1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-20 02:32:36 +00:00

Added CORDIC atan2 implementation.

This commit is contained in:
jespergravgaard 2019-06-26 09:24:25 +02:00
parent 7574ed744c
commit c3cff0dff1
15 changed files with 6954 additions and 4473 deletions

View File

@ -0,0 +1,8 @@
cpx #0
beq !e+
!l:
cmp #$80
ror
dex
bne !l-
!e:

View File

@ -0,0 +1,8 @@
cpy #0
beq !e+
!l:
cmp #$80
ror
dey
bne !l-
!e:

View File

@ -0,0 +1,4 @@
cmp #0
beq !+
bpl {la1}
!:

View File

@ -0,0 +1,2 @@
cmp #0
bne {la1}

View File

@ -35,6 +35,11 @@ public class TestPrograms {
public TestPrograms() {
}
@Test
public void testCordicAtan2() throws IOException, URISyntaxException {
compileAndCompare("cordic-atan2");
}
@Test
public void testDefaultFont() throws IOException, URISyntaxException {
compileAndCompare("default-font");

View File

@ -17,10 +17,10 @@ const word* VXSIN = 0x2200;
const word* VYSIN = 0x2280;
// Copy of the screen used for finding chars to process
align(0x100) byte[1000] SCREEN_COPY;
byte* SCREEN_COPY = malloc(1000);
// Screen containing bytes representing the distance to the center
align(0x100) byte[1000] SCREEN_DIST;
byte* SCREEN_DIST = malloc(1000);
// Max number of chars processed at once
const byte NUM_PROCESSING = 8;

View File

@ -0,0 +1,52 @@
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
void main() {
byte* screen = 0x0400;
for(signed byte y: 0..24) {
for(signed byte x: 0..39) {
byte angle = atan2(x, y);
screen[x] = angle;
}
screen+=40;
}
}
// The number of iterations performed during CORDIC atan2 calculation
const byte CORDIC_ITERATIONS = 8;
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
byte* CORDIC_ATAN2_ANGLES = 0x1000;
// Populate cordic angles table
kickasm(pc CORDIC_ATAN2_ANGLES) {{
.fill CORDIC_ITERATIONS, 256*atan(1/pow(2,i))/PI/2
}}
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS
// Returns the angle in hex-degrees (0=0, 128=PI, 256=2*PI)
byte atan2(signed byte x, signed byte y) {
byte angle = 0;
for( byte i: 0..CORDIC_ITERATIONS) {
if(y==0) {
// We found the correct angle!
break;
}
signed byte xd = x>>i;
signed byte yd = y>>i;
if(y>0) {
x += yd;
y -= xd;
angle += CORDIC_ATAN2_ANGLES[i];
} else {
x -= yd;
y += xd;
angle -= CORDIC_ATAN2_ANGLES[i];
}
}
// Iterations complete - return estimated angle
return angle;
}

View File

@ -1,6 +1,6 @@
// Clears start screen throwing around the letters (by turning them into sprites)
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
.const SIZEOF_WORD = 2
.const STATUS_FREE = 0
@ -76,19 +76,51 @@
.const RASTER_IRQ_TOP = $30
.const RASTER_IRQ_MIDDLE = $ff
.const XPOS_RIGHTMOST = BORDER_XPOS_RIGHT<<4
.label SQUARES = malloc.return
.const YPOS_BOTTOMMOST = BORDER_YPOS_BOTTOM<<4
.const XPOS_LEFTMOST = BORDER_XPOS_LEFT-8<<4
.const YPOS_TOPMOST = BORDER_YPOS_TOP-8<<4
.label heap_head = $23
.label SQUARES = $49
.label SCREEN_COPY = $29
.label SCREEN_DIST = $2b
bbegin:
lda #<$3e8
sta malloc.size
lda #>$3e8
sta malloc.size+1
lda #<HEAP_START
sta heap_head
lda #>HEAP_START
sta heap_head+1
jsr malloc
lda malloc.mem
sta SCREEN_COPY
lda malloc.mem+1
sta SCREEN_COPY+1
lda #<$3e8
sta malloc.size
lda #>$3e8
sta malloc.size+1
jsr malloc
lda malloc.mem
sta SCREEN_DIST
lda malloc.mem+1
sta SCREEN_DIST+1
jsr main
rts
main: {
.label src = 2
.label dst = 4
.label src = 2
.label i = 6
.label center_y = $25
.label center_y = $2d
lda SCREEN_DIST
sta init_dist_screen.screen
lda SCREEN_DIST+1
sta init_dist_screen.screen+1
jsr init_dist_screen
lda #<SCREEN_COPY
lda SCREEN_COPY
sta dst
lda #>SCREEN_COPY
lda SCREEN_COPY+1
sta dst+1
lda #<SCREEN
sta src
@ -169,36 +201,36 @@ main: {
jmp b3
}
// Start processing a char - by inserting it into the PROCESSING array
// startProcessing(byte zeropage($26) center_x, byte zeropage($25) center_y)
// startProcessing(byte zeropage($2e) center_x, byte zeropage($2d) center_y)
startProcessing: {
.label _0 = $27
.label _1 = $27
.label _0 = $2f
.label _1 = $2f
.label _5 = $a
.label _6 = $a
.label _8 = 8
.label _9 = 8
.label _11 = $2e
.label _12 = $2e
.label _13 = $2e
.label _15 = $30
.label _16 = $30
.label _17 = $30
.label _23 = $33
.label center_x = $26
.label center_y = $25
.label _11 = $36
.label _12 = $36
.label _13 = $36
.label _15 = $38
.label _16 = $38
.label _17 = $38
.label _23 = $3b
.label center_x = $2e
.label center_y = $2d
.label i = 7
.label offset = $27
.label colPtr = $2b
.label spriteCol = $2d
.label screenPtr = $27
.label offset = $2f
.label colPtr = $33
.label spriteCol = $35
.label screenPtr = $2f
.label spriteData = $a
.label chargenData = 8
.label spriteX = $2e
.label spriteY = $30
.label spritePtr = $32
.label spriteX = $36
.label spriteY = $38
.label spritePtr = $3a
.label freeIdx = 7
.label _47 = $29
.label _48 = $27
.label _47 = $31
.label _48 = $2f
ldx #$ff
b1:
lda #0
@ -452,9 +484,9 @@ startProcessing: {
// Find the non-space char closest to the center of the screen
// If no non-space char is found the distance will be 0xffff
getCharToProcess: {
.label _8 = $35
.label _9 = $35
.label _10 = $35
.label _8 = $3d
.label _9 = $3d
.label _10 = $3d
.label screen_line = $c
.label dist_line = $e
.label y = $10
@ -463,22 +495,22 @@ getCharToProcess: {
.label closest_dist = $11
.label closest_x = $12
.label closest_y = $13
.label _12 = $37
.label _13 = $35
.label _12 = $3f
.label _13 = $3d
lda SCREEN_COPY
sta screen_line
lda SCREEN_COPY+1
sta screen_line+1
lda SCREEN_DIST
sta dist_line
lda SCREEN_DIST+1
sta dist_line+1
lda #0
sta closest_y
sta closest_x
sta y
lda #NOT_FOUND
sta closest_dist
lda #<SCREEN_DIST
sta dist_line
lda #>SCREEN_DIST
sta dist_line+1
lda #<SCREEN_COPY
sta screen_line
lda #>SCREEN_COPY
sta screen_line+1
b1:
ldy #0
b2:
@ -543,12 +575,12 @@ getCharToProcess: {
rol _9+1
asl _9
rol _9+1
clc
lda _10
adc #<SCREEN_COPY
clc
adc SCREEN_COPY
sta _10
lda _10+1
adc #>SCREEN_COPY
adc SCREEN_COPY+1
sta _10+1
// clear the found char on the screen copy
lda #' '
@ -637,24 +669,25 @@ initSprites: {
}
// Populates 1000 bytes (a screen) with values representing the distance to the center.
// The actual value stored is distance*2 to increase precision
// init_dist_screen(byte* zeropage($17) screen)
init_dist_screen: {
.label yds = $39
.label xds = $3b
.label ds = $3b
.label screen = $17
.label screen_bottomline = $19
.label yds = $41
.label xds = $43
.label ds = $43
.label x = $1b
.label xb = $1c
.label screen_topline = $17
.label screen_bottomline = $19
.label y = $16
jsr init_squares
lda #<SCREEN_DIST+$28*$18
lda screen
clc
adc #<$28*$18
sta screen_bottomline
lda #>SCREEN_DIST+$28*$18
lda screen+1
adc #>$28*$18
sta screen_bottomline+1
lda #<SCREEN_DIST
sta screen_topline
lda #>SCREEN_DIST
sta screen_topline+1
lda #0
sta y
b1:
@ -735,19 +768,23 @@ init_dist_screen: {
// Find the (integer) square root of a word value
// If the square is not an integer then it returns the largest integer N where N*N <= val
// Uses a table of squares that must be initialized by calling init_squares()
// sqrt(word zeropage($3b) val)
// sqrt(word zeropage($43) val)
sqrt: {
.label _1 = $1d
.label _3 = $1d
.label found = $1d
.label val = $3b
.label val = $43
lda SQUARES
sta bsearch16u.items
lda SQUARES+1
sta bsearch16u.items+1
jsr bsearch16u
lda _3
sec
sbc #<SQUARES
sbc SQUARES
sta _3
lda _3+1
sbc #>SQUARES
sbc SQUARES+1
sta _3+1
lsr _1+1
ror _1
@ -759,18 +796,14 @@ sqrt: {
// - items - Pointer to the start of the array to search in
// - num - The number of items in the array
// Returns pointer to an entry in the array that matches the search key
// bsearch16u(word zeropage($3b) key, word* zeropage($1d) items, byte register(X) num)
// bsearch16u(word zeropage($43) key, word* zeropage($1d) items, byte register(X) num)
bsearch16u: {
.label _2 = $1d
.label pivot = $3d
.label result = $3f
.label pivot = $45
.label result = $47
.label return = $1d
.label items = $1d
.label key = $3b
lda #<SQUARES
sta items
lda #>SQUARES
sta items+1
.label key = $43
ldx #NUM_SQUARES
b3:
cpx #0
@ -846,13 +879,14 @@ bsearch16u: {
// Uses a table of squares that must be initialized by calling init_squares()
// sqr(byte register(A) val)
sqr: {
.label return = $3b
.label return_2 = $39
.label return = $43
.label return_2 = $41
asl
tay
lda SQUARES,y
lda (SQUARES),y
sta return
lda SQUARES+1,y
iny
lda (SQUARES),y
sta return+1
rts
}
@ -861,12 +895,16 @@ sqr: {
init_squares: {
.label squares = $21
.label sqr = $1f
lda #NUM_SQUARES*SIZEOF_WORD
sta malloc.size
lda #0
sta malloc.size+1
jsr malloc
ldx #0
lda #<SQUARES
lda SQUARES
sta squares
lda #>SQUARES
lda SQUARES+1
sta squares+1
ldx #0
txa
sta sqr
sta sqr+1
@ -901,8 +939,21 @@ init_squares: {
}
// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block.
// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.
// malloc(word zeropage($25) size)
malloc: {
.label return = HEAP_START
.label mem = $49
.label size = $25
lda heap_head
sta mem
lda heap_head+1
sta mem+1
lda heap_head
clc
adc size
sta heap_head
lda heap_head+1
adc size+1
sta heap_head+1
rts
}
// Raster Interrupt at the bottom of the screen
@ -931,14 +982,14 @@ irqBottom: {
}
// Process any chars in the PROCESSING array
processChars: {
.label _15 = $46
.label _25 = $44
.label processing = $41
.label bitmask = $43
.label i = $23
.label xpos = $44
.label ypos = $48
.label numActive = $24
.label _15 = $50
.label _25 = $4e
.label processing = $4b
.label bitmask = $4d
.label i = $27
.label xpos = $4e
.label ypos = $52
.label numActive = $28
lda #0
sta numActive
sta i
@ -1231,12 +1282,6 @@ irqTop: {
ldy #00
rti
}
// Copy of the screen used for finding chars to process
.align $100
SCREEN_COPY: .fill $3e8, 0
// Screen containing bytes representing the distance to the center
.align $100
SCREEN_DIST: .fill $3e8, 0
// Sprites currently being processed in the interrupt
PROCESSING: .fill $e*NUM_PROCESSING, 0
.pc = VXSIN "VXSIN"

View File

@ -2,6 +2,17 @@
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call malloc
to:@4
@4: scope:[] from @1
[3] (void*) SCREEN_COPY#0 ← (void*)(byte*) malloc::mem#0
[4] call malloc
to:@5
@5: scope:[] from @4
[5] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0
to:@2
@2: scope:[] from @5
kickasm(location (const word*) VXSIN#0) {{ .for(var i=0; i<40; i++) {
.word -sin(toRadians([i*360]/40))*4
}
@ -10,539 +21,554 @@
.word -sin(toRadians([i*360]/25))*4
}
}}
to:@2
@2: scope:[] from @1
[3] phi()
[4] call main
to:@3
@3: scope:[] from @2
[8] phi()
[9] call main
to:@end
@end: scope:[] from @2
[5] phi()
main: scope:[main] from @2
[6] phi()
[7] call init_dist_screen
@end: scope:[] from @3
[10] phi()
main: scope:[main] from @3
[11] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0
[12] call init_dist_screen
to:main::@8
main::@8: scope:[main] from main
[13] (byte*) main::dst#0 ← (byte*)(void*) SCREEN_COPY#0
to:main::@1
main::@1: scope:[main] from main main::@1
[8] (byte*) main::dst#2 ← phi( main::@1/(byte*) main::dst#1 main/(const byte[$3e8]) SCREEN_COPY#0 )
[8] (byte*) main::src#2 ← phi( main::@1/(byte*) main::src#1 main/(const byte*) SCREEN#0 )
[9] *((byte*) main::dst#2) ← *((byte*) main::src#2)
[10] (byte*) main::src#1 ← ++ (byte*) main::src#2
[11] (byte*) main::dst#1 ← ++ (byte*) main::dst#2
[12] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1
main::@1: scope:[main] from main::@1 main::@8
[14] (byte*) main::dst#2 ← phi( main::@1/(byte*) main::dst#1 main::@8/(byte*) main::dst#0 )
[14] (byte*) main::src#2 ← phi( main::@1/(byte*) main::src#1 main::@8/(const byte*) SCREEN#0 )
[15] *((byte*) main::dst#2) ← *((byte*) main::src#2)
[16] (byte*) main::src#1 ← ++ (byte*) main::src#2
[17] (byte*) main::dst#1 ← ++ (byte*) main::dst#2
[18] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[13] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@2/(byte) main::i#1 )
[14] (byte) main::$26 ← (byte) main::i#2 << (byte) 1
[15] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2
[16] (byte) main::$28 ← (byte) main::$27 << (byte) 1
[17] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2
[18] (byte~) main::$16 ← (byte) main::$29 << (byte) 1
[19] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0
[20] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0
[21] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0
[22] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0
[23] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0
[24] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0
[25] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0
[26] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE
[27] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0
[28] (byte) main::i#1 ← ++ (byte) main::i#2
[29] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2
[19] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@2/(byte) main::i#1 )
[20] (byte) main::$26 ← (byte) main::i#2 << (byte) 1
[21] (byte) main::$27 ← (byte) main::$26 + (byte) main::i#2
[22] (byte) main::$28 ← (byte) main::$27 << (byte) 1
[23] (byte) main::$29 ← (byte) main::$28 + (byte) main::i#2
[24] (byte~) main::$16 ← (byte) main::$29 << (byte) 1
[25] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$16) ← (byte) 0
[26] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$16) ← (byte) 0
[27] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) main::$16) ← (byte) 0
[28] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) main::$16) ← (byte) 0
[29] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$16) ← (byte) 0
[30] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$16) ← (byte) 0
[31] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) main::$16) ← (byte) 0
[32] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$16) ← (const byte) STATUS_FREE
[33] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$16) ← (byte*) 0
[34] (byte) main::i#1 ← ++ (byte) main::i#2
[35] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[30] phi()
[31] call initSprites
to:main::@8
main::@8: scope:[main] from main::@3
[32] phi()
[33] call setupRasterIrq
to:main::@4
main::@4: scope:[main] from main::@5 main::@8
[34] phi()
[35] call getCharToProcess
[36] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
[37] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
[38] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1
[36] phi()
[37] call initSprites
to:main::@9
main::@9: scope:[main] from main::@4
[39] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
[40] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
[41] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0
[42] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5
main::@9: scope:[main] from main::@3
[38] phi()
[39] call setupRasterIrq
to:main::@4
main::@4: scope:[main] from main::@5 main::@9
[40] phi()
[41] call getCharToProcess
[42] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
[43] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
[44] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1
to:main::@10
main::@10: scope:[main] from main::@4
[45] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
[46] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
[47] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0
[48] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5
to:main::@6
main::@6: scope:[main] from main::@9
[43] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.'
main::@6: scope:[main] from main::@10
[49] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.'
to:main::@7
main::@7: scope:[main] from main::@6 main::@7
[44] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7)
[50] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7)
to:main::@7
main::@5: scope:[main] from main::@9
[45] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0
[46] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0
[47] call startProcessing
main::@5: scope:[main] from main::@10
[51] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0
[52] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0
[53] call startProcessing
to:main::@4
startProcessing: scope:[startProcessing] from main::@5
[48] phi()
[54] phi()
to:startProcessing::@1
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8
[49] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 )
[55] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 )
to:startProcessing::@2
startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3
[50] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
[51] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1
[52] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2
[53] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1
[54] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2
[55] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1
[56] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3
[56] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
[57] (byte) startProcessing::$42 ← (byte) startProcessing::i#2 << (byte) 1
[58] (byte) startProcessing::$43 ← (byte) startProcessing::$42 + (byte) startProcessing::i#2
[59] (byte) startProcessing::$44 ← (byte) startProcessing::$43 << (byte) 1
[60] (byte) startProcessing::$45 ← (byte) startProcessing::$44 + (byte) startProcessing::i#2
[61] (byte~) startProcessing::$30 ← (byte) startProcessing::$45 << (byte) 1
[62] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$30)!=(const byte) STATUS_FREE) goto startProcessing::@3
to:startProcessing::@4
startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9
[57] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
[58] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
[63] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
[64] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
to:startProcessing::@5
startProcessing::@5: scope:[startProcessing] from startProcessing::@4
[59] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0
[60] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2
[61] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0
[62] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3
[63] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0
[64] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0
[65] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0)
[66] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0
[67] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2
[68] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6
[69] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6
[70] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0)
[71] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0
[72] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3
[73] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9
[65] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0
[66] (word) startProcessing::$47 ← (word~) startProcessing::$0 << (byte) 2
[67] (word) startProcessing::$48 ← (word) startProcessing::$47 + (word~) startProcessing::$0
[68] (word~) startProcessing::$1 ← (word) startProcessing::$48 << (byte) 3
[69] (word) startProcessing::offset#0 ← (word~) startProcessing::$1 + (byte) startProcessing::center_x#0
[70] (byte*) startProcessing::colPtr#0 ← (const byte*) COLS#0 + (word) startProcessing::offset#0
[71] (byte) startProcessing::spriteCol#0 ← *((byte*) startProcessing::colPtr#0)
[72] (byte*) startProcessing::screenPtr#0 ← (const byte*) SCREEN#0 + (word) startProcessing::offset#0
[73] (word~) startProcessing::$5 ← (word)(byte) startProcessing::freeIdx#2
[74] (word~) startProcessing::$6 ← (word~) startProcessing::$5 << (byte) 6
[75] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$6
[76] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0)
[77] (word~) startProcessing::$8 ← (word)(byte) startProcessing::ch#0
[78] (word~) startProcessing::$9 ← (word~) startProcessing::$8 << (byte) 3
[79] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$9
asm { sei }
[75] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0
[81] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0
to:startProcessing::@6
startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6
[76] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
[76] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
[76] (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@5/(byte*) startProcessing::chargenData#0 startProcessing::@6/(byte*) startProcessing::chargenData#1 )
[77] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2)
[78] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
[79] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2
[80] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
[81] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6
[82] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
[82] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
[82] (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@5/(byte*) startProcessing::chargenData#0 startProcessing::@6/(byte*) startProcessing::chargenData#1 )
[83] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2)
[84] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
[85] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2
[86] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
[87] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6
to:startProcessing::@7
startProcessing::@7: scope:[startProcessing] from startProcessing::@6
[82] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
asm { cli }
[84] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0
[85] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3
[86] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12
[87] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4
[88] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0
[89] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3
[90] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16
[91] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4
[92] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2
[93] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3
[94] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22
[95] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1
[96] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2
[97] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1
[98] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2
[99] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1
[100] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0
[101] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0
[102] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23
[103] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c
[104] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2
[105] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0
[106] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0
[107] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW
[108] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0
[90] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_x#0
[91] (word~) startProcessing::$12 ← (word~) startProcessing::$11 << (byte) 3
[92] (word~) startProcessing::$13 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$12
[93] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$13 << (byte) 4
[94] (word~) startProcessing::$15 ← (word)(byte) startProcessing::center_y#0
[95] (word~) startProcessing::$16 ← (word~) startProcessing::$15 << (byte) 3
[96] (word~) startProcessing::$17 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$16
[97] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$17 << (byte) 4
[98] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2
[99] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3
[100] (word~) startProcessing::$23 ← (word)(byte~) startProcessing::$22
[101] (byte) startProcessing::$50 ← (byte) startProcessing::freeIdx#2 << (byte) 1
[102] (byte) startProcessing::$51 ← (byte) startProcessing::$50 + (byte) startProcessing::freeIdx#2
[103] (byte) startProcessing::$52 ← (byte) startProcessing::$51 << (byte) 1
[104] (byte) startProcessing::$53 ← (byte) startProcessing::$52 + (byte) startProcessing::freeIdx#2
[105] (byte~) startProcessing::$31 ← (byte) startProcessing::$53 << (byte) 1
[106] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$31) ← (word) startProcessing::spriteX#0
[107] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$31) ← (word) startProcessing::spriteY#0
[108] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX + (byte~) startProcessing::$31) ← (word~) startProcessing::$23
[109] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY + (byte~) startProcessing::$31) ← (byte) $3c
[110] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$31) ← (byte) startProcessing::freeIdx#2
[111] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$31) ← (byte) startProcessing::spritePtr#0
[112] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL + (byte~) startProcessing::$31) ← (byte) startProcessing::spriteCol#0
[113] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$31) ← (const byte) STATUS_NEW
[114] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$31) ← (byte*) startProcessing::screenPtr#0
to:startProcessing::@return
startProcessing::@return: scope:[startProcessing] from startProcessing::@7
[109] return
[115] return
to:@return
startProcessing::@8: scope:[startProcessing] from startProcessing::@4
[110] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
[116] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
to:startProcessing::@1
startProcessing::@3: scope:[startProcessing] from startProcessing::@2
[111] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
[112] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2
[117] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
[118] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2
to:startProcessing::@9
startProcessing::@9: scope:[startProcessing] from startProcessing::@3
[113] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
[119] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
to:startProcessing::@4
getCharToProcess: scope:[getCharToProcess] from main::@4
[114] phi()
[120] (byte*) getCharToProcess::screen_line#0 ← (byte*)(void*) SCREEN_COPY#0
[121] (byte*) getCharToProcess::dist_line#0 ← (byte*)(void*) SCREEN_DIST#0
to:getCharToProcess::@1
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
[115] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
[115] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
[115] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
[115] (byte) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const byte) NOT_FOUND#0 getCharToProcess::@9/(byte~) getCharToProcess::closest_dist#10 )
[115] (byte*) getCharToProcess::dist_line#6 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_DIST#0 getCharToProcess::@9/(byte*) getCharToProcess::dist_line#1 )
[115] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
[122] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
[122] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
[122] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
[122] (byte) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const byte) NOT_FOUND#0 getCharToProcess::@9/(byte~) getCharToProcess::closest_dist#10 )
[122] (byte*) getCharToProcess::dist_line#6 ← phi( getCharToProcess/(byte*) getCharToProcess::dist_line#0 getCharToProcess::@9/(byte*) getCharToProcess::dist_line#1 )
[122] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(byte*) getCharToProcess::screen_line#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
to:getCharToProcess::@2
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
[116] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
[116] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
[116] (byte) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_dist#8 getCharToProcess::@10/(byte~) getCharToProcess::closest_dist#12 )
[116] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
[117] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
[123] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
[123] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
[123] (byte) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_dist#8 getCharToProcess::@10/(byte~) getCharToProcess::closest_dist#12 )
[123] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
[124] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
to:getCharToProcess::@4
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
[118] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2)
[119] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
[125] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2)
[126] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
to:getCharToProcess::@5
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
[120] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[121] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
[127] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[128] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
to:getCharToProcess::@3
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
[122] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
[122] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
[122] (byte) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(byte~) getCharToProcess::return_dist#5 getCharToProcess::@12/(byte~) getCharToProcess::return_dist#6 getCharToProcess::@5/(byte) getCharToProcess::dist#0 )
[123] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[124] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
[129] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
[129] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
[129] (byte) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(byte~) getCharToProcess::return_dist#5 getCharToProcess::@12/(byte~) getCharToProcess::return_dist#6 getCharToProcess::@5/(byte) getCharToProcess::dist#0 )
[130] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[131] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
to:getCharToProcess::@6
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
[125] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[126] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28
[127] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[128] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
[132] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[133] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28
[134] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[135] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
to:getCharToProcess::@7
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
[129] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return
[136] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return
to:getCharToProcess::@8
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
[130] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1
[131] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2
[132] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8
[133] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3
[134] (byte*~) getCharToProcess::$10 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$9
[135] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
[137] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1
[138] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2
[139] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8
[140] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3
[141] (byte*~) getCharToProcess::$10 ← (byte*)(void*) SCREEN_COPY#0 + (word~) getCharToProcess::$9
[142] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
to:getCharToProcess::@return
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
[136] return
[143] return
to:@return
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
[137] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1
[144] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1
to:getCharToProcess::@1
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
[138] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1
[145] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1
to:getCharToProcess::@2
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
[139] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2
[146] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2
to:getCharToProcess::@3
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
[140] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2
[147] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2
to:getCharToProcess::@3
setupRasterIrq: scope:[setupRasterIrq] from main::@8
setupRasterIrq: scope:[setupRasterIrq] from main::@9
asm { sei }
[142] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
[143] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[144] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
[149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
[150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
to:setupRasterIrq::@1
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
[145] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
[152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
to:setupRasterIrq::@2
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
[146] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
[147] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
[148] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
[153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
[154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
[155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
asm { cli }
to:setupRasterIrq::@return
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
[150] return
[157] return
to:@return
initSprites: scope:[initSprites] from main::@3
[151] phi()
[158] phi()
to:initSprites::@1
initSprites::@1: scope:[initSprites] from initSprites initSprites::@1
[152] (byte*) initSprites::sp#2 ← phi( initSprites/(const byte*) SPRITE_DATA#0 initSprites::@1/(byte*) initSprites::sp#1 )
[153] *((byte*) initSprites::sp#2) ← (byte) 0
[154] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
[155] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1
[159] (byte*) initSprites::sp#2 ← phi( initSprites/(const byte*) SPRITE_DATA#0 initSprites::@1/(byte*) initSprites::sp#1 )
[160] *((byte*) initSprites::sp#2) ← (byte) 0
[161] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
[162] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1
to:initSprites::@2
initSprites::@2: scope:[initSprites] from initSprites::@1 initSprites::@2
[156] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@2/(byte) initSprites::i#1 )
[157] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0
[158] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
[159] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2
[163] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@2/(byte) initSprites::i#1 )
[164] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0
[165] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
[166] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2
to:initSprites::@3
initSprites::@3: scope:[initSprites] from initSprites::@2
[160] *((const byte*) SPRITES_MC#0) ← (byte) 0
[161] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0
[162] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0
[167] *((const byte*) SPRITES_MC#0) ← (byte) 0
[168] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0
[169] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0
to:initSprites::@return
initSprites::@return: scope:[initSprites] from initSprites::@3
[163] return
[170] return
to:@return
init_dist_screen: scope:[init_dist_screen] from main
[164] phi()
[165] call init_squares
[171] phi()
[172] call init_squares
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen
[173] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9
[166] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen/(const byte[$3e8]) SCREEN_DIST#0+(word)(number) $28*(number) $18 )
[166] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen/(const byte[$3e8]) SCREEN_DIST#0 )
[166] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 )
[167] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[168] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@9
[174] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#0 )
[174] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen#0 )
[174] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen::@10/(byte) 0 )
[175] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[176] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
to:init_dist_screen::@3
init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1
[169] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
[177] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
to:init_dist_screen::@4
init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3
[170] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 )
[171] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[172] call sqr
[173] (word) sqr::return#2 ← (word) sqr::return#0
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@4
[174] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
[178] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 )
[179] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[180] call sqr
[181] (word) sqr::return#2 ← (word) sqr::return#0
to:init_dist_screen::@11
init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@4
[182] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
to:init_dist_screen::@5
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@12
[175] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 )
[175] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 )
[176] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[177] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13
[183] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 )
[183] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 )
[184] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[185] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6
to:init_dist_screen::@7
init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5
[178] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0
[186] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0
to:init_dist_screen::@8
init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7
[179] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 )
[180] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[181] call sqr
[182] (word) sqr::return#3 ← (word) sqr::return#0
to:init_dist_screen::@11
init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@8
[183] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[184] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[185] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[186] call sqrt
[187] (byte) sqrt::return#2 ← (byte) sqrt::return#0
[187] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 )
[188] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[189] call sqr
[190] (word) sqr::return#3 ← (word) sqr::return#0
to:init_dist_screen::@12
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11
[188] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[189] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[190] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[191] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[192] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[193] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[194] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[195] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8
[191] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[192] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[193] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[194] call sqrt
[195] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:init_dist_screen::@13
init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@12
[196] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[199] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[200] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[201] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[202] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[203] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5
to:init_dist_screen::@9
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@12
[196] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[197] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[198] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[199] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13
[204] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[205] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[206] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[207] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
to:init_dist_screen::@return
init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9
[200] return
[208] return
to:@return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[201] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27
[209] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27
to:init_dist_screen::@8
init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1
[202] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
[210] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
to:init_dist_screen::@4
sqrt: scope:[sqrt] from init_dist_screen::@11
[203] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[204] call bsearch16u
[205] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
sqrt: scope:[sqrt] from init_dist_screen::@12
[211] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[213] call bsearch16u
[214] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[206] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[207] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1
[208] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[209] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
[215] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[216] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[217] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[218] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[210] return
[219] return
to:@return
bsearch16u: scope:[bsearch16u] from sqrt
[211] phi()
[220] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[212] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[212] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[213] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
[221] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[221] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[214] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
[223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[215] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
[224] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
to:bsearch16u::@2
bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5
[216] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
[225] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
to:bsearch16u::@return
bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8
[217] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[218] return
[226] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[227] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[219] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[220] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[221] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[222] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[223] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
[228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[224] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
[233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[225] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
[234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[226] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[227] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
[235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[228] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[228] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[229] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
[237] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[237] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[238] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
to:bsearch16u::@3
sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8
[230] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[231] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[232] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0)
[239] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[233] return
[242] return
to:@return
init_squares: scope:[init_squares] from init_dist_screen
[234] phi()
[235] call malloc
[243] phi()
[244] call malloc
to:init_squares::@2
init_squares::@2: scope:[init_squares] from init_squares
[245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[246] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1
to:init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares init_squares::@1
[236] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 )
[236] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 )
[236] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 )
[237] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[238] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[239] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[240] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[241] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[242] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[243] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2
[247] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 )
[247] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 )
[247] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 )
[248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[254] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1
to:init_squares::@return
init_squares::@return: scope:[init_squares] from init_squares::@1
[244] return
[255] return
to:@return
malloc: scope:[malloc] from init_squares
[245] phi()
malloc: scope:[malloc] from @1 @4 init_squares
[256] (word) malloc::size#3 ← phi( @1/(word) $3e8 @4/(word) $3e8 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[256] (byte*) heap_head#12 ← phi( @1/(const byte*) HEAP_START#0 @4/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 )
[257] (byte*) malloc::mem#0 ← (byte*) heap_head#12
[258] (byte*) heap_head#1 ← (byte*) heap_head#12 + (word) malloc::size#3
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[246] return
[259] return
to:@return
irqBottom: scope:[irqBottom] from
[247] phi()
[260] phi()
to:irqBottom::@1
irqBottom::@1: scope:[irqBottom] from irqBottom
[248] phi()
[249] call processChars
[261] phi()
[262] call processChars
to:irqBottom::@2
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
[250] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[263] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[264] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[265] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
to:irqBottom::@return
irqBottom::@return: scope:[irqBottom] from irqBottom::@2
[253] return
[266] return
to:@return
processChars: scope:[processChars] from irqBottom::@1
[254] phi()
[267] phi()
to:processChars::@1
processChars::@1: scope:[processChars] from processChars processChars::@2
[255] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[255] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1
[257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10
[258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1
[259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10
[260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1
[261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37
[262] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2
[268] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[268] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[269] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1
[270] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10
[271] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1
[272] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10
[273] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1
[274] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37
[275] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[276] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2
to:processChars::@10
processChars::@10: scope:[processChars] from processChars::@1
[264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3
[277] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3
to:processChars::@11
processChars::@11: scope:[processChars] from processChars::@10
[265] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[266] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL)
[268] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
[269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING
[278] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[279] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[280] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL)
[281] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
[282] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING
to:processChars::@3
processChars::@3: scope:[processChars] from processChars::@10 processChars::@11
[270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
[271] (byte~) processChars::$11 ← > (word) processChars::xpos#0
[272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4
[283] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
[284] (byte~) processChars::$11 ← > (word) processChars::xpos#0
[285] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4
to:processChars::@8
processChars::@8: scope:[processChars] from processChars::@3
[273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0
[274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12
[286] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0
[287] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12
to:processChars::@5
processChars::@5: scope:[processChars] from processChars::@4 processChars::@8
[275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1
[276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0
[277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14
[278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15
[280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0
[281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
[288] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1
[289] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0
[290] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14
[291] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[292] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15
[293] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0
[294] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
to:processChars::@14
processChars::@14: scope:[processChars] from processChars::@5
[282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6
[295] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6
to:processChars::@13
processChars::@13: scope:[processChars] from processChars::@14
[283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6
[296] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6
to:processChars::@12
processChars::@12: scope:[processChars] from processChars::@13
[284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6
[297] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6
to:processChars::@9
processChars::@9: scope:[processChars] from processChars::@12
[285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3
[286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25
[287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8
[288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1
[289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38)
[290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3
[292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8
[293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1
[294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39)
[295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
[298] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3
[299] (byte~) processChars::$26 ← (byte)(word~) processChars::$25
[300] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8
[301] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1
[302] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38)
[303] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[304] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3
[305] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8
[306] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1
[307] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39)
[308] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
to:processChars::@7
processChars::@7: scope:[processChars] from processChars::@6 processChars::@9
[296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
[309] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
to:processChars::@2
processChars::@2: scope:[processChars] from processChars::@1 processChars::@7
[297] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
[310] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[311] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[312] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
to:processChars::@return
processChars::@return: scope:[processChars] from processChars::@2
[300] return
[313] return
to:@return
processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5
[301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE
[302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0
[303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33
[314] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE
[315] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0
[316] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33
to:processChars::@7
processChars::@4: scope:[processChars] from processChars::@3
[304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
[317] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
to:processChars::@5
irqTop: scope:[irqTop] from
[305] phi()
[318] phi()
to:irqTop::@1
irqTop::@1: scope:[irqTop] from irqTop
[306] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[319] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[320] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[321] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
to:irqTop::@return
irqTop::@return: scope:[irqTop] from irqTop::@1
[309] return
[322] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
(label) @1
(label) @2
(label) @3
(label) @4
(label) @5
(label) @begin
(label) @end
(byte*) BGCOL
@ -80,10 +83,10 @@
(const byte) RASTER_IRQ_TOP#0 RASTER_IRQ_TOP = (byte) $30
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte[$3e8]) SCREEN_COPY
(const byte[$3e8]) SCREEN_COPY#0 SCREEN_COPY = { fill( $3e8, 0) }
(byte[$3e8]) SCREEN_DIST
(const byte[$3e8]) SCREEN_DIST#0 SCREEN_DIST = { fill( $3e8, 0) }
(byte*) SCREEN_COPY
(void*) SCREEN_COPY#0 SCREEN_COPY zp ZP_WORD:41 0.02666666666666667
(byte*) SCREEN_DIST
(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:43 0.0273972602739726
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
(byte*) SPRITES_COLS
(const byte*) SPRITES_COLS#0 SPRITES_COLS = (byte*) 53287
@ -106,7 +109,7 @@
(word) SPRITE_PTRS
(const word) SPRITE_PTRS#0 SPRITE_PTRS = (word) $3f8
(word*) SQUARES
(const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0
(void*) SQUARES#1 SQUARES zp ZP_WORD:73 0.03225806451612903
(const byte) STATUS_FREE STATUS_FREE = (byte) 0
(const byte) STATUS_NEW STATUS_NEW = (byte) 1
(const byte) STATUS_PROCESSING STATUS_PROCESSING = (byte) 2
@ -141,30 +144,31 @@
(label) bsearch16u::@return
(word*) bsearch16u::items
(word*) bsearch16u::items#0 items zp ZP_WORD:29 1001.0
(word*) bsearch16u::items#2 items zp ZP_WORD:29 334.33333333333337
(word*) bsearch16u::items#1 items zp ZP_WORD:29 2.0
(word*) bsearch16u::items#2 items zp ZP_WORD:29 334.5555555555556
(word*) bsearch16u::items#8 items zp ZP_WORD:29 1501.5
(word) bsearch16u::key
(word) bsearch16u::key#0 key zp ZP_WORD:59 0.2857142857142857
(word) bsearch16u::key#0 key zp ZP_WORD:67 0.26666666666666666
(byte) bsearch16u::num
(byte) bsearch16u::num#0 reg byte x 2002.0
(byte) bsearch16u::num#1 reg byte x 2002.0
(byte) bsearch16u::num#3 reg byte x 556.1111111111111
(byte) bsearch16u::num#5 reg byte x 3003.0
(word*) bsearch16u::pivot
(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:61 501.0
(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:69 501.0
(signed word) bsearch16u::result
(signed word) bsearch16u::result#0 result zp ZP_WORD:63 1501.5
(signed word) bsearch16u::result#0 result zp ZP_WORD:71 1501.5
(word*) bsearch16u::return
(word*) bsearch16u::return#1 return zp ZP_WORD:29 2.0
(word*) bsearch16u::return#2 return zp ZP_WORD:29 6.0
(word*) bsearch16u::return#3 return zp ZP_WORD:29 4.0
(word*~) bsearch16u::return#6 return zp ZP_WORD:29 4.0
(struct ProcessingChar()) getCharToProcess()
(byte*~) getCharToProcess::$10 $10 zp ZP_WORD:53 4.0
(word) getCharToProcess::$12 $12 zp ZP_WORD:55 4.0
(word) getCharToProcess::$13 $13 zp ZP_WORD:53 4.0
(word~) getCharToProcess::$8 $8 zp ZP_WORD:53 3.0
(word~) getCharToProcess::$9 $9 zp ZP_WORD:53 4.0
(byte*~) getCharToProcess::$10 $10 zp ZP_WORD:61 4.0
(word) getCharToProcess::$12 $12 zp ZP_WORD:63 4.0
(word) getCharToProcess::$13 $13 zp ZP_WORD:61 4.0
(word~) getCharToProcess::$8 $8 zp ZP_WORD:61 3.0
(word~) getCharToProcess::$9 $9 zp ZP_WORD:61 4.0
(label) getCharToProcess::@1
(label) getCharToProcess::@10
(label) getCharToProcess::@11
@ -192,8 +196,9 @@
(byte) getCharToProcess::dist
(byte) getCharToProcess::dist#0 reg byte x 750.75
(byte*) getCharToProcess::dist_line
(byte*) getCharToProcess::dist_line#0 dist_line zp ZP_WORD:14 4.0
(byte*) getCharToProcess::dist_line#1 dist_line zp ZP_WORD:14 50.5
(byte*) getCharToProcess::dist_line#6 dist_line zp ZP_WORD:14 85.92857142857142
(byte*) getCharToProcess::dist_line#6 dist_line zp ZP_WORD:14 86.07142857142857
(struct ProcessingChar) getCharToProcess::return
(byte) getCharToProcess::return_dist
(byte) getCharToProcess::return_dist#0 reg byte x 7.333333333333333
@ -209,8 +214,9 @@
(byte) getCharToProcess::return_y#1 return_y zp ZP_BYTE:19 216.6315789473684
(byte~) getCharToProcess::return_y#7 return_y zp ZP_BYTE:19 2002.0
(byte*) getCharToProcess::screen_line
(byte*) getCharToProcess::screen_line#0 screen_line zp ZP_WORD:12 2.0
(byte*) getCharToProcess::screen_line#1 screen_line zp ZP_WORD:12 40.4
(byte*) getCharToProcess::screen_line#4 screen_line zp ZP_WORD:12 92.53846153846155
(byte*) getCharToProcess::screen_line#4 screen_line zp ZP_WORD:12 92.6923076923077
(byte) getCharToProcess::x
(byte) getCharToProcess::x#1 reg byte y 1001.0
(byte) getCharToProcess::x#2 reg byte y 556.1111111111111
@ -218,6 +224,8 @@
(byte) getCharToProcess::y#1 y zp ZP_BYTE:16 101.0
(byte) getCharToProcess::y#7 y zp ZP_BYTE:16 80.2
(byte*) heap_head
(byte*) heap_head#1 heap_head zp ZP_WORD:35 0.5
(byte*) heap_head#12 heap_head zp ZP_WORD:35 4.0
(void()) initSprites()
(label) initSprites::@1
(label) initSprites::@2
@ -238,6 +246,7 @@
(label) init_dist_screen::@10
(label) init_dist_screen::@11
(label) init_dist_screen::@12
(label) init_dist_screen::@13
(label) init_dist_screen::@2
(label) init_dist_screen::@3
(label) init_dist_screen::@4
@ -250,14 +259,16 @@
(byte) init_dist_screen::d
(byte) init_dist_screen::d#0 reg byte a 126.25
(word) init_dist_screen::ds
(word) init_dist_screen::ds#0 ds zp ZP_WORD:59 202.0
(word) init_dist_screen::ds#0 ds zp ZP_WORD:67 202.0
(byte*) init_dist_screen::screen
(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:23 1.5
(byte*) init_dist_screen::screen_bottomline
(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:25 4.0
(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:25 7.333333333333333
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:25 6.787878787878788
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:25 6.848484848484849
(byte*) init_dist_screen::screen_topline
(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:23 5.5
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:23 7.0
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:23 7.0625
(byte) init_dist_screen::x
(byte) init_dist_screen::x#1 x zp ZP_BYTE:27 101.0
(byte) init_dist_screen::x#2 x zp ZP_BYTE:27 26.578947368421055
@ -269,7 +280,7 @@
(byte) init_dist_screen::xd
(byte) init_dist_screen::xd#0 reg byte a 303.0
(word) init_dist_screen::xds
(word) init_dist_screen::xds#0 xds zp ZP_WORD:59 202.0
(word) init_dist_screen::xds#0 xds zp ZP_WORD:67 202.0
(byte) init_dist_screen::y
(byte) init_dist_screen::y#1 y zp ZP_BYTE:22 16.5
(byte) init_dist_screen::y#10 y zp ZP_BYTE:22 0.9705882352941178
@ -278,11 +289,12 @@
(byte) init_dist_screen::yd
(byte) init_dist_screen::yd#0 reg byte a 33.0
(word) init_dist_screen::yds
(word) init_dist_screen::yds#0 yds zp ZP_WORD:57 4.869565217391305
(word) init_dist_screen::yds#0 yds zp ZP_WORD:65 4.869565217391305
(void()) init_squares()
(byte~) init_squares::$3 reg byte a 22.0
(byte~) init_squares::$4 reg byte a 22.0
(label) init_squares::@1
(label) init_squares::@2
(label) init_squares::@return
(byte) init_squares::i
(byte) init_squares::i#1 reg byte x 16.5
@ -291,8 +303,9 @@
(word) init_squares::sqr#1 sqr zp ZP_WORD:31 7.333333333333333
(word) init_squares::sqr#2 sqr zp ZP_WORD:31 6.6000000000000005
(word*) init_squares::squares
(word*) init_squares::squares#0 squares zp ZP_WORD:33 4.0
(word*) init_squares::squares#1 squares zp ZP_WORD:33 3.6666666666666665
(word*) init_squares::squares#2 squares zp ZP_WORD:33 16.5
(word*) init_squares::squares#2 squares zp ZP_WORD:33 17.5
interrupt(HARDWARE_ALL)(void()) irqBottom()
(label) irqBottom::@1
(label) irqBottom::@2
@ -311,6 +324,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) main::$29 reg byte a 22.0
(struct ProcessingChar~) main::$9
(label) main::@1
(label) main::@10
(label) main::@2
(label) main::@3
(label) main::@4
@ -324,10 +338,11 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) main::center_x
(byte) main::center_x#0 reg byte y 5.5
(byte) main::center_y
(byte) main::center_y#0 center_y zp ZP_BYTE:37 5.5
(byte) main::center_y#0 center_y zp ZP_BYTE:45 5.5
(byte*) main::dst
(byte*) main::dst#0 dst zp ZP_WORD:4 4.0
(byte*) main::dst#1 dst zp ZP_WORD:4 11.0
(byte*) main::dst#2 dst zp ZP_WORD:4 11.0
(byte*) main::dst#2 dst zp ZP_WORD:4 11.666666666666666
(byte) main::i
(byte) main::i#1 i zp ZP_BYTE:6 16.5
(byte) main::i#2 i zp ZP_BYTE:6 3.6666666666666665
@ -337,16 +352,17 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
(byte*) malloc::mem#0 mem zp ZP_WORD:73 0.3333333333333333
(void*) malloc::return
(const void*) malloc::return#0 return = (void*)(const byte*) HEAP_START#0
(word) malloc::size
(word) malloc::size#3 size zp ZP_WORD:37 1.0
(void()) processChars()
(byte~) processChars::$11 reg byte a 22.0
(byte~) processChars::$12 reg byte a 22.0
(byte~) processChars::$14 reg byte a 22.0
(word~) processChars::$15 $15 zp ZP_WORD:70 11.0
(word~) processChars::$15 $15 zp ZP_WORD:80 11.0
(byte~) processChars::$17 reg byte x 6.6000000000000005
(word~) processChars::$25 $25 zp ZP_WORD:68 11.0
(word~) processChars::$25 $25 zp ZP_WORD:78 11.0
(byte~) processChars::$26 reg byte a 22.0
(byte~) processChars::$30 reg byte a 22.0
(byte~) processChars::$33 reg byte a 22.0
@ -373,24 +389,24 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) processChars::@9
(label) processChars::@return
(byte) processChars::bitmask
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:67 2.2
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:77 2.2
(byte) processChars::i
(byte) processChars::i#1 i zp ZP_BYTE:35 16.5
(byte) processChars::i#10 i zp ZP_BYTE:35 1.4042553191489362
(byte) processChars::i#1 i zp ZP_BYTE:39 16.5
(byte) processChars::i#10 i zp ZP_BYTE:39 1.4042553191489362
(byte) processChars::numActive
(byte) processChars::numActive#1 numActive zp ZP_BYTE:36 22.0
(byte) processChars::numActive#10 numActive zp ZP_BYTE:36 0.7333333333333333
(byte) processChars::numActive#3 numActive zp ZP_BYTE:36 11.0
(byte) processChars::numActive#1 numActive zp ZP_BYTE:40 22.0
(byte) processChars::numActive#10 numActive zp ZP_BYTE:40 0.7333333333333333
(byte) processChars::numActive#3 numActive zp ZP_BYTE:40 11.0
(struct ProcessingSprite*) processChars::processing
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:65 0.3142857142857143
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:75 0.3142857142857143
(byte) processChars::xchar
(byte) processChars::xchar#0 reg byte a 22.0
(word) processChars::xpos
(word) processChars::xpos#0 xpos zp ZP_WORD:68 2.0625
(word) processChars::xpos#0 xpos zp ZP_WORD:78 2.0625
(byte) processChars::ychar
(byte) processChars::ychar#0 reg byte a 22.0
(byte) processChars::ypos
(byte) processChars::ypos#0 ypos zp ZP_BYTE:72 2.75
(byte) processChars::ypos#0 ypos zp ZP_BYTE:82 2.75
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
(label) setupRasterIrq::@1
(label) setupRasterIrq::@2
@ -402,9 +418,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte~) sqr::$0 reg byte a 4.0
(label) sqr::@return
(word) sqr::return
(word) sqr::return#0 return zp ZP_WORD:59 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:57 22.0
(word) sqr::return#3 return zp ZP_WORD:59 202.0
(word) sqr::return#0 return zp ZP_WORD:67 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:65 22.0
(word) sqr::return#3 return zp ZP_WORD:67 202.0
(byte) sqr::val
(byte) sqr::val#0 reg byte a 22.0
(byte) sqr::val#1 reg byte a 202.0
@ -421,26 +437,26 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) sqrt::return#2 reg byte a 202.0
(byte) sqrt::sq
(word) sqrt::val
(word) sqrt::val#0 val zp ZP_WORD:59 103.0
(word) sqrt::val#0 val zp ZP_WORD:67 103.0
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist)
(word~) startProcessing::$0 $0 zp ZP_WORD:39 3.0
(word~) startProcessing::$1 $1 zp ZP_WORD:39 4.0
(word~) startProcessing::$11 $11 zp ZP_WORD:46 4.0
(word~) startProcessing::$12 $12 zp ZP_WORD:46 4.0
(word~) startProcessing::$13 $13 zp ZP_WORD:46 4.0
(word~) startProcessing::$15 $15 zp ZP_WORD:48 4.0
(word~) startProcessing::$16 $16 zp ZP_WORD:48 4.0
(word~) startProcessing::$17 $17 zp ZP_WORD:48 4.0
(word~) startProcessing::$0 $0 zp ZP_WORD:47 3.0
(word~) startProcessing::$1 $1 zp ZP_WORD:47 4.0
(word~) startProcessing::$11 $11 zp ZP_WORD:54 4.0
(word~) startProcessing::$12 $12 zp ZP_WORD:54 4.0
(word~) startProcessing::$13 $13 zp ZP_WORD:54 4.0
(word~) startProcessing::$15 $15 zp ZP_WORD:56 4.0
(word~) startProcessing::$16 $16 zp ZP_WORD:56 4.0
(word~) startProcessing::$17 $17 zp ZP_WORD:56 4.0
(byte~) startProcessing::$22 reg byte a 2.0
(word~) startProcessing::$23 $23 zp ZP_WORD:51 0.5
(word~) startProcessing::$23 $23 zp ZP_WORD:59 0.5
(byte~) startProcessing::$30 reg byte a 2002.0
(byte~) startProcessing::$31 reg byte x 2.2222222222222228
(byte) startProcessing::$42 reg byte a 2002.0
(byte) startProcessing::$43 reg byte a 2002.0
(byte) startProcessing::$44 reg byte a 2002.0
(byte) startProcessing::$45 reg byte a 2002.0
(word) startProcessing::$47 $47 zp ZP_WORD:41 4.0
(word) startProcessing::$48 $48 zp ZP_WORD:39 4.0
(word) startProcessing::$47 $47 zp ZP_WORD:49 4.0
(word) startProcessing::$48 $48 zp ZP_WORD:47 4.0
(word~) startProcessing::$5 $5 zp ZP_WORD:10 4.0
(byte) startProcessing::$50 reg byte a 4.0
(byte) startProcessing::$51 reg byte a 4.0
@ -462,9 +478,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(struct ProcessingChar) startProcessing::center
(byte) startProcessing::center_dist
(byte) startProcessing::center_x
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:38 0.30952380952380953
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:46 0.30952380952380953
(byte) startProcessing::center_y
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:37 0.24444444444444444
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:45 0.24444444444444444
(byte) startProcessing::ch
(byte) startProcessing::ch#0 reg byte a 2.0
(byte*) startProcessing::chargenData
@ -472,7 +488,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte*) startProcessing::chargenData#1 chargenData zp ZP_WORD:8 67.33333333333333
(byte*) startProcessing::chargenData#2 chargenData zp ZP_WORD:8 101.66666666666666
(byte*) startProcessing::colPtr
(byte*) startProcessing::colPtr#0 colPtr zp ZP_WORD:43 4.0
(byte*) startProcessing::colPtr#0 colPtr zp ZP_WORD:51 4.0
(byte) startProcessing::freeIdx
(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:7 28.0
(byte) startProcessing::freeIdx#6 reg byte x 20.2
@ -485,33 +501,33 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) startProcessing::i1#1 reg byte x 151.5
(byte) startProcessing::i1#2 reg byte x 50.5
(word) startProcessing::offset
(word) startProcessing::offset#0 offset zp ZP_WORD:39 2.0
(word) startProcessing::offset#0 offset zp ZP_WORD:47 2.0
(byte*) startProcessing::screenPtr
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:39 0.14285714285714285
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:47 0.14285714285714285
(byte) startProcessing::spriteCol
(byte) startProcessing::spriteCol#0 spriteCol zp ZP_BYTE:45 0.0975609756097561
(byte) startProcessing::spriteCol#0 spriteCol zp ZP_BYTE:53 0.0975609756097561
(byte*) startProcessing::spriteData
(byte*) startProcessing::spriteData#0 spriteData zp ZP_WORD:10 0.5714285714285714
(byte*) startProcessing::spriteData#1 spriteData zp ZP_WORD:10 50.5
(byte*) startProcessing::spriteData#2 spriteData zp ZP_WORD:10 152.5
(byte) startProcessing::spriteIdx
(byte) startProcessing::spritePtr
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:50 0.3076923076923077
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:58 0.3076923076923077
(word) startProcessing::spriteX
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:46 0.3076923076923077
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:54 0.3076923076923077
(word) startProcessing::spriteY
(word) startProcessing::spriteY#0 spriteY zp ZP_WORD:48 0.4
(word) startProcessing::spriteY#0 spriteY zp ZP_WORD:56 0.4
zp ZP_WORD:2 [ main::src#2 main::src#1 ]
zp ZP_WORD:4 [ main::dst#2 main::dst#1 ]
zp ZP_WORD:4 [ main::dst#2 main::dst#1 main::dst#0 ]
zp ZP_BYTE:6 [ main::i#2 main::i#1 ]
reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
zp ZP_BYTE:7 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
zp ZP_WORD:8 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$9 startProcessing::$8 ]
zp ZP_WORD:10 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 startProcessing::$5 ]
reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ]
zp ZP_WORD:12 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
zp ZP_WORD:14 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#1 ]
zp ZP_WORD:12 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#0 getCharToProcess::screen_line#1 ]
zp ZP_WORD:14 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#0 getCharToProcess::dist_line#1 ]
zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
reg byte y [ getCharToProcess::x#2 getCharToProcess::x#1 ]
zp ZP_BYTE:17 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
@ -521,20 +537,24 @@ reg byte x [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 get
zp ZP_WORD:20 [ initSprites::sp#2 initSprites::sp#1 ]
reg byte x [ initSprites::i#2 initSprites::i#1 ]
zp ZP_BYTE:22 [ init_dist_screen::y#10 init_dist_screen::y#1 ]
zp ZP_WORD:23 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ]
zp ZP_WORD:25 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ]
zp ZP_WORD:23 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ]
zp ZP_WORD:25 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ]
reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ]
zp ZP_BYTE:27 [ init_dist_screen::x#2 init_dist_screen::x#1 ]
zp ZP_BYTE:28 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ]
reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ]
zp ZP_WORD:29 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ]
zp ZP_WORD:29 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ]
reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ]
reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ]
zp ZP_WORD:31 [ init_squares::sqr#2 init_squares::sqr#1 ]
zp ZP_WORD:33 [ init_squares::squares#2 init_squares::squares#1 ]
zp ZP_WORD:33 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ]
reg byte x [ init_squares::i#2 init_squares::i#1 ]
zp ZP_BYTE:35 [ processChars::i#10 processChars::i#1 ]
zp ZP_BYTE:36 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ]
zp ZP_WORD:35 [ heap_head#12 heap_head#1 ]
zp ZP_WORD:37 [ malloc::size#3 ]
zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ]
zp ZP_BYTE:40 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ]
zp ZP_WORD:41 [ SCREEN_COPY#0 ]
zp ZP_WORD:43 [ SCREEN_DIST#0 ]
reg byte a [ main::$26 ]
reg byte a [ main::$27 ]
reg byte a [ main::$28 ]
@ -544,43 +564,44 @@ reg byte y [ getCharToProcess::return_x#0 ]
reg byte a [ getCharToProcess::return_y#0 ]
reg byte x [ getCharToProcess::return_dist#0 ]
reg byte y [ main::center_x#0 ]
zp ZP_BYTE:37 [ main::center_y#0 startProcessing::center_y#0 ]
zp ZP_BYTE:45 [ main::center_y#0 startProcessing::center_y#0 ]
reg byte a [ main::center_dist#0 ]
zp ZP_BYTE:38 [ startProcessing::center_x#0 ]
zp ZP_BYTE:46 [ startProcessing::center_x#0 ]
reg byte a [ startProcessing::$42 ]
reg byte a [ startProcessing::$43 ]
reg byte a [ startProcessing::$44 ]
reg byte a [ startProcessing::$45 ]
reg byte a [ startProcessing::$30 ]
zp ZP_WORD:39 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ]
zp ZP_WORD:41 [ startProcessing::$47 ]
zp ZP_WORD:43 [ startProcessing::colPtr#0 ]
zp ZP_BYTE:45 [ startProcessing::spriteCol#0 ]
zp ZP_WORD:47 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ]
zp ZP_WORD:49 [ startProcessing::$47 ]
zp ZP_WORD:51 [ startProcessing::colPtr#0 ]
zp ZP_BYTE:53 [ startProcessing::spriteCol#0 ]
reg byte a [ startProcessing::ch#0 ]
zp ZP_WORD:46 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ]
zp ZP_WORD:48 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ]
zp ZP_BYTE:50 [ startProcessing::spritePtr#0 ]
zp ZP_WORD:54 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ]
zp ZP_WORD:56 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ]
zp ZP_BYTE:58 [ startProcessing::spritePtr#0 ]
reg byte a [ startProcessing::$22 ]
zp ZP_WORD:51 [ startProcessing::$23 ]
zp ZP_WORD:59 [ startProcessing::$23 ]
reg byte a [ startProcessing::$50 ]
reg byte a [ startProcessing::$51 ]
reg byte a [ startProcessing::$52 ]
reg byte a [ startProcessing::$53 ]
reg byte x [ startProcessing::$31 ]
zp ZP_WORD:53 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 ]
zp ZP_WORD:55 [ getCharToProcess::$12 ]
zp ZP_WORD:61 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 ]
zp ZP_WORD:63 [ getCharToProcess::$12 ]
reg byte a [ init_dist_screen::y2#0 ]
zp ZP_WORD:57 [ sqr::return#2 init_dist_screen::yds#0 ]
zp ZP_WORD:65 [ sqr::return#2 init_dist_screen::yds#0 ]
reg byte a [ init_dist_screen::x2#0 ]
zp ZP_WORD:59 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ]
zp ZP_WORD:67 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ]
reg byte a [ sqrt::return#2 ]
reg byte a [ init_dist_screen::d#0 ]
reg byte a [ sqrt::return#0 ]
reg byte a [ bsearch16u::$6 ]
reg byte a [ bsearch16u::$16 ]
zp ZP_WORD:61 [ bsearch16u::pivot#0 ]
zp ZP_WORD:63 [ bsearch16u::result#0 ]
zp ZP_WORD:69 [ bsearch16u::pivot#0 ]
zp ZP_WORD:71 [ bsearch16u::result#0 ]
reg byte a [ sqr::$0 ]
zp ZP_WORD:73 [ SQUARES#1 malloc::mem#0 ]
reg byte a [ init_squares::$3 ]
reg byte a [ init_squares::$4 ]
reg byte a [ processChars::$67 ]
@ -588,15 +609,15 @@ reg byte a [ processChars::$68 ]
reg byte a [ processChars::$69 ]
reg byte a [ processChars::$70 ]
reg byte a [ processChars::$37 ]
zp ZP_WORD:65 [ processChars::processing#0 ]
zp ZP_BYTE:67 [ processChars::bitmask#0 ]
zp ZP_WORD:68 [ processChars::xpos#0 processChars::$25 ]
zp ZP_WORD:75 [ processChars::processing#0 ]
zp ZP_BYTE:77 [ processChars::bitmask#0 ]
zp ZP_WORD:78 [ processChars::xpos#0 processChars::$25 ]
reg byte a [ processChars::$11 ]
reg byte a [ processChars::$12 ]
reg byte x [ processChars::$17 ]
reg byte a [ processChars::$14 ]
zp ZP_WORD:70 [ processChars::$15 ]
zp ZP_BYTE:72 [ processChars::ypos#0 ]
zp ZP_WORD:80 [ processChars::$15 ]
zp ZP_BYTE:82 [ processChars::ypos#0 ]
reg byte a [ processChars::$26 ]
reg byte a [ processChars::xchar#0 ]
reg byte a [ processChars::$38 ]

View File

@ -0,0 +1,133 @@
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
// The number of iterations performed during CORDIC atan2 calculation
.const CORDIC_ITERATIONS = 8
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
.label CORDIC_ATAN2_ANGLES = $1000
// Populate cordic angles table
main: {
.label x = 5
.label screen = 3
.label y = 2
lda #<$400
sta screen
lda #>$400
sta screen+1
lda #0
sta y
b1:
lda #0
sta x
b2:
lda x
sta atan2.x
lda y
sta atan2.y
jsr atan2
txa
ldy x
sta (screen),y
inc x
lda #$28
cmp x
bne b2
clc
adc screen
sta screen
bcc !+
inc screen+1
!:
inc y
lda #$19
cmp y
bne b1
rts
}
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS
// Returns the angle in hex-degrees (0=0, 128=PI, 256=2*PI)
// atan2(signed byte zeropage(7) x, signed byte zeropage(6) y)
atan2: {
.label x = 7
.label y = 6
.label xd = 9
.label i = 8
ldx #0
txa
sta i
b1:
lda y
cmp #0
bne b2
b3:
rts
b2:
lda x
ldy i
cpy #0
beq !e+
!l:
cmp #$80
ror
dey
bne !l-
!e:
sta xd
lda y
ldy i
cpy #0
beq !e+
!l:
cmp #$80
ror
dey
bne !l-
!e:
tay
lda y
cmp #0
beq !+
bpl b4
!:
tya
eor #$ff
sec
adc x
sta x
lda y
clc
adc xd
sta y
txa
ldx i
sec
sbc CORDIC_ATAN2_ANGLES,x
tax
b5:
inc i
lda #CORDIC_ITERATIONS+1
cmp i
beq b3
jmp b1
b4:
tya
clc
adc x
sta x
lda y
sec
sbc xd
sta y
txa
ldx i
clc
adc CORDIC_ATAN2_ANGLES,x
tax
jmp b5
}
.pc = CORDIC_ATAN2_ANGLES "CORDIC_ATAN2_ANGLES"
.fill CORDIC_ITERATIONS, 256*atan(1/pow(2,i))/PI/2

View File

@ -0,0 +1,79 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
kickasm(location (const byte*) CORDIC_ATAN2_ANGLES#0) {{ .fill CORDIC_ITERATIONS, 256*atan(1/pow(2,i))/PI/2
}}
to:@2
@2: scope:[] from @1
[2] phi()
[3] call main
to:@end
@end: scope:[] from @2
[4] phi()
main: scope:[main] from @2
[5] phi()
to:main::@1
main::@1: scope:[main] from main main::@3
[6] (byte*) main::screen#5 ← phi( main/(byte*) 1024 main::@3/(byte*) main::screen#1 )
[6] (signed byte) main::y#4 ← phi( main/(signed byte) 0 main::@3/(signed byte) main::y#1 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@4
[7] (signed byte) main::x#2 ← phi( main::@1/(signed byte) 0 main::@4/(signed byte) main::x#1 )
[8] (signed byte) atan2::x#0 ← (signed byte) main::x#2
[9] (signed byte) atan2::y#0 ← (signed byte) main::y#4
[10] call atan2
[11] (byte) atan2::return#0 ← (byte) atan2::return#1
to:main::@4
main::@4: scope:[main] from main::@2
[12] (byte) main::angle#0 ← (byte) atan2::return#0
[13] *((byte*) main::screen#5 + (signed byte) main::x#2) ← (byte) main::angle#0
[14] (signed byte) main::x#1 ← ++ (signed byte) main::x#2
[15] if((signed byte) main::x#1!=(signed byte) $28) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@4
[16] (byte*) main::screen#1 ← (byte*) main::screen#5 + (byte) $28
[17] (signed byte) main::y#1 ← ++ (signed byte) main::y#4
[18] if((signed byte) main::y#1!=(signed byte) $19) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@3
[19] return
to:@return
atan2: scope:[atan2] from main::@2
[20] phi()
to:atan2::@1
atan2::@1: scope:[atan2] from atan2 atan2::@5
[21] (byte) atan2::angle#4 ← phi( atan2/(byte) 0 atan2::@5/(byte) atan2::angle#7 )
[21] (byte) atan2::i#2 ← phi( atan2/(byte) 0 atan2::@5/(byte) atan2::i#1 )
[21] (signed byte) atan2::x#3 ← phi( atan2/(signed byte) atan2::x#0 atan2::@5/(signed byte) atan2::x#8 )
[21] (signed byte) atan2::y#3 ← phi( atan2/(signed byte) atan2::y#0 atan2::@5/(signed byte) atan2::y#8 )
[22] if((signed byte) atan2::y#3!=(signed byte) 0) goto atan2::@2
to:atan2::@3
atan2::@3: scope:[atan2] from atan2::@1 atan2::@5
[23] (byte) atan2::return#1 ← phi( atan2::@1/(byte) atan2::angle#4 atan2::@5/(byte) atan2::angle#7 )
to:atan2::@return
atan2::@return: scope:[atan2] from atan2::@3
[24] return
to:@return
atan2::@2: scope:[atan2] from atan2::@1
[25] (signed byte) atan2::xd#0 ← (signed byte) atan2::x#3 >> (byte) atan2::i#2
[26] (signed byte) atan2::yd#0 ← (signed byte) atan2::y#3 >> (byte) atan2::i#2
[27] if((signed byte) atan2::y#3>(signed byte) 0) goto atan2::@4
to:atan2::@6
atan2::@6: scope:[atan2] from atan2::@2
[28] (signed byte) atan2::x#2 ← (signed byte) atan2::x#3 - (signed byte) atan2::yd#0
[29] (signed byte) atan2::y#2 ← (signed byte) atan2::y#3 + (signed byte) atan2::xd#0
[30] (byte) atan2::angle#2 ← (byte) atan2::angle#4 - *((const byte*) CORDIC_ATAN2_ANGLES#0 + (byte) atan2::i#2)
to:atan2::@5
atan2::@5: scope:[atan2] from atan2::@4 atan2::@6
[31] (signed byte) atan2::x#8 ← phi( atan2::@4/(signed byte) atan2::x#1 atan2::@6/(signed byte) atan2::x#2 )
[31] (byte) atan2::angle#7 ← phi( atan2::@4/(byte) atan2::angle#1 atan2::@6/(byte) atan2::angle#2 )
[31] (signed byte) atan2::y#8 ← phi( atan2::@4/(signed byte) atan2::y#1 atan2::@6/(signed byte) atan2::y#2 )
[32] (byte) atan2::i#1 ← ++ (byte) atan2::i#2
[33] if((byte) atan2::i#1==(const byte) CORDIC_ITERATIONS#0+(byte) 1) goto atan2::@3
to:atan2::@1
atan2::@4: scope:[atan2] from atan2::@2
[34] (signed byte) atan2::x#1 ← (signed byte) atan2::x#3 + (signed byte) atan2::yd#0
[35] (signed byte) atan2::y#1 ← (signed byte) atan2::y#3 - (signed byte) atan2::xd#0
[36] (byte) atan2::angle#1 ← (byte) atan2::angle#4 + *((const byte*) CORDIC_ATAN2_ANGLES#0 + (byte) atan2::i#2)
to:atan2::@5

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,72 @@
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) CORDIC_ATAN2_ANGLES
(const byte*) CORDIC_ATAN2_ANGLES#0 CORDIC_ATAN2_ANGLES = (byte*) 4096
(byte) CORDIC_ITERATIONS
(const byte) CORDIC_ITERATIONS#0 CORDIC_ITERATIONS = (byte) 8
(byte()) atan2((signed byte) atan2::x , (signed byte) atan2::y)
(label) atan2::@1
(label) atan2::@2
(label) atan2::@3
(label) atan2::@4
(label) atan2::@5
(label) atan2::@6
(label) atan2::@return
(byte) atan2::angle
(byte) atan2::angle#1 reg byte x 2002.0
(byte) atan2::angle#2 reg byte x 2002.0
(byte) atan2::angle#4 reg byte x 444.8888888888889
(byte) atan2::angle#7 reg byte x 1334.6666666666667
(byte) atan2::i
(byte) atan2::i#1 i zp ZP_BYTE:8 1501.5
(byte) atan2::i#2 i zp ZP_BYTE:8 500.50000000000006
(byte) atan2::return
(byte) atan2::return#0 reg byte a 202.0
(byte) atan2::return#1 reg byte x 701.0
(signed byte) atan2::x
(signed byte) atan2::x#0 x zp ZP_BYTE:7 34.33333333333333
(signed byte) atan2::x#1 x zp ZP_BYTE:7 667.3333333333334
(signed byte) atan2::x#2 x zp ZP_BYTE:7 667.3333333333334
(signed byte) atan2::x#3 x zp ZP_BYTE:7 801.2
(signed byte) atan2::x#8 x zp ZP_BYTE:7 1001.0
(signed byte) atan2::xd
(signed byte) atan2::xd#0 xd zp ZP_BYTE:9 600.5999999999999
(signed byte) atan2::y
(signed byte) atan2::y#0 y zp ZP_BYTE:6 51.5
(signed byte) atan2::y#1 y zp ZP_BYTE:6 1001.0
(signed byte) atan2::y#2 y zp ZP_BYTE:6 1001.0
(signed byte) atan2::y#3 y zp ZP_BYTE:6 858.2857142857142
(signed byte) atan2::y#8 y zp ZP_BYTE:6 1001.0
(signed byte) atan2::yd
(signed byte) atan2::yd#0 reg byte y 1501.5
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@return
(byte) main::angle
(byte) main::angle#0 reg byte a 202.0
(byte*) main::screen
(byte*) main::screen#1 screen zp ZP_WORD:3 7.333333333333333
(byte*) main::screen#5 screen zp ZP_WORD:3 12.299999999999999
(signed byte) main::x
(signed byte) main::x#1 x zp ZP_BYTE:5 151.5
(signed byte) main::x#2 x zp ZP_BYTE:5 57.714285714285715
(signed byte) main::y
(signed byte) main::y#1 y zp ZP_BYTE:2 16.5
(signed byte) main::y#4 y zp ZP_BYTE:2 11.181818181818182
zp ZP_BYTE:2 [ main::y#4 main::y#1 ]
zp ZP_WORD:3 [ main::screen#5 main::screen#1 ]
zp ZP_BYTE:5 [ main::x#2 main::x#1 ]
zp ZP_BYTE:6 [ atan2::y#3 atan2::y#0 atan2::y#8 atan2::y#1 atan2::y#2 ]
zp ZP_BYTE:7 [ atan2::x#3 atan2::x#0 atan2::x#8 atan2::x#1 atan2::x#2 ]
zp ZP_BYTE:8 [ atan2::i#2 atan2::i#1 ]
reg byte x [ atan2::return#1 atan2::angle#4 atan2::angle#7 atan2::angle#1 atan2::angle#2 ]
reg byte a [ atan2::return#0 ]
reg byte a [ main::angle#0 ]
zp ZP_BYTE:9 [ atan2::xd#0 ]
reg byte y [ atan2::yd#0 ]