1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-08 17:54:40 +00:00

Optimized a bit.

This commit is contained in:
jespergravgaard 2018-12-25 23:25:42 +01:00
parent 627df0bda9
commit d9d28f4018
5 changed files with 345 additions and 336 deletions

View File

@ -73,10 +73,11 @@ interrupt(hardware_clobber) void irq() {
*BORDERCOL = DARK_GREY;
// Place the sprites
SPRITES_YPOS[0] = irq_sprite_ypos;
SPRITES_YPOS[2] = irq_sprite_ypos;
SPRITES_YPOS[4] = irq_sprite_ypos;
SPRITES_YPOS[6] = irq_sprite_ypos;
byte ypos = irq_sprite_ypos;
SPRITES_YPOS[0] = ypos;
SPRITES_YPOS[2] = ypos;
SPRITES_YPOS[4] = ypos;
SPRITES_YPOS[6] = ypos;
// Wait for the y-position before changing sprite pointers
do {
@ -100,7 +101,7 @@ interrupt(hardware_clobber) void irq() {
irq_sprite_ptr += 3;
}
// Setup next interrupt
// Setup next interrupt - start 1 line earlier when overlapping a badline
byte raster_next = irq_raster_next;
if((raster_next&7)==3) {
raster_next -=1;

View File

@ -123,11 +123,8 @@ irq: {
sta BORDERCOL
lda irq_sprite_ypos
sta SPRITES_YPOS
lda irq_sprite_ypos
sta SPRITES_YPOS+2
lda irq_sprite_ypos
sta SPRITES_YPOS+4
lda irq_sprite_ypos
sta SPRITES_YPOS+6
b1:
lda RASTER

View File

@ -93,56 +93,57 @@ init_sprites::@return: scope:[init_sprites] from init_sprites::@1
to:@return
irq: scope:[irq] from
[44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0
[45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0
[46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0
[47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0
[48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0
[45] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0
[46] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0
[47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0
[48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0
[49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0
to:irq::@1
irq::@1: scope:[irq] from irq irq::@1
[49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1
[50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1
to:irq::@5
irq::@5: scope:[irq] from irq::@1
[50] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0
[51] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0
[52] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0
[53] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1
[54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1
[55] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1
[56] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2
[57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
[58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2
[51] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0
[52] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0
[53] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0
[54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1
[55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1
[56] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1
[57] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2
[58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
[59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2
to:irq::@6
irq::@6: scope:[irq] from irq::@5
[59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
[60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
to:irq::@3
irq::@3: scope:[irq] from irq::@6 irq::@9
[62] (byte) irq_raster_next#12 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#1 )
[63] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12
[64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7
[65] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4
[63] (byte) irq_raster_next#12 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#1 )
[64] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12
[65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7
[66] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4
to:irq::@8
irq::@8: scope:[irq] from irq::@3
[66] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1
[67] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1
to:irq::@4
irq::@4: scope:[irq] from irq::@3 irq::@8
[67] (byte) irq::raster_next#2 ← phi( irq::@3/(byte) irq::raster_next#0 irq::@8/(byte) irq::raster_next#1 )
[68] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2
[69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0
[68] (byte) irq::raster_next#2 ← phi( irq::@3/(byte) irq::raster_next#0 irq::@8/(byte) irq::raster_next#1 )
[69] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2
[70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0
to:irq::@return
irq::@return: scope:[irq] from irq::@4
[71] return
[72] return
to:@return
irq::@2: scope:[irq] from irq::@5
[72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0
[73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0
[74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50
[73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0
[74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0
[75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:irq::toSpritePtr2
irq::toSpritePtr2: scope:[irq] from irq::@2
[75] phi()
[76] phi()
to:irq::@9
irq::@9: scope:[irq] from irq::toSpritePtr2
[76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0
[77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0
to:irq::@3

View File

@ -239,10 +239,11 @@ irq: scope:[irq] from
(byte) irq_sprite_ptr#9 ← phi( @8/(byte) irq_sprite_ptr#12 )
(byte) irq_sprite_ypos#4 ← phi( @8/(byte) irq_sprite_ypos#8 )
*((byte*) BORDERCOL#0) ← (byte) DARK_GREY#0
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) irq_sprite_ypos#4
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#4
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#4
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#4
(byte) irq::ypos#0 ← (byte) irq_sprite_ypos#4
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) irq::ypos#0
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0
*((byte*) SPRITES_YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0
to:irq::@1
irq::@1: scope:[irq] from irq irq::@1
(byte) irq_raster_next#10 ← phi( irq/(byte) irq_raster_next#13 irq::@1/(byte) irq_raster_next#10 )
@ -670,6 +671,8 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte*) irq::toSpritePtr2_sprite
(byte*) irq::toSpritePtr2_sprite#0
(byte*) irq::toSpritePtr2_sprite#1
(byte) irq::ypos
(byte) irq::ypos#0
(byte) irq_cnt
(byte) irq_cnt#0
(byte) irq_cnt#1
@ -1045,10 +1048,10 @@ Calls in [main] to init_sprites:10 init_irq:12
Created 4 initial phi equivalence classes
Coalesced [44] init_sprites::s#3 ← init_sprites::s#1
Coalesced [45] init_sprites::xpos#3 ← init_sprites::xpos#1
Coalesced [64] irq_raster_next#19 ← irq_raster_next#2
Coalesced [70] irq::raster_next#5 ← irq::raster_next#1
Coalesced [76] irq::raster_next#4 ← irq::raster_next#0
Coalesced [82] irq_raster_next#20 ← irq_raster_next#1
Coalesced [65] irq_raster_next#19 ← irq_raster_next#2
Coalesced [71] irq::raster_next#5 ← irq::raster_next#1
Coalesced [77] irq::raster_next#4 ← irq::raster_next#0
Coalesced [83] irq_raster_next#20 ← irq_raster_next#1
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) init_sprites::@5
Culled Empty Block (label) irq::@10
@ -1158,58 +1161,59 @@ init_sprites::@return: scope:[init_sprites] from init_sprites::@1
to:@return
irq: scope:[irq] from
[44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0
[45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0
[46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0
[47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0
[48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0
[45] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0
[46] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0
[47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0
[48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0
[49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0
to:irq::@1
irq::@1: scope:[irq] from irq irq::@1
[49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1
[50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1
to:irq::@5
irq::@5: scope:[irq] from irq::@1
[50] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0
[51] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0
[52] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0
[53] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1
[54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1
[55] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1
[56] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2
[57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
[58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2
[51] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0
[52] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0
[53] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0
[54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1
[55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1
[56] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1
[57] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2
[58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
[59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2
to:irq::@6
irq::@6: scope:[irq] from irq::@5
[59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
[60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21
[62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
to:irq::@3
irq::@3: scope:[irq] from irq::@6 irq::@9
[62] (byte) irq_raster_next#12 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#1 )
[63] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12
[64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7
[65] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4
[63] (byte) irq_raster_next#12 ← phi( irq::@6/(byte) irq_raster_next#2 irq::@9/(byte) irq_raster_next#1 )
[64] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12
[65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7
[66] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4
to:irq::@8
irq::@8: scope:[irq] from irq::@3
[66] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1
[67] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1
to:irq::@4
irq::@4: scope:[irq] from irq::@3 irq::@8
[67] (byte) irq::raster_next#2 ← phi( irq::@3/(byte) irq::raster_next#0 irq::@8/(byte) irq::raster_next#1 )
[68] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2
[69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0
[68] (byte) irq::raster_next#2 ← phi( irq::@3/(byte) irq::raster_next#0 irq::@8/(byte) irq::raster_next#1 )
[69] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2
[70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0
to:irq::@return
irq::@return: scope:[irq] from irq::@4
[71] return
[72] return
to:@return
irq::@2: scope:[irq] from irq::@5
[72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0
[73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0
[74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50
[73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0
[74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0
[75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50
to:irq::toSpritePtr2
irq::toSpritePtr2: scope:[irq] from irq::@2
[75] phi()
[76] phi()
to:irq::@9
irq::@9: scope:[irq] from irq::toSpritePtr2
[76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0
[77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0
to:irq::@3
@ -1343,21 +1347,23 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte~) irq::toSpritePtr2_$2
(byte) irq::toSpritePtr2_return
(byte*) irq::toSpritePtr2_sprite
(byte) irq::ypos
(byte) irq::ypos#0 2.5
(byte) irq_cnt
(byte) irq_cnt#0 0.3076923076923077
(byte) irq_cnt#0 0.2857142857142857
(byte) irq_cnt#1 4.0
(byte) irq_cnt#13 20.0
(byte) irq_raster_next
(byte) irq_raster_next#0 0.26666666666666666
(byte) irq_raster_next#0 0.25
(byte) irq_raster_next#1 1.0
(byte) irq_raster_next#12 6.0
(byte) irq_raster_next#2 1.3333333333333333
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 0.3529411764705882
(byte) irq_sprite_ptr#0 0.3333333333333333
(byte) irq_sprite_ptr#1 20.0
(byte) irq_sprite_ptr#2 20.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 1.4375
(byte) irq_sprite_ypos#0 1.0
(byte) irq_sprite_ypos#1 20.0
(byte) irq_sprite_ypos#2 20.0
(void()) main()
@ -1377,6 +1383,7 @@ Added variable irq_sprite_ypos#0 to zero page equivalence class [ irq_sprite_ypo
Added variable irq_sprite_ptr#0 to zero page equivalence class [ irq_sprite_ptr#0 ]
Added variable irq_cnt#0 to zero page equivalence class [ irq_cnt#0 ]
Added variable init_sprites::s2#0 to zero page equivalence class [ init_sprites::s2#0 ]
Added variable irq::ypos#0 to zero page equivalence class [ irq::ypos#0 ]
Added variable irq::ptr#0 to zero page equivalence class [ irq::ptr#0 ]
Added variable irq::ptr#1 to zero page equivalence class [ irq::ptr#1 ]
Added variable irq::ptr#2 to zero page equivalence class [ irq::ptr#2 ]
@ -1397,6 +1404,7 @@ Complete equivalence classes
[ irq_sprite_ptr#0 ]
[ irq_cnt#0 ]
[ init_sprites::s2#0 ]
[ irq::ypos#0 ]
[ irq::ptr#0 ]
[ irq::ptr#1 ]
[ irq::ptr#2 ]
@ -1416,16 +1424,17 @@ Allocated zp ZP_BYTE:7 [ irq_sprite_ypos#0 ]
Allocated zp ZP_BYTE:8 [ irq_sprite_ptr#0 ]
Allocated zp ZP_BYTE:9 [ irq_cnt#0 ]
Allocated zp ZP_BYTE:10 [ init_sprites::s2#0 ]
Allocated zp ZP_BYTE:11 [ irq::ptr#0 ]
Allocated zp ZP_BYTE:12 [ irq::ptr#1 ]
Allocated zp ZP_BYTE:13 [ irq::ptr#2 ]
Allocated zp ZP_BYTE:14 [ irq_cnt#1 ]
Allocated zp ZP_BYTE:15 [ irq_sprite_ypos#2 ]
Allocated zp ZP_BYTE:16 [ irq_sprite_ptr#2 ]
Allocated zp ZP_BYTE:17 [ irq::$3 ]
Allocated zp ZP_BYTE:18 [ irq_cnt#13 ]
Allocated zp ZP_BYTE:19 [ irq_sprite_ypos#1 ]
Allocated zp ZP_BYTE:20 [ irq_sprite_ptr#1 ]
Allocated zp ZP_BYTE:11 [ irq::ypos#0 ]
Allocated zp ZP_BYTE:12 [ irq::ptr#0 ]
Allocated zp ZP_BYTE:13 [ irq::ptr#1 ]
Allocated zp ZP_BYTE:14 [ irq::ptr#2 ]
Allocated zp ZP_BYTE:15 [ irq_cnt#1 ]
Allocated zp ZP_BYTE:16 [ irq_sprite_ypos#2 ]
Allocated zp ZP_BYTE:17 [ irq_sprite_ptr#2 ]
Allocated zp ZP_BYTE:18 [ irq::$3 ]
Allocated zp ZP_BYTE:19 [ irq_cnt#13 ]
Allocated zp ZP_BYTE:20 [ irq_sprite_ypos#1 ]
Allocated zp ZP_BYTE:21 [ irq_sprite_ptr#1 ]
INITIAL ASM
//SEG0 Basic Upstart
@ -1469,15 +1478,15 @@ INITIAL ASM
.label irq_sprite_ypos = 7
.label irq_sprite_ptr = 8
.label irq_cnt = 9
.label irq_cnt_1 = $e
.label irq_cnt_1 = $f
.label irq_raster_next_1 = 4
.label irq_sprite_ypos_1 = $13
.label irq_sprite_ptr_1 = $14
.label irq_sprite_ypos_1 = $14
.label irq_sprite_ptr_1 = $15
.label irq_raster_next_2 = 4
.label irq_sprite_ypos_2 = $f
.label irq_sprite_ptr_2 = $10
.label irq_sprite_ypos_2 = $10
.label irq_sprite_ptr_2 = $11
.label irq_raster_next_12 = 4
.label irq_cnt_13 = $12
.label irq_cnt_13 = $13
//SEG2 @begin
bbegin:
jmp b6
@ -1672,10 +1681,11 @@ init_sprites: {
//SEG69 irq
irq: {
.const toSpritePtr2_return = PLAYFIELD_SPRITES>>6
.label _3 = $11
.label ptr = $b
.label ptr_1 = $c
.label ptr_2 = $d
.label _3 = $12
.label ypos = $b
.label ptr = $c
.label ptr_1 = $d
.label ptr_2 = $e
.label raster_next = 5
//SEG70 entry interrupt(HARDWARE_CLOBBER)
sta rega+1
@ -1684,120 +1694,123 @@ irq: {
//SEG71 [44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 -- _deref_pbuc1=vbuc2
lda #DARK_GREY
sta BORDERCOL
//SEG72 [45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
//SEG72 [45] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuz1=vbuz2
lda irq_sprite_ypos
sta ypos
//SEG73 [46] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuz1
lda ypos
sta SPRITES_YPOS
//SEG73 [46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG74 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuz1
lda ypos
sta SPRITES_YPOS+2
//SEG74 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG75 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuz1
lda ypos
sta SPRITES_YPOS+4
//SEG75 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG76 [49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuz1
lda ypos
sta SPRITES_YPOS+6
jmp b1
//SEG76 irq::@1
//SEG77 irq::@1
b1:
//SEG77 [49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 -- _deref_pbuc1_neq_vbuz1_then_la1
//SEG78 [50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 -- _deref_pbuc1_neq_vbuz1_then_la1
lda RASTER
cmp irq_sprite_ypos
bne b1
jmp b5
//SEG78 irq::@5
//SEG79 irq::@5
b5:
//SEG79 [50] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuz1=vbuz2
//SEG80 [51] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuz1=vbuz2
lda irq_sprite_ptr
sta ptr
//SEG80 [51] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 -- _deref_pbuc1=vbuz1
//SEG81 [52] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 -- _deref_pbuc1=vbuz1
lda ptr
sta PLAYFIELD_SPRITE_PTRS
//SEG81 [52] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 -- vbuz1=_inc_vbuz2
//SEG82 [53] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 -- vbuz1=_inc_vbuz2
ldy ptr
iny
sty ptr_1
//SEG82 [53] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuz1
//SEG83 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuz1
lda ptr_1
sta PLAYFIELD_SPRITE_PTRS+1
//SEG83 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuz1
//SEG84 [55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuz1
lda ptr_1
sta PLAYFIELD_SPRITE_PTRS+2
//SEG84 [55] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 -- vbuz1=_inc_vbuz2
//SEG85 [56] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 -- vbuz1=_inc_vbuz2
ldy ptr_1
iny
sty ptr_2
//SEG85 [56] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 -- _deref_pbuc1=vbuz1
//SEG86 [57] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 -- _deref_pbuc1=vbuz1
lda ptr_2
sta PLAYFIELD_SPRITE_PTRS+3
//SEG86 [57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz2
//SEG87 [58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz2
ldy irq_cnt
iny
sty irq_cnt_1
//SEG87 [58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 -- vbuz1_eq_vbuc1_then_la1
//SEG88 [59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 -- vbuz1_eq_vbuc1_then_la1
lda irq_cnt_1
cmp #$a
beq b2
jmp b6
//SEG88 irq::@6
//SEG89 irq::@6
b6:
//SEG89 [59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1
//SEG90 [60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1
lda #$15
clc
adc irq_raster_next
sta irq_raster_next_2
//SEG90 [60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1
//SEG91 [61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz2_plus_vbuc1
lda #$15
clc
adc irq_sprite_ypos
sta irq_sprite_ypos_2
//SEG91 [61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_plus_vbuc1
//SEG92 [62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_plus_vbuc1
lda #3
clc
adc irq_sprite_ptr
sta irq_sprite_ptr_2
//SEG92 [62] phi from irq::@6 irq::@9 to irq::@3 [phi:irq::@6/irq::@9->irq::@3]
//SEG93 [63] phi from irq::@6 irq::@9 to irq::@3 [phi:irq::@6/irq::@9->irq::@3]
b3_from_b6:
b3_from_b9:
//SEG93 [62] phi (byte) irq_raster_next#12 = (byte) irq_raster_next#2 [phi:irq::@6/irq::@9->irq::@3#0] -- register_copy
//SEG94 [63] phi (byte) irq_raster_next#12 = (byte) irq_raster_next#2 [phi:irq::@6/irq::@9->irq::@3#0] -- register_copy
jmp b3
//SEG94 irq::@3
//SEG95 irq::@3
b3:
//SEG95 [63] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 -- vbuz1=vbuz2
//SEG96 [64] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 -- vbuz1=vbuz2
lda irq_raster_next_12
sta raster_next
//SEG96 [64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1
//SEG97 [65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1
lda #7
and raster_next
sta _3
//SEG97 [65] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 -- vbuz1_neq_vbuc1_then_la1
//SEG98 [66] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 -- vbuz1_neq_vbuc1_then_la1
lda _3
cmp #3
bne b4_from_b3
jmp b8
//SEG98 irq::@8
//SEG99 irq::@8
b8:
//SEG99 [66] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_minus_1
//SEG100 [67] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_minus_1
dec raster_next
//SEG100 [67] phi from irq::@3 irq::@8 to irq::@4 [phi:irq::@3/irq::@8->irq::@4]
//SEG101 [68] phi from irq::@3 irq::@8 to irq::@4 [phi:irq::@3/irq::@8->irq::@4]
b4_from_b3:
b4_from_b8:
//SEG101 [67] phi (byte) irq::raster_next#2 = (byte) irq::raster_next#0 [phi:irq::@3/irq::@8->irq::@4#0] -- register_copy
//SEG102 [68] phi (byte) irq::raster_next#2 = (byte) irq::raster_next#0 [phi:irq::@3/irq::@8->irq::@4#0] -- register_copy
jmp b4
//SEG102 irq::@4
//SEG103 irq::@4
b4:
//SEG103 [68] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuz1
//SEG104 [69] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuz1
lda raster_next
sta RASTER
//SEG104 [69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
//SEG105 [70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
lda #IRQ_RASTER
sta IRQ_STATUS
//SEG105 [70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
//SEG106 [71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
lda #BLACK
sta BORDERCOL
jmp breturn
//SEG106 irq::@return
//SEG107 irq::@return
breturn:
//SEG107 [71] return - exit interrupt(HARDWARE_CLOBBER)
//SEG108 [72] return - exit interrupt(HARDWARE_CLOBBER)
rega:
lda #00
regx:
@ -1805,26 +1818,26 @@ irq: {
regy:
ldy #00
rti
//SEG108 irq::@2
//SEG109 irq::@2
b2:
//SEG109 [72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
//SEG110 [73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
lda #0
sta irq_cnt_13
//SEG110 [73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
//SEG111 [74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
lda #IRQ_RASTER_FIRST
sta irq_raster_next_1
//SEG111 [74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
//SEG112 [75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
lda #$32
sta irq_sprite_ypos_1
//SEG112 [75] phi from irq::@2 to irq::toSpritePtr2 [phi:irq::@2->irq::toSpritePtr2]
//SEG113 [76] phi from irq::@2 to irq::toSpritePtr2 [phi:irq::@2->irq::toSpritePtr2]
toSpritePtr2_from_b2:
jmp toSpritePtr2
//SEG113 irq::toSpritePtr2
//SEG114 irq::toSpritePtr2
toSpritePtr2:
jmp b9
//SEG114 irq::@9
//SEG115 irq::@9
b9:
//SEG115 [76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 -- vbuz1=vbuc1
//SEG116 [77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 -- vbuz1=vbuc1
lda #toSpritePtr2_return
sta irq_sprite_ptr_1
jmp b3_from_b9
@ -1871,25 +1884,21 @@ Statement [38] *((const byte*) SPRITES_XPOS#0 + (byte) init_sprites::s2#0) ← (
Statement [39] *((const byte*) SPRITES_COLS#0 + (byte) init_sprites::s#2) ← (const byte) BLACK#0 [ init_sprites::s#2 init_sprites::xpos#2 ] ( main:7::init_sprites:10 [ init_sprites::s#2 init_sprites::xpos#2 ] ) always clobbers reg byte a
Statement [40] (byte) init_sprites::xpos#1 ← (byte) init_sprites::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ init_sprites::s#2 init_sprites::xpos#1 ] ( main:7::init_sprites:10 [ init_sprites::s#2 init_sprites::xpos#1 ] ) always clobbers reg byte a
Statement [44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte y
Statement [58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a
Statement [59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#2 ] ( [ irq_raster_next#2 ] ) always clobbers reg byte a
Statement [64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ irq::raster_next#0 irq::$3 ] ( [ irq::raster_next#0 irq::$3 ] ) always clobbers reg byte a
Statement [50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte y
Statement [59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a
Statement [60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#2 ] ( [ irq_raster_next#2 ] ) always clobbers reg byte a
Statement [65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ irq::raster_next#0 irq::$3 ] ( [ irq::raster_next#0 irq::$3 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ]
Statement [69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [71] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
Statement [72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( [ ] ) always clobbers reg byte a
Statement [73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [72] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
Statement [73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( [ ] ) always clobbers reg byte a
Statement [74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [1] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0 [ ] ( ) always clobbers reg byte a
Statement [2] (byte) irq_sprite_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ ] ( ) always clobbers reg byte a
Statement [4] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0 [ ] ( ) always clobbers reg byte a
@ -1915,24 +1924,20 @@ Statement [38] *((const byte*) SPRITES_XPOS#0 + (byte) init_sprites::s2#0) ← (
Statement [39] *((const byte*) SPRITES_COLS#0 + (byte) init_sprites::s#2) ← (const byte) BLACK#0 [ init_sprites::s#2 init_sprites::xpos#2 ] ( main:7::init_sprites:10 [ init_sprites::s#2 init_sprites::xpos#2 ] ) always clobbers reg byte a
Statement [40] (byte) init_sprites::xpos#1 ← (byte) init_sprites::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) 24 [ init_sprites::s#2 init_sprites::xpos#1 ] ( main:7::init_sprites:10 [ init_sprites::s#2 init_sprites::xpos#1 ] ) always clobbers reg byte a
Statement [44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte y
Statement [58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a
Statement [59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#2 ] ( [ irq_raster_next#2 ] ) always clobbers reg byte a
Statement [64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ irq::raster_next#0 irq::$3 ] ( [ irq::raster_next#0 irq::$3 ] ) always clobbers reg byte a
Statement [69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [71] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
Statement [72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( [ ] ) always clobbers reg byte a
Statement [73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#0 ] ) always clobbers reg byte a
Statement [58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 irq_cnt#1 ] ) always clobbers reg byte y
Statement [59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ( [ irq_raster_next#0 irq_sprite_ypos#0 irq_sprite_ptr#0 ] ) always clobbers reg byte a
Statement [60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ypos#0 irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 [ irq_sprite_ptr#0 irq_raster_next#2 ] ( [ irq_sprite_ptr#0 irq_raster_next#2 ] ) always clobbers reg byte a
Statement [62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 [ irq_raster_next#2 ] ( [ irq_raster_next#2 ] ) always clobbers reg byte a
Statement [65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ irq::raster_next#0 irq::$3 ] ( [ irq::raster_next#0 irq::$3 ] ) always clobbers reg byte a
Statement [70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a
Statement [72] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y
Statement [73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( [ ] ) always clobbers reg byte a
Statement [74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Statement [77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 [ irq_raster_next#1 ] ( [ irq_raster_next#1 ] ) always clobbers reg byte a
Potential registers zp ZP_BYTE:2 [ init_sprites::s#2 init_sprites::s#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ] : zp ZP_BYTE:4 ,
@ -1942,63 +1947,66 @@ Potential registers zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] : zp ZP_BYTE:7 ,
Potential registers zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] : zp ZP_BYTE:8 ,
Potential registers zp ZP_BYTE:9 [ irq_cnt#0 ] : zp ZP_BYTE:9 ,
Potential registers zp ZP_BYTE:10 [ init_sprites::s2#0 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:11 [ irq::ptr#0 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:12 [ irq::ptr#1 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:13 [ irq::ptr#2 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:14 [ irq_cnt#1 ] : zp ZP_BYTE:14 ,
Potential registers zp ZP_BYTE:15 [ irq_sprite_ypos#2 ] : zp ZP_BYTE:15 ,
Potential registers zp ZP_BYTE:16 [ irq_sprite_ptr#2 ] : zp ZP_BYTE:16 ,
Potential registers zp ZP_BYTE:17 [ irq::$3 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:18 [ irq_cnt#13 ] : zp ZP_BYTE:18 ,
Potential registers zp ZP_BYTE:19 [ irq_sprite_ypos#1 ] : zp ZP_BYTE:19 ,
Potential registers zp ZP_BYTE:20 [ irq_sprite_ptr#1 ] : zp ZP_BYTE:20 ,
Potential registers zp ZP_BYTE:11 [ irq::ypos#0 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:12 [ irq::ptr#0 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:13 [ irq::ptr#1 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:14 [ irq::ptr#2 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:15 [ irq_cnt#1 ] : zp ZP_BYTE:15 ,
Potential registers zp ZP_BYTE:16 [ irq_sprite_ypos#2 ] : zp ZP_BYTE:16 ,
Potential registers zp ZP_BYTE:17 [ irq_sprite_ptr#2 ] : zp ZP_BYTE:17 ,
Potential registers zp ZP_BYTE:18 [ irq::$3 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y ,
Potential registers zp ZP_BYTE:19 [ irq_cnt#13 ] : zp ZP_BYTE:19 ,
Potential registers zp ZP_BYTE:20 [ irq_sprite_ypos#1 ] : zp ZP_BYTE:20 ,
Potential registers zp ZP_BYTE:21 [ irq_sprite_ptr#1 ] : zp ZP_BYTE:21 ,
REGISTER UPLIFT SCOPES
Uplift Scope [] 20: zp ZP_BYTE:15 [ irq_sprite_ypos#2 ] 20: zp ZP_BYTE:16 [ irq_sprite_ptr#2 ] 20: zp ZP_BYTE:18 [ irq_cnt#13 ] 20: zp ZP_BYTE:19 [ irq_sprite_ypos#1 ] 20: zp ZP_BYTE:20 [ irq_sprite_ptr#1 ] 8.33: zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ] 4: zp ZP_BYTE:14 [ irq_cnt#1 ] 1.44: zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] 0.35: zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] 0.31: zp ZP_BYTE:9 [ irq_cnt#0 ] 0.27: zp ZP_BYTE:6 [ irq_raster_next#0 ]
Uplift Scope [] 20: zp ZP_BYTE:16 [ irq_sprite_ypos#2 ] 20: zp ZP_BYTE:17 [ irq_sprite_ptr#2 ] 20: zp ZP_BYTE:19 [ irq_cnt#13 ] 20: zp ZP_BYTE:20 [ irq_sprite_ypos#1 ] 20: zp ZP_BYTE:21 [ irq_sprite_ptr#1 ] 8.33: zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ] 4: zp ZP_BYTE:15 [ irq_cnt#1 ] 1: zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] 0.33: zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] 0.29: zp ZP_BYTE:9 [ irq_cnt#0 ] 0.25: zp ZP_BYTE:6 [ irq_raster_next#0 ]
Uplift Scope [init_sprites] 25.3: zp ZP_BYTE:2 [ init_sprites::s#2 init_sprites::s#1 ] 22: zp ZP_BYTE:10 [ init_sprites::s2#0 ] 15.58: zp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Uplift Scope [irq] 12.67: zp ZP_BYTE:5 [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ] 4: zp ZP_BYTE:13 [ irq::ptr#2 ] 4: zp ZP_BYTE:17 [ irq::$3 ] 3: zp ZP_BYTE:11 [ irq::ptr#0 ] 2.67: zp ZP_BYTE:12 [ irq::ptr#1 ]
Uplift Scope [irq] 12.67: zp ZP_BYTE:5 [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ] 4: zp ZP_BYTE:14 [ irq::ptr#2 ] 4: zp ZP_BYTE:18 [ irq::$3 ] 3: zp ZP_BYTE:12 [ irq::ptr#0 ] 2.67: zp ZP_BYTE:13 [ irq::ptr#1 ] 2.5: zp ZP_BYTE:11 [ irq::ypos#0 ]
Uplift Scope [main]
Uplift Scope [init_irq]
Uplifting [] best 1892 combination zp ZP_BYTE:15 [ irq_sprite_ypos#2 ] zp ZP_BYTE:16 [ irq_sprite_ptr#2 ] zp ZP_BYTE:18 [ irq_cnt#13 ] zp ZP_BYTE:19 [ irq_sprite_ypos#1 ] zp ZP_BYTE:20 [ irq_sprite_ptr#1 ] zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ] zp ZP_BYTE:14 [ irq_cnt#1 ] zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] zp ZP_BYTE:9 [ irq_cnt#0 ] zp ZP_BYTE:6 [ irq_raster_next#0 ]
Uplifting [init_sprites] best 1722 combination reg byte x [ init_sprites::s#2 init_sprites::s#1 ] reg byte a [ init_sprites::s2#0 ] zp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Uplifting [irq] best 1693 combination reg byte x [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ] reg byte x [ irq::ptr#2 ] reg byte a [ irq::$3 ] reg byte a [ irq::ptr#0 ] zp ZP_BYTE:12 [ irq::ptr#1 ]
Limited combination testing to 100 combinations of 768 possible.
Uplifting [main] best 1693 combination
Uplifting [init_irq] best 1693 combination
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ irq_sprite_ypos#2 ]
Uplifting [] best 1693 combination zp ZP_BYTE:15 [ irq_sprite_ypos#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:16 [ irq_sprite_ptr#2 ]
Uplifting [] best 1693 combination zp ZP_BYTE:16 [ irq_sprite_ptr#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ irq_cnt#13 ]
Uplifting [] best 1693 combination zp ZP_BYTE:18 [ irq_cnt#13 ]
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ irq_sprite_ypos#1 ]
Uplifting [] best 1693 combination zp ZP_BYTE:19 [ irq_sprite_ypos#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ irq_sprite_ptr#1 ]
Uplifting [] best 1693 combination zp ZP_BYTE:20 [ irq_sprite_ptr#1 ]
Uplifting [] best 1898 combination zp ZP_BYTE:16 [ irq_sprite_ypos#2 ] zp ZP_BYTE:17 [ irq_sprite_ptr#2 ] zp ZP_BYTE:19 [ irq_cnt#13 ] zp ZP_BYTE:20 [ irq_sprite_ypos#1 ] zp ZP_BYTE:21 [ irq_sprite_ptr#1 ] zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ] zp ZP_BYTE:15 [ irq_cnt#1 ] zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] zp ZP_BYTE:9 [ irq_cnt#0 ] zp ZP_BYTE:6 [ irq_raster_next#0 ]
Uplifting [init_sprites] best 1728 combination reg byte x [ init_sprites::s#2 init_sprites::s#1 ] reg byte a [ init_sprites::s2#0 ] zp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Uplifting [irq] best 1699 combination reg byte x [ irq::raster_next#2 irq::raster_next#0 irq::raster_next#1 ] reg byte x [ irq::ptr#2 ] reg byte a [ irq::$3 ] reg byte a [ irq::ptr#0 ] zp ZP_BYTE:13 [ irq::ptr#1 ] zp ZP_BYTE:11 [ irq::ypos#0 ]
Limited combination testing to 100 combinations of 3072 possible.
Uplifting [main] best 1699 combination
Uplifting [init_irq] best 1699 combination
Attempting to uplift remaining variables inzp ZP_BYTE:16 [ irq_sprite_ypos#2 ]
Uplifting [] best 1699 combination zp ZP_BYTE:16 [ irq_sprite_ypos#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:17 [ irq_sprite_ptr#2 ]
Uplifting [] best 1699 combination zp ZP_BYTE:17 [ irq_sprite_ptr#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ irq_cnt#13 ]
Uplifting [] best 1699 combination zp ZP_BYTE:19 [ irq_cnt#13 ]
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ irq_sprite_ypos#1 ]
Uplifting [] best 1699 combination zp ZP_BYTE:20 [ irq_sprite_ypos#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ irq_sprite_ptr#1 ]
Uplifting [] best 1699 combination zp ZP_BYTE:21 [ irq_sprite_ptr#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Uplifting [init_sprites] best 1693 combination zp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Uplifting [init_sprites] best 1699 combination zp ZP_BYTE:3 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ]
Uplifting [] best 1693 combination zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ irq_cnt#1 ]
Uplifting [] best 1693 combination zp ZP_BYTE:14 [ irq_cnt#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ irq::ptr#1 ]
Uplifting [irq] best 1681 combination reg byte x [ irq::ptr#1 ]
Uplifting [] best 1699 combination zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ irq_cnt#1 ]
Uplifting [] best 1699 combination zp ZP_BYTE:15 [ irq_cnt#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ irq::ptr#1 ]
Uplifting [irq] best 1687 combination reg byte x [ irq::ptr#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:11 [ irq::ypos#0 ]
Uplifting [irq] best 1672 combination reg byte a [ irq::ypos#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ irq_sprite_ypos#0 ]
Uplifting [] best 1681 combination zp ZP_BYTE:7 [ irq_sprite_ypos#0 ]
Uplifting [] best 1672 combination zp ZP_BYTE:7 [ irq_sprite_ypos#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:8 [ irq_sprite_ptr#0 ]
Uplifting [] best 1681 combination zp ZP_BYTE:8 [ irq_sprite_ptr#0 ]
Uplifting [] best 1672 combination zp ZP_BYTE:8 [ irq_sprite_ptr#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:9 [ irq_cnt#0 ]
Uplifting [] best 1681 combination zp ZP_BYTE:9 [ irq_cnt#0 ]
Uplifting [] best 1672 combination zp ZP_BYTE:9 [ irq_cnt#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ irq_raster_next#0 ]
Uplifting [] best 1681 combination zp ZP_BYTE:6 [ irq_raster_next#0 ]
Uplifting [] best 1672 combination zp ZP_BYTE:6 [ irq_raster_next#0 ]
Coalescing zero page register with common assignment [ zp ZP_BYTE:4 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 ] ] with [ zp ZP_BYTE:6 [ irq_raster_next#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] ] with [ zp ZP_BYTE:15 [ irq_sprite_ypos#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] ] with [ zp ZP_BYTE:16 [ irq_sprite_ptr#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:9 [ irq_cnt#0 ] ] with [ zp ZP_BYTE:14 [ irq_cnt#1 ] ] - score: 1
Coalescing zero page register [ zp ZP_BYTE:7 [ irq_sprite_ypos#0 irq_sprite_ypos#2 ] ] with [ zp ZP_BYTE:19 [ irq_sprite_ypos#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:8 [ irq_sprite_ptr#0 irq_sprite_ptr#2 ] ] with [ zp ZP_BYTE:20 [ irq_sprite_ptr#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:9 [ irq_cnt#0 irq_cnt#1 ] ] with [ zp ZP_BYTE:18 [ irq_cnt#13 ] ]
Coalescing zero page register with common assignment [ zp ZP_BYTE:7 [ irq_sprite_ypos#0 ] ] with [ zp ZP_BYTE:16 [ irq_sprite_ypos#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:8 [ irq_sprite_ptr#0 ] ] with [ zp ZP_BYTE:17 [ irq_sprite_ptr#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_BYTE:9 [ irq_cnt#0 ] ] with [ zp ZP_BYTE:15 [ irq_cnt#1 ] ] - score: 1
Coalescing zero page register [ zp ZP_BYTE:7 [ irq_sprite_ypos#0 irq_sprite_ypos#2 ] ] with [ zp ZP_BYTE:20 [ irq_sprite_ypos#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:8 [ irq_sprite_ptr#0 irq_sprite_ptr#2 ] ] with [ zp ZP_BYTE:21 [ irq_sprite_ptr#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:9 [ irq_cnt#0 irq_cnt#1 ] ] with [ zp ZP_BYTE:19 [ irq_cnt#13 ] ]
Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ init_sprites::xpos#2 init_sprites::xpos#1 ]
Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:3 [ irq_raster_next#12 irq_raster_next#2 irq_raster_next#1 irq_raster_next#0 ]
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:4 [ irq_sprite_ypos#0 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
@ -2006,8 +2014,8 @@ Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:5 [ irq_sprite_ptr#0 irq_sprite_ptr#2 ir
Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:6 [ irq_cnt#0 irq_cnt#1 irq_cnt#13 ]
Interrupt procedure irq clobbers AXCNZV
Removing interrupt register storage sty regy+1 in SEG70 entry interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage regy: in SEG107 [71] return - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage ldy #00 in SEG107 [71] return - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage regy: in SEG108 [72] return - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage ldy #00 in SEG108 [72] return - exit interrupt(HARDWARE_CLOBBER)
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
@ -2245,131 +2253,129 @@ irq: {
//SEG71 [44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 -- _deref_pbuc1=vbuc2
lda #DARK_GREY
sta BORDERCOL
//SEG72 [45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
//SEG72 [45] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1
lda irq_sprite_ypos
//SEG73 [46] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS
//SEG73 [46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG74 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS+2
//SEG74 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG75 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS+4
//SEG75 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG76 [49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS+6
jmp b1
//SEG76 irq::@1
//SEG77 irq::@1
b1:
//SEG77 [49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 -- _deref_pbuc1_neq_vbuz1_then_la1
//SEG78 [50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 -- _deref_pbuc1_neq_vbuz1_then_la1
lda RASTER
cmp irq_sprite_ypos
bne b1
jmp b5
//SEG78 irq::@5
//SEG79 irq::@5
b5:
//SEG79 [50] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuaa=vbuz1
//SEG80 [51] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuaa=vbuz1
lda irq_sprite_ptr
//SEG80 [51] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 -- _deref_pbuc1=vbuaa
//SEG81 [52] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 -- _deref_pbuc1=vbuaa
sta PLAYFIELD_SPRITE_PTRS
//SEG81 [52] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 -- vbuxx=_inc_vbuaa
//SEG82 [53] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 -- vbuxx=_inc_vbuaa
tax
inx
//SEG82 [53] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
//SEG83 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
stx PLAYFIELD_SPRITE_PTRS+1
//SEG83 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
//SEG84 [55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
stx PLAYFIELD_SPRITE_PTRS+2
//SEG84 [55] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 -- vbuxx=_inc_vbuxx
//SEG85 [56] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 -- vbuxx=_inc_vbuxx
inx
//SEG85 [56] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 -- _deref_pbuc1=vbuxx
//SEG86 [57] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 -- _deref_pbuc1=vbuxx
stx PLAYFIELD_SPRITE_PTRS+3
//SEG86 [57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1
//SEG87 [58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1
inc irq_cnt
//SEG87 [58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 -- vbuz1_eq_vbuc1_then_la1
//SEG88 [59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 -- vbuz1_eq_vbuc1_then_la1
lda irq_cnt
cmp #$a
beq b2
jmp b6
//SEG88 irq::@6
//SEG89 irq::@6
b6:
//SEG89 [59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
//SEG90 [60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
lda #$15
clc
adc irq_raster_next
sta irq_raster_next
//SEG90 [60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
//SEG91 [61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
lda #$15
clc
adc irq_sprite_ypos
sta irq_sprite_ypos
//SEG91 [61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1
//SEG92 [62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1
lda #3
clc
adc irq_sprite_ptr
sta irq_sprite_ptr
//SEG92 [62] phi from irq::@6 irq::@9 to irq::@3 [phi:irq::@6/irq::@9->irq::@3]
//SEG93 [63] phi from irq::@6 irq::@9 to irq::@3 [phi:irq::@6/irq::@9->irq::@3]
b3_from_b6:
b3_from_b9:
//SEG93 [62] phi (byte) irq_raster_next#12 = (byte) irq_raster_next#2 [phi:irq::@6/irq::@9->irq::@3#0] -- register_copy
//SEG94 [63] phi (byte) irq_raster_next#12 = (byte) irq_raster_next#2 [phi:irq::@6/irq::@9->irq::@3#0] -- register_copy
jmp b3
//SEG94 irq::@3
//SEG95 irq::@3
b3:
//SEG95 [63] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 -- vbuxx=vbuz1
//SEG96 [64] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 -- vbuxx=vbuz1
ldx irq_raster_next
//SEG96 [64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
//SEG97 [65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
txa
and #7
//SEG97 [65] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 -- vbuaa_neq_vbuc1_then_la1
//SEG98 [66] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 -- vbuaa_neq_vbuc1_then_la1
cmp #3
bne b4_from_b3
jmp b8
//SEG98 irq::@8
//SEG99 irq::@8
b8:
//SEG99 [66] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_minus_1
//SEG100 [67] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_minus_1
dex
//SEG100 [67] phi from irq::@3 irq::@8 to irq::@4 [phi:irq::@3/irq::@8->irq::@4]
//SEG101 [68] phi from irq::@3 irq::@8 to irq::@4 [phi:irq::@3/irq::@8->irq::@4]
b4_from_b3:
b4_from_b8:
//SEG101 [67] phi (byte) irq::raster_next#2 = (byte) irq::raster_next#0 [phi:irq::@3/irq::@8->irq::@4#0] -- register_copy
//SEG102 [68] phi (byte) irq::raster_next#2 = (byte) irq::raster_next#0 [phi:irq::@3/irq::@8->irq::@4#0] -- register_copy
jmp b4
//SEG102 irq::@4
//SEG103 irq::@4
b4:
//SEG103 [68] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuxx
//SEG104 [69] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuxx
stx RASTER
//SEG104 [69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
//SEG105 [70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
lda #IRQ_RASTER
sta IRQ_STATUS
//SEG105 [70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
//SEG106 [71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
lda #BLACK
sta BORDERCOL
jmp breturn
//SEG106 irq::@return
//SEG107 irq::@return
breturn:
//SEG107 [71] return - exit interrupt(HARDWARE_CLOBBER)
//SEG108 [72] return - exit interrupt(HARDWARE_CLOBBER)
rega:
lda #00
regx:
ldx #00
rti
//SEG108 irq::@2
//SEG109 irq::@2
b2:
//SEG109 [72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
//SEG110 [73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
lda #0
sta irq_cnt
//SEG110 [73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
//SEG111 [74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
lda #IRQ_RASTER_FIRST
sta irq_raster_next
//SEG111 [74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
//SEG112 [75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
lda #$32
sta irq_sprite_ypos
//SEG112 [75] phi from irq::@2 to irq::toSpritePtr2 [phi:irq::@2->irq::toSpritePtr2]
//SEG113 [76] phi from irq::@2 to irq::toSpritePtr2 [phi:irq::@2->irq::toSpritePtr2]
toSpritePtr2_from_b2:
jmp toSpritePtr2
//SEG113 irq::toSpritePtr2
//SEG114 irq::toSpritePtr2
toSpritePtr2:
jmp b9
//SEG114 irq::@9
//SEG115 irq::@9
b9:
//SEG115 [76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 -- vbuz1=vbuc1
//SEG116 [77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 -- vbuz1=vbuc1
lda #toSpritePtr2_return
sta irq_sprite_ptr
jmp b3_from_b9
@ -2645,21 +2651,23 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq::toSpritePtr2_return
(const byte) irq::toSpritePtr2_return#0 toSpritePtr2_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) irq::toSpritePtr2_sprite
(byte) irq::ypos
(byte) irq::ypos#0 reg byte a 2.5
(byte) irq_cnt
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:6 0.3076923076923077
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:6 0.2857142857142857
(byte) irq_cnt#1 irq_cnt zp ZP_BYTE:6 4.0
(byte) irq_cnt#13 irq_cnt zp ZP_BYTE:6 20.0
(byte) irq_raster_next
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:3 0.26666666666666666
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:3 0.25
(byte) irq_raster_next#1 irq_raster_next zp ZP_BYTE:3 1.0
(byte) irq_raster_next#12 irq_raster_next zp ZP_BYTE:3 6.0
(byte) irq_raster_next#2 irq_raster_next zp ZP_BYTE:3 1.3333333333333333
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:5 0.3529411764705882
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:5 0.3333333333333333
(byte) irq_sprite_ptr#1 irq_sprite_ptr zp ZP_BYTE:5 20.0
(byte) irq_sprite_ptr#2 irq_sprite_ptr zp ZP_BYTE:5 20.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:4 1.4375
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:4 1.0
(byte) irq_sprite_ypos#1 irq_sprite_ypos zp ZP_BYTE:4 20.0
(byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:4 20.0
(void()) main()
@ -2681,6 +2689,7 @@ zp ZP_BYTE:4 [ irq_sprite_ypos#0 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
zp ZP_BYTE:5 [ irq_sprite_ptr#0 irq_sprite_ptr#2 irq_sprite_ptr#1 ]
zp ZP_BYTE:6 [ irq_cnt#0 irq_cnt#1 irq_cnt#13 ]
reg byte a [ init_sprites::s2#0 ]
reg byte a [ irq::ypos#0 ]
reg byte a [ irq::ptr#0 ]
reg byte x [ irq::ptr#1 ]
reg byte x [ irq::ptr#2 ]
@ -2688,7 +2697,7 @@ reg byte a [ irq::$3 ]
FINAL ASSEMBLER
Score: 1283
Score: 1274
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -2885,111 +2894,109 @@ irq: {
//SEG71 [44] *((const byte*) BORDERCOL#0) ← (const byte) DARK_GREY#0 -- _deref_pbuc1=vbuc2
lda #DARK_GREY
sta BORDERCOL
//SEG72 [45] *((const byte*) SPRITES_YPOS#0) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
//SEG72 [45] (byte) irq::ypos#0 ← (byte) irq_sprite_ypos#0 -- vbuaa=vbuz1
lda irq_sprite_ypos
//SEG73 [46] *((const byte*) SPRITES_YPOS#0) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS
//SEG73 [46] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG74 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS+2
//SEG74 [47] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG75 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS+4
//SEG75 [48] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq_sprite_ypos#0 -- _deref_pbuc1=vbuz1
lda irq_sprite_ypos
//SEG76 [49] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) irq::ypos#0 -- _deref_pbuc1=vbuaa
sta SPRITES_YPOS+6
//SEG76 irq::@1
//SEG77 irq::@1
b1:
//SEG77 [49] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 -- _deref_pbuc1_neq_vbuz1_then_la1
//SEG78 [50] if(*((const byte*) RASTER#0)!=(byte) irq_sprite_ypos#0) goto irq::@1 -- _deref_pbuc1_neq_vbuz1_then_la1
lda RASTER
cmp irq_sprite_ypos
bne b1
//SEG78 irq::@5
//SEG79 [50] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuaa=vbuz1
//SEG79 irq::@5
//SEG80 [51] (byte) irq::ptr#0 ← (byte) irq_sprite_ptr#0 -- vbuaa=vbuz1
lda irq_sprite_ptr
//SEG80 [51] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 -- _deref_pbuc1=vbuaa
//SEG81 [52] *((const byte*) PLAYFIELD_SPRITE_PTRS#0) ← (byte) irq::ptr#0 -- _deref_pbuc1=vbuaa
sta PLAYFIELD_SPRITE_PTRS
//SEG81 [52] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 -- vbuxx=_inc_vbuaa
//SEG82 [53] (byte) irq::ptr#1 ← ++ (byte) irq::ptr#0 -- vbuxx=_inc_vbuaa
tax
inx
//SEG82 [53] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
//SEG83 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
stx PLAYFIELD_SPRITE_PTRS+1
//SEG83 [54] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
//SEG84 [55] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) irq::ptr#1 -- _deref_pbuc1=vbuxx
stx PLAYFIELD_SPRITE_PTRS+2
//SEG84 [55] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 -- vbuxx=_inc_vbuxx
//SEG85 [56] (byte) irq::ptr#2 ← ++ (byte) irq::ptr#1 -- vbuxx=_inc_vbuxx
inx
//SEG85 [56] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 -- _deref_pbuc1=vbuxx
//SEG86 [57] *((const byte*) PLAYFIELD_SPRITE_PTRS#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) irq::ptr#2 -- _deref_pbuc1=vbuxx
stx PLAYFIELD_SPRITE_PTRS+3
//SEG86 [57] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1
//SEG87 [58] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0 -- vbuz1=_inc_vbuz1
inc irq_cnt
//SEG87 [58] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 -- vbuz1_eq_vbuc1_then_la1
//SEG88 [59] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto irq::@2 -- vbuz1_eq_vbuc1_then_la1
lda irq_cnt
cmp #$a
beq b2
//SEG88 irq::@6
//SEG89 [59] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
//SEG89 irq::@6
//SEG90 [60] (byte) irq_raster_next#2 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
lda #$15
clc
adc irq_raster_next
sta irq_raster_next
//SEG90 [60] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
//SEG91 [61] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) 21 -- vbuz1=vbuz1_plus_vbuc1
lda #$15
clc
adc irq_sprite_ypos
sta irq_sprite_ypos
//SEG91 [61] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1
//SEG92 [62] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz1_plus_vbuc1
lda #3
clc
adc irq_sprite_ptr
sta irq_sprite_ptr
//SEG92 [62] phi from irq::@6 irq::@9 to irq::@3 [phi:irq::@6/irq::@9->irq::@3]
//SEG93 [62] phi (byte) irq_raster_next#12 = (byte) irq_raster_next#2 [phi:irq::@6/irq::@9->irq::@3#0] -- register_copy
//SEG94 irq::@3
//SEG93 [63] phi from irq::@6 irq::@9 to irq::@3 [phi:irq::@6/irq::@9->irq::@3]
//SEG94 [63] phi (byte) irq_raster_next#12 = (byte) irq_raster_next#2 [phi:irq::@6/irq::@9->irq::@3#0] -- register_copy
//SEG95 irq::@3
b3:
//SEG95 [63] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 -- vbuxx=vbuz1
//SEG96 [64] (byte) irq::raster_next#0 ← (byte) irq_raster_next#12 -- vbuxx=vbuz1
ldx irq_raster_next
//SEG96 [64] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
//SEG97 [65] (byte~) irq::$3 ← (byte) irq::raster_next#0 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
txa
and #7
//SEG97 [65] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 -- vbuaa_neq_vbuc1_then_la1
//SEG98 [66] if((byte~) irq::$3!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto irq::@4 -- vbuaa_neq_vbuc1_then_la1
cmp #3
bne b4
//SEG98 irq::@8
//SEG99 [66] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_minus_1
//SEG99 irq::@8
//SEG100 [67] (byte) irq::raster_next#1 ← (byte) irq::raster_next#0 - (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuxx=vbuxx_minus_1
dex
//SEG100 [67] phi from irq::@3 irq::@8 to irq::@4 [phi:irq::@3/irq::@8->irq::@4]
//SEG101 [67] phi (byte) irq::raster_next#2 = (byte) irq::raster_next#0 [phi:irq::@3/irq::@8->irq::@4#0] -- register_copy
//SEG102 irq::@4
//SEG101 [68] phi from irq::@3 irq::@8 to irq::@4 [phi:irq::@3/irq::@8->irq::@4]
//SEG102 [68] phi (byte) irq::raster_next#2 = (byte) irq::raster_next#0 [phi:irq::@3/irq::@8->irq::@4#0] -- register_copy
//SEG103 irq::@4
b4:
//SEG103 [68] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuxx
//SEG104 [69] *((const byte*) RASTER#0) ← (byte) irq::raster_next#2 -- _deref_pbuc1=vbuxx
stx RASTER
//SEG104 [69] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
//SEG105 [70] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2
lda #IRQ_RASTER
sta IRQ_STATUS
//SEG105 [70] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
//SEG106 [71] *((const byte*) BORDERCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2
lda #BLACK
sta BORDERCOL
//SEG106 irq::@return
//SEG107 [71] return - exit interrupt(HARDWARE_CLOBBER)
//SEG107 irq::@return
//SEG108 [72] return - exit interrupt(HARDWARE_CLOBBER)
rega:
lda #00
regx:
ldx #00
rti
//SEG108 irq::@2
//SEG109 irq::@2
b2:
//SEG109 [72] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
//SEG110 [73] (byte) irq_cnt#13 ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- vbuz1=vbuc1
lda #0
sta irq_cnt
//SEG110 [73] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
//SEG111 [74] (byte) irq_raster_next#1 ← (const byte) IRQ_RASTER_FIRST#0 -- vbuz1=vbuc1
lda #IRQ_RASTER_FIRST
sta irq_raster_next
//SEG111 [74] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
//SEG112 [75] (byte) irq_sprite_ypos#1 ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- vbuz1=vbuc1
lda #$32
sta irq_sprite_ypos
//SEG112 [75] phi from irq::@2 to irq::toSpritePtr2 [phi:irq::@2->irq::toSpritePtr2]
//SEG113 irq::toSpritePtr2
//SEG114 irq::@9
//SEG115 [76] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 -- vbuz1=vbuc1
//SEG113 [76] phi from irq::@2 to irq::toSpritePtr2 [phi:irq::@2->irq::toSpritePtr2]
//SEG114 irq::toSpritePtr2
//SEG115 irq::@9
//SEG116 [77] (byte) irq_sprite_ptr#1 ← (const byte) irq::toSpritePtr2_return#0 -- vbuz1=vbuc1
lda #toSpritePtr2_return
sta irq_sprite_ptr
jmp b3

View File

@ -184,21 +184,23 @@ interrupt(HARDWARE_CLOBBER)(void()) irq()
(byte) irq::toSpritePtr2_return
(const byte) irq::toSpritePtr2_return#0 toSpritePtr2_return = ((byte))((word))(const byte*) PLAYFIELD_SPRITES#0>>(byte/signed byte/word/signed word/dword/signed dword) 6
(byte*) irq::toSpritePtr2_sprite
(byte) irq::ypos
(byte) irq::ypos#0 reg byte a 2.5
(byte) irq_cnt
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:6 0.3076923076923077
(byte) irq_cnt#0 irq_cnt zp ZP_BYTE:6 0.2857142857142857
(byte) irq_cnt#1 irq_cnt zp ZP_BYTE:6 4.0
(byte) irq_cnt#13 irq_cnt zp ZP_BYTE:6 20.0
(byte) irq_raster_next
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:3 0.26666666666666666
(byte) irq_raster_next#0 irq_raster_next zp ZP_BYTE:3 0.25
(byte) irq_raster_next#1 irq_raster_next zp ZP_BYTE:3 1.0
(byte) irq_raster_next#12 irq_raster_next zp ZP_BYTE:3 6.0
(byte) irq_raster_next#2 irq_raster_next zp ZP_BYTE:3 1.3333333333333333
(byte) irq_sprite_ptr
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:5 0.3529411764705882
(byte) irq_sprite_ptr#0 irq_sprite_ptr zp ZP_BYTE:5 0.3333333333333333
(byte) irq_sprite_ptr#1 irq_sprite_ptr zp ZP_BYTE:5 20.0
(byte) irq_sprite_ptr#2 irq_sprite_ptr zp ZP_BYTE:5 20.0
(byte) irq_sprite_ypos
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:4 1.4375
(byte) irq_sprite_ypos#0 irq_sprite_ypos zp ZP_BYTE:4 1.0
(byte) irq_sprite_ypos#1 irq_sprite_ypos zp ZP_BYTE:4 20.0
(byte) irq_sprite_ypos#2 irq_sprite_ypos zp ZP_BYTE:4 20.0
(void()) main()
@ -220,6 +222,7 @@ zp ZP_BYTE:4 [ irq_sprite_ypos#0 irq_sprite_ypos#2 irq_sprite_ypos#1 ]
zp ZP_BYTE:5 [ irq_sprite_ptr#0 irq_sprite_ptr#2 irq_sprite_ptr#1 ]
zp ZP_BYTE:6 [ irq_cnt#0 irq_cnt#1 irq_cnt#13 ]
reg byte a [ init_sprites::s2#0 ]
reg byte a [ irq::ypos#0 ]
reg byte a [ irq::ptr#0 ]
reg byte x [ irq::ptr#1 ]
reg byte x [ irq::ptr#2 ]