1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-08-01 02:29:30 +00:00

Implemented detection of constant addresses being <256 - and generating ZP ASM for these. Closes #301

This commit is contained in:
Jesper Gravgaard 2019-09-01 22:06:32 +02:00
parent a2ce3a5e14
commit 51cd148433
48 changed files with 825 additions and 403 deletions

View File

@ -2,15 +2,14 @@ package dk.camelot64.kickc.fragment;
import dk.camelot64.kickc.NumberParser;
import dk.camelot64.kickc.asm.*;
import dk.camelot64.kickc.model.ConstantNotLiteral;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.Registers;
import dk.camelot64.kickc.model.symbols.ConstantVar;
import dk.camelot64.kickc.model.symbols.Label;
import dk.camelot64.kickc.model.symbols.Variable;
import dk.camelot64.kickc.model.types.SymbolType;
import dk.camelot64.kickc.model.values.ConstantValue;
import dk.camelot64.kickc.model.values.ScopeRef;
import dk.camelot64.kickc.model.values.Value;
import dk.camelot64.kickc.model.values.*;
import dk.camelot64.kickc.parser.KickCParser;
import dk.camelot64.kickc.parser.KickCParserBaseVisitor;
@ -88,11 +87,14 @@ public class AsmFragmentInstance {
ConstantVar constantVar = (ConstantVar) boundValue;
String constantValueAsm = AsmFormat.getAsmConstant(program, constantVar.getRef(), 99, codeScopeRef);
boolean constantValueZp = SymbolType.BYTE.equals(constantVar.getType());
if(!constantValueZp) {
constantValueZp = isConstantValueZp(constantVar.getValue());
}
return new AsmParameter(constantValueAsm, constantValueZp);
} else if(boundValue instanceof ConstantValue) {
ConstantValue boundConst = (ConstantValue) boundValue;
String constantValueAsm = AsmFormat.getAsmConstant(program, boundConst, 99, codeScopeRef);
boolean constantValueZp = SymbolType.BYTE.equals(boundConst.getType(program.getScope()));
boolean constantValueZp = isConstantValueZp(boundConst);
return new AsmParameter(constantValueAsm, constantValueZp);
} else if(boundValue instanceof Label) {
String param = AsmFormat.asmFix(((Label) boundValue).getLocalName());
@ -102,6 +104,39 @@ public class AsmFragmentInstance {
}
}
/**
* Determine whether a constant value representing an address in memory is located on zeropage.
* @param boundConst The constant value
* @return true if the address represented by the constant is 0<=val<=255
*/
private boolean isConstantValueZp(ConstantValue boundConst) {
SymbolType boundConstType = boundConst.getType(program.getScope());
if(SymbolType.BYTE.equals(boundConstType))
return true;
try {
ConstantLiteral literal = boundConst.calculateLiteral(program.getScope());
if(literal instanceof ConstantInteger) {
Long integer = ((ConstantInteger) literal).getInteger();
return integer <= 255 && integer >= 0;
}
} catch(ConstantNotLiteral e) {
// ignore
}
if(boundConst instanceof ConstantRef) {
ConstantVar reffedConstant = program.getScope().getConstant((ConstantRef) boundConst);
return isConstantValueZp(reffedConstant.getValue());
}
if(boundConst instanceof ConstantCastValue) {
SymbolType toType = ((ConstantCastValue) boundConst).getToType();
if(SymbolType.BYTE.equals(toType) || SymbolType.SBYTE.equals(toType))
return true;
else
return isConstantValueZp(((ConstantCastValue) boundConst).getValue());
}
return false;
}
public String getFragmentName() {
return name;
}

View File

@ -70,7 +70,7 @@ public class AsmFragmentTemplate {
}
/**
* Initialize the fields that require parsing the ASM (bodyAsm, clobber, clobber).
* Initialize the fields that require parsing the ASM (bodyAsm, clobber, cycles).
*
* @return The parsed fragment ready for generating
*/
@ -104,12 +104,12 @@ public class AsmFragmentTemplate {
if(signature.contains("z4")) bindings.put("z4", v4);
if(signature.contains("z5")) bindings.put("z5", v5);
if(signature.contains("z6")) bindings.put("z6", v6);
if(signature.contains("c1")) bindings.put("c1", new ConstantInteger(10L));
if(signature.contains("c2")) bindings.put("c2", new ConstantInteger(20L));
if(signature.contains("c3")) bindings.put("c3", new ConstantInteger(30L));
if(signature.contains("c4")) bindings.put("c4", new ConstantInteger(40L));
if(signature.contains("c5")) bindings.put("c5", new ConstantInteger(50L));
if(signature.contains("c6")) bindings.put("c6", new ConstantInteger(60L));
if(signature.contains("c1")) bindings.put("c1", new ConstantInteger(310L));
if(signature.contains("c2")) bindings.put("c2", new ConstantInteger(320L));
if(signature.contains("c3")) bindings.put("c3", new ConstantInteger(330L));
if(signature.contains("c4")) bindings.put("c4", new ConstantInteger(340L));
if(signature.contains("c5")) bindings.put("c5", new ConstantInteger(350L));
if(signature.contains("c6")) bindings.put("c6", new ConstantInteger(360L));
if(signature.contains("la1")) bindings.put("la1", new Label("@1", scope, true));
AsmFragmentInstance fragmentInstance =
new AsmFragmentInstance(new Program(), signature, ScopeRef.ROOT, this, bindings);

View File

@ -84,7 +84,8 @@ public class CParser {
return typedefs.contains(identifier);
}
/** Get the underlying token stream.
/**
* Get the underlying token stream.
*
* @return The token stream
*/

View File

@ -26,7 +26,44 @@ public class CTokenSourceStack implements TokenSource {
}
public TokenSource getCurrentSource() {
return sourceStack.peek();
if(sourceStack.size()>0)
return sourceStack.peek();
else
return new TokenSource() {
@Override
public Token nextToken() {
return null;
}
@Override
public int getLine() {
return 0;
}
@Override
public int getCharPositionInLine() {
return 0;
}
@Override
public CharStream getInputStream() {
return null;
}
@Override
public String getSourceName() {
return "";
}
@Override
public void setTokenFactory(TokenFactory<?> factory) {
}
@Override
public TokenFactory<?> getTokenFactory() {
return null;
}
};
}
@Override

View File

@ -44,6 +44,11 @@ public class TestPrograms {
}
*/
@Test
public void testZeropageDetectAdvanced() throws IOException, URISyntaxException {
compileAndCompare("zeropage-detect-advanced", log());
}
@Test
public void testKickasmUsesPreventDeletion() throws IOException, URISyntaxException {
compileAndCompare("kickasm-uses-prevent-deletion");

View File

@ -0,0 +1,8 @@
// Illustrates a problem where absolute addressing is used for zeropage-access
// This is caused by the compiler believing the pointer is into memory" (not knowing the upper part is 0x00 )
void main() {
unsigned dword t;
unsigned char *c=(unsigned char *)&t;
*(unsigned char *)0x0400 = c[0];
}

View File

@ -9,7 +9,7 @@ main: {
lda #0
sta.z b
b1:
lda bp
lda.z bp
clc
adc #1
ldy.z b

View File

@ -184,7 +184,7 @@ main: {
// main::@1
b1:
// [6] (byte) main::c#0 ← *((const byte*) main::bp#0) + (byte) 1 -- vbuz1=_deref_pbuc1_plus_1
ldy bp
ldy.z bp
iny
sty.z c
// [7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuz2
@ -216,10 +216,10 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 32.17: zp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ] 22: zp ZP_BYTE:3 [ main::c#0 ]
Uplift Scope []
Uplifting [main] best 368 combination zp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ] reg byte a [ main::c#0 ]
Uplifting [] best 368 combination
Uplifting [main] best 358 combination zp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ] reg byte a [ main::c#0 ]
Uplifting [] best 358 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ]
Uplifting [main] best 368 combination zp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ]
Uplifting [main] best 358 combination zp ZP_BYTE:2 [ main::b#2 main::b#0 main::b#1 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -259,7 +259,7 @@ main: {
// main::@1
b1:
// [6] (byte) main::c#0 ← *((const byte*) main::bp#0) + (byte) 1 -- vbuaa=_deref_pbuc1_plus_1
lda bp
lda.z bp
clc
adc #1
// [7] *((const byte*) main::SCREEN#0 + (byte) main::b#2) ← (byte) main::c#0 -- pbuc1_derefidx_vbuz1=vbuaa
@ -324,7 +324,7 @@ reg byte a [ main::c#0 ]
FINAL ASSEMBLER
Score: 296
Score: 286
// File Comments
// Test address-of - use the pointer to get the value
@ -354,7 +354,7 @@ main: {
b1:
// c = *bp +1
// [6] (byte) main::c#0 ← *((const byte*) main::bp#0) + (byte) 1 -- vbuaa=_deref_pbuc1_plus_1
lda bp
lda.z bp
clc
adc #1
// SCREEN[b] = c

View File

@ -26,31 +26,31 @@ main: {
lda #2
sta.z val
sta SCREEN1+2
lda ptr
lda.z ptr
sta SCREEN2+2
// Set value through pointer
lda #3
sta ptr
sta.z ptr
lda.z val
sta SCREEN1+3
lda ptr
lda.z ptr
sta SCREEN2+3
jsr setv
lda.z val
sta SCREEN1+4
lda ptr
lda.z ptr
sta SCREEN2+4
jsr setp
lda.z val
sta SCREEN1+5
lda ptr
lda.z ptr
sta SCREEN2+5
rts
}
setp: {
.const v = 5
lda #v
sta main.ptr
sta.z main.ptr
rts
}
setv: {

View File

@ -419,17 +419,17 @@ main: {
lda.z val
sta SCREEN1+2
// [11] *((const byte*) main::SCREEN2#0+(byte) 2) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+2
// [12] *((const byte*) main::ptr#0) ← (byte) 3 -- _deref_pbuc1=vbuc2
// Set value through pointer
lda #3
sta ptr
sta.z ptr
// [13] *((const byte*) main::SCREEN1#0+(byte) 3) ← (byte) val#2 -- _deref_pbuc1=vbuz1
lda.z val
sta SCREEN1+3
// [14] *((const byte*) main::SCREEN2#0+(byte) 3) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+3
// [15] call setv
jsr setv
@ -440,7 +440,7 @@ main: {
lda.z val
sta SCREEN1+4
// [17] *((const byte*) main::SCREEN2#0+(byte) 4) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+4
// [18] call setp
jsr setp
@ -451,7 +451,7 @@ main: {
lda.z val
sta SCREEN1+5
// [20] *((const byte*) main::SCREEN2#0+(byte) 5) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+5
jmp breturn
// main::@return
@ -464,7 +464,7 @@ setp: {
.const v = 5
// [22] *((const byte*) main::ptr#0) ← (const byte) setp::v#0 -- _deref_pbuc1=vbuc2
lda #v
sta main.ptr
sta.z main.ptr
jmp breturn
// setp::@return
breturn:
@ -512,12 +512,12 @@ Uplift Scope [main]
Uplift Scope [setv]
Uplift Scope [setp]
Uplifting [] best 175 combination zp ZP_BYTE:2 [ val#0 val#1 val#2 val#12 ]
Uplifting [main] best 175 combination
Uplifting [setv] best 175 combination
Uplifting [setp] best 175 combination
Uplifting [] best 169 combination zp ZP_BYTE:2 [ val#0 val#1 val#2 val#12 ]
Uplifting [main] best 169 combination
Uplifting [setv] best 169 combination
Uplifting [setp] best 169 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ val#0 val#1 val#2 val#12 ]
Uplifting [] best 175 combination zp ZP_BYTE:2 [ val#0 val#1 val#2 val#12 ]
Uplifting [] best 169 combination zp ZP_BYTE:2 [ val#0 val#1 val#2 val#12 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -574,17 +574,17 @@ main: {
lda.z val
sta SCREEN1+2
// [11] *((const byte*) main::SCREEN2#0+(byte) 2) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+2
// [12] *((const byte*) main::ptr#0) ← (byte) 3 -- _deref_pbuc1=vbuc2
// Set value through pointer
lda #3
sta ptr
sta.z ptr
// [13] *((const byte*) main::SCREEN1#0+(byte) 3) ← (byte) val#2 -- _deref_pbuc1=vbuz1
lda.z val
sta SCREEN1+3
// [14] *((const byte*) main::SCREEN2#0+(byte) 3) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+3
// [15] call setv
jsr setv
@ -595,7 +595,7 @@ main: {
lda.z val
sta SCREEN1+4
// [17] *((const byte*) main::SCREEN2#0+(byte) 4) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+4
// [18] call setp
jsr setp
@ -606,7 +606,7 @@ main: {
lda.z val
sta SCREEN1+5
// [20] *((const byte*) main::SCREEN2#0+(byte) 5) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+5
jmp breturn
// main::@return
@ -619,7 +619,7 @@ setp: {
.const v = 5
// [22] *((const byte*) main::ptr#0) ← (const byte) setp::v#0 -- _deref_pbuc1=vbuc2
lda #v
sta main.ptr
sta.z main.ptr
jmp breturn
// setp::@return
breturn:
@ -700,7 +700,7 @@ zp ZP_BYTE:2 [ val#0 val#1 val#2 val#12 ]
FINAL ASSEMBLER
Score: 154
Score: 148
// File Comments
// Test address-of by assigning the affected variable in multiple ways
@ -758,20 +758,20 @@ main: {
sta SCREEN1+2
// SCREEN2[idx++] = *ptr
// [11] *((const byte*) main::SCREEN2#0+(byte) 2) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+2
// *ptr = 3
// [12] *((const byte*) main::ptr#0) ← (byte) 3 -- _deref_pbuc1=vbuc2
// Set value through pointer
lda #3
sta ptr
sta.z ptr
// SCREEN1[idx] = val
// [13] *((const byte*) main::SCREEN1#0+(byte) 3) ← (byte) val#2 -- _deref_pbuc1=vbuz1
lda.z val
sta SCREEN1+3
// SCREEN2[idx++] = *ptr
// [14] *((const byte*) main::SCREEN2#0+(byte) 3) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+3
// setv(4)
// [15] call setv
@ -783,7 +783,7 @@ main: {
sta SCREEN1+4
// SCREEN2[idx++] = *ptr
// [17] *((const byte*) main::SCREEN2#0+(byte) 4) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+4
// setp(ptr, 5)
// [18] call setp
@ -795,7 +795,7 @@ main: {
sta SCREEN1+5
// SCREEN2[idx++] = *ptr
// [20] *((const byte*) main::SCREEN2#0+(byte) 5) ← *((const byte*) main::ptr#0) -- _deref_pbuc1=_deref_pbuc2
lda ptr
lda.z ptr
sta SCREEN2+5
// main::@return
// }
@ -808,7 +808,7 @@ setp: {
// *p = v
// [22] *((const byte*) main::ptr#0) ← (const byte) setp::v#0 -- _deref_pbuc1=vbuc2
lda #v
sta main.ptr
sta.z main.ptr
// setp::@return
// }
// [23] return

View File

@ -319,7 +319,7 @@ render_score: {
lda #>score_offset+2
sta.z render_bcd.offset+1
jsr render_bcd
ldx score_bytes
ldx.z score_bytes
ldy #0
lda #<score_offset+4
sta.z render_bcd.offset

View File

@ -14522,7 +14522,7 @@ render_score: {
lda.z screen+1
sta.z render_bcd.screen+1
// [85] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes#0) -- vbuz1=_deref_pbuc1
lda score_bytes
lda.z score_bytes
sta.z render_bcd.bcd
// [86] call render_bcd
// [97] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd]
@ -18646,243 +18646,243 @@ Uplift Scope [sid_rnd_init]
Uplift Scope [render_screen_swap]
Uplift Scope [sprites_irq_init]
Uplifting [keyboard_event_scan] best 4708854 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] reg byte a [ keyboard_event_scan::event_type#0 ] reg byte a [ keyboard_event_scan::$23 ] zp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:201 [ keyboard_event_scan::$0 ] zp ZP_BYTE:203 [ keyboard_event_scan::$3 ] zp ZP_BYTE:205 [ keyboard_event_scan::$6 ] zp ZP_BYTE:207 [ keyboard_event_scan::$9 ]
Uplifting [keyboard_event_scan] best 4708853 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] reg byte a [ keyboard_event_scan::event_type#0 ] reg byte a [ keyboard_event_scan::$23 ] zp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:201 [ keyboard_event_scan::$0 ] zp ZP_BYTE:203 [ keyboard_event_scan::$3 ] zp ZP_BYTE:205 [ keyboard_event_scan::$6 ] zp ZP_BYTE:207 [ keyboard_event_scan::$9 ]
Limited combination testing to 100 combinations of 524288 possible.
Uplifting [play_collision] best 4558854 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] reg byte a [ play_collision::$5 ] zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] reg byte x [ play_collision::c#2 play_collision::c#1 ] zp ZP_BYTE:156 [ play_collision::$14 ] zp ZP_BYTE:159 [ play_collision::i#1 ] zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] zp ZP_WORD:157 [ play_collision::playfield_line#0 ] zp ZP_WORD:154 [ play_collision::piece_gfx#0 ] zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] zp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] zp ZP_BYTE:151 [ play_collision::return#14 ] zp ZP_BYTE:161 [ play_collision::return#13 ] zp ZP_BYTE:163 [ play_collision::return#1 ] zp ZP_BYTE:167 [ play_collision::return#0 ] zp ZP_BYTE:174 [ play_collision::return#10 ] zp ZP_BYTE:53 [ play_collision::return#15 ]
Uplifting [play_collision] best 4558853 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] reg byte a [ play_collision::$5 ] zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] reg byte x [ play_collision::c#2 play_collision::c#1 ] zp ZP_BYTE:156 [ play_collision::$14 ] zp ZP_BYTE:159 [ play_collision::i#1 ] zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ] zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ] zp ZP_WORD:157 [ play_collision::playfield_line#0 ] zp ZP_WORD:154 [ play_collision::piece_gfx#0 ] zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] zp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] zp ZP_BYTE:151 [ play_collision::return#14 ] zp ZP_BYTE:161 [ play_collision::return#13 ] zp ZP_BYTE:163 [ play_collision::return#1 ] zp ZP_BYTE:167 [ play_collision::return#0 ] zp ZP_BYTE:174 [ play_collision::return#10 ] zp ZP_BYTE:53 [ play_collision::return#15 ]
Limited combination testing to 100 combinations of 429981696 possible.
Uplifting [play_lock_current] best 4464854 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] reg byte x [ play_lock_current::c#2 play_lock_current::c#1 ] zp ZP_BYTE:192 [ play_lock_current::i#1 ] reg byte a [ play_lock_current::$4 ] zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] zp ZP_WORD:190 [ play_lock_current::playfield_line#0 ] zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ]
Uplifting [play_lock_current] best 4464853 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] reg byte x [ play_lock_current::c#2 play_lock_current::c#1 ] zp ZP_BYTE:192 [ play_lock_current::i#1 ] reg byte a [ play_lock_current::$4 ] zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ] zp ZP_WORD:190 [ play_lock_current::playfield_line#0 ] zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ]
Limited combination testing to 100 combinations of 2916 possible.
Uplifting [play_remove_lines] best 4325854 combination reg byte y [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] reg byte x [ play_remove_lines::w#6 play_remove_lines::w#3 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 ] zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] zp ZP_BYTE:188 [ play_remove_lines::c#0 ] zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] zp ZP_BYTE:169 [ play_remove_lines::return#0 ]
Uplifting [play_remove_lines] best 4325853 combination reg byte y [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] reg byte x [ play_remove_lines::w#6 play_remove_lines::w#3 play_remove_lines::w#4 play_remove_lines::w#12 play_remove_lines::w#11 play_remove_lines::w#1 play_remove_lines::w#2 ] zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ] zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ] zp ZP_BYTE:188 [ play_remove_lines::c#0 ] zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ] zp ZP_BYTE:169 [ play_remove_lines::return#0 ]
Limited combination testing to 100 combinations of 20736 possible.
Uplifting [] best 4325612 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] zp ZP_WORD:27 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 ] zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] zp ZP_WORD:44 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 ] reg byte x [ render_screen_render#22 render_screen_render#64 ] reg byte x [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] reg byte a [ render_screen_render#15 render_screen_render#66 ] reg byte x [ current_ypos#13 current_ypos#98 current_ypos#99 ] zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] zp ZP_WORD:66 [ current_piece#28 current_piece#10 current_piece#15 current_piece#102 current_piece#93 ] zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] zp ZP_DWORD:59 [ score_bcd#26 score_bcd#18 score_bcd#14 score_bcd#0 score_bcd#16 score_bcd#29 ] zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] zp ZP_WORD:57 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ]
Uplifting [] best 4325611 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ] zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ] zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ] zp ZP_WORD:70 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#124 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#117 ] zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ] zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ] zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ] zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ] zp ZP_WORD:27 [ current_piece_gfx#64 current_piece_gfx#112 current_piece_gfx#113 ] zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] zp ZP_WORD:44 [ current_piece#17 current_piece#96 current_piece#97 current_piece#98 current_piece#99 current_piece#100 ] reg byte x [ render_screen_render#22 render_screen_render#64 ] reg byte x [ next_piece_idx#12 next_piece_idx#77 next_piece_idx#78 ] reg byte a [ render_screen_render#15 render_screen_render#66 ] reg byte x [ current_ypos#13 current_ypos#98 current_ypos#99 ] zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ] zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] zp ZP_WORD:66 [ current_piece#28 current_piece#10 current_piece#15 current_piece#102 current_piece#93 ] zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ] zp ZP_DWORD:59 [ score_bcd#26 score_bcd#18 score_bcd#14 score_bcd#0 score_bcd#16 score_bcd#29 ] zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ] zp ZP_WORD:57 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ] zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ] zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ] zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ]
Limited combination testing to 100 combinations of 1944 possible.
Uplifting [render_moving] best 4310612 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] reg byte x [ render_moving::c#2 render_moving::c#1 ] zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] reg byte a [ render_moving::current_cell#0 ] zp ZP_BYTE:134 [ render_moving::$1 ] zp ZP_BYTE:135 [ render_moving::$6 ] zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] zp ZP_WORD:136 [ render_moving::screen_line#0 ] zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ]
Uplifting [render_moving] best 4310611 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] reg byte x [ render_moving::c#2 render_moving::c#1 ] zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] reg byte a [ render_moving::current_cell#0 ] zp ZP_BYTE:134 [ render_moving::$1 ] zp ZP_BYTE:135 [ render_moving::$6 ] zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ] zp ZP_WORD:136 [ render_moving::screen_line#0 ] zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ]
Limited combination testing to 100 combinations of 15552 possible.
Uplifting [render_next] best 4295608 combination zp ZP_WORD:19 [ render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#1 render_next::next_piece_gfx#9 ] reg byte x [ render_next::c#2 render_next::c#1 ] zp ZP_WORD:21 [ render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#4 render_next::screen_next_area#11 render_next::screen_next_area#3 ] reg byte a [ render_next::cell#0 ] zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] reg byte y [ render_next::$6 ]
Uplifting [render_next] best 4295607 combination zp ZP_WORD:19 [ render_next::next_piece_gfx#2 render_next::next_piece_gfx#3 render_next::next_piece_gfx#1 render_next::next_piece_gfx#9 ] reg byte x [ render_next::c#2 render_next::c#1 ] zp ZP_WORD:21 [ render_next::screen_next_area#5 render_next::screen_next_area#10 render_next::screen_next_area#4 render_next::screen_next_area#11 render_next::screen_next_area#3 ] reg byte a [ render_next::cell#0 ] zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ] zp ZP_BYTE:132 [ render_next::next_piece_char#0 ] reg byte y [ render_next::$6 ]
Limited combination testing to 100 combinations of 128 possible.
Uplifting [play_increase_level] best 4281602 combination reg byte a [ play_increase_level::$5 ] reg byte x [ play_increase_level::b#2 play_increase_level::b#1 ] reg byte a [ play_increase_level::$1 ]
Uplifting [render_playfield] best 4280602 combination zp ZP_WORD:38 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$2 ] reg byte a [ render_playfield::$6 ] zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ]
Uplifting [play_increase_level] best 4281601 combination reg byte a [ play_increase_level::$5 ] reg byte x [ play_increase_level::b#2 play_increase_level::b#1 ] reg byte a [ play_increase_level::$1 ]
Uplifting [render_playfield] best 4280601 combination zp ZP_WORD:38 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ] zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$2 ] reg byte a [ render_playfield::$6 ] zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ]
Limited combination testing to 100 combinations of 128 possible.
Uplifting [keyboard_matrix_read] best 4268596 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#0 ]
Uplifting [render_screen_original] best 4266496 combination zp ZP_WORD:112 [ render_screen_original::screen#7 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#8 render_screen_original::screen#9 render_screen_original::screen#10 render_screen_original::screen#2 render_screen_original::screen#3 ] reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] zp ZP_WORD:114 [ render_screen_original::cols#6 render_screen_original::cols#5 render_screen_original::cols#4 render_screen_original::cols#7 render_screen_original::cols#3 render_screen_original::cols#1 render_screen_original::cols#2 ] zp ZP_WORD:108 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] zp ZP_WORD:110 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ]
Uplifting [play_spawn_current] best 4260477 combination reg byte a [ play_spawn_current::sid_rnd1_return#0 ] reg byte a [ play_spawn_current::$1 ] reg byte x [ play_spawn_current::current_piece_idx#0 ] zp ZP_BYTE:173 [ play_spawn_current::$7 ]
Uplifting [main] best 4259277 combination reg byte a [ main::render#1 ] reg byte x [ main::key_event#0 ]
Uplifting [play_movement] best 4258665 combination reg byte a [ play_movement::return#3 ] zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] zp ZP_BYTE:124 [ play_movement::key_event#0 ] reg byte a [ play_movement::$3 ] reg byte a [ play_movement::$4 ] zp ZP_BYTE:146 [ play_movement::render#2 ]
Uplifting [keyboard_matrix_read] best 4268595 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#0 ]
Uplifting [render_screen_original] best 4266495 combination zp ZP_WORD:112 [ render_screen_original::screen#7 render_screen_original::screen#6 render_screen_original::screen#5 render_screen_original::screen#8 render_screen_original::screen#9 render_screen_original::screen#10 render_screen_original::screen#2 render_screen_original::screen#3 ] reg byte x [ render_screen_original::x#6 render_screen_original::x#5 render_screen_original::x#4 render_screen_original::x#1 render_screen_original::x#2 render_screen_original::x#3 ] zp ZP_WORD:114 [ render_screen_original::cols#6 render_screen_original::cols#5 render_screen_original::cols#4 render_screen_original::cols#7 render_screen_original::cols#3 render_screen_original::cols#1 render_screen_original::cols#2 ] zp ZP_WORD:108 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] zp ZP_WORD:110 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ]
Uplifting [play_spawn_current] best 4260476 combination reg byte a [ play_spawn_current::sid_rnd1_return#0 ] reg byte a [ play_spawn_current::$1 ] reg byte x [ play_spawn_current::current_piece_idx#0 ] zp ZP_BYTE:173 [ play_spawn_current::$7 ]
Uplifting [main] best 4259276 combination reg byte a [ main::render#1 ] reg byte x [ main::key_event#0 ]
Uplifting [play_movement] best 4258664 combination reg byte a [ play_movement::return#3 ] zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] zp ZP_BYTE:124 [ play_movement::key_event#0 ] reg byte a [ play_movement::$3 ] reg byte a [ play_movement::$4 ] zp ZP_BYTE:146 [ play_movement::render#2 ]
Limited combination testing to 100 combinations of 576 possible.
Uplifting [keyboard_event_get] best 4257759 combination reg byte x [ keyboard_event_get::return#3 ] reg byte x [ keyboard_event_get::return#2 keyboard_event_get::return#1 ]
Uplifting [play_init] best 4257549 combination reg byte a [ play_init::$5 ] zp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ] reg byte y [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::$4 ] zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] zp ZP_WORD:96 [ play_init::pli#2 play_init::pli#1 ]
Uplifting [keyboard_event_get] best 4257758 combination reg byte x [ keyboard_event_get::return#3 ] reg byte x [ keyboard_event_get::return#2 keyboard_event_get::return#1 ]
Uplifting [play_init] best 4257548 combination reg byte a [ play_init::$5 ] zp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ] reg byte y [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::$4 ] zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ] zp ZP_WORD:96 [ play_init::pli#2 play_init::pli#1 ]
Limited combination testing to 100 combinations of 432 possible.
Uplifting [render_bcd] best 4257519 combination zp ZP_WORD:8 [ render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ] reg byte x [ render_bcd::bcd#6 render_bcd::bcd#0 render_bcd::bcd#1 render_bcd::bcd#2 render_bcd::bcd#3 render_bcd::bcd#4 render_bcd::bcd#5 ] zp ZP_WORD:14 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] reg byte a [ render_bcd::$5 ] reg byte a [ render_bcd::$6 ] reg byte a [ render_bcd::$3 ] zp ZP_BYTE:130 [ render_bcd::$4 ] zp ZP_WORD:10 [ render_bcd::offset#6 ] zp ZP_BYTE:12 [ render_bcd::only_low#6 ]
Uplifting [render_bcd] best 4257518 combination zp ZP_WORD:8 [ render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ] reg byte x [ render_bcd::bcd#6 render_bcd::bcd#0 render_bcd::bcd#1 render_bcd::bcd#2 render_bcd::bcd#3 render_bcd::bcd#4 render_bcd::bcd#5 ] zp ZP_WORD:14 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] reg byte a [ render_bcd::$5 ] reg byte a [ render_bcd::$6 ] reg byte a [ render_bcd::$3 ] zp ZP_BYTE:130 [ render_bcd::$4 ] zp ZP_WORD:10 [ render_bcd::offset#6 ] zp ZP_BYTE:12 [ render_bcd::only_low#6 ]
Limited combination testing to 100 combinations of 1536 possible.
Uplifting [render_init] best 4257349 combination reg byte y [ render_init::i#2 render_init::i#1 ] reg byte x [ render_init::$13 ] zp ZP_WORD:105 [ render_init::li_2#2 render_init::li_2#1 ] zp ZP_WORD:103 [ render_init::li_1#2 render_init::li_1#1 ]
Uplifting [sprites_init] best 4257179 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Uplifting [play_move_down] best 4257146 combination reg byte x [ play_move_down::movedown#6 play_move_down::movedown#7 play_move_down::movedown#10 play_move_down::movedown#2 play_move_down::movedown#3 ] reg byte a [ play_move_down::return#0 ] reg byte a [ play_move_down::$2 ] reg byte a [ play_move_down::$12 ] zp ZP_BYTE:170 [ play_move_down::removed#0 ] zp ZP_BYTE:141 [ play_move_down::key_event#0 ] zp ZP_BYTE:73 [ play_move_down::return#3 ]
Uplifting [render_init] best 4257348 combination reg byte y [ render_init::i#2 render_init::i#1 ] reg byte x [ render_init::$13 ] zp ZP_WORD:105 [ render_init::li_2#2 render_init::li_2#1 ] zp ZP_WORD:103 [ render_init::li_1#2 render_init::li_1#1 ]
Uplifting [sprites_init] best 4257178 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Uplifting [play_move_down] best 4257145 combination reg byte x [ play_move_down::movedown#6 play_move_down::movedown#7 play_move_down::movedown#10 play_move_down::movedown#2 play_move_down::movedown#3 ] reg byte a [ play_move_down::return#0 ] reg byte a [ play_move_down::$2 ] reg byte a [ play_move_down::$12 ] zp ZP_BYTE:170 [ play_move_down::removed#0 ] zp ZP_BYTE:141 [ play_move_down::key_event#0 ] zp ZP_BYTE:73 [ play_move_down::return#3 ]
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [keyboard_event_pressed] best 4257126 combination reg byte a [ keyboard_event_pressed::return#12 ] reg byte a [ keyboard_event_pressed::$0 ] reg byte a [ keyboard_event_pressed::$1 ] reg byte a [ keyboard_event_pressed::return#0 ] zp ZP_BYTE:202 [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:204 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:206 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:196 [ keyboard_event_pressed::return#11 ] zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ]
Uplifting [keyboard_event_pressed] best 4257125 combination reg byte a [ keyboard_event_pressed::return#12 ] reg byte a [ keyboard_event_pressed::$0 ] reg byte a [ keyboard_event_pressed::$1 ] reg byte a [ keyboard_event_pressed::return#0 ] zp ZP_BYTE:202 [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:204 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:206 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:196 [ keyboard_event_pressed::return#11 ] zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ]
Limited combination testing to 100 combinations of 589824 possible.
Uplifting [sprites_irq] best 4257102 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] reg byte x [ sprites_irq::$0 ] reg byte a [ sprites_irq::ptr#4 ] reg byte a [ sprites_irq::ptr#2 ] reg byte a [ sprites_irq::ptr#3 ] zp ZP_BYTE:222 [ sprites_irq::ptr#1 ] zp ZP_BYTE:217 [ sprites_irq::ypos#0 ] zp ZP_BYTE:219 [ sprites_irq::ptr#0 ]
Uplifting [sprites_irq] best 4257101 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ] reg byte x [ sprites_irq::$0 ] reg byte a [ sprites_irq::ptr#4 ] reg byte a [ sprites_irq::ptr#2 ] reg byte a [ sprites_irq::ptr#3 ] zp ZP_BYTE:222 [ sprites_irq::ptr#1 ] zp ZP_BYTE:217 [ sprites_irq::ypos#0 ] zp ZP_BYTE:219 [ sprites_irq::ptr#0 ]
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [play_move_rotate] best 4257084 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] reg byte a [ play_move_rotate::return#0 ] reg byte x [ play_move_rotate::$5 ] reg byte a [ play_move_rotate::$2 ] zp ZP_BYTE:153 [ play_move_rotate::$7 ] zp ZP_BYTE:147 [ play_move_rotate::key_event#0 ] zp ZP_BYTE:42 [ play_move_rotate::return#2 ]
Uplifting [play_move_rotate] best 4257083 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] reg byte a [ play_move_rotate::return#0 ] reg byte x [ play_move_rotate::$5 ] reg byte a [ play_move_rotate::$2 ] zp ZP_BYTE:153 [ play_move_rotate::$7 ] zp ZP_BYTE:147 [ play_move_rotate::key_event#0 ] zp ZP_BYTE:42 [ play_move_rotate::return#2 ]
Limited combination testing to 100 combinations of 12288 possible.
Uplifting [play_update_score] best 4257062 combination reg byte a [ play_update_score::$2 ] reg byte a [ play_update_score::$9 ] reg byte a [ play_update_score::$4 ] reg byte a [ play_update_score::lines_after#0 ] zp ZP_DWORD:180 [ play_update_score::add_bcd#0 ] zp ZP_BYTE:171 [ play_update_score::removed#0 ] zp ZP_BYTE:178 [ play_update_score::lines_before#0 ]
Uplifting [play_update_score] best 4257061 combination reg byte a [ play_update_score::$2 ] reg byte a [ play_update_score::$9 ] reg byte a [ play_update_score::$4 ] reg byte a [ play_update_score::lines_after#0 ] zp ZP_DWORD:180 [ play_update_score::add_bcd#0 ] zp ZP_BYTE:171 [ play_update_score::removed#0 ] zp ZP_BYTE:178 [ play_update_score::lines_before#0 ]
Limited combination testing to 100 combinations of 2304 possible.
Uplifting [play_move_leftright] best 4257035 combination reg byte a [ play_move_leftright::return#0 ] reg byte a [ play_move_leftright::$4 ] reg byte a [ play_move_leftright::$8 ] reg byte a [ play_move_leftright::key_event#0 ] zp ZP_BYTE:54 [ play_move_leftright::return#2 ]
Uplifting [play_move_leftright] best 4257034 combination reg byte a [ play_move_leftright::return#0 ] reg byte a [ play_move_leftright::$4 ] reg byte a [ play_move_leftright::$8 ] reg byte a [ play_move_leftright::key_event#0 ] zp ZP_BYTE:54 [ play_move_leftright::return#2 ]
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [render_show] best 4257026 combination reg byte a [ render_show::d018val#3 ]
Uplifting [render_score] best 4257026 combination zp ZP_WORD:6 [ render_score::screen#3 ]
Uplifting [sid_rnd_init] best 4257026 combination
Uplifting [render_screen_swap] best 4257026 combination
Uplifting [sprites_irq_init] best 4257026 combination
Uplifting [render_show] best 4257025 combination reg byte a [ render_show::d018val#3 ]
Uplifting [render_score] best 4257025 combination zp ZP_WORD:6 [ render_score::screen#3 ]
Uplifting [sid_rnd_init] best 4257025 combination
Uplifting [render_screen_swap] best 4257025 combination
Uplifting [sprites_irq_init] best 4257025 combination
Attempting to uplift remaining variables inzp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ]
Uplifting [] best 4257026 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ]
Uplifting [] best 4257025 combination zp ZP_BYTE:93 [ keyboard_events_size#10 keyboard_events_size#30 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#29 keyboard_events_size#1 keyboard_events_size#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ]
Uplifting [play_collision] best 4257026 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ]
Uplifting [play_collision] best 4257025 combination zp ZP_BYTE:50 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ]
Attempting to uplift remaining variables inzp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ]
Uplifting [play_lock_current] best 4257026 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ]
Uplifting [play_lock_current] best 4257025 combination zp ZP_BYTE:85 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ]
Attempting to uplift remaining variables inzp ZP_BYTE:91 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ]
Uplifting [keyboard_event_scan] best 4107026 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ]
Uplifting [keyboard_event_scan] best 4107025 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ]
Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ]
Uplifting [play_remove_lines] best 4107025 combination zp ZP_BYTE:80 [ play_remove_lines::x#2 play_remove_lines::x#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ]
Uplifting [play_lock_current] best 4107026 combination zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ]
Uplifting [play_lock_current] best 4107025 combination zp ZP_BYTE:86 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ]
Uplifting [play_collision] best 4107026 combination zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ]
Uplifting [play_collision] best 4107025 combination zp ZP_BYTE:51 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ]
Uplifting [keyboard_event_scan] best 4107026 combination zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ]
Uplifting [keyboard_event_scan] best 4107025 combination zp ZP_BYTE:92 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ]
Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ]
Uplifting [play_remove_lines] best 4107025 combination zp ZP_BYTE:81 [ play_remove_lines::full#4 play_remove_lines::full#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:188 [ play_remove_lines::c#0 ]
Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:188 [ play_remove_lines::c#0 ]
Uplifting [play_remove_lines] best 4107025 combination zp ZP_BYTE:188 [ play_remove_lines::c#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ]
Uplifting [render_moving] best 4107026 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ]
Uplifting [render_moving] best 4107025 combination zp ZP_BYTE:32 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ]
Uplifting [play_remove_lines] best 4107026 combination zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ]
Uplifting [play_remove_lines] best 4107025 combination zp ZP_BYTE:78 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:192 [ play_lock_current::i#1 ]
Uplifting [play_lock_current] best 4107026 combination zp ZP_BYTE:192 [ play_lock_current::i#1 ]
Uplifting [play_lock_current] best 4107025 combination zp ZP_BYTE:192 [ play_lock_current::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ]
Uplifting [] best 4107026 combination zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ]
Uplifting [] best 4107025 combination zp ZP_BYTE:74 [ next_piece_idx#17 next_piece_idx#30 next_piece_idx#10 next_piece_idx#16 play_spawn_current::piece_idx#2 play_spawn_current::piece_idx#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ]
Uplifting [keyboard_event_scan] best 4107026 combination zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ]
Uplifting [keyboard_event_scan] best 4107025 combination zp ZP_BYTE:90 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ]
Uplifting [render_playfield] best 4107026 combination zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ]
Uplifting [render_playfield] best 4107025 combination zp ZP_BYTE:40 [ render_playfield::c#2 render_playfield::c#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:156 [ play_collision::$14 ]
Uplifting [play_collision] best 4103026 combination reg byte a [ play_collision::$14 ]
Uplifting [play_collision] best 4103025 combination reg byte a [ play_collision::$14 ]
Attempting to uplift remaining variables inzp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ]
Uplifting [play_remove_lines] best 4103026 combination zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ]
Uplifting [play_remove_lines] best 4103025 combination zp ZP_BYTE:77 [ play_remove_lines::y#8 play_remove_lines::y#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:159 [ play_collision::i#1 ]
Uplifting [play_collision] best 4103026 combination zp ZP_BYTE:159 [ play_collision::i#1 ]
Uplifting [play_collision] best 4103025 combination zp ZP_BYTE:159 [ play_collision::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ]
Uplifting [render_playfield] best 4103026 combination zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ]
Uplifting [render_playfield] best 4103025 combination zp ZP_BYTE:37 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ]
Uplifting [render_moving] best 4103026 combination zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ]
Uplifting [render_moving] best 4103025 combination zp ZP_BYTE:33 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ]
Uplifting [play_collision] best 4103026 combination zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ]
Uplifting [play_collision] best 4103025 combination zp ZP_BYTE:48 [ play_collision::yp#2 play_collision::yp#0 play_collision::ypos#0 play_collision::ypos#1 play_collision::ypos#2 play_collision::ypos#3 play_collision::ypos#4 play_collision::yp#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ]
Uplifting [keyboard_event_scan] best 4103026 combination zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ]
Uplifting [keyboard_event_scan] best 4103025 combination zp ZP_BYTE:199 [ keyboard_event_scan::row_scan#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ]
Uplifting [play_lock_current] best 4103026 combination zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ]
Uplifting [play_lock_current] best 4103025 combination zp ZP_BYTE:84 [ play_lock_current::l#6 play_lock_current::l#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ]
Uplifting [] best 4103026 combination zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ]
Uplifting [] best 4103025 combination zp ZP_BYTE:4 [ render_screen_showing#13 render_screen_showing#1 render_screen_showing#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ]
Uplifting [play_collision] best 4103026 combination zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ]
Uplifting [play_collision] best 4103025 combination zp ZP_BYTE:49 [ play_collision::l#6 play_collision::l#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ]
Uplifting [play_lock_current] best 4103026 combination zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ]
Uplifting [play_lock_current] best 4103025 combination zp ZP_BYTE:83 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:134 [ render_moving::$1 ]
Uplifting [render_moving] best 4102426 combination reg byte a [ render_moving::$1 ]
Uplifting [render_moving] best 4102425 combination reg byte a [ render_moving::$1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:135 [ render_moving::$6 ]
Uplifting [render_moving] best 4102026 combination reg byte a [ render_moving::$6 ]
Uplifting [render_moving] best 4102025 combination reg byte a [ render_moving::$6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ]
Uplifting [] best 4102026 combination zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ]
Uplifting [] best 4102025 combination zp ZP_BYTE:68 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ]
Attempting to uplift remaining variables inzp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ]
Uplifting [render_playfield] best 4102026 combination zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ]
Uplifting [render_playfield] best 4102025 combination zp ZP_BYTE:36 [ render_playfield::l#2 render_playfield::l#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ]
Uplifting [render_next] best 4102026 combination zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ]
Uplifting [render_next] best 4102025 combination zp ZP_BYTE:18 [ render_next::l#7 render_next::l#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ]
Uplifting [render_moving] best 4102026 combination zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ]
Uplifting [render_moving] best 4102025 combination zp ZP_BYTE:31 [ render_moving::l#4 render_moving::l#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ]
Uplifting [render_moving] best 4102026 combination zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ]
Uplifting [render_moving] best 4102025 combination zp ZP_BYTE:30 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ]
Uplifting [] best 4102026 combination zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ]
Uplifting [] best 4102025 combination zp ZP_BYTE:29 [ current_piece_char#68 current_piece_char#100 current_piece_char#101 ]
Attempting to uplift remaining variables inzp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Uplifting [] best 4102026 combination zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Uplifting [] best 4102025 combination zp ZP_BYTE:120 [ irq_sprite_ptr#0 irq_sprite_ptr#11 irq_sprite_ptr#1 irq_sprite_ptr#2 irq_sprite_ptr#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:132 [ render_next::next_piece_char#0 ]
Uplifting [render_next] best 4102026 combination zp ZP_BYTE:132 [ render_next::next_piece_char#0 ]
Uplifting [render_next] best 4102025 combination zp ZP_BYTE:132 [ render_next::next_piece_char#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Uplifting [] best 4102026 combination zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Uplifting [] best 4102025 combination zp ZP_BYTE:119 [ irq_sprite_ypos#0 irq_sprite_ypos#11 irq_sprite_ypos#1 irq_sprite_ypos#2 irq_sprite_ypos#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Uplifting [] best 4102026 combination zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Uplifting [] best 4102025 combination zp ZP_BYTE:121 [ irq_cnt#0 irq_cnt#3 irq_cnt#1 irq_cnt#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ]
Uplifting [play_collision] best 4102026 combination zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ]
Uplifting [play_collision] best 4102025 combination zp ZP_BYTE:47 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ]
Attempting to uplift remaining variables inzp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ]
Uplifting [] best 4102026 combination zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ]
Uplifting [] best 4102025 combination zp ZP_BYTE:72 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ]
Attempting to uplift remaining variables inzp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ]
Uplifting [play_movement] best 4102026 combination zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ]
Uplifting [play_movement] best 4102025 combination zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:99 [ play_init::b#2 play_init::b#1 ]
Uplifting [play_init] best 4101926 combination reg byte x [ play_init::b#2 play_init::b#1 ]
Uplifting [play_init] best 4101925 combination reg byte x [ play_init::b#2 play_init::b#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ]
Uplifting [] best 4101926 combination zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ]
Uplifting [] best 4101925 combination zp ZP_BYTE:65 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ]
Attempting to uplift remaining variables inzp ZP_BYTE:46 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ]
Uplifting [play_collision] best 4101910 combination reg byte x [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ]
Uplifting [play_collision] best 4101909 combination reg byte x [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ]
Uplifting [render_screen_original] best 4101910 combination zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ]
Uplifting [render_screen_original] best 4101909 combination zp ZP_BYTE:107 [ render_screen_original::y#6 render_screen_original::y#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:69 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ]
Attempting to uplift remaining variables inzp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:64 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#66 current_movedown_slow#10 ]
Attempting to uplift remaining variables inzp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Uplifting [sprites_init] best 4101910 combination zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Uplifting [sprites_init] best 4101909 combination zp ZP_BYTE:101 [ sprites_init::xpos#2 sprites_init::xpos#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:56 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:75 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ]
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:26 [ current_xpos#59 current_xpos#119 current_xpos#120 ]
Attempting to uplift remaining variables inzp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ]
Uplifting [play_init] best 4101910 combination zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ]
Uplifting [play_init] best 4101909 combination zp ZP_BYTE:98 [ play_init::idx#2 play_init::idx#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:63 [ level#33 level#10 level#17 level#19 level#21 ]
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:5 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ]
Attempting to uplift remaining variables inzp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:118 [ irq_raster_next#0 irq_raster_next#4 irq_raster_next#1 irq_raster_next#2 irq_raster_next#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:25 [ render_screen_render#33 render_screen_render#65 ]
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:2 [ render_screen_show#16 render_screen_show#13 ]
Attempting to uplift remaining variables inzp ZP_BYTE:124 [ play_movement::key_event#0 ]
Uplifting [play_movement] best 4101910 combination zp ZP_BYTE:124 [ play_movement::key_event#0 ]
Uplifting [play_movement] best 4101909 combination zp ZP_BYTE:124 [ play_movement::key_event#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ]
Uplifting [play_move_rotate] best 4101910 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ]
Uplifting [play_move_rotate] best 4101909 combination zp ZP_BYTE:43 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ]
Uplifting [] best 4101910 combination zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ]
Uplifting [] best 4101909 combination zp ZP_BYTE:3 [ render_screen_render#18 render_screen_render#11 ]
Attempting to uplift remaining variables inzp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Uplifting [sprites_irq] best 4101910 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Uplifting [sprites_irq] best 4101909 combination zp ZP_BYTE:117 [ sprites_irq::raster_sprite_gfx_modify#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:130 [ render_bcd::$4 ]
Uplifting [render_bcd] best 4101904 combination reg byte a [ render_bcd::$4 ]
Uplifting [render_bcd] best 4101903 combination reg byte a [ render_bcd::$4 ]
Attempting to uplift remaining variables inzp ZP_BYTE:151 [ play_collision::return#14 ]
Uplifting [play_collision] best 4101898 combination reg byte a [ play_collision::return#14 ]
Uplifting [play_collision] best 4101897 combination reg byte a [ play_collision::return#14 ]
Attempting to uplift remaining variables inzp ZP_BYTE:153 [ play_move_rotate::$7 ]
Uplifting [play_move_rotate] best 4101892 combination reg byte x [ play_move_rotate::$7 ]
Uplifting [play_move_rotate] best 4101891 combination reg byte x [ play_move_rotate::$7 ]
Attempting to uplift remaining variables inzp ZP_BYTE:161 [ play_collision::return#13 ]
Uplifting [play_collision] best 4101886 combination reg byte a [ play_collision::return#13 ]
Uplifting [play_collision] best 4101885 combination reg byte a [ play_collision::return#13 ]
Attempting to uplift remaining variables inzp ZP_BYTE:163 [ play_collision::return#1 ]
Uplifting [play_collision] best 4101880 combination reg byte a [ play_collision::return#1 ]
Uplifting [play_collision] best 4101879 combination reg byte a [ play_collision::return#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:167 [ play_collision::return#0 ]
Uplifting [play_collision] best 4101874 combination reg byte a [ play_collision::return#0 ]
Uplifting [play_collision] best 4101873 combination reg byte a [ play_collision::return#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:169 [ play_remove_lines::return#0 ]
Uplifting [play_remove_lines] best 4101868 combination reg byte a [ play_remove_lines::return#0 ]
Uplifting [play_remove_lines] best 4101867 combination reg byte a [ play_remove_lines::return#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:170 [ play_move_down::removed#0 ]
Uplifting [play_move_down] best 4101862 combination reg byte a [ play_move_down::removed#0 ]
Uplifting [play_move_down] best 4101861 combination reg byte a [ play_move_down::removed#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:174 [ play_collision::return#10 ]
Uplifting [play_collision] best 4101856 combination reg byte a [ play_collision::return#10 ]
Uplifting [play_collision] best 4101855 combination reg byte a [ play_collision::return#10 ]
Attempting to uplift remaining variables inzp ZP_BYTE:201 [ keyboard_event_scan::$0 ]
Uplifting [keyboard_event_scan] best 4101850 combination reg byte a [ keyboard_event_scan::$0 ]
Uplifting [keyboard_event_scan] best 4101849 combination reg byte a [ keyboard_event_scan::$0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:202 [ keyboard_event_pressed::return#1 ]
Uplifting [keyboard_event_pressed] best 4101844 combination reg byte a [ keyboard_event_pressed::return#1 ]
Uplifting [keyboard_event_pressed] best 4101843 combination reg byte a [ keyboard_event_pressed::return#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:203 [ keyboard_event_scan::$3 ]
Uplifting [keyboard_event_scan] best 4101838 combination reg byte a [ keyboard_event_scan::$3 ]
Uplifting [keyboard_event_scan] best 4101837 combination reg byte a [ keyboard_event_scan::$3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:204 [ keyboard_event_pressed::return#2 ]
Uplifting [keyboard_event_pressed] best 4101832 combination reg byte a [ keyboard_event_pressed::return#2 ]
Uplifting [keyboard_event_pressed] best 4101831 combination reg byte a [ keyboard_event_pressed::return#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:205 [ keyboard_event_scan::$6 ]
Uplifting [keyboard_event_scan] best 4101826 combination reg byte a [ keyboard_event_scan::$6 ]
Uplifting [keyboard_event_scan] best 4101825 combination reg byte a [ keyboard_event_scan::$6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:206 [ keyboard_event_pressed::return#10 ]
Uplifting [keyboard_event_pressed] best 4101820 combination reg byte a [ keyboard_event_pressed::return#10 ]
Uplifting [keyboard_event_pressed] best 4101819 combination reg byte a [ keyboard_event_pressed::return#10 ]
Attempting to uplift remaining variables inzp ZP_BYTE:207 [ keyboard_event_scan::$9 ]
Uplifting [keyboard_event_scan] best 4101814 combination reg byte a [ keyboard_event_scan::$9 ]
Uplifting [keyboard_event_scan] best 4101813 combination reg byte a [ keyboard_event_scan::$9 ]
Attempting to uplift remaining variables inzp ZP_BYTE:147 [ play_move_rotate::key_event#0 ]
Uplifting [play_move_rotate] best 4101805 combination reg byte a [ play_move_rotate::key_event#0 ]
Uplifting [play_move_rotate] best 4101804 combination reg byte a [ play_move_rotate::key_event#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:222 [ sprites_irq::ptr#1 ]
Uplifting [sprites_irq] best 4101793 combination reg byte x [ sprites_irq::ptr#1 ]
Uplifting [sprites_irq] best 4101792 combination reg byte x [ sprites_irq::ptr#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:217 [ sprites_irq::ypos#0 ]
Uplifting [sprites_irq] best 4101778 combination reg byte a [ sprites_irq::ypos#0 ]
Uplifting [sprites_irq] best 4101777 combination reg byte a [ sprites_irq::ypos#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:219 [ sprites_irq::ptr#0 ]
Uplifting [sprites_irq] best 4101763 combination reg byte x [ sprites_irq::ptr#0 ]
Uplifting [sprites_irq] best 4101762 combination reg byte x [ sprites_irq::ptr#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:141 [ play_move_down::key_event#0 ]
Uplifting [play_move_down] best 4101757 combination reg byte a [ play_move_down::key_event#0 ]
Uplifting [play_move_down] best 4101756 combination reg byte a [ play_move_down::key_event#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ]
Uplifting [keyboard_event_pressed] best 4101757 combination zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ]
Uplifting [keyboard_event_pressed] best 4101756 combination zp ZP_BYTE:194 [ keyboard_event_pressed::row_bits#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:196 [ keyboard_event_pressed::return#11 ]
Uplifting [keyboard_event_pressed] best 4101739 combination reg byte a [ keyboard_event_pressed::return#11 ]
Uplifting [keyboard_event_pressed] best 4101738 combination reg byte a [ keyboard_event_pressed::return#11 ]
Attempting to uplift remaining variables inzp ZP_BYTE:53 [ play_collision::return#15 ]
Uplifting [play_collision] best 4101709 combination reg byte a [ play_collision::return#15 ]
Uplifting [play_collision] best 4101708 combination reg byte a [ play_collision::return#15 ]
Attempting to uplift remaining variables inzp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ]
Uplifting [keyboard_event_pressed] best 4101709 combination zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ]
Uplifting [keyboard_event_pressed] best 4101708 combination zp ZP_BYTE:88 [ keyboard_event_pressed::keycode#5 ]
Attempting to uplift remaining variables inzp ZP_BYTE:171 [ play_update_score::removed#0 ]
Uplifting [play_update_score] best 4101703 combination reg byte x [ play_update_score::removed#0 ]
Uplifting [play_update_score] best 4101702 combination reg byte x [ play_update_score::removed#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ render_bcd::only_low#6 ]
Uplifting [render_bcd] best 4101682 combination reg byte y [ render_bcd::only_low#6 ]
Uplifting [render_bcd] best 4101681 combination reg byte y [ render_bcd::only_low#6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:146 [ play_movement::render#2 ]
Uplifting [play_movement] best 4101682 combination zp ZP_BYTE:146 [ play_movement::render#2 ]
Uplifting [play_movement] best 4101681 combination zp ZP_BYTE:146 [ play_movement::render#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:42 [ play_move_rotate::return#2 ]
Uplifting [play_move_rotate] best 4101673 combination reg byte a [ play_move_rotate::return#2 ]
Uplifting [play_move_rotate] best 4101672 combination reg byte a [ play_move_rotate::return#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:54 [ play_move_leftright::return#2 ]
Uplifting [play_move_leftright] best 4101664 combination reg byte a [ play_move_leftright::return#2 ]
Uplifting [play_move_leftright] best 4101663 combination reg byte a [ play_move_leftright::return#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:73 [ play_move_down::return#3 ]
Uplifting [play_move_down] best 4101657 combination reg byte x [ play_move_down::return#3 ]
Uplifting [play_move_down] best 4101656 combination reg byte x [ play_move_down::return#3 ]
Attempting to uplift remaining variables inzp ZP_BYTE:178 [ play_update_score::lines_before#0 ]
Uplifting [play_update_score] best 4101657 combination zp ZP_BYTE:178 [ play_update_score::lines_before#0 ]
Uplifting [play_update_score] best 4101656 combination zp ZP_BYTE:178 [ play_update_score::lines_before#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:173 [ play_spawn_current::$7 ]
Uplifting [play_spawn_current] best 4101657 combination zp ZP_BYTE:173 [ play_spawn_current::$7 ]
Uplifting [play_spawn_current] best 4101656 combination zp ZP_BYTE:173 [ play_spawn_current::$7 ]
Coalescing zero page register [ zp ZP_WORD:6 [ render_score::screen#3 ] ] with [ zp ZP_WORD:8 [ render_bcd::screen#6 render_bcd::screen#0 render_bcd::screen#1 render_bcd::screen#2 render_bcd::screen#3 render_bcd::screen#4 render_bcd::screen#5 ] ] - score: 6
Coalescing zero page register [ zp ZP_BYTE:41 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] ] with [ zp ZP_BYTE:146 [ play_movement::render#2 ] ] - score: 2
Coalescing zero page register [ zp ZP_WORD:10 [ render_bcd::offset#6 ] ] with [ zp ZP_WORD:14 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] ] - score: 1
@ -19617,7 +19617,7 @@ render_score: {
b4:
// [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3
// [85] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes#0) -- vbuxx=_deref_pbuc1
ldx score_bytes
ldx.z score_bytes
// [86] call render_bcd
// [97] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd]
render_bcd_from_b4:
@ -24408,7 +24408,7 @@ reg byte a [ sprites_irq::ptr#2 ]
FINAL ASSEMBLER
Score: 3353852
Score: 3353851
// File Comments
// Tetris Game for the Commodore 64
@ -24981,7 +24981,7 @@ render_score: {
// render_bcd( screen, score_offset+4, score_bytes[0], 0)
// [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3
// [85] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes#0) -- vbuxx=_deref_pbuc1
ldx score_bytes
ldx.z score_bytes
// [86] call render_bcd
// [97] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd]
// [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#2 [phi:render_score::@4->render_bcd#0] -- register_copy

View File

@ -17,7 +17,7 @@ main: {
sta SCREEN
lda #B
sta SCREEN+1
lda addrA
lda.z addrA
sta SCREEN+2
jsr sub
rts

View File

@ -223,7 +223,7 @@ main: {
lda #B
sta SCREEN+1
// [6] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte*) main::addrA#0) -- _deref_pbuc1=_deref_pbuc2
lda addrA
lda.z addrA
sta SCREEN+2
// [7] call sub
jsr sub
@ -269,11 +269,11 @@ Uplift Scope [sub] 4: zp ZP_BYTE:3 [ sub::D#0 ]
Uplift Scope [] 1: zp ZP_BYTE:2 [ A#0 ]
Uplift Scope [main]
Uplifting [sub] best 77 combination reg byte x [ sub::D#0 ]
Uplifting [] best 77 combination zp ZP_BYTE:2 [ A#0 ]
Uplifting [main] best 77 combination
Uplifting [sub] best 76 combination reg byte x [ sub::D#0 ]
Uplifting [] best 76 combination zp ZP_BYTE:2 [ A#0 ]
Uplifting [main] best 76 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ A#0 ]
Uplifting [] best 77 combination zp ZP_BYTE:2 [ A#0 ]
Uplifting [] best 76 combination zp ZP_BYTE:2 [ A#0 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -314,7 +314,7 @@ main: {
lda #B
sta SCREEN+1
// [6] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte*) main::addrA#0) -- _deref_pbuc1=_deref_pbuc2
lda addrA
lda.z addrA
sta SCREEN+2
// [7] call sub
jsr sub
@ -386,7 +386,7 @@ reg byte x [ sub::D#0 ]
FINAL ASSEMBLER
Score: 71
Score: 70
// File Comments
// Tests that constants are identified early
@ -425,7 +425,7 @@ main: {
sta SCREEN+1
// SCREEN[2] = *addrA
// [6] *((const byte*) SCREEN#0+(byte) 2) ← *((const byte*) main::addrA#0) -- _deref_pbuc1=_deref_pbuc2
lda addrA
lda.z addrA
sta SCREEN+2
// sub()
// [7] call sub

View File

@ -11,17 +11,17 @@ main: {
sta.z w
lda #>$d03
sta.z w+1
lda wp
lda.z wp
sta screen
lda wp+1
lda.z wp+1
sta screen+1
lda #<$210c
sta wp
sta.z wp
lda #>$210c
sta wp+1
lda wp
sta.z wp+1
lda.z wp
sta screen+2
lda wp+1
lda.z wp+1
sta screen+3
rts
}

View File

@ -195,30 +195,30 @@ main: {
lda #>$d03
sta.z w+1
// [5] (byte~) main::$1 ← < *((const word*) main::wp#0) -- vbuz1=_lo__deref_pwuc1
lda wp
lda.z wp
sta.z _1
// [6] *((const byte*) main::screen#0) ← (byte~) main::$1 -- _deref_pbuc1=vbuz1
lda.z _1
sta screen
// [7] (byte~) main::$2 ← > *((const word*) main::wp#0) -- vbuz1=_hi__deref_pwuc1
lda wp+1
lda.z wp+1
sta.z _2
// [8] *((const byte*) main::screen#0+(byte) 1) ← (byte~) main::$2 -- _deref_pbuc1=vbuz1
lda.z _2
sta screen+1
// [9] *((const word*) main::wp#0) ← (word) $210c -- _deref_pwuc1=vwuc2
lda #<$210c
sta wp
sta.z wp
lda #>$210c
sta wp+1
sta.z wp+1
// [10] (byte~) main::$3 ← < *((const word*) main::wp#0) -- vbuz1=_lo__deref_pwuc1
lda wp
lda.z wp
sta.z _3
// [11] *((const byte*) main::screen#0+(byte) 2) ← (byte~) main::$3 -- _deref_pbuc1=vbuz1
lda.z _3
sta screen+2
// [12] (byte~) main::$4 ← > *((const word*) main::wp#0) -- vbuz1=_hi__deref_pwuc1
lda wp+1
lda.z wp+1
sta.z _4
// [13] *((const byte*) main::screen#0+(byte) 3) ← (byte~) main::$4 -- _deref_pbuc1=vbuz1
lda.z _4
@ -244,9 +244,9 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp ZP_WORD:2 [ main::w#0 ] 4: zp ZP_BYTE:4 [ main::$1 ] 4: zp ZP_BYTE:5 [ main::$2 ] 4: zp ZP_BYTE:6 [ main::$3 ] 4: zp ZP_BYTE:7 [ main::$4 ]
Uplift Scope []
Uplifting [main] best 75 combination zp ZP_WORD:2 [ main::w#0 ] reg byte a [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ]
Uplifting [main] best 69 combination zp ZP_WORD:2 [ main::w#0 ] reg byte a [ main::$1 ] reg byte a [ main::$2 ] reg byte a [ main::$3 ] reg byte a [ main::$4 ]
Limited combination testing to 100 combinations of 256 possible.
Uplifting [] best 75 combination
Uplifting [] best 69 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -282,24 +282,24 @@ main: {
lda #>$d03
sta.z w+1
// [5] (byte~) main::$1 ← < *((const word*) main::wp#0) -- vbuaa=_lo__deref_pwuc1
lda wp
lda.z wp
// [6] *((const byte*) main::screen#0) ← (byte~) main::$1 -- _deref_pbuc1=vbuaa
sta screen
// [7] (byte~) main::$2 ← > *((const word*) main::wp#0) -- vbuaa=_hi__deref_pwuc1
lda wp+1
lda.z wp+1
// [8] *((const byte*) main::screen#0+(byte) 1) ← (byte~) main::$2 -- _deref_pbuc1=vbuaa
sta screen+1
// [9] *((const word*) main::wp#0) ← (word) $210c -- _deref_pwuc1=vwuc2
lda #<$210c
sta wp
sta.z wp
lda #>$210c
sta wp+1
sta.z wp+1
// [10] (byte~) main::$3 ← < *((const word*) main::wp#0) -- vbuaa=_lo__deref_pwuc1
lda wp
lda.z wp
// [11] *((const byte*) main::screen#0+(byte) 2) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa
sta screen+2
// [12] (byte~) main::$4 ← > *((const word*) main::wp#0) -- vbuaa=_hi__deref_pwuc1
lda wp+1
lda.z wp+1
// [13] *((const byte*) main::screen#0+(byte) 3) ← (byte~) main::$4 -- _deref_pbuc1=vbuaa
sta screen+3
jmp breturn
@ -353,7 +353,7 @@ reg byte a [ main::$4 ]
FINAL ASSEMBLER
Score: 60
Score: 54
// File Comments
// Test a constant word pointers (pointing to a word placed on zeropage).
@ -382,31 +382,31 @@ main: {
sta.z w+1
// <*wp
// [5] (byte~) main::$1 ← < *((const word*) main::wp#0) -- vbuaa=_lo__deref_pwuc1
lda wp
lda.z wp
// screen[0] = <*wp
// [6] *((const byte*) main::screen#0) ← (byte~) main::$1 -- _deref_pbuc1=vbuaa
sta screen
// >*wp
// [7] (byte~) main::$2 ← > *((const word*) main::wp#0) -- vbuaa=_hi__deref_pwuc1
lda wp+1
lda.z wp+1
// screen[1] = >*wp
// [8] *((const byte*) main::screen#0+(byte) 1) ← (byte~) main::$2 -- _deref_pbuc1=vbuaa
sta screen+1
// *wp = $210c
// [9] *((const word*) main::wp#0) ← (word) $210c -- _deref_pwuc1=vwuc2
lda #<$210c
sta wp
sta.z wp
lda #>$210c
sta wp+1
sta.z wp+1
// <*wp
// [10] (byte~) main::$3 ← < *((const word*) main::wp#0) -- vbuaa=_lo__deref_pwuc1
lda wp
lda.z wp
// screen[2] = <*wp
// [11] *((const byte*) main::screen#0+(byte) 2) ← (byte~) main::$3 -- _deref_pbuc1=vbuaa
sta screen+2
// >*wp
// [12] (byte~) main::$4 ← > *((const word*) main::wp#0) -- vbuaa=_hi__deref_pwuc1
lda wp+1
lda.z wp+1
// screen[3] = >*wp
// [13] *((const byte*) main::screen#0+(byte) 3) ← (byte~) main::$4 -- _deref_pbuc1=vbuaa
sta screen+3

View File

@ -93,9 +93,9 @@ utoa16n: {
lda DIGITS,y
ldy #0
sta (utoa16w.dst),y
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
breturn:
rts

View File

@ -1052,9 +1052,9 @@ utoa16n: {
ldy #0
sta (utoa16w.dst),y
// [44] *(&(byte*) utoa16w::dst#5) ← ++ *(&(byte*) utoa16w::dst#5) -- _deref_pptc1=_inc__deref_pptc1
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
jmp breturn
// utoa16n::@return
@ -1163,17 +1163,17 @@ Uplift Scope [cls] 33: zp ZP_WORD:8 [ cls::sc#2 cls::sc#1 ]
Uplift Scope [main]
Uplift Scope []
Uplifting [utoa16w] best 957 combination zp ZP_WORD:4 [ utoa16w::dst#5 utoa16w::dst#0 utoa16w::dst#1 utoa16w::dst#2 utoa16w::dst#3 utoa16w::dst#4 ] reg byte a [ utoa16w::$0 ] reg byte a [ utoa16w::$4 ] reg byte a [ utoa16w::$8 ] reg byte a [ utoa16w::$12 ] zp ZP_BYTE:12 [ utoa16w::started#1 ] zp ZP_BYTE:15 [ utoa16w::started#2 ] zp ZP_WORD:2 [ utoa16w::value#5 ]
Uplifting [utoa16w] best 955 combination zp ZP_WORD:4 [ utoa16w::dst#5 utoa16w::dst#0 utoa16w::dst#1 utoa16w::dst#2 utoa16w::dst#3 utoa16w::dst#4 ] reg byte a [ utoa16w::$0 ] reg byte a [ utoa16w::$4 ] reg byte a [ utoa16w::$8 ] reg byte a [ utoa16w::$12 ] zp ZP_BYTE:12 [ utoa16w::started#1 ] zp ZP_BYTE:15 [ utoa16w::started#2 ] zp ZP_WORD:2 [ utoa16w::value#5 ]
Limited combination testing to 100 combinations of 2304 possible.
Uplifting [utoa16n] best 905 combination reg byte a [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] reg byte x [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] reg byte x [ utoa16n::return#0 ] reg byte x [ utoa16n::return#1 ]
Uplifting [utoa16n] best 903 combination reg byte a [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] reg byte x [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] reg byte x [ utoa16n::return#0 ] reg byte x [ utoa16n::return#1 ]
Limited combination testing to 100 combinations of 128 possible.
Uplifting [cls] best 905 combination zp ZP_WORD:8 [ cls::sc#2 cls::sc#1 ]
Uplifting [main] best 905 combination
Uplifting [] best 905 combination
Uplifting [cls] best 903 combination zp ZP_WORD:8 [ cls::sc#2 cls::sc#1 ]
Uplifting [main] best 903 combination
Uplifting [] best 903 combination
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ utoa16w::started#1 ]
Uplifting [utoa16w] best 899 combination reg byte x [ utoa16w::started#1 ]
Uplifting [utoa16w] best 897 combination reg byte x [ utoa16w::started#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ utoa16w::started#2 ]
Uplifting [utoa16w] best 893 combination reg byte x [ utoa16w::started#2 ]
Uplifting [utoa16w] best 891 combination reg byte x [ utoa16w::started#2 ]
Coalescing zero page register [ zp ZP_WORD:8 [ cls::sc#2 cls::sc#1 ] ] with [ zp ZP_WORD:2 [ utoa16w::value#5 ] ]
Allocated (was zp ZP_WORD:4) zp ZP_WORD:2 [ utoa16w::dst#5 utoa16w::dst#0 utoa16w::dst#1 utoa16w::dst#2 utoa16w::dst#3 utoa16w::dst#4 ]
Allocated (was zp ZP_WORD:8) zp ZP_WORD:4 [ cls::sc#2 cls::sc#1 utoa16w::value#5 ]
@ -1421,9 +1421,9 @@ utoa16n: {
ldy #0
sta (utoa16w.dst),y
// [44] *(&(byte*) utoa16w::dst#5) ← ++ *(&(byte*) utoa16w::dst#5) -- _deref_pptc1=_inc__deref_pptc1
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
jmp breturn
// utoa16n::@return
@ -1628,7 +1628,7 @@ reg byte a [ utoa16w::$12 ]
FINAL ASSEMBLER
Score: 741
Score: 739
// File Comments
// Testing binary to hex conversion using pointer to pointer
@ -1846,9 +1846,9 @@ utoa16n: {
sta (utoa16w.dst),y
// *(*dst)++ = DIGITS[nybble];
// [44] *(&(byte*) utoa16w::dst#5) ← ++ *(&(byte*) utoa16w::dst#5) -- _deref_pptc1=_inc__deref_pptc1
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
// utoa16n::@return
breturn:

View File

@ -219,9 +219,9 @@ utoa16n: {
lda DIGITS,y
ldy #0
sta (utoa16w.dst),y
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
breturn:
rts

View File

@ -1995,9 +1995,9 @@ utoa16n: {
ldy #0
sta (utoa16w.dst),y
// [83] *(&(byte*) utoa16w::dst#5) ← ++ *(&(byte*) utoa16w::dst#5) -- _deref_pptc1=_inc__deref_pptc1
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
jmp breturn
// utoa16n::@return
@ -2176,36 +2176,36 @@ Uplift Scope [utoa16n] 14.4: zp ZP_BYTE:14 [ utoa16n::nybble#4 utoa16n::nybble#0
Uplift Scope [cls] 33: zp ZP_WORD:16 [ cls::sc#2 cls::sc#1 ]
Uplift Scope []
Uplifting [utoa10w] best 28961 combination zp ZP_WORD:8 [ utoa10w::dst#7 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] zp ZP_WORD:4 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] zp ZP_BYTE:6 [ utoa10w::digit#3 utoa10w::digit#7 utoa10w::digit#1 ] reg byte x [ utoa10w::i#2 utoa10w::i#1 ] reg byte a [ utoa10w::$8 ] reg byte a [ utoa10w::$2 ] zp ZP_BYTE:29 [ utoa10w::$9 ] zp ZP_BYTE:7 [ utoa10w::bStarted#2 ] zp ZP_BYTE:26 [ utoa10w::$0 ] zp ZP_WORD:27 [ utoa10w::dst#2 ]
Uplifting [utoa10w] best 28959 combination zp ZP_WORD:8 [ utoa10w::dst#7 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] zp ZP_WORD:4 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] zp ZP_BYTE:6 [ utoa10w::digit#3 utoa10w::digit#7 utoa10w::digit#1 ] reg byte x [ utoa10w::i#2 utoa10w::i#1 ] reg byte a [ utoa10w::$8 ] reg byte a [ utoa10w::$2 ] zp ZP_BYTE:29 [ utoa10w::$9 ] zp ZP_BYTE:7 [ utoa10w::bStarted#2 ] zp ZP_BYTE:26 [ utoa10w::$0 ] zp ZP_WORD:27 [ utoa10w::dst#2 ]
Limited combination testing to 100 combinations of 3072 possible.
Uplifting [main] best 26561 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$2 ] reg byte a [ main::rst#0 ] zp ZP_BYTE:18 [ main::$1 ] zp ZP_BYTE:22 [ main::time_end#0 ] zp ZP_BYTE:23 [ main::time#0 ] zp ZP_BYTE:21 [ main::time_start#0 ]
Uplifting [main] best 26559 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$2 ] reg byte a [ main::rst#0 ] zp ZP_BYTE:18 [ main::$1 ] zp ZP_BYTE:22 [ main::time_end#0 ] zp ZP_BYTE:23 [ main::time#0 ] zp ZP_BYTE:21 [ main::time_start#0 ]
Limited combination testing to 100 combinations of 3456 possible.
Uplifting [utoa16w] best 26537 combination zp ZP_WORD:12 [ utoa16w::dst#5 utoa16w::dst#1 utoa16w::dst#2 utoa16w::dst#3 utoa16w::dst#4 utoa16w::dst#0 ] reg byte a [ utoa16w::$0 ] reg byte a [ utoa16w::$4 ] reg byte a [ utoa16w::$8 ] reg byte a [ utoa16w::$12 ] zp ZP_BYTE:32 [ utoa16w::started#1 ] zp ZP_BYTE:35 [ utoa16w::started#2 ] zp ZP_WORD:10 [ utoa16w::value#5 ]
Uplifting [utoa16w] best 26535 combination zp ZP_WORD:12 [ utoa16w::dst#5 utoa16w::dst#1 utoa16w::dst#2 utoa16w::dst#3 utoa16w::dst#4 utoa16w::dst#0 ] reg byte a [ utoa16w::$0 ] reg byte a [ utoa16w::$4 ] reg byte a [ utoa16w::$8 ] reg byte a [ utoa16w::$12 ] zp ZP_BYTE:32 [ utoa16w::started#1 ] zp ZP_BYTE:35 [ utoa16w::started#2 ] zp ZP_WORD:10 [ utoa16w::value#5 ]
Limited combination testing to 100 combinations of 2304 possible.
Uplifting [utoa16n] best 26485 combination reg byte a [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] reg byte x [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] reg byte x [ utoa16n::return#0 ] reg byte x [ utoa16n::return#1 ]
Uplifting [utoa16n] best 26483 combination reg byte a [ utoa16n::nybble#4 utoa16n::nybble#0 utoa16n::nybble#1 utoa16n::nybble#2 utoa16n::nybble#3 ] reg byte x [ utoa16n::return#4 utoa16n::started#7 utoa16n::started#1 utoa16n::started#2 ] reg byte x [ utoa16n::return#0 ] reg byte x [ utoa16n::return#1 ]
Limited combination testing to 100 combinations of 128 possible.
Uplifting [cls] best 26485 combination zp ZP_WORD:16 [ cls::sc#2 cls::sc#1 ]
Uplifting [] best 26485 combination
Uplifting [cls] best 26483 combination zp ZP_WORD:16 [ cls::sc#2 cls::sc#1 ]
Uplifting [] best 26483 combination
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ utoa10w::digit#3 utoa10w::digit#7 utoa10w::digit#1 ]
Uplifting [utoa10w] best 26485 combination zp ZP_BYTE:6 [ utoa10w::digit#3 utoa10w::digit#7 utoa10w::digit#1 ]
Uplifting [utoa10w] best 26483 combination zp ZP_BYTE:6 [ utoa10w::digit#3 utoa10w::digit#7 utoa10w::digit#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:29 [ utoa10w::$9 ]
Uplifting [utoa10w] best 26085 combination reg byte a [ utoa10w::$9 ]
Uplifting [utoa10w] best 26083 combination reg byte a [ utoa10w::$9 ]
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ main::$1 ]
Uplifting [main] best 26085 combination zp ZP_BYTE:18 [ main::$1 ]
Uplifting [main] best 26083 combination zp ZP_BYTE:18 [ main::$1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ utoa10w::bStarted#2 ]
Uplifting [utoa10w] best 26085 combination zp ZP_BYTE:7 [ utoa10w::bStarted#2 ]
Uplifting [utoa10w] best 26083 combination zp ZP_BYTE:7 [ utoa10w::bStarted#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ main::time_end#0 ]
Uplifting [main] best 26045 combination reg byte x [ main::time_end#0 ]
Uplifting [main] best 26043 combination reg byte x [ main::time_end#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ main::time#0 ]
Uplifting [main] best 25985 combination reg byte a [ main::time#0 ]
Uplifting [main] best 25983 combination reg byte a [ main::time#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ utoa10w::$0 ]
Uplifting [utoa10w] best 25981 combination reg byte a [ utoa10w::$0 ]
Uplifting [utoa10w] best 25979 combination reg byte a [ utoa10w::$0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ utoa16w::started#1 ]
Uplifting [utoa16w] best 25975 combination reg byte x [ utoa16w::started#1 ]
Uplifting [utoa16w] best 25973 combination reg byte x [ utoa16w::started#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:35 [ utoa16w::started#2 ]
Uplifting [utoa16w] best 25969 combination reg byte x [ utoa16w::started#2 ]
Uplifting [utoa16w] best 25967 combination reg byte x [ utoa16w::started#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ main::time_start#0 ]
Uplifting [main] best 25969 combination zp ZP_BYTE:21 [ main::time_start#0 ]
Uplifting [main] best 25967 combination zp ZP_BYTE:21 [ main::time_start#0 ]
Coalescing zero page register [ zp ZP_WORD:8 [ utoa10w::dst#7 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 ] ] with [ zp ZP_WORD:27 [ utoa10w::dst#2 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:10 [ utoa16w::value#5 ] ] with [ zp ZP_WORD:4 [ utoa10w::value#10 utoa10w::value#0 utoa10w::value#1 ] ]
Coalescing zero page register [ zp ZP_WORD:16 [ cls::sc#2 cls::sc#1 ] ] with [ zp ZP_WORD:8 [ utoa10w::dst#7 utoa10w::dst#11 utoa10w::dst#4 utoa10w::dst#1 utoa10w::dst#2 ] ]
@ -2691,9 +2691,9 @@ utoa16n: {
ldy #0
sta (utoa16w.dst),y
// [83] *(&(byte*) utoa16w::dst#5) ← ++ *(&(byte*) utoa16w::dst#5) -- _deref_pptc1=_inc__deref_pptc1
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
jmp breturn
// utoa16n::@return
@ -3008,7 +3008,7 @@ reg byte a [ utoa16w::$12 ]
FINAL ASSEMBLER
Score: 22308
Score: 22306
// File Comments
// Testing hex to decimal conversion
@ -3462,9 +3462,9 @@ utoa16n: {
sta (utoa16w.dst),y
// *(*dst)++ = DIGITS[nybble];
// [83] *(&(byte*) utoa16w::dst#5) ← ++ *(&(byte*) utoa16w::dst#5) -- _deref_pptc1=_inc__deref_pptc1
inc utoa16w.dst
inc.z utoa16w.dst
bne !+
inc utoa16w.dst+1
inc.z utoa16w.dst+1
!:
// utoa16n::@return
breturn:

View File

@ -13,7 +13,7 @@ main: {
.label SCREEN = $400
.label a = aa_b
lda #0
cmp a
cmp.z a
bne !a+
lda #'a'
sta SCREEN

View File

@ -191,7 +191,7 @@ main: {
.label a = aa_b
// [4] if((byte) 0!=*((byte*)(const struct A*) main::a#0)) goto main::@1 -- vbuc1_neq__deref_pbuc2_then_la1
lda #0
cmp a
cmp.z a
bne b1
jmp b2
// main::@2
@ -225,11 +225,11 @@ Uplift Scope [] 20: zp ZP_BYTE:2 [ aa_b#0 ]
Uplift Scope [A]
Uplift Scope [main]
Uplifting [] best 49 combination zp ZP_BYTE:2 [ aa_b#0 ]
Uplifting [A] best 49 combination
Uplifting [main] best 49 combination
Uplifting [] best 48 combination zp ZP_BYTE:2 [ aa_b#0 ]
Uplifting [A] best 48 combination
Uplifting [main] best 48 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ aa_b#0 ]
Uplifting [] best 49 combination zp ZP_BYTE:2 [ aa_b#0 ]
Uplifting [] best 48 combination zp ZP_BYTE:2 [ aa_b#0 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -264,7 +264,7 @@ main: {
.label a = aa_b
// [4] if((byte) 0!=*((byte*)(const struct A*) main::a#0)) goto main::@1 -- vbuc1_neq__deref_pbuc2_then_la1
lda #0
cmp a
cmp.z a
bne b1
jmp b2
// main::@2
@ -330,7 +330,7 @@ zp ZP_BYTE:2 [ aa_b#0 ]
FINAL ASSEMBLER
Score: 40
Score: 39
// File Comments
// Test parsing a negated struct reference - which causes problems with the ASMREL labels !a++
@ -361,7 +361,7 @@ main: {
// if(!a->b)
// [4] if((byte) 0!=*((byte*)(const struct A*) main::a#0)) goto main::@1 -- vbuc1_neq__deref_pbuc2_then_la1
lda #0
cmp a
cmp.z a
bne !a+
// main::@2
// *SCREEN = 'a'

View File

@ -12,13 +12,13 @@ main: {
lda #$ff
sta.z ub
lda #1
sta sb_ptr
sta.z sb_ptr
lda.z ub
sta ub_screen
lda #$7f
sta.z sb
lda #1
sta ub_ptr
sta.z ub_ptr
lda.z sb
sta sb_screen
rts

View File

@ -195,7 +195,7 @@ main: {
sta.z ub
// [5] *((const signed byte*) main::sb_ptr#0) ← (signed byte) 1 -- _deref_pbsc1=vbsc2
lda #1
sta sb_ptr
sta.z sb_ptr
// [6] *((const byte*) main::ub_screen#0) ← (byte) main::ub#0 -- _deref_pbuc1=vbuz1
lda.z ub
sta ub_screen
@ -204,7 +204,7 @@ main: {
sta.z sb
// [8] *((const byte*) main::ub_ptr#0) ← (byte) 1 -- _deref_pbuc1=vbuc2
lda #1
sta ub_ptr
sta.z ub_ptr
// [9] *((const signed byte*) main::sb_screen#0) ← (signed byte) main::sb#0 -- _deref_pbsc1=vbsz1
lda.z sb
sta sb_screen
@ -230,12 +230,12 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 2: zp ZP_BYTE:2 [ main::ub#0 ] 2: zp ZP_BYTE:3 [ main::sb#0 ]
Uplift Scope []
Uplifting [main] best 57 combination zp ZP_BYTE:2 [ main::ub#0 ] zp ZP_BYTE:3 [ main::sb#0 ]
Uplifting [] best 57 combination
Uplifting [main] best 55 combination zp ZP_BYTE:2 [ main::ub#0 ] zp ZP_BYTE:3 [ main::sb#0 ]
Uplifting [] best 55 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::ub#0 ]
Uplifting [main] best 57 combination zp ZP_BYTE:2 [ main::ub#0 ]
Uplifting [main] best 55 combination zp ZP_BYTE:2 [ main::ub#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::sb#0 ]
Uplifting [main] best 57 combination zp ZP_BYTE:3 [ main::sb#0 ]
Uplifting [main] best 55 combination zp ZP_BYTE:3 [ main::sb#0 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -272,7 +272,7 @@ main: {
sta.z ub
// [5] *((const signed byte*) main::sb_ptr#0) ← (signed byte) 1 -- _deref_pbsc1=vbsc2
lda #1
sta sb_ptr
sta.z sb_ptr
// [6] *((const byte*) main::ub_screen#0) ← (byte) main::ub#0 -- _deref_pbuc1=vbuz1
lda.z ub
sta ub_screen
@ -281,7 +281,7 @@ main: {
sta.z sb
// [8] *((const byte*) main::ub_ptr#0) ← (byte) 1 -- _deref_pbuc1=vbuc2
lda #1
sta ub_ptr
sta.z ub_ptr
// [9] *((const signed byte*) main::sb_screen#0) ← (signed byte) main::sb#0 -- _deref_pbsc1=vbsz1
lda.z sb
sta sb_screen
@ -335,7 +335,7 @@ zp ZP_BYTE:3 [ main::sb#0 ]
FINAL ASSEMBLER
Score: 42
Score: 40
// File Comments
// Tests casting pointer types to other pointer types
@ -365,7 +365,7 @@ main: {
// *sb_ptr = 1
// [5] *((const signed byte*) main::sb_ptr#0) ← (signed byte) 1 -- _deref_pbsc1=vbsc2
lda #1
sta sb_ptr
sta.z sb_ptr
// *ub_screen = ub
// [6] *((const byte*) main::ub_screen#0) ← (byte) main::ub#0 -- _deref_pbuc1=vbuz1
lda.z ub
@ -377,7 +377,7 @@ main: {
// *ub_ptr = 1
// [8] *((const byte*) main::ub_ptr#0) ← (byte) 1 -- _deref_pbuc1=vbuc2
lda #1
sta ub_ptr
sta.z ub_ptr
// *sb_screen = sb
// [9] *((const signed byte*) main::sb_screen#0) ← (signed byte) main::sb#0 -- _deref_pbsc1=vbsz1
lda.z sb

View File

@ -50,15 +50,15 @@ nexttext: {
cmp #0
beq b1
lda #<text2
sta textp
sta.z textp
lda #>text2
sta textp+1
sta.z textp+1
rts
b1:
lda #<text1
sta textp
sta.z textp
lda #>text1
sta textp+1
sta.z textp+1
rts
}
text1: .text "camelot "

View File

@ -506,9 +506,9 @@ nexttext: {
b2:
// [18] *((const byte**) nexttext::textp#0) ← (const byte[]) text2#0 -- _deref_pptc1=pbuc2
lda #<text2
sta textp
sta.z textp
lda #>text2
sta textp+1
sta.z textp+1
jmp breturn
// nexttext::@return
breturn:
@ -518,9 +518,9 @@ nexttext: {
b1:
// [20] *((const byte**) nexttext::textp#0) ← (const byte[]) text1#0 -- _deref_pptc1=pbuc2
lda #<text1
sta textp
sta.z textp
lda #>text1
sta textp+1
sta.z textp+1
jmp breturn
}
// File Data
@ -557,11 +557,11 @@ Uplift Scope [main] 289: zp ZP_WORD:2 [ main::text#2 main::text#0 main::text#3 m
Uplift Scope [] 8.5: zp ZP_BYTE:4 [ textid#11 textid#13 ]
Uplift Scope [nexttext] 2: zp ZP_BYTE:8 [ nexttext::$0 ]
Uplifting [main] best 6622 combination zp ZP_WORD:2 [ main::text#2 main::text#0 main::text#3 main::text#1 ] zp ZP_WORD:5 [ main::screen#4 main::screen#2 main::screen#1 ] reg byte x [ main::i#5 main::i#1 ]
Uplifting [] best 6622 combination zp ZP_BYTE:4 [ textid#11 textid#13 ]
Uplifting [nexttext] best 6616 combination reg byte a [ nexttext::$0 ]
Uplifting [main] best 6618 combination zp ZP_WORD:2 [ main::text#2 main::text#0 main::text#3 main::text#1 ] zp ZP_WORD:5 [ main::screen#4 main::screen#2 main::screen#1 ] reg byte x [ main::i#5 main::i#1 ]
Uplifting [] best 6618 combination zp ZP_BYTE:4 [ textid#11 textid#13 ]
Uplifting [nexttext] best 6612 combination reg byte a [ nexttext::$0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ textid#11 textid#13 ]
Uplifting [] best 6616 combination zp ZP_BYTE:4 [ textid#11 textid#13 ]
Uplifting [] best 6612 combination zp ZP_BYTE:4 [ textid#11 textid#13 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -682,9 +682,9 @@ nexttext: {
b2:
// [18] *((const byte**) nexttext::textp#0) ← (const byte[]) text2#0 -- _deref_pptc1=pbuc2
lda #<text2
sta textp
sta.z textp
lda #>text2
sta textp+1
sta.z textp+1
jmp breturn
// nexttext::@return
breturn:
@ -694,9 +694,9 @@ nexttext: {
b1:
// [20] *((const byte**) nexttext::textp#0) ← (const byte[]) text1#0 -- _deref_pptc1=pbuc2
lda #<text1
sta textp
sta.z textp
lda #>text1
sta textp+1
sta.z textp+1
jmp breturn
}
// File Data
@ -791,7 +791,7 @@ reg byte a [ nexttext::$0 ]
FINAL ASSEMBLER
Score: 5709
Score: 5705
// File Comments
// Tests pointer to pointer in a more complex setup
@ -898,9 +898,9 @@ nexttext: {
// *textp = text2
// [18] *((const byte**) nexttext::textp#0) ← (const byte[]) text2#0 -- _deref_pptc1=pbuc2
lda #<text2
sta textp
sta.z textp
lda #>text2
sta textp+1
sta.z textp+1
// nexttext::@return
// }
// [19] return
@ -910,9 +910,9 @@ nexttext: {
// *textp = text1
// [20] *((const byte**) nexttext::textp#0) ← (const byte[]) text1#0 -- _deref_pptc1=pbuc2
lda #<text1
sta textp
sta.z textp
lda #>text1
sta textp+1
sta.z textp+1
rts
}
// File Data

View File

@ -35,8 +35,8 @@ main: {
setscreen: {
.label val = 2
lda.z val
sta screen
sta.z screen
lda.z val+1
sta screen+1
sta.z screen+1
rts
}

View File

@ -275,9 +275,9 @@ setscreen: {
.label val = 2
// [11] *(&(byte*) screen#0) ← (byte*) setscreen::val#2 -- _deref_pptc1=pbuz1
lda.z val
sta screen
sta.z screen
lda.z val+1
sta screen+1
sta.z screen+1
jmp breturn
// setscreen::@return
breturn:
@ -299,9 +299,9 @@ Uplift Scope [setscreen] 2: zp ZP_WORD:2 [ setscreen::val#2 ]
Uplift Scope [] 0.67: zp ZP_WORD:4 [ screen#0 ]
Uplift Scope [main]
Uplifting [setscreen] best 112 combination zp ZP_WORD:2 [ setscreen::val#2 ]
Uplifting [] best 112 combination zp ZP_WORD:4 [ screen#0 ]
Uplifting [main] best 112 combination
Uplifting [setscreen] best 110 combination zp ZP_WORD:2 [ setscreen::val#2 ]
Uplifting [] best 110 combination zp ZP_WORD:4 [ screen#0 ]
Uplifting [main] best 110 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -381,9 +381,9 @@ setscreen: {
.label val = 2
// [11] *(&(byte*) screen#0) ← (byte*) setscreen::val#2 -- _deref_pptc1=pbuz1
lda.z val
sta screen
sta.z screen
lda.z val+1
sta screen+1
sta.z screen+1
jmp breturn
// setscreen::@return
breturn:
@ -441,7 +441,7 @@ zp ZP_WORD:4 [ screen#0 ]
FINAL ASSEMBLER
Score: 100
Score: 98
// File Comments
// Tests pointer to pointer in a more complex setup
@ -513,9 +513,9 @@ setscreen: {
// *screen = val
// [11] *(&(byte*) screen#0) ← (byte*) setscreen::val#2 -- _deref_pptc1=pbuz1
lda.z val
sta screen
sta.z screen
lda.z val+1
sta screen+1
sta.z screen+1
// setscreen::@return
// }
// [12] return

View File

@ -12,7 +12,7 @@ main: {
sta.z w
lda #>$4d2
sta.z w+1
lda bp
lda.z bp
sta SCREEN
rts
}

View File

@ -151,7 +151,7 @@ main: {
lda #>$4d2
sta.z w+1
// [5] *((const byte*) main::SCREEN#0) ← *((const byte*) main::bp#0) -- _deref_pbuc1=_deref_pbuc2
lda bp
lda.z bp
sta SCREEN
jmp breturn
// main::@return
@ -170,8 +170,8 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp ZP_WORD:2 [ main::w#0 ]
Uplift Scope []
Uplifting [main] best 39 combination zp ZP_WORD:2 [ main::w#0 ]
Uplifting [] best 39 combination
Uplifting [main] best 38 combination zp ZP_WORD:2 [ main::w#0 ]
Uplifting [] best 38 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -208,7 +208,7 @@ main: {
lda #>$4d2
sta.z w+1
// [5] *((const byte*) main::SCREEN#0) ← *((const byte*) main::bp#0) -- _deref_pbuc1=_deref_pbuc2
lda bp
lda.z bp
sta SCREEN
jmp breturn
// main::@return
@ -257,7 +257,7 @@ zp ZP_WORD:2 [ main::w#0 ]
FINAL ASSEMBLER
Score: 24
Score: 23
// File Comments
// Test simple void pointer (conversion without casting)
@ -287,7 +287,7 @@ main: {
sta.z w+1
// *SCREEN = *bp
// [5] *((const byte*) main::SCREEN#0) ← *((const byte*) main::bp#0) -- _deref_pbuc1=_deref_pbuc2
lda bp
lda.z bp
sta SCREEN
// main::@return
// }

View File

@ -12,9 +12,9 @@ main: {
lda #'a'
ldy #0
sta (pscreen),y
inc pscreen
inc.z pscreen
bne !+
inc pscreen+1
inc.z pscreen+1
!:
lda #'b'
ldy #0

View File

@ -127,9 +127,9 @@ main: {
ldy #0
sta (pscreen),y
// [6] *((const byte**) main::pscreen#0) ← ++ *((const byte**) main::pscreen#0) -- _deref_pptc1=_inc__deref_pptc1
inc pscreen
inc.z pscreen
bne !+
inc pscreen+1
inc.z pscreen+1
!:
// [7] *(*((const byte**) main::pscreen#0)) ← (byte) 'b' -- _deref_(_deref_pptc1)=vbuc2
lda #'b'
@ -153,8 +153,8 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp ZP_WORD:2 [ main::screen#0 ]
Uplift Scope []
Uplifting [main] best 65 combination zp ZP_WORD:2 [ main::screen#0 ]
Uplifting [] best 65 combination
Uplifting [main] best 63 combination zp ZP_WORD:2 [ main::screen#0 ]
Uplifting [] best 63 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -192,9 +192,9 @@ main: {
ldy #0
sta (pscreen),y
// [6] *((const byte**) main::pscreen#0) ← ++ *((const byte**) main::pscreen#0) -- _deref_pptc1=_inc__deref_pptc1
inc pscreen
inc.z pscreen
bne !+
inc pscreen+1
inc.z pscreen+1
!:
// [7] *(*((const byte**) main::pscreen#0)) ← (byte) 'b' -- _deref_(_deref_pptc1)=vbuc2
lda #'b'
@ -241,7 +241,7 @@ zp ZP_WORD:2 [ main::screen#0 ]
FINAL ASSEMBLER
Score: 50
Score: 48
// File Comments
// Tests optimization of constant pointers to pointers
@ -273,9 +273,9 @@ main: {
sta (pscreen),y
// (*pscreen)++;
// [6] *((const byte**) main::pscreen#0) ← ++ *((const byte**) main::pscreen#0) -- _deref_pptc1=_inc__deref_pptc1
inc pscreen
inc.z pscreen
bne !+
inc pscreen+1
inc.z pscreen+1
!:
// **pscreen = 'b'
// [7] *(*((const byte**) main::pscreen#0)) ← (byte) 'b' -- _deref_(_deref_pptc1)=vbuc2

View File

@ -19,9 +19,9 @@ main: {
sub: {
ldy #0
sta (main.pscreen),y
inc main.pscreen
inc.z main.pscreen
bne !+
inc main.pscreen+1
inc.z main.pscreen+1
!:
rts
}

View File

@ -226,9 +226,9 @@ sub: {
ldy #0
sta (main.pscreen),y
// [11] *((const byte**) main::pscreen#0) ← ++ *((const byte**) main::pscreen#0) -- _deref_pptc1=_inc__deref_pptc1
inc main.pscreen
inc.z main.pscreen
bne !+
inc main.pscreen+1
inc.z main.pscreen+1
!:
jmp breturn
// sub::@return
@ -249,9 +249,9 @@ Uplift Scope [main] 20: zp ZP_WORD:3 [ main::screen#0 ]
Uplift Scope [sub] 2: zp ZP_BYTE:2 [ sub::ch#2 ]
Uplift Scope []
Uplifting [main] best 90 combination zp ZP_WORD:3 [ main::screen#0 ]
Uplifting [sub] best 81 combination reg byte a [ sub::ch#2 ]
Uplifting [] best 81 combination
Uplifting [main] best 88 combination zp ZP_WORD:3 [ main::screen#0 ]
Uplifting [sub] best 79 combination reg byte a [ sub::ch#2 ]
Uplifting [] best 79 combination
Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ main::screen#0 ]
ASSEMBLER BEFORE OPTIMIZATION
@ -315,9 +315,9 @@ sub: {
ldy #0
sta (main.pscreen),y
// [11] *((const byte**) main::pscreen#0) ← ++ *((const byte**) main::pscreen#0) -- _deref_pptc1=_inc__deref_pptc1
inc main.pscreen
inc.z main.pscreen
bne !+
inc main.pscreen+1
inc.z main.pscreen+1
!:
jmp breturn
// sub::@return
@ -374,7 +374,7 @@ zp ZP_WORD:2 [ main::screen#0 ]
FINAL ASSEMBLER
Score: 60
Score: 58
// File Comments
// Tests optimization of constant pointers to pointers
@ -427,9 +427,9 @@ sub: {
sta (main.pscreen),y
// *(*dst)++ = ch;
// [11] *((const byte**) main::pscreen#0) ← ++ *((const byte**) main::pscreen#0) -- _deref_pptc1=_inc__deref_pptc1
inc main.pscreen
inc.z main.pscreen
bne !+
inc main.pscreen+1
inc.z main.pscreen+1
!:
// sub::@return
// }

View File

@ -19,9 +19,9 @@ main: {
sub: {
ldy #0
sta (main.screen),y
inc main.screen
inc.z main.screen
bne !+
inc main.screen+1
inc.z main.screen+1
!:
rts
}

View File

@ -226,9 +226,9 @@ sub: {
ldy #0
sta (main.screen),y
// [11] *(&(byte*) main::screen#0) ← ++ *(&(byte*) main::screen#0) -- _deref_pptc1=_inc__deref_pptc1
inc main.screen
inc.z main.screen
bne !+
inc main.screen+1
inc.z main.screen+1
!:
jmp breturn
// sub::@return
@ -249,9 +249,9 @@ Uplift Scope [sub] 2: zp ZP_BYTE:2 [ sub::ch#2 ]
Uplift Scope [main] 0.29: zp ZP_WORD:3 [ main::screen#0 ]
Uplift Scope []
Uplifting [sub] best 81 combination reg byte a [ sub::ch#2 ]
Uplifting [main] best 81 combination zp ZP_WORD:3 [ main::screen#0 ]
Uplifting [] best 81 combination
Uplifting [sub] best 79 combination reg byte a [ sub::ch#2 ]
Uplifting [main] best 79 combination zp ZP_WORD:3 [ main::screen#0 ]
Uplifting [] best 79 combination
Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ main::screen#0 ]
ASSEMBLER BEFORE OPTIMIZATION
@ -315,9 +315,9 @@ sub: {
ldy #0
sta (main.screen),y
// [11] *(&(byte*) main::screen#0) ← ++ *(&(byte*) main::screen#0) -- _deref_pptc1=_inc__deref_pptc1
inc main.screen
inc.z main.screen
bne !+
inc main.screen+1
inc.z main.screen+1
!:
jmp breturn
// sub::@return
@ -372,7 +372,7 @@ zp ZP_WORD:2 [ main::screen#0 ]
FINAL ASSEMBLER
Score: 60
Score: 58
// File Comments
// Tests (non-)optimization of constant pointers to pointers
@ -425,9 +425,9 @@ sub: {
sta (main.screen),y
// *(*dst)++ = ch;
// [11] *(&(byte*) main::screen#0) ← ++ *(&(byte*) main::screen#0) -- _deref_pptc1=_inc__deref_pptc1
inc main.screen
inc.z main.screen
bne !+
inc main.screen+1
inc.z main.screen+1
!:
// sub::@return
// }

View File

@ -10,9 +10,9 @@ main: {
sta.z p
lda #>2*$100+3
sta.z p+1
lda q
lda.z q
sta SCREEN
lda q+1
lda.z q+1
sta SCREEN+1
rts
}

View File

@ -179,13 +179,13 @@ main: {
lda #>2*$100+3
sta.z p+1
// [5] (byte~) main::$1 ← < *((const word*) main::q#0) -- vbuz1=_lo__deref_pwuc1
lda q
lda.z q
sta.z _1
// [6] *((const byte*) main::SCREEN#0) ← (byte~) main::$1 -- _deref_pbuc1=vbuz1
lda.z _1
sta SCREEN
// [7] (byte~) main::$2 ← > *((const word*) main::q#0) -- vbuz1=_hi__deref_pwuc1
lda q+1
lda.z q+1
sta.z _2
// [8] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte~) main::$2 -- _deref_pbuc1=vbuz1
lda.z _2
@ -208,8 +208,8 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp ZP_WORD:2 [ main::p#0 ] 4: zp ZP_BYTE:4 [ main::$1 ] 4: zp ZP_BYTE:5 [ main::$2 ]
Uplift Scope []
Uplifting [main] best 47 combination zp ZP_WORD:2 [ main::p#0 ] reg byte a [ main::$1 ] reg byte a [ main::$2 ]
Uplifting [] best 47 combination
Uplifting [main] best 45 combination zp ZP_WORD:2 [ main::p#0 ] reg byte a [ main::$1 ] reg byte a [ main::$2 ]
Uplifting [] best 45 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -244,11 +244,11 @@ main: {
lda #>2*$100+3
sta.z p+1
// [5] (byte~) main::$1 ← < *((const word*) main::q#0) -- vbuaa=_lo__deref_pwuc1
lda q
lda.z q
// [6] *((const byte*) main::SCREEN#0) ← (byte~) main::$1 -- _deref_pbuc1=vbuaa
sta SCREEN
// [7] (byte~) main::$2 ← > *((const word*) main::q#0) -- vbuaa=_hi__deref_pwuc1
lda q+1
lda.z q+1
// [8] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte~) main::$2 -- _deref_pbuc1=vbuaa
sta SCREEN+1
jmp breturn
@ -298,7 +298,7 @@ reg byte a [ main::$2 ]
FINAL ASSEMBLER
Score: 32
Score: 30
// File Comments
// Reference file for Minimal struct - using address-of
@ -326,13 +326,13 @@ main: {
sta.z p+1
// <*q
// [5] (byte~) main::$1 ← < *((const word*) main::q#0) -- vbuaa=_lo__deref_pwuc1
lda q
lda.z q
// SCREEN[0] = <*q
// [6] *((const byte*) main::SCREEN#0) ← (byte~) main::$1 -- _deref_pbuc1=vbuaa
sta SCREEN
// >*q
// [7] (byte~) main::$2 ← > *((const word*) main::q#0) -- vbuaa=_hi__deref_pwuc1
lda q+1
lda.z q+1
// SCREEN[1] = >*q
// [8] *((const byte*) main::SCREEN#0+(byte) 1) ← (byte~) main::$2 -- _deref_pbuc1=vbuaa
sta SCREEN+1

View File

@ -12,7 +12,7 @@ main: {
sta.z p_x
lda #3
sta.z p_y
lda q
lda.z q
sta SCREEN
lda q+OFFSET_STRUCT_POINT_Y
sta SCREEN+1

View File

@ -196,7 +196,7 @@ main: {
lda #3
sta.z p_y
// [6] *((const byte*) main::SCREEN#0) ← *((byte*)(const struct Point*) main::q#0) -- _deref_pbuc1=_deref_pbuc2
lda q
lda.z q
sta SCREEN
// [7] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2
lda q+OFFSET_STRUCT_POINT_Y
@ -222,13 +222,13 @@ Uplift Scope [main] 20: zp ZP_BYTE:2 [ main::p_x#0 ] 20: zp ZP_BYTE:3 [ main::p_
Uplift Scope [Point]
Uplift Scope []
Uplifting [main] best 47 combination zp ZP_BYTE:2 [ main::p_x#0 ] zp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [Point] best 47 combination
Uplifting [] best 47 combination
Uplifting [main] best 46 combination zp ZP_BYTE:2 [ main::p_x#0 ] zp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [Point] best 46 combination
Uplifting [] best 46 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::p_x#0 ]
Uplifting [main] best 47 combination zp ZP_BYTE:2 [ main::p_x#0 ]
Uplifting [main] best 46 combination zp ZP_BYTE:2 [ main::p_x#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [main] best 47 combination zp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [main] best 46 combination zp ZP_BYTE:3 [ main::p_y#0 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -266,7 +266,7 @@ main: {
lda #3
sta.z p_y
// [6] *((const byte*) main::SCREEN#0) ← *((byte*)(const struct Point*) main::q#0) -- _deref_pbuc1=_deref_pbuc2
lda q
lda.z q
sta SCREEN
// [7] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2
lda q+OFFSET_STRUCT_POINT_Y
@ -321,7 +321,7 @@ zp ZP_BYTE:3 [ main::p_y#0 ]
FINAL ASSEMBLER
Score: 32
Score: 31
// File Comments
// Minimal struct - using address-of
@ -352,7 +352,7 @@ main: {
sta.z p_y
// SCREEN[0] = q->x
// [6] *((const byte*) main::SCREEN#0) ← *((byte*)(const struct Point*) main::q#0) -- _deref_pbuc1=_deref_pbuc2
lda q
lda.z q
sta SCREEN
// SCREEN[1] = q->y
// [7] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2

View File

@ -13,7 +13,7 @@ main: {
lda #3
sta.z p_y
jsr set
lda q
lda.z q
sta SCREEN
lda q+OFFSET_STRUCT_POINT_Y
sta SCREEN+1
@ -21,7 +21,7 @@ main: {
}
set: {
lda #4
sta main.q
sta.z main.q
lda #5
sta main.q+OFFSET_STRUCT_POINT_Y
rts

View File

@ -265,7 +265,7 @@ main: {
// main::@1
b1:
// [7] *((const byte*) main::SCREEN#0) ← *((byte*)(const struct Point*) main::q#0) -- _deref_pbuc1=_deref_pbuc2
lda q
lda.z q
sta SCREEN
// [8] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2
lda q+OFFSET_STRUCT_POINT_Y
@ -280,7 +280,7 @@ main: {
set: {
// [10] *((byte*)(const struct Point*) main::q#0) ← (byte) 4 -- _deref_pbuc1=vbuc2
lda #4
sta main.q
sta.z main.q
// [11] *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 5 -- _deref_pbuc1=vbuc2
lda #5
sta main.q+OFFSET_STRUCT_POINT_Y
@ -308,14 +308,14 @@ Uplift Scope [Point]
Uplift Scope [set]
Uplift Scope []
Uplifting [main] best 77 combination zp ZP_BYTE:2 [ main::p_x#0 ] zp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [Point] best 77 combination
Uplifting [set] best 77 combination
Uplifting [] best 77 combination
Uplifting [main] best 75 combination zp ZP_BYTE:2 [ main::p_x#0 ] zp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [Point] best 75 combination
Uplifting [set] best 75 combination
Uplifting [] best 75 combination
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::p_x#0 ]
Uplifting [main] best 77 combination zp ZP_BYTE:2 [ main::p_x#0 ]
Uplifting [main] best 75 combination zp ZP_BYTE:2 [ main::p_x#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [main] best 77 combination zp ZP_BYTE:3 [ main::p_y#0 ]
Uplifting [main] best 75 combination zp ZP_BYTE:3 [ main::p_y#0 ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
@ -358,7 +358,7 @@ main: {
// main::@1
b1:
// [7] *((const byte*) main::SCREEN#0) ← *((byte*)(const struct Point*) main::q#0) -- _deref_pbuc1=_deref_pbuc2
lda q
lda.z q
sta SCREEN
// [8] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2
lda q+OFFSET_STRUCT_POINT_Y
@ -373,7 +373,7 @@ main: {
set: {
// [10] *((byte*)(const struct Point*) main::q#0) ← (byte) 4 -- _deref_pbuc1=vbuc2
lda #4
sta main.q
sta.z main.q
// [11] *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 5 -- _deref_pbuc1=vbuc2
lda #5
sta main.q+OFFSET_STRUCT_POINT_Y
@ -435,7 +435,7 @@ zp ZP_BYTE:3 [ main::p_y#0 ]
FINAL ASSEMBLER
Score: 56
Score: 54
// File Comments
// Minimal struct - using address-of and passing it to a function
@ -470,7 +470,7 @@ main: {
// main::@1
// SCREEN[0] = q->x
// [7] *((const byte*) main::SCREEN#0) ← *((byte*)(const struct Point*) main::q#0) -- _deref_pbuc1=_deref_pbuc2
lda q
lda.z q
sta SCREEN
// SCREEN[1] = q->y
// [8] *((const byte*) main::SCREEN#0+(byte) 1) ← *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2
@ -486,7 +486,7 @@ set: {
// ptr->x = 4
// [10] *((byte*)(const struct Point*) main::q#0) ← (byte) 4 -- _deref_pbuc1=vbuc2
lda #4
sta main.q
sta.z main.q
// ptr->y = 5
// [11] *((byte*)(const struct Point*) main::q#0+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte) 5 -- _deref_pbuc1=vbuc2
lda #5

View File

@ -18,7 +18,7 @@ main: {
lda #0
sta.z idx
jsr print
ldy ptr
ldy.z ptr
ldx ptr+OFFSET_STRUCT_POINT_Y
jsr print
rts

View File

@ -354,7 +354,7 @@ main: {
// main::@1
b1:
// [9] (byte) print::p_x#1 ← *((byte*)(const struct Point*) main::ptr#0) -- vbuz1=_deref_pbuc1
lda ptr
lda.z ptr
sta.z print.p_x
// [10] (byte) print::p_y#1 ← *((byte*)(const struct Point*) main::ptr#0+(const byte) OFFSET_STRUCT_POINT_Y) -- vbuz1=_deref_pbuc1
lda ptr+OFFSET_STRUCT_POINT_Y
@ -417,16 +417,16 @@ Uplift Scope [] 3.8: zp ZP_BYTE:3 [ idx#11 idx#12 ] 3: zp ZP_BYTE:7 [ idx#4 ]
Uplift Scope [main] 2: zp ZP_BYTE:5 [ main::point_x#0 ] 2: zp ZP_BYTE:6 [ main::point_y#0 ]
Uplift Scope [Point]
Uplifting [print] best 110 combination reg byte y [ print::p_x#2 print::p_x#0 print::p_x#1 ] reg byte x [ print::p_y#2 print::p_y#0 print::p_y#1 ]
Uplifting [] best 101 combination zp ZP_BYTE:3 [ idx#11 idx#12 ] reg byte y [ idx#4 ]
Uplifting [main] best 101 combination zp ZP_BYTE:5 [ main::point_x#0 ] zp ZP_BYTE:6 [ main::point_y#0 ]
Uplifting [Point] best 101 combination
Uplifting [print] best 109 combination reg byte y [ print::p_x#2 print::p_x#0 print::p_x#1 ] reg byte x [ print::p_y#2 print::p_y#0 print::p_y#1 ]
Uplifting [] best 100 combination zp ZP_BYTE:3 [ idx#11 idx#12 ] reg byte y [ idx#4 ]
Uplifting [main] best 100 combination zp ZP_BYTE:5 [ main::point_x#0 ] zp ZP_BYTE:6 [ main::point_y#0 ]
Uplifting [Point] best 100 combination
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ idx#11 idx#12 ]
Uplifting [] best 101 combination zp ZP_BYTE:3 [ idx#11 idx#12 ]
Uplifting [] best 100 combination zp ZP_BYTE:3 [ idx#11 idx#12 ]
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ main::point_x#0 ]
Uplifting [main] best 101 combination zp ZP_BYTE:5 [ main::point_x#0 ]
Uplifting [main] best 100 combination zp ZP_BYTE:5 [ main::point_x#0 ]
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ main::point_y#0 ]
Uplifting [main] best 101 combination zp ZP_BYTE:6 [ main::point_y#0 ]
Uplifting [main] best 100 combination zp ZP_BYTE:6 [ main::point_y#0 ]
Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ idx#11 idx#12 ]
Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:3 [ main::point_x#0 ]
Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:4 [ main::point_y#0 ]
@ -484,7 +484,7 @@ main: {
// main::@1
b1:
// [9] (byte) print::p_x#1 ← *((byte*)(const struct Point*) main::ptr#0) -- vbuyy=_deref_pbuc1
ldy ptr
ldy.z ptr
// [10] (byte) print::p_y#1 ← *((byte*)(const struct Point*) main::ptr#0+(const byte) OFFSET_STRUCT_POINT_Y) -- vbuxx=_deref_pbuc1
ldx ptr+OFFSET_STRUCT_POINT_Y
// [11] call print
@ -595,7 +595,7 @@ reg byte y [ idx#4 ]
FINAL ASSEMBLER
Score: 76
Score: 75
// File Comments
// Demonstrates problem with passing struct pointer deref as parameter to call
@ -641,7 +641,7 @@ main: {
// main::@1
// print(*ptr)
// [9] (byte) print::p_x#1 ← *((byte*)(const struct Point*) main::ptr#0) -- vbuyy=_deref_pbuc1
ldy ptr
ldy.z ptr
// [10] (byte) print::p_y#1 ← *((byte*)(const struct Point*) main::ptr#0+(const byte) OFFSET_STRUCT_POINT_Y) -- vbuxx=_deref_pbuc1
ldx ptr+OFFSET_STRUCT_POINT_Y
// [11] call print

View File

@ -0,0 +1,19 @@
// Illustrates a problem where absolute addressing is used for zeropage-access
// This is caused by the compiler believing the pointer is into memory" (not knowing the upper part is 0x00 )
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
.label c = t
.label t = 2
lda #<0
sta.z t
sta.z t+1
lda #<0>>$10
sta.z t+2
lda #>0>>$10
sta.z t+3
lda.z c
sta $400
rts
}

View File

@ -0,0 +1,16 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] (dword) main::t#0 ← (dword) 0
[5] *((byte*) 1024) ← *((const byte*) main::c#0)
to:main::@return
main::@return: scope:[main] from main
[6] return
to:@return

View File

@ -0,0 +1,290 @@
Setting inferred volatile on symbol affected by address-of (dword*~) main::$0 ← & (dword) main::t
CONTROL FLOW GRAPH SSA
@begin: scope:[] from
to:@1
main: scope:[main] from @1
(dword) main::t#0 ← (dword) 0
(dword*~) main::$0 ← & (dword) main::t#0
(byte*~) main::$1 ← ((byte*)) (dword*~) main::$0
(byte*) main::c#0 ← (byte*~) main::$1
(byte*~) main::$2 ← ((byte*)) (number) $400
*((byte*~) main::$2) ← *((byte*) main::c#0 + (number) 0)
to:main::@return
main::@return: scope:[main] from main
return
to:@return
@1: scope:[] from @begin
call main
to:@2
@2: scope:[] from @1
to:@end
@end: scope:[] from @2
SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(void()) main()
(dword*~) main::$0
(byte*~) main::$1
(byte*~) main::$2
(label) main::@return
(byte*) main::c
(byte*) main::c#0
(dword) main::t
(dword) main::t#0
Adding number conversion cast (unumber) 0 in *((byte*~) main::$2) ← *((byte*) main::c#0 + (number) 0)
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*~) main::$1 ← (byte*)(dword*~) main::$0
Inlining cast (byte*~) main::$2 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) main::c#0 = (byte*~) main::$1
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [1] (dword*~) main::$0 ← & (dword) main::t#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const dword*) main::$0 = &main::t#0
Constant (const byte*) main::$2 = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)main::$0 in [2] (byte*) main::c#0 ← (byte*)(const dword*) main::$0
Successful SSA optimization Pass2ConstantValues
Simplifying expression containing zero main::c#0 in [5] *((const byte*) main::$2) ← *((byte*) main::c#0 + (byte) 0)
Successful SSA optimization PassNSimplifyExpressionWithZero
Constant (const byte*) main::c#0 = (byte*)main::$0
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$2 = (byte*) 1024
Constant inlined main::$0 = &(dword) main::t#0
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:2
Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @2
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
FINAL CONTROL FLOW GRAPH
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] (dword) main::t#0 ← (dword) 0
[5] *((byte*) 1024) ← *((const byte*) main::c#0)
to:main::@return
main::@return: scope:[main] from main
[6] return
to:@return
VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::c
(dword) main::t
(dword) main::t#0 20.0
Initial phi equivalence classes
Complete equivalence classes
[ main::t#0 ]
Allocated zp ZP_DWORD:2 [ main::t#0 ]
INITIAL ASM
Target platform is c64basic
// File Comments
// Illustrates a problem where absolute addressing is used for zeropage-access
// This is caused by the compiler believing the pointer is into memory" (not knowing the upper part is 0x00 )
// Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
// Global Constants & labels
// @begin
bbegin:
// [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
// @1
b1:
// [2] call main
jsr main
// [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
// @end
bend:
// main
main: {
.label c = t
.label t = 2
// [4] (dword) main::t#0 ← (dword) 0 -- vduz1=vduc1
lda #<0
sta.z t
lda #>0
sta.z t+1
lda #<0>>$10
sta.z t+2
lda #>0>>$10
sta.z t+3
// [5] *((byte*) 1024) ← *((const byte*) main::c#0) -- _deref_pbuc1=_deref_pbuc2
lda.z c
sta $400
jmp breturn
// main::@return
breturn:
// [6] return
rts
}
// File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] (dword) main::t#0 ← (dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [5] *((byte*) 1024) ← *((const byte*) main::c#0) [ ] ( main:2 [ ] ) always clobbers reg byte a
Potential registers zp ZP_DWORD:2 [ main::t#0 ] : zp ZP_DWORD:2 ,
REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp ZP_DWORD:2 [ main::t#0 ]
Uplift Scope []
Uplifting [main] best 48 combination zp ZP_DWORD:2 [ main::t#0 ]
Uplifting [] best 48 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
// Illustrates a problem where absolute addressing is used for zeropage-access
// This is caused by the compiler believing the pointer is into memory" (not knowing the upper part is 0x00 )
// Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
// Global Constants & labels
// @begin
bbegin:
// [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
jmp b1
// @1
b1:
// [2] call main
jsr main
// [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
jmp bend
// @end
bend:
// main
main: {
.label c = t
.label t = 2
// [4] (dword) main::t#0 ← (dword) 0 -- vduz1=vduc1
lda #<0
sta.z t
lda #>0
sta.z t+1
lda #<0>>$10
sta.z t+2
lda #>0>>$10
sta.z t+3
// [5] *((byte*) 1024) ← *((const byte*) main::c#0) -- _deref_pbuc1=_deref_pbuc2
lda.z c
sta $400
jmp breturn
// main::@return
breturn:
// [6] return
rts
}
// File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(void()) main()
(label) main::@return
(byte*) main::c
(const byte*) main::c#0 c = (byte*)&(dword) main::t#0
(dword) main::t
(dword) main::t#0 t zp ZP_DWORD:2 20.0
zp ZP_DWORD:2 [ main::t#0 ]
FINAL ASSEMBLER
Score: 31
// File Comments
// Illustrates a problem where absolute addressing is used for zeropage-access
// This is caused by the compiler believing the pointer is into memory" (not knowing the upper part is 0x00 )
// Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
// Global Constants & labels
// @begin
// [1] phi from @begin to @1 [phi:@begin->@1]
// @1
// [2] call main
// [3] phi from @1 to @end [phi:@1->@end]
// @end
// main
main: {
.label c = t
.label t = 2
// t
// [4] (dword) main::t#0 ← (dword) 0 -- vduz1=vduc1
lda #<0
sta.z t
sta.z t+1
lda #<0>>$10
sta.z t+2
lda #>0>>$10
sta.z t+3
// *(unsigned char *)0x0400 = c[0]
// [5] *((byte*) 1024) ← *((const byte*) main::c#0) -- _deref_pbuc1=_deref_pbuc2
lda.z c
sta $400
// main::@return
// }
// [6] return
rts
}
// File Data

View File

@ -0,0 +1,11 @@
(label) @1
(label) @begin
(label) @end
(void()) main()
(label) main::@return
(byte*) main::c
(const byte*) main::c#0 c = (byte*)&(dword) main::t#0
(dword) main::t
(dword) main::t#0 t zp ZP_DWORD:2 20.0
zp ZP_DWORD:2 [ main::t#0 ]